Last active
August 29, 2015 14:19
-
-
Save prespondek/412fbba9492624872601 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
attribute vec4 a_position; | |
attribute vec2 a_texCoord; | |
attribute vec2 a_texCoord1; | |
varying vec2 v_texture_coord; | |
varying vec2 v_texture_coord1; | |
void main(void) | |
{ | |
gl_Position = CC_MVPMatrix * a_position; | |
v_texture_coord.x = a_texCoord.x; | |
v_texture_coord.y = (1.0 - a_texCoord.y); | |
v_texture_coord1.x = a_texCoord1.x; | |
v_texture_coord1.y = (1.0 - a_texCoord.y); | |
} |
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
#ifdef GL_ES | |
varying mediump vec2 v_texture_coord; | |
varying mediump vec2 v_texture_coord1; | |
#else | |
varying vec2 v_texture_coord; | |
varying vec2 v_texture_coord1; | |
#endif | |
uniform sampler2D lightmap; | |
void main(void) | |
{ | |
gl_FragColor = texture2D(CC_Texture0, v_texture_coord) * (texture2D(lightmap, v_texture_coord1) * 2.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment