quakeforge/libs/video/renderer/glsl/quakebsp.frag
Bill Currie c884ef5f80 Convert the colormap to a 2D palette.
This skips one level of indirection in the alias model and brush shaders.
Hopefully, this will improve performance on my eeepc.
2012-01-14 21:42:42 +09:00

16 lines
321 B
GLSL

uniform sampler2D colormap;
uniform sampler2D texture;
uniform sampler2D lightmap;
varying vec2 tst;
varying vec2 lst;
void
main (void)
{
float pix = texture2D (texture, tst).r;
float light = texture2D (lightmap, lst).r;
float col;
gl_FragColor = texture2D (colormap, vec2 (pix, light * 4.0));
}