Files
OpenRA/glsl/shp.frag
2015-10-17 22:34:46 +01:00

13 lines
272 B
GLSL

uniform sampler2D DiffuseTexture, Palette;
varying vec4 TexCoord;
varying vec4 ChannelMask;
varying vec4 DepthMask;
void main()
{
vec4 x = texture2D(DiffuseTexture, TexCoord.st);
vec2 p = vec2(dot(x, ChannelMask), TexCoord.p);
gl_FragColor = texture2D(Palette, p);
}