Skip to content

Instantly share code, notes, and snippets.

@soundofjw
Created June 8, 2011 15:20
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 soundofjw/1014628 to your computer and use it in GitHub Desktop.
Save soundofjw/1014628 to your computer and use it in GitHub Desktop.
Lightmap Shader
uniform sampler2D sampler0;
uniform sampler2D sampler1;
void main()
{
vec2 off = gl_TexCoord[0].st;
vec4 baseColor = texture2D(sampler0, off);
baseColor = baseColor * texture2D(sampler1,off);
gl_FragColor = vec4( baseColor[0], baseColor[1], baseColor[2], baseColor[3] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment