1uniform mat4 g_WorldViewProjectionMatrix; 2 3attribute vec3 inPosition; 4attribute vec3 inNormal; 5attribute vec2 inTexCoord; 6 7varying vec2 texCoord; 8 9#ifdef TRI_PLANAR_MAPPING 10 varying vec4 vVertex; 11 varying vec3 vNormal; 12#endif 13 14void main(){ 15 gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0); 16 texCoord = inTexCoord; 17 18#ifdef TRI_PLANAR_MAPPING 19 vVertex = vec4(inPosition,0.0); 20 vNormal = inNormal; 21#endif 22 23}