Color space

Color space prescribes the numerical values that each color is assigned. Color space also defines the area each color is allocated in the space, and therefore how much variation is available within that color.

Originally, rendering was performed in the gamma color space. Otherwise, gamma correction would be required on the final image before it can be displayed on the monitor because monitors are designed to display gamma color space images.

With the advent of Physically Based Rendering (PBR), there has been a shift towards rendering in the linear color space. Doing so allows for the values of multiple light sources to easily and accurately be accumulated within shaders. In the gamma color space, this addition would not be physically accurate due to the curve inherent to rendering in the gamma color space.

Rendering in the linear color space brings further benefits as it can help to reduce specular aliasing. This benefit occurs as increasing the brightness within a scene when rendering in the gamma color space causes objects to rapidly become white which can cause specular aliasing effects. In a linear color space, the object brightens linearly which stops the object becoming white so quickly and therefore reduces the risk of specular aliasing.

How to choose the color space in Unity

In Unity, you choose the color space in Project Player Settings.

To enable linear color space:

  1. Go to Edit, then Project Settings.
  2. Select Player to open the Project Player Settings panel.
  3. Open the Color Space drop-down option that is located inside the Player Settings, Other Settings option.
  4. From the Rendering section, choose the Linear option from the drop-down menu.

Note: The Graphics API must be set to OpenGLES 3.0 when you set your application to the linear color space. To choose the correct API, uncheck the Auto Graphics API option and then remove OpenGLES2 from the list of named Graphics APIs. The Minimum API Level setting from within the Identification section must also be set to at least Android 4.3 ‘Jelly Bean’, API Level 18.

Previous Next