Version: 2022.3
Language : English
Gamma Textures with linear rendering
High dynamic range

Working with linear Textures

sRGB sampling allows the Unity Editor to render ShadersA program that runs on the GPU. More info
See in Glossary
in linear color space when Textures are in gamma color space. When you select to work in linear color space, the Editor defaults to using sRGB sampling. If your TexturesAn image used when rendering a GameObject, Sprite, or UI element. Textures are often applied to the surface of a mesh to give it visual detail. More info
See in Glossary
are in linear color space, you need to work in linear color space and disable sRGB sampling for each Texture. To learn how to do this, see Disabling sRGB sampling, below.

For further reading, see documentation on:

Legacy GUI

Rendering of elements of the Legacy GUI System is always done in gamma space. This means that for the legacy GUI system, Textures with their Texture Type set to Editor GUI and Legacy GUI do not have their gamma removed on import.

Linear authored Textures

It is also important that lookup Textures, masks, and other textures with RGB values that mean something specific and have no gamma correction applied to them bypass sRGB sampling. This prevents values from the sampled Texture having non-existent gamma correction removed before they are used in the Shader, with calculations made with the same value as is stored on disk. Unity assumes that GUI textures and normal mapA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.
See in Glossary
textures are authored in a linear space.

Disabling sRGB sampling

To ensure a Texture is imported as a linear color space image, in the Inspector window for the Texture:

  • Select the appropriate Texture Type for the Texture’s intended use.

  • Uncheck sRGB (Color Texture) if it is shown.

The Inspector window for a Texture. Note the setting for sRGB (Color Texture) is unchecked. This ensures the Texture is imported as a linear color space image
The Inspector window for a Texture. Note the setting for sRGB (Color Texture) is unchecked. This ensures the Texture is imported as a linear color space image
Gamma Textures with linear rendering
High dynamic range
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961