Home | History | Annotate | Download | only in Terrain
      1 uniform mat4 g_WorldViewProjectionMatrix;
      2 
      3 attribute vec3 inPosition;
      4 attribute vec3 inNormal;
      5 attribute vec2 inTexCoord;
      6 
      7 varying vec2 texCoord;
      8 
      9 #ifdef TRI_PLANAR_MAPPING
     10   varying vec4 vVertex;
     11   varying vec3 vNormal;
     12 #endif
     13 
     14 void 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 }