Skip to content

Instantly share code, notes, and snippets.

@CptSpaceToaster
Created December 23, 2014 14:45
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 CptSpaceToaster/70da5593d72dfa110f2e to your computer and use it in GitHub Desktop.
Save CptSpaceToaster/70da5593d72dfa110f2e to your computer and use it in GitHub Desktop.
#version 120
uniform sampler2D Texture;
uniform sampler2D LightMap;
uniform ivec4 u_LightCoord;
attribute vec2 TexCoord;
varying vec2 p_TexCoord;
attribute vec4 LightCoord;
varying vec4 p_LightCoord;
varying vec4 p_Color;
void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
p_TexCoord = TexCoord;
p_Color = gl_Color;
if (u_LightCoord == ivec4(0, 0, 0, 0)) {
p_LightCoord = LightCoord;
} else {
p_LightCoord = u_LightCoord;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment