#version 450 layout(binding = 0) uniform UniformBufferObject { vec2 initialWindowSize; vec2 windowSize; } ubo; layout(location = 0) in vec2 inPosition; layout(location = 1) in vec3 inColor; layout(location = 2) in int inShapeType; layout(location = 3) in vec2 inUv; layout(location = 0) out vec2 outPosition; layout(location = 1) out vec3 fragColor; layout(location = 2) out int outShapeType; layout(location = 3) out vec2 outUv; void main() { vec2 normalized = ((inPosition / ubo.initialWindowSize) - 0.5) * 2.0; gl_Position = vec4(normalized, 0.0, 1.0); fragColor = inColor; outPosition = normalized; outShapeType = inShapeType; outUv = inUv; }