paysages3d/src/render/opengl/shaders/water.vert

12 lines
298 B
GLSL
Raw Normal View History

in vec4 vertex;
uniform mat4 viewMatrix;
2013-12-21 23:41:19 +00:00
uniform float waterHeight;
uniform vec3 cameraLocation;
2015-12-07 22:32:55 +00:00
out vec3 unprojected;
2013-12-21 23:41:19 +00:00
void main(void)
{
2014-01-06 19:22:00 +00:00
unprojected = vec3(cameraLocation.x + vertex.x * 500.0, 0.0, cameraLocation.z + vertex.z * 500.0);
2013-12-21 23:41:19 +00:00
gl_Position = viewMatrix * vec4(unprojected, 1.0);
}