15 lines
265 B
GLSL
15 lines
265 B
GLSL
|
|
||
|
layout (location = 0) in vec2 pos;
|
||
|
|
||
|
flat out vec2 startPos;
|
||
|
out vec2 vertPos;
|
||
|
|
||
|
uniform mat4 viewMatrix;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
vec4 outPos = viewMatrix * vec4(pos.x, pos.y, 0.0, 1.0);
|
||
|
gl_Position = outPos;
|
||
|
vertPos = pos.xy / outPos.w;
|
||
|
startPos = vertPos;
|
||
|
}
|