diff options
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/water_fragment.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/water_fragment.glsl b/shaders/water_fragment.glsl index 857a500..150f071 100644 --- a/shaders/water_fragment.glsl +++ b/shaders/water_fragment.glsl @@ -3,9 +3,10 @@ varying vec3 pos; uniform vec3 player_pos; uniform sampler2D tex; +uniform float t; void main() { - gl_FragColor = texture2D(tex, gl_TexCoord[0].st) - vec4(.2, .2, 0, 0); + gl_FragColor = texture2D(tex, gl_TexCoord[0].st + vec2(t, t)) - vec4(.2, .2, 0, 0); gl_FragColor = mix(gl_FragColor, gl_Fog.color, pow(length(player_pos - pos)/100, 5)); gl_FragColor.a = 0.7; } |