diff --git a/projects/saf_r/shaders/shader.vert b/projects/saf_r/shaders/shader.vert index 1faa9080db858944e6390bf111e996f0707b4b04..fe51e23237c6526c32ae73b008fd8732adbc3744 100644 --- a/projects/saf_r/shaders/shader.vert +++ b/projects/saf_r/shaders/shader.vert @@ -24,8 +24,8 @@ void main() { vec4 position = mvp * vec4(positions[gl_VertexIndex], 1.0); gl_Position = position; - texCoord.x = (position.x + 1.0) * 0.5; - texCoord.y = (position.y + 1.0) * 0.5; + texCoord.x = (positions[gl_VertexIndex].x + 1.0) * 0.5; + texCoord.y = (-positions[gl_VertexIndex].y + 1.0) * 0.5; fragColor = colors[gl_VertexIndex]; } \ No newline at end of file