#version 300 es
precision highp float;
in vec2 out_tex_coord;
uniform sampler2D tex;
uniform vec4 palette[256];
out vec4 color;
void main(){
	 int r = int(texture(tex, out_tex_coord).r * 255.f);
	 if(r > 0)
	  color = palette[r];
	 else discard;
}
