This file contains hidden or 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
// VERTEX SHADER | |
attribute vec2 a_position; | |
uniform vec2 u_resolution; | |
uniform vec3 u_palette[256]; | |
varying vec3 v_color; | |
void main() { | |
This file contains hidden or 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
// FRAGMENT SHADER | |
precision mediump float; | |
uniform vec2 u_position; | |
uniform vec3 u_palette[256]; | |
void main() { | |
int index = 5; | |
vec3 palColor = u_palette[index]; |
NewerOlder