From 56fecdd8589298605df97d98463ccd7823609fa1 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 30 Jul 2018 16:52:40 -0700 Subject: [PATCH] fixed height variable typo in fbm function --- tutorials/3d/vertex_displacement_with_shaders.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/3d/vertex_displacement_with_shaders.rst b/tutorials/3d/vertex_displacement_with_shaders.rst index 53ffcd902..036924db2 100644 --- a/tutorials/3d/vertex_displacement_with_shaders.rst +++ b/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 frequency = 3.0; for (int i = 0; i < 6; i++){ - h += noise(x * frequency) * amplitude; + height += noise(x * frequency) * amplitude; amplitude *= 0.5; frequency *= 2.0; } - return h; + return height; } We can now use this noise function in place of ``cos`` and ``sin`` in the previous section.