Browse Source

Update `NORMALMAP` builtin name in Your first 3D shader (#5546)

HoustonBass 3 years ago
parent
commit
525d3565ef
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tutorials/shaders/your_first_shader/your_first_3d_shader.rst

+ 3 - 3
tutorials/shaders/your_first_shader/your_first_3d_shader.rst

@@ -320,7 +320,7 @@ explained in more detail in the next part of this tutorial.
 
 
 When we have normals that correspond to a specific vertex we set ``NORMAL``, but
 When we have normals that correspond to a specific vertex we set ``NORMAL``, but
 if you have a normalmap that comes from a texture, set the normal using
 if you have a normalmap that comes from a texture, set the normal using
-``NORMALMAP``. This way Godot will handle the wrapping the texture around the
+``NORMAL_MAP``. This way Godot will handle the wrapping the texture around the
 mesh automatically.
 mesh automatically.
 
 
 Lastly, in order to ensure that we are reading from the same places on the noise
 Lastly, in order to ensure that we are reading from the same places on the noise
@@ -347,7 +347,7 @@ And now we can access ``tex_position`` from the ``fragment()`` function.
 .. code-block:: glsl
 .. code-block:: glsl
 
 
   void fragment() {
   void fragment() {
-    NORMALMAP = texture(normalmap, tex_position).xyz;
+    NORMAL_MAP = texture(normalmap, tex_position).xyz;
   }
   }
 
 
 With the normals in place the light now reacts to the height of the mesh
 With the normals in place the light now reacts to the height of the mesh
@@ -379,7 +379,7 @@ Godot handles most of the difficult stuff for you.
   }
   }
 
 
   void fragment() {
   void fragment() {
-    NORMALMAP = texture(normalmap, tex_position).xyz;
+    NORMAL_MAP = texture(normalmap, tex_position).xyz;
   }
   }
 
 
 That is everything for this part. Hopefully, you now understand the basics of
 That is everything for this part. Hopefully, you now understand the basics of