aboutsummaryrefslogtreecommitdiff
path: root/pacc/glsl/color_trans.frag
blob: 1a2e28d9da5ca8ea9148aa8e4d3448a2ffb08c22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)) {
    discard;
  }
  FRAGCOLOR = TEXTURE2D(palette, vec2(color, 0.0));
}