Browse Source

Merge pull request #6202 from clayjohn/canvasitem-ref-36

Fix order of EXTRA_MATRIX and WORLD_MATRIX
Max Hilbrunner 3 years ago
parent
commit
b4baba9d32
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tutorials/shaders/shader_reference/canvas_item_shader.rst

+ 1 - 1
tutorials/shaders/shader_reference/canvas_item_shader.rst

@@ -75,7 +75,7 @@ it manually with the following code:
 
     void vertex() {
 
-        VERTEX = (EXTRA_MATRIX * (WORLD_MATRIX * vec4(VERTEX, 0.0, 1.0))).xy;
+        VERTEX = (WORLD_MATRIX * (EXTRA_MATRIX * vec4(VERTEX, 0.0, 1.0))).xy;
     }
 
 .. note:: ``WORLD_MATRIX`` is actually a modelview matrix. It takes input in local space and transforms it