aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge/texture.frag
blob: 3de427ba8dfebc7066b9c7c964e6067af8b3a946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
uniform sampler2D sampler2d;
uniform bool zBuffer;
uniform float zBufferLayer;
uniform bool modulateColor;

varying vec2 varCoord;
varying vec4 color;

void main(void)
{
	vec4 col = texture2D(sampler2d, varCoord);
	if (zBuffer && col.a < 0.0625*zBufferLayer-0.03)
	{
		discard;
	}
	if (modulateColor)
	{
		col = col * color;
	}
	gl_FragColor = col;
}