spooky-game/assets/shaders/compositor-vertex.glsl

20 lines
429 B
Plaintext
Raw Normal View History

2020-08-13 20:14:37 +02:00
#version 450
layout (location=0) in vec3 vPosition;
layout (location=0) out vec3 vPosition2;
layout (location=1) out vec2 vTexCoords2;
void main() {
// Handle texCoords
if (vPosition.x < 0) vTexCoords2.x = 0;
if (vPosition.y < 0) vTexCoords2.y = 0;
if (vPosition.x > 0) vTexCoords2.x = 1;
if (vPosition.y > 0) vTexCoords2.y = 1;
// Handle position
vPosition2 = vPosition;
gl_Position = vec4(vPosition, 1.0);
}