summaryrefslogtreecommitdiff
path: root/shaders/water_fragment.glsl
blob: 7e877e94c076e0de90d484e901928bc99a213b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#version 120

varying vec3 pos;
uniform vec3 player_pos;
uniform sampler2D tex;
uniform float t;

void main() {
	gl_FragColor = texture2D(tex, gl_TexCoord[0].st + vec2(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;
}

/* vim: set syn=glsl: */