StrandedKitty / three-csm

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

Weird overlapping shadows #21

Closed kayhhh closed 1 year ago

kayhhh commented 1 year ago

Hi, im getting some weird shadow behaviors, not sure why.

As I zoom in I start getting overlapping darker shadows. The scene is also very bright.

I tried changing around different parameters but wasn't able to fix it. I also tried replicating it at https://codesandbox.io/s/three-csm-debugging-tg7sqq, but it seems to be working fine there.

Would appreciate any ideas on how to fix this. I can link to my source code if that would help, but its in a large codebase, so it may be difficult to read through.

image image image

kayhhh commented 1 year ago

😭 Fixed it, turns out I wasnt calling setupMaterial on my materials, I was using the wrong variable name.