DepthWriteAttrib not working

Hi,

I’ve got a skybox in my scene. Of course, objects should not be able to disappear “behind the sky”, so I want it to be rendered with depth write disabled. I tried it like this:

sky.setAttrib(DepthWriteAttrib.make(DepthWriteAttrib.MOff))

But that has no effect.
Objects do disappear behind the sky box.

Is this a bug, or am I missing something?

In addition to turning off depth write, you need to ensure that your skybox is drawn before anything else in the scene. Try also setting:

sky.setBin('background', 0)

David

Thanks, I realized that by myself last night, one second before I fell asleep :slight_smile: