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

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

void main() {
	gl_FragColor = texture2D(tex, gl_TexCoord[0].st) - 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: */