Misalign of orthogonal camera and SSAO post process image when changing frustum

Here is the playground link: Babylon.js Playground

I need to change orthoLeft, orthoRight etc. in my project in order to zoom and pan the camera. What I am missing? Is there a manual align method that I need to call after frustum change?

Second problem: SSAO looks messed up if I apply a negative minZ for the camera.

cc @Cedric

You need to change the values depending on what you want to do. for zooming in:

I’m not sure to understand what you need with the method to call after frustum change. Maybe this will have some interests to you :

Thanks for your answer. I have an iso-3d-SimCity-like scene with “zoom to pointer” functionality like this: https://playground.babylonjs.com/#FCPCCZ#3

Zooming also involves also shifting the frustum. Maybe it is an odd way but it worked for me until I introduced ambient occlusion. From your example I get that uniformly increasing/decreasing the frustum to all extends (center zoom) does work with SSAO. I guess I can implement panning by changing camera.position and use this in combination with uniformed frustum change for the same results…

Any hints regarding the problem with negative camera.minZ? I can’t get good results for SSAO with this values: https://playground.babylonjs.com/#FCPCCZ#5

I have no good explanation for that, sorry. Maybe @sebavan will have some ideas when he gets back from vacation