shader/sprite_vtx.glsl

changeset 83
f7ce0db6f72b
parent 42
cc912686f663
child 88
6234b7ea48f3
--- a/shader/sprite_vtx.glsl	Sat Apr 19 11:42:53 2025 +0200
+++ b/shader/sprite_vtx.glsl	Sat Apr 19 12:18:43 2025 +0200
@@ -4,11 +4,12 @@
 out vec2 texcoord;
 
 uniform mat4 projection;
+uniform mat4 view;
 uniform mat4 model;
 uniform float depth;
 
 void main(void) {
-    vec4 pos = projection*model*vec4(position.x, position.y, 0, 1.0);
+    vec4 pos = projection*view*model*vec4(position.x, position.y, 0, 1.0);
     // apply depth
     pos.z = depth / -1024.0;
     gl_Position = pos;

mercurial