Mesh smearing with autoClear on scene

Dear community,

maybe it is a stupid question, but I am wondering why disabling the auto clear causes the mesh to smear in this playground:

I read the documentation about optimizing the scene and assumed that it is not necessary to enable auto clear if the whole canvas is painted - and the background plane is opaque and covers 100% of the viewport. Shouldn’t it work in that case?

I want to render another scene on top of the first one, so I assume I have to disable auto clear. Is there a way to prevent smearing besides assigning a render group to the mesh? I realized that it also works if I only disable autoClear and leave autoClearDepthAndStencil enabled, still, following the documentation I’m wondering why it is working like that.

Kind regards,
Zacherl

Despite not clearing the screen pixels you should still clear the depth information :slight_smile: https://playground.babylonjs.com/#C7HKKU#12

3 Likes

Thank you for your answer!

1 Like