The playground has similar geometry, same material / light / shadow settings and the glitch don’t want to appear.
The only infos I have is that, the issue appears only when using useContactHardeningShadow, and forceBackFacesOnly. It is also 100% consistent, where if i remove / put back a geometry, the exact same glitch appear.
This could be difficult to reproduce because it would require a more complex geometry to glitch? I am not quite sure, still trying again
If you have any suggestion about what could cause such issue, it would be greatly appreaciated as it would help me reproduce the issue in the playground.
That’s what I assumed as well. but the geometry is split in smaller pieces of 120x120x120, which are pretty empty most of the time, and the bug also appear regardless of the complexity of the current geometry.
I also realise that i could also get the issue without the “forceBackFacesOnly”.
Also I find weird that without “useContactHardeningShadow” the shadow looks as expected. I would assume if the issue was a precision issue, I would be able to observe it on the raw shadow?
I followed the link and tried a few things but without success.
Just a question: Is it still possible that it is a precision issue even if the raw shadow looks fine ?
EDIT: I also did a test with the most simple geometry possible (a flat terrain). The green lines shows were the geometry is split. Each geo gets their own direction light and their own shadow maps (set with renderList and lightOnly). Considering this is as simple as the geometry can possibly get, I doubt the issue is really arround precision ?
EDIT 2: I feel like this is related. With and without useContactHardeningShadow. When it’s on, it’s doing this weird staircase thing, but most likely the staircase approximation doesn’t play well with a single cube. As you can see the artefact doesnt appear when multiple cubes are involved, but the contours are very odd
EDIT 3: Switching to usePercentageCloserFiltering instead of useContactHardeningShadow does not have the issue. (I’m going to settle on that in the meantime. Feel free to tell if you think this is a non-issue, I will mark this as resolved)