PCFSoftShadowFilter
A high-quality soft shadow function that uses a fixed 3x3 sampling grid combined with interpolation to create smoother, more natural shadow edges than basic PCF, effectively reducing sampling artifacts.
Core Advantages
Offers an excellent balance between visual quality and performance. It delivers exceptionally smooth, artifact-free soft shadows 'out-of-the-box' using a highly optimized, fixed 9-sample pattern, making it an ideal choice for high-quality rendering.
Common Uses
High-quality rendering for close-up shots of characters or products.
Architectural visualization projects requiring smooth, realistic shadows.
Creating soft, atmospheric lighting in stylized or artistic scenes.
Serving as a stable foundation for building more complex custom shadow techniques.
How to adjust
This node's filtering algorithm is fixed (3x3 grid). Its visual softness is primarily controlled by `light.shadow.mapSize`. A larger map size results in a smaller sampling area, producing sharper yet still smooth shadows, while a smaller map size creates a wider, more diffuse blur. Artifacts like 'shadow acne' are fixed by adjusting the light's `shadow.bias`.
Code Examples
1// shadowMap is a ShadowMapNode instance containing all necessary shadow info
2const shadowFactor = PCFSoftShadowFilter( shadowMap );
3
4// Apply the high-quality soft shadow factor
5diffuseColor.rgb *= shadowFactor;