Tech Note: Removing Dark Scene Color Banding in Unity
Oculus Developer Blog
|
Posted by Jian Zhang and Volga Aksoy
|
July 31, 2017
|
Share

8-bit sRGB framebuffers are widely used in real-time rendering, which work well mostly for non-VR apps. However, due to the light-locked nature of VR and the limited 8-bit precision, when using sRGB buffers in VR apps, the users’ eyes can adjust to the dark to see the subtle differences in the dark areas of the scene, leading to complaints about visible color banding artifacts.

The Oculus PC SDK provides an extra option to let applications submit floating-point format eye buffers to the Oculus runtime to be presented in the Rift. The Oculus runtime will use the extra precision in these eye buffers to eliminate color banding in dark areas that might have been visible with 8-bit sRGB eye buffers.

We worked with Unity to have this feature integrated into the engine, and you can set it through Oculus Unity Utils, which has 2 floating point formats:

  • R11G11B10_FP: this format has same bandwidth cost with regular 8 bits sRGB framebuffer, so there should be no extra performance cost for regular rendering. This format should be good enough for most applications to remove color banding. However, as the name indicates, there is no alpha channel for this format, so if your application requires destination alpha blending or needs to sample the frame buffer alpha channel, you might prefer R16G16B16A16_FP
  • R16G16B16A16_FP: this format has full alpha channel with 16-bit floating point precision, which should be compatible with your application even if it requires framebuffer alpha channel. The bandwidth cost is 2x of 8 bit sRGB format.

Steps to enable this feature are as follows:

  • Use Unity 5.6.1p1 or newer versions
  • Use Oculus Unity Utils 1.5 or newer versions
  • Add OVRManager.eyeTextureFormat = R11G11B10_FP or OVRManager.eyeTextureFormat= R16G16B16A16_FP into your unity initialization script
  • Note the new eye texture format only works under Linear color space