blob: d4fd7021f1ae677711d206b1026d32b59b1aab00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
uniform sampler2D palette;
uniform sampler2D tex;
FRAG_IN mediump vec2 texcoord;
uniform lowp float color;
FRAGCOLOR_DECL
void main(void) {
lowp float index = TEXTURE2D(tex, texcoord).x;
if (index > (0.5/255.0)) {
index = color;
} else {
index = 0.5 / 256.0;
}
FRAGCOLOR = TEXTURE2D(palette, vec2(index, 0.0));
}
|