A complete 3D game development suite written purely in Java.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jmonkeyengine/jme3-terrain/src/main/resources/Common/MatDefs/Terrain/Terrain.vert

23 lines
458 B

uniform mat4 g_WorldViewProjectionMatrix;
attribute vec3 inPosition;
attribute vec3 inNormal;
attribute vec2 inTexCoord;
varying vec2 texCoord;
#ifdef TRI_PLANAR_MAPPING
varying vec4 vVertex;
varying vec3 vNormal;
#endif
void main(){
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
texCoord = inTexCoord;
#ifdef TRI_PLANAR_MAPPING
vVertex = vec4(inPosition,0.0);
vNormal = inNormal;
#endif
}