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