gl01/internal/render/drawtexture.vert

18 lines
324 B
GLSL
Raw Permalink Normal View History

#version 330
uniform vec2 onScreenPos, onScreenSize;
layout (location = 0) in vec2 vert;
layout (location = 1) in vec2 texCoord;
out vec2 fragVert;
out vec2 fragTexCoord;
void main() {
gl_Position = vec4(onScreenPos + onScreenSize * texCoord, 1, 0);
fragVert = texCoord * 2 - vec2(1, 1);
fragTexCoord = texCoord;
}