diff options
Diffstat (limited to 'src/shaders')
| -rw-r--r-- | src/shaders/land.frag | 16 | ||||
| -rw-r--r-- | src/shaders/stars.lua | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/shaders/land.frag b/src/shaders/land.frag index 1eb8d93..54ca24d 100644 --- a/src/shaders/land.frag +++ b/src/shaders/land.frag @@ -19,6 +19,7 @@ uniform float time; //used for noise uniform sampler2D atlas; uniform float nlamps; uniform float water; +//uniform sampler2D bubbles; varying vec2 worldxy; varying vec2 norm; @@ -78,8 +79,21 @@ void main() { float rng = random(vec2(coord.x, coord.y) + vec2(color, time)); color -= (pow(rng / 1.3, 10. * color)) * streamer; // add noise to water - if(water > 1.) + if(water > 1.){ color += (noise(coord.xy + vec2(time, time)) - 0.0) * 0.1; + } + if(water > 2.){ + color -= noise(coord.xy + vec2(time,time)) * 0.3; + } + /* + for(int i = 1; i < 1024; i++){ + vec4 bubble = texture2D(bubbles,vec2(i,0)); + /* + if(distance(bubble.xy, coord.xy) < 10.){ + color = 1.; + } + */ + //} /* */ if(color > 1.) gl_FragColor = highlight * normal.a; diff --git a/src/shaders/stars.lua b/src/shaders/stars.lua index 3e4138e..95938b4 100644 --- a/src/shaders/stars.lua +++ b/src/shaders/stars.lua @@ -68,7 +68,7 @@ node:action(function(self) self("bind").world_y = world.world_y local lamps = world.level.lamps_on_screen() for i,v in pairs(lamps) do - print("Setting lamp", i, "to", v) + --print("Setting lamp", i, "to", v) self("bind")["lamp" .. tostring(i)] = v end end) |
