A progressive/accumulative shadow catcher for three js which is a vanilla js implementation of AccumulativeShadows from react three fiber
Based on
- LightMapping example by Zalo https://threejs.org/examples/?q=prog#webgl_shadowmap_progressive
- r3F drei's Accumulative Shadows https://github.com/pmndrs/drei/blob/master/src/core/AccumulativeShadows.tsx
- Development Forum post https://discourse.threejs.org/t/progressive-lightmap-as-floor-shadow-catcher/41429
Big thanks to drcmda/OxcaOa , r3f and three js forums
Class Files are available in src
folder
progressiveShadows = new ProgressiveShadows(renderer, scene, { size: 4 })
progressiveShadows.clear()
progressiveShadows.lightOrigin.position.set(5,5,5)
progressiveShadows.update(camera)
guiProgressiveShadows
function can help add gui quickly for testing