axmol/tests/cpp-tests/Resources/Shaders3D/Skybox.vert

16 lines
327 B
GLSL
Raw Normal View History

2015-01-29 09:28:14 +08:00
attribute vec4 a_position;
varying vec3 v_reflect;
void main(void)
{
mat4 MVMatrixLimited = CC_MVMatrix;
2015-01-29 17:31:57 +08:00
MVMatrixLimited[0][3] = 0.0;
MVMatrixLimited[1][3] = 0.0;
MVMatrixLimited[2][3] = 0.0;
2015-01-29 09:28:14 +08:00
vec4 position = MVMatrixLimited* a_position;
v_reflect = a_position.xyz;
gl_Position = position.xyww;
}