StrandedKitty / three-csm

☀️ Cascaded shadow maps (CSMs) implementation for Three.js
MIT License
296 stars 21 forks source link

Cannot create 2 instances of CSM (issue with CSM.injectInclude) #34

Closed elo58 closed 1 year ago

elo58 commented 1 year ago

If we create two instances of CSM, there is an issue with the injectInclude method from CSM's ctor. Some code parts of the shader are added two times and so, the shader's compilation fails.

elo58 commented 1 year ago

I have created a pull request to fix this behaviour.

StrandedKitty commented 1 year ago

I've merged your PR, thanks.