layout (location = 0) in vec2 Position; out vec2 Texcoord; void main() { Texcoord = Position * vec2(0.5) + vec2(0.5);// Map from [-1, +1] to [0, 1]. // The Gfx library is written to work with the glTF sample models, which // seem to want the textures loaded "as is" without flipping. Flip the // y-coordinate here so that the texture appears as expected. Texcoord.y = 1.0 - Texcoord.y; gl_Position = vec4(Position, 0.0, 1.0); }