SIGN IN SIGN UP

WebGPURenderer: Optimize VSM shadow code (#32209)

Port optimizations from PR #32181 to the WebGPU renderer:
- Extract mean variable for clarity
- Add early return optimization for fully lit pixels
- Improve variable naming (d, p_max)
- Correct variance epsilon from 0 to 0.0000001
- Pre-compute constant (0.65 instead of 0.95 - 0.3)
- Remove redundant outer clamp
- Add clarifying comments

These changes improve performance by reducing operations per pixel
while maintaining identical visual output.

Co-authored-by: Claude <[email protected]>
M
mrdoob committed
000d4fb37ba8618d5b6231bd942e0b73ac29e0cb
Parent: 2bf24e8
Committed by GitHub <[email protected]> on 11/7/2025, 6:32:12 AM