Step_06.glsl差异#

Step_05.glsl至Step_06.glsl差异#
--- /pb1/repo/arcade/doc/tutorials/raycasting/step_05.glsl
+++ /pb1/repo/arcade/doc/tutorials/raycasting/step_06.glsl
@@ -10,6 +10,10 @@
     float samplePointAlpha = texture(iChannel0, samplePoint).a;
     float sampleStepped = step(0.1, samplePointAlpha);
     float returnValue = 1.0 - sampleStepped;
+
+    // Soften the shadows. Comment out for hard shadows.
+    // The closer the first number is to 1.0, the softer the shadows.
+    returnValue = mix(0.98, 1.0, returnValue);
 
     return returnValue;
 }