Set a project's color space
Select the color space for a project to use for its rendering.
阅读时间1 分钟最后更新于 1 个月前
The Unity Editor offers both linear and gamma workflows. The linear workflow has a color space crossover where Textures that were authored in gamma color space can be correctly and precisely rendered in linear color space. See documentation on Linear rendering overview for more information about gamma and linear color space.
Textures tend to be saved in gamma color space, while Shaders expect linear color space. As such, when Textures are sampled in Shaders, the gamma-based values lead to inaccurate results. To overcome this, you can set Unity to use an sRGB sampler to cross over from gamma to linear sampling. This ensures a linear workflow with all inputs and outputs of a Shader in the correct color space, resulting in a correct outcome.
Select the color space
Select the color space for your project with the following steps:
- Go to Edit > , then select the Player category.Project Settings
?
- Navigate to the Other Settings, open the Rendering section, and set the Color Space property to Linear or Gamma, depending on your preference.