Browse Source

Merge pull request #4835 from mortarroad/3.3-normalize-normal

fix the doc for skip_vertex_transform.
Rémi Verschelde 4 years ago
parent
commit
8e0e7a61a8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tutorials/shading/shading_reference/spatial_shader.rst

+ 1 - 1
tutorials/shading/shading_reference/spatial_shader.rst

@@ -115,7 +115,7 @@ it manually with the following code:
 
     void vertex() {
         VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
-        NORMAL = (MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz;
+        NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
         // same as above for binormal and tangent, if normal mapping is used
     }