Add RasterizeWaveMeshPosition
This commit is contained in:
parent
5108492544
commit
ffd0938e1b
2 changed files with 37 additions and 0 deletions
15
rasterizeWaveMeshPosition.frag
Normal file
15
rasterizeWaveMeshPosition.frag
Normal file
|
@ -0,0 +1,15 @@
|
|||
#version 410
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
in Attribs {
|
||||
vec3 pos;
|
||||
} In;
|
||||
|
||||
out vec4 Color;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Color = vec4(In.pos, 1.);
|
||||
}
|
||||
|
22
rasterizeWaveMeshPosition.vert
Normal file
22
rasterizeWaveMeshPosition.vert
Normal file
|
@ -0,0 +1,22 @@
|
|||
#version 410
|
||||
#define SCENE_EXTENT 100.0f
|
||||
|
||||
uniform mat4 matrModel;
|
||||
uniform mat4 matrVisu;
|
||||
uniform mat4 matrProj;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
layout(location=0) in vec2 Vertex;
|
||||
layout(location=8) in vec2 TexCoord;
|
||||
|
||||
out Attribs {
|
||||
vec3 pos;
|
||||
} Out;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Out.pos = 0.5 * SCENE_EXTENT * vec3(Vertex.x, Vertex.y, 0);
|
||||
gl_Position = matrProj * matrVisu * vec4(Out.pos, 1.);
|
||||
}
|
||||
|
Loading…
Reference in a new issue