ludum_dare_40/res/shaders/s2le/vert.gls
2024-08-07 04:58:40 +00:00

16 lines
No EOL
324 B
Text

#version 330 core
uniform mat4 mvp;
layout (location = 0) in vec3 vertices;
layout (location = 1) in vec2 texCoords;
out vec2 iTexCoords;
out float percent;
void main() {
iTexCoords = texCoords;
vec4 position = mvp * vec4(vertices, 1);
percent = (position.x + 1) / 4 - (position.y - 1) / 4;
gl_Position = position;
}