色収差やビネット効果を無効にする
公式フォーラムにて色収差やビネット効果を無効にする方法が紹介されていたので試してみました。
印刷物へのスクリーンショットの掲載時や他の画像との合成の際などに利用できるかもしれません。
手順
下記のDisableDistortion.csのようなスクリプトを作って、ゲームオブジェクトにアタッチする。
using UnityEngine;
using Ovr;
public class DisableDistortion : MonoBehaviour {
void Start()
{
OVRManager.display.distortionCaps &= ~(uint)DistortionCaps.Chromatic;
OVRManager.display.distortionCaps &= ~(uint)DistortionCaps.Vignette;
}
}
Chromaticの行が色収差オフ、
Vignetteの行がビネット効果オフのためのコードです。
デフォルト
色収差オフ
色収差オフ + ビネット効果(画像の周囲を暗くする効果)オフ
参考
- Can I disable or reduce the default chromatic aberration | Unity Integration | Oculus VR Forums
- Oculus Unity Integration: Package Ovr