protot/data/shaders/vs_passthrough.glsl

12 lines
191 B
GLSL

#version 330 core
in vec3 inVertex;
uniform mat4 uModelViewProj;
out vec2 ioUV;
void main() {
gl_Position = uModelViewProj * vec4(inVertex, 1);
ioUV = (inVertex.xy + vec2(1,1)) / 2.0;
}