Hi, currently SSAO does not handle mirrored objects (negative scaling) correctly. You can see it here:
https://www.babylonjs-playground.com/#ZKC9KH
Is it possible to fix this? Our data model makes heavy use of morroring and currently we can’t use SSAO.
pinging @CraigFeldspar who is currently working on our ssao2 implementation
It seems like this bug has been fixed by my last PR on SSAO.
When you force the old geometry buffer method (true to the last constructor parameter) :
var tSSAO = new BABYLON.SSAO2RenderingPipeline("ssao", scene, {
ssaoRatio: 0.5,
blurRatio: 1.0,
}, [camera], true);
we can indeed see the bug with the second cube.
Just use the latest version of babylon.js and you should be fine
Thank you that works but the new method seems to have a bug with the background color.
The color is brighter now.
Compare these two links please:
https://www.babylonjs-playground.com/#ZKC9KH
https://www.babylonjs-playground.com/#ZKC9KH#1
@CraigFeldspar Did you had time to look at the background color issue?
Hi @Kesshi,
It seems it comes from the fact we use a post process to apply gamma color transform with this new ssao method.
Fixing should be kinda easy though.
In the meantime, you can apply a quick and dirty fix : apply gamma to linear space transformation to your background color : scene.clearColor = scene.clearColor.toLinearSpace();
Hope this helps,