Last active
August 29, 2015 14:13
-
-
Save emidoots/bb7712bf68027e7ea350 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 120 | |
varying vec2 tc0; | |
uniform sampler2D Texture0; | |
uniform vec4 palette[64]; | |
void main() { | |
vec4 t = texture2D(Texture0, tc0); | |
int i = int(t.b * 15.0) * 16 + int(t.a * 15.0); | |
i = i - ((i / 64) * 64); | |
gl_FragColor = palette[i]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment