Created
December 23, 2014 14:45
-
-
Save CptSpaceToaster/70da5593d72dfa110f2e to your computer and use it in GitHub Desktop.
This file contains 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
#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