Browse Source

Fix `height()` functions missing `return` in Your second 3D shader (#4631)

Co-authored-by: Hugo Locurcio <[email protected]>
FeralBytes 4 years ago
parent
commit
7f92ed4d29
1 changed files with 4 additions and 2 deletions
  1. 4 2
      tutorials/shaders/your_first_shader/your_second_3d_shader.rst

+ 4 - 2
tutorials/shaders/your_first_shader/your_second_3d_shader.rst

@@ -293,9 +293,10 @@ We can now replace the contents of our ``height()`` function with ``wave()``.
 
   float height(vec2 position, float time) {
     float h = wave(position);
+    return h;
   }
 
-Using this you get:
+Using this, you get:
 
 .. image:: img/wave1.png
 
@@ -305,7 +306,8 @@ We do this by scaling ``position``.
 .. code-block:: glsl
 
   float height(vec2 position, float time) {
-    float h = wave(position*0.4);
+    float h = wave(position * 0.4);
+    return h;
   }
 
 Now it looks much better.