blob: 4e3c7d731992a7a3a08079e85386d3fbebfc2338 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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);
}
|