// --------------------- Terrain material ------------------------ // IN attribute vec4 vertex; // iPosition attribute vec2 uv0; // iUv // OUT varying vec3 vUv; // UNIFORM void main(void) { gl_Position = gl_ModelViewProjectionMatrix * vertex; vUv.xy = uv0; vUv.z = vertex.y; }