소스 검색

Fix varying name in Your first spatial shader (#4031)

CDWimmer 5 년 전
부모
커밋
3245853e78
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      tutorials/shading/your_first_shader/your_first_spatial_shader.rst

+ 2 - 2
tutorials/shading/your_first_shader/your_first_spatial_shader.rst

@@ -305,12 +305,12 @@ assign ``VERTEX.xz`` to ``tex_position``.
     ...
     ...
   }
   }
 
 
-And now we can access ``vertex_position`` from the ``fragment()`` function.
+And now we can access ``tex_position`` from the ``fragment()`` function.
 
 
 .. code-block:: glsl
 .. code-block:: glsl
 
 
   void fragment() {
   void fragment() {
-    NORMALMAP = texture(normalmap, vertex_position).xyz;
+    NORMALMAP = texture(normalmap, tex_position).xyz;
   }
   }
 
 
 With the normals in place the light now reacts to the height of the mesh dynamically.
 With the normals in place the light now reacts to the height of the mesh dynamically.