Hey @JacobF
For the sky (using SkyMaterial or not), what I generally do is that I tag the material “disableDepthWrite = true”. In your case, do you need some passes to compute the sky except the final render of it ?
@julien-moreau that was the first thing I tried. It doesn’t have any effect in my scene for some reason. The skybox is just a normal cube with its own material.
Hi @JacobF,
Actually in 5.0 we use a more efficient way to render the depth texture, with the PrePassRenderer, and this seems to ignore the disableDepthWrite flag.
I’ll make a PR to fix that, in the meantime, you can fix your scene by setting the last SSAO2 parameter to true and forcing the old way of rendering depth :
const ssao = new BABYLON.SSAO2RenderingPipeline('ssao', scene, {
ssaoRatio: .5,
blurRatio: 1
}, [ camera ], true)
Hopefully this should be a quick fix so the PR should come very soon
Nice. Appreciated I ended up using SSAO instead in my scene demo #Project Snowball (late 2020), precisely because of this issue. Also, I’d say that depending on the use case, SSAO2 does not show a huge benefit over SSAO (at least, visually). My opinion only.