Skip to content

Instantly share code, notes, and snippets.

@daniel-j
Created January 25, 2012 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniel-j/1676735 to your computer and use it in GitHub Desktop.
Save daniel-j/1676735 to your computer and use it in GitHub Desktop.
// FRAGMENT SHADER
precision mediump float;
uniform vec2 u_position;
uniform vec3 u_palette[256];
void main() {
int index = 5;
vec3 palColor = u_palette[index];
gl_FragColor = vec4(palColor, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment