Depth buffer glitches

Hey,

I made a LOD planet using quadtrees.

When i combined it with the volumetric-atmospheric-scattering postprocess from @CrashMaster i got visual glitches.

They occur when I create a new chunk and the depthbuffer takes a few frames to update. I asked about this on the postprocess’s github repo and he replied that it could be a bug in Babylon.

I want to ask the question quickly here in the forum. Is this a bug in Babylon?
And would there be another solution than the one he suggested on github?

For more information see: Github discussion

Thanks for any reply

The workaround sounds more than reasonnable to me.

Could you create a repro in the playground ??? not necessarily with the same post process but as long as it highlights a difference between the meshes at play and the depthmap ???

1 Like

Yes, I was able to reproduce it on the playground: https://www.babylonjs-playground.com/#WUTHX5#17

The workaround works in 95 percent of cases, but sometimes the glitch still occurs and it is after all a workaround.

It is because the depth renderer is not created in the correct way: https://www.babylonjs-playground.com/#WUTHX5#19

It should rely on the scene enableDepthRenderer functions :wink:

3 Likes

lovely! thank u! :hugs: