forked from AuroraMiddleware/gtk
1ab1fd4391
Since we use an FBO to render the contents of the render node tree, the coordinate space is going to be flipped in GL. We can undo the flip by using an appropriate projection matrix, instead of changing the sampling coordinates in the shaders and updating all our coordinates at render time.
7 lines
118 B
GLSL
7 lines
118 B
GLSL
void main() {
|
|
gl_Position = uMVP * vec4(aPosition, 0.0, 1.0);
|
|
|
|
// Flip the sampling
|
|
vUv = vec2(aUv.x, aUv.y);
|
|
}
|