paysages3d/src/render/opengl/shaders/vegetation.vert
Michaël Lemaire d2b4a1ea5e vegetation: Removed index variable in impostor shader
It was used for texture coordinates, but is now
precomputed in the vertex array
2015-12-15 00:14:06 +01:00

16 lines
353 B
GLSL

in highp vec3 vertex;
in highp vec2 uv;
uniform highp mat4 viewMatrix;
uniform highp vec3 offset;
uniform float size;
out vec3 unprojected;
out vec2 texcoord;
uniform float waterOffset;
void main(void)
{
unprojected = offset + size * vertex; // + vec3(0, waterOffset, 0)
texcoord = uv;
gl_Position = viewMatrix * vec4(unprojected, 1.0);
}