Disabling SSAO2 breaks FXAA

PG: Babylon.js Playground
If you press 2 to disable SSAO2 you will see a strange effect if you move the camera.
This happens only with babylon.js 5.0 (not with 4.2) and only if FXAA is enabled.

It seems there’s no framebuffer clearing when disabling the effect.

Pinging @CraigFeldspar as it is linked to the pre-pass renderer (when forcing the geometry buffer by setting the 5th parameter of the SSAO2RenderingPipeline constructor to true it does work).

Opened a PR for that issue adding autoclear to PP when unlinking prepassRT by CraigFeldspar · Pull Request #10676 · BabylonJS/Babylon.js · GitHub. It was indeed the autoclearing of the postprocess that got disabled by the prepass, and not re-enabled when disabling the prepass.

Waiting for the PR to be merged, you can fix your playground by adding :

     tFXAA.autoClear = true;

Just like in this PG :
https://playground.babylonjs.com/#QFXII0#2

3 Likes

You rock !!! I ll make a nightly ASAP.