Browse Source

Merge pull request #1629 from clayjohn/more_vertex_displacement_typos

More fixes for typos in vertex displacement tutorial
Chris Bradfield 7 years ago
parent
commit
e758984950
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/3d/vertex_displacement_with_shaders.rst

+ 2 - 2
tutorials/3d/vertex_displacement_with_shaders.rst

@@ -194,11 +194,11 @@ we increase the frequency each level, decrease the amplitude, and calculate a ne
     float amplitude = 0.5;
     float amplitude = 0.5;
     float frequency = 3.0;
     float frequency = 3.0;
     for (int i = 0; i < 6; i++){
     for (int i = 0; i < 6; i++){
-      h += noise(x * frequency) * amplitude;
+      height += noise(x * frequency) * amplitude;
       amplitude *= 0.5;
       amplitude *= 0.5;
       frequency *= 2.0;
       frequency *= 2.0;
     }
     }
-    return h;
+    return height;
   }
   }
 
 
 We can now use this noise function in place of ``cos`` and ``sin`` in the previous section. 
 We can now use this noise function in place of ``cos`` and ``sin`` in the previous section.