Преглед изворни кода

Merge pull request #2848 from taner1es/spatial_shader_part2_fix

Fixed spatial shader part2 wave effect redundant parameter usage
Clay John пре 6 година
родитељ
комит
34483d2ea6
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      tutorials/shading/your_first_shader/your_second_spatial_shader.rst

+ 4 - 4
tutorials/shading/your_first_shader/your_second_spatial_shader.rst

@@ -299,10 +299,10 @@ Here is an example for how you could layer the four waves to achieve nicer looki
 .. code-block:: glsl
 
   float height(vec2 position, float time) {
-    float d = wave((position + time) * 0.4, 8.0) * 0.3;
-    d += wave((position - time) * 0.3, 8.0) * 0.3;
-    d += wave((position + time) * 0.5, 4.0) * 0.2;
-    d += wave((position - time) * 0.6, 4.0) * 0.2;
+    float d = wave((position + time) * 0.4) * 0.3;
+    d += wave((position - time) * 0.3) * 0.3;
+    d += wave((position + time) * 0.5) * 0.2;
+    d += wave((position - time) * 0.6) * 0.2;
     return d;
   }