axmol/cocos/renderer/shaders/3D_terrain.vert

22 lines
399 B
GLSL
Raw Normal View History

2015-03-30 13:45:50 +08:00
const char* CC3D_terrain_vert = R"(
2015-03-30 13:45:50 +08:00
attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec3 a_normal;
#ifdef GL_ES
2015-03-30 13:45:50 +08:00
varying mediump vec2 v_texCoord;
varying mediump vec3 v_normal;
#else
2015-03-30 13:45:50 +08:00
varying vec2 v_texCoord;
varying vec3 v_normal;
#endif
uniform mat4 u_MVPMatrix;
2015-03-30 13:45:50 +08:00
void main()
{
gl_Position = u_MVPMatrix * a_position;
2015-03-30 13:45:50 +08:00
v_texCoord = a_texCoord;
v_normal = a_normal;
}
)";