Example contact shadows is blinking + artifacts

Hey, Im playing around with the contact shadow example. I noticed that when looking at it from further away, the shadows will start dancing. They get striped and blink randomly. I made a example to demonstrate it better.

I extended the example with a wall and a model.
I also only render to the renderTargets once and not in animationFrame, I thought this might fix the issue, but its not.
Disabling blur does not fix it as well.

Any ideas?

1 Like

Could be a precision related issue…

Should I report it as bug?

I’m not sure this is fixable. Seems to be a limitation of the approach.

But yeah, the original contributor of the example could have a look at it.

What I dont understand is, that im rendering to a renderTarget and use it as texture. I only render the renderTarget once. When the texture is done and not touched anymore, how has it to do with MeshDepthMaterial?

Would it be possible to save the renderTarget as png?