Last active
January 2, 2016 01:09
-
-
Save McZonk/8228124 to your computer and use it in GitHub Desktop.
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 | |
uniform float u_selected; | |
attribute vec4 a_position; | |
attribute vec4 a_color; | |
varying lowp vec4 v_color; | |
void main() { | |
if (u_selected > 0.0) { | |
v_color = vec4(0.5, 1.0, 1.0, 1.0); | |
} else { | |
v_color = a_color; | |
} | |
gl_Position = vec4(a_position.xy, 0, 1.0); | |
} | |
// fragment shader | |
varying lowp vec4 v_color; | |
void main() { | |
gl_FragColor = v_color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment