BasicShadowFilter
A fundamental shadow filtering function that performs the fastest binary shadow test (either in or out of shadow), producing hard, aliased shadow edges.
Core Advantages
Extreme performance and simplicity. It directly returns a 0.0 or 1.0 shadow result with no extra overhead, making it the fastest of all shadow algorithms and an ideal foundational tool for debugging shadow issues.
Common Uses
Implementing hard, crisp shadow effects, such as in toon or stylized rendering.
Applications with extreme performance requirements, like those on mobile or low-power devices.
Serving as a starting point for building custom PCF (Percentage-Closer Filtering) or other advanced soft shadow algorithms.
Debugging common shadow artifacts like shadow map bias, normal bias, and 'Peter Panning'.
How to adjust
This node has no adjustable parameters itself. Shadow adjustments (like fixing 'shadow acne' or 'Peter Panning') are typically made by tuning the light source's `shadow.bias` and `shadow.normalBias` properties, not by modifying this node directly.
Code Examples
1// Get the basic shadow factor (0.0 or 1.0)
2const shadowFactor = BasicShadowFilter();
3
4// Apply it to the lighting
5diffuseColor.rgb *= shadowFactor;