ripple/rasterizeWaveMeshPosition.vert

24 lines
521 B
GLSL
Raw Permalink Normal View History

2017-11-27 00:12:13 -05:00
#version 410
#define SCENE_EXTENT 100.0f
uniform mat4 matrModel;
uniform mat4 matrVisu;
uniform mat4 matrProj;
/////////////////////////////////////////////////////////////////
2017-12-11 17:20:40 -05:00
layout(location=0) in vec2 Vertex;
layout(location=1) in vec2 TexCoord;
2017-11-27 00:12:13 -05:00
out Attribs {
vec3 pos;
} Out;
void main(void)
{
2017-11-28 12:35:49 -05:00
Out.pos = 0.5 * SCENE_EXTENT * vec3(Vertex.x, 0, Vertex.y);
2017-12-11 17:20:40 -05:00
/* Direct3D and OpenGL don't render with the same screen coordinates */
2017-11-28 12:35:49 -05:00
gl_Position = matrProj * matrVisu * matrModel * vec4(Out.pos, 1.);
2017-11-27 00:12:13 -05:00
}