blob: 21016cefaa706cfd3a3715908e87f86fbec43fb6 (
plain)
1
2
3
4
5
6
7
8
9
10
|
uniform sampler2D palette;
uniform sampler2D tex;
FRAG_IN mediump vec2 texcoord;
FRAGCOLOR_DECL
void main(void) {
lowp float index = TEXTURE2D(tex, texcoord).x;
lowp float color = (index * 255.0 + 0.5) / 256.0;
FRAGCOLOR = TEXTURE2D(palette, vec2(color, 0.0));
}
|