summaryrefslogtreecommitdiff
path: root/src/shaders/land.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/shaders/land.frag')
-rw-r--r--src/shaders/land.frag16
1 files changed, 15 insertions, 1 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;