Browse Source

fix the doc for skip_vertex_transform.

Morris Tabor 4 years ago
parent
commit
d8568535dc
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
     }