SSAO pipeline not working properly when 2 different cameras involved

Well i have a project of a Trailer house and it has 2 cameras in order to check the outside with an ArcRotate camera and the inside with a Universal or free camera, so i was trying the SSAO pipeline when i realized that when i changed to the universal or free camera the pipeline would freeze on the first SSAO frame so the first frame would follow you with the camera, meanwhile it would work just fine when i go back to arcRotate camera. so this is a graphic example of what im talking about:



I know the problem doesnt relate to the kind of camera you re using since the playgroung example is using a freeCamera while in my project the one that works is the arcRotateCamera, so i guess the problem has to do with the fact that im using it for 2 different types of camera , would appreciate a fix to this problem or a work around to it if you can help me, already tried creating 2 different SSAO pipelines and attaching each to a camera but the problem persists

You can check the project on this link : https://servex-us.com/servex-online-product-configurator-test-juan-david/ , as in the playground example for SSAO pipeline you can press ā€œ1ā€ to see the pipeline, ā€œ2ā€ to hide de pipeline and ā€œ3ā€ to just display the pipeline. if you wanna check the inspector you can do it too, you just have to press like 10 or 12 times the ā€œdā€ on your keyboard, code is fairly simple , i just import the GLBs and create some arrows inside the house in order to move from one room to another

As the problem seems pretty complex I would recommend creating a simple repro in the playground.

Also could you try the SSAO2RenderingPipeline ?

CC @CraigFeldspar

sure , im gonna try SSAO2 first and if doesnt help ill try creating the repro in the playground, so you can check it out ,thanks

1 Like

well @sebavan i tried SSAO2 and kinda the same problem but the other way around, seems like this time the freecamera is working fine with the pipeline but the arcRotate camera is getting the first frame of the pipeline baked on screen , so something about the attach to multiple cameras is not working properly , i felt like it depends on which camera you create first on scene , thats the one is gonna get the privileges of working just fine , the ones you create after that one are just gonna get the first frame on screen baked version of the pipeline , i emulated this in the playground example for you to take a look , its a fairly simple mod, just added another camera (arcrotate) and the problem shows up: https://playground.babylonjs.com/#N96NXC#77
hope this can help to fix this bug !
Pd: liked the SSAO better , feel like the shadowing is juts a little more precise and malleable than the SSAO2 but is just my opinion

I am on it, I will try to fix it ASAP