Last active
January 2, 2016 01:09
-
-
Save McZonk/8228086 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 | |
attribute vec4 a_color; | |
attribute vec4 a_position; | |
attribute vec2 a_tex_coord; | |
varying highp vec2 v_tex_coord; | |
varying lowp vec4 v_color_mix; | |
void main() { | |
v_color_mix = a_color; | |
v_tex_coord = a_tex_coord; | |
gl_Position = a_position; | |
} | |
// fragment shader | |
uniform lowp sampler2D u_texture; | |
varying highp vec2 v_tex_coord; | |
varying lowp vec4 v_color_mix; | |
void main() { | |
gl_FragColor = v_color_mix * texture2D(u_texture, v_tex_coord); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment