Skip to main content
New Participant
December 21, 2014

Can I disable or reduce the default chromatic aberration

For some reason the chromatic aberration on my Unity Oculus is quite out and isn't working very well. I've had a look through some of the code and I can't seem to find it anywhere.
    This topic has been closed for replies.

    6 replies

    Inspiring
    December 22, 2014
    Try this:
    OVRManager.display.distortionCaps &= ~(uint)DistortionCaps.Chromatic;
    New Participant
    December 24, 2014
    Hey, is this the code I have to disable or is this a line of code I have to implement to be able to find and disable the chromatic distortion? If the latter, where do I insert it?

    Thanks for the help!
    New Participant
    December 24, 2014


    I assumed it would go in here, and the script accepted it without any errors, however it hasn't disabled the effect or given me an option under the script to disable or enable it (I thought it might make it public or something). Sorry I'm still slightly new with Unity.

    Thanks again for the help.
    Inspiring
    January 3, 2015
    No need to modify the Oculus scripts. You can write a script of your own (say, DisableCA.cs) as follows. It should automatically turn off chromatic aberration as soon as the app starts.
    using UnityEngine;

    public class OVRGamepadController : MonoBehaviour
    {
    void Start()
    {
    OVRManager.display.distortionCaps &= ~(uint)DistortionCaps.Chromatic;
    }
    }
    New Participant
    March 7, 2015
    Hey mate,

    Sorry for the late reply, I seemed to have left this alone for a while. Just letting you know that when I implement that code, a black screen is only rendered. I applied this code to a blank gameobject in the main heirachy.


    using UnityEngine;
    using Ovr;

    public class CA : MonoBehaviour
    {
    void Start()
    {
    OVRManager.display.distortionCaps &= ~(uint)DistortionCaps.Chromatic;
    }
    }
    New Participant
    March 7, 2015
    Nevermind! It just wasn't rendering it in the engine, but I built the scene and it worked. Thankyou so much.