mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 15:51:36 +00:00
928dd92276
I realized it's pretty silly using colormap + palette when I can just combine the two into one and have a 2D palette. This is in preparation for that.
16 lines
287 B
GLSL
16 lines
287 B
GLSL
//precision mediump float;
|
|
uniform sampler2D texture;
|
|
uniform sampler2D palette;
|
|
varying vec4 color;
|
|
varying vec2 st;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
float pix;
|
|
|
|
pix = texture2D (texture, st).r;
|
|
if (pix == 1.0)
|
|
discard;
|
|
gl_FragColor = texture2D (palette, vec2 (pix, 0.0)) * color;
|
|
}
|