ludum_dare_40/res/shaders/s2le/vert.gls

16 lines
324 B
Text
Raw Normal View History

2019-03-11 05:38:14 +00:00
#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;
}