unity-game-enginehtc-viveambientocclusionvrtk

Post Processing Stack Ambient Occlusion stops working on runtime with Unity, VRTK, and SteamVR on the HTC Vive


When adding ambient occlusion from the Post Processing Stack asset onto the SteamVR camera, it works fine until I hit the play button (SteamVR is enabled for this as the VRTK manager automatically disables it). After that it disappears. I noticed that if I move the post processing behavior script in the component hierarchy during runtime, the ambient occlusion works. Any assistance is appreciated.


Solution

  • I found that adding the Post Processing Behavior script to the CameraRig gameobject fixes the issue. Not sure why though.

    Edit: This also makes the controllers not visible. Not a valid solution.

    Edit I found that adding a camera with the Post Processing Stack script as a child of cameraRig gameobject fixes the issue. It seems that something in the eye gameobject is causing the incompatibility.