I have a scene using EffectComposer and an SAO pass, and UI to allow the user to switch between orthographic and perspective cameras. What is the recommended way of changing the camera that SAO uses?
If I just set SAO’s
camera property to the new camera, there are a number of fields that are left with values referencing the old camera, for example:
saoMaterial.defines[ 'PERSPECTIVE_CAMERA' ]
saoMaterial.uniforms[ 'cameraProjectionMatrix' ].
setSize method appears to fix things, but there are a number of fields that remain incorrect. For example, it resets the second property above, but not the first. Not sure if that matters.
setSize also, well, sets the size, of all of the render targets, so it seems like it’s a little more (and less?) than needed. I have created my own method on a custom version of the pass that resets all of the camera related properties, but I’m wondering if I’m missing something. Thanks!