Skip to content
Snippets Groups Projects
Commit 0bfd3585 authored by Vanessa Karolek's avatar Vanessa Karolek
Browse files

[#94] avoid moving texture wrt camera orientation

parent 6d346928
No related branches found
No related tags found
1 merge request!77Resolve "SAF-R Module"
...@@ -24,8 +24,8 @@ void main() { ...@@ -24,8 +24,8 @@ void main() {
vec4 position = mvp * vec4(positions[gl_VertexIndex], 1.0); vec4 position = mvp * vec4(positions[gl_VertexIndex], 1.0);
gl_Position = position; gl_Position = position;
texCoord.x = (position.x + 1.0) * 0.5; texCoord.x = (positions[gl_VertexIndex].x + 1.0) * 0.5;
texCoord.y = (position.y + 1.0) * 0.5; texCoord.y = (-positions[gl_VertexIndex].y + 1.0) * 0.5;
fragColor = colors[gl_VertexIndex]; fragColor = colors[gl_VertexIndex];
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment