Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ExampleFlamer's avatar
ExampleFlamer
Honored Guest
11 years ago

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.

6 Replies

Replies have been turned off for this discussion
  • Try this:
    OVRManager.display.distortionCaps &= ~(uint)DistortionCaps.Chromatic;
  • 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!


  • 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.
  • 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;
    }
    }
  • 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;
    }
    }
  • Nevermind! It just wasn't rendering it in the engine, but I built the scene and it worked. Thankyou so much.