Horizontally flipping a camera in Unity 3D
To be able to display an image on Holusion’s products using Unity, the first step is to flip camera images.
It can be done with a
Post Process Volume (Unity >5.6 required) or with the slightly less efficient
OnPreCull camera hook.
Since V5.6, Unity offers a new post-processing stack. It is possible to use it to mirror a camera’s output using a matrix transform.
Post Processing v2 package from Unity’s
Package Manager is required. You then need the holusion-provided CameraFlop package.
For the shader to be applied you need to add a
Post Process Layer to your main camera and tick the
Camera Flop effect.
You need to also add the shader in
Edit > Project settings > Gaphics > Always included Shaders.
To use the
OnPreCull hook, attach this script to your scene’s main camera :
It will apply a matrix transform to the camera.