Skip to content

Instantly share code, notes, and snippets.

@JavadocMD
Created January 27, 2015 22:43
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 JavadocMD/27d8ac0857868f6abc03 to your computer and use it in GitHub Desktop.
Save JavadocMD/27d8ac0857868f6abc03 to your computer and use it in GitHub Desktop.
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D u_texture;
uniform sampler2D u_mask;
varying vec4 v_color;
varying vec2 v_texCoord0;
void main()
{
vec4 texColor = texture2D(u_texture, v_texCoord0);
vec4 mask = texture2D(u_mask, v_texCoord0);
texColor.a *= mask.a;
gl_FragColor = v_color * texColor;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment