瀏覽代碼

fix the doc for skip_vertex_transform.

Morris Tabor 4 年之前
父節點
當前提交
d8568535dc
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
     }