Version: 2020.3
Method group is Obsolete

TextureImporter.linearTexture

切换到手册
Obsolete public bool linearTexture ;

描述

Determines whether this texture stores non-color data.

此设置仅在使用 Linear color space 时相关,并用于控制是否在对着色器中的纹理进行采样时 完成 sRGB > Linear 颜色空间转换。

大多数“常规纹理”将颜色数据存储在 sRGB 颜色空间中,对于这些纹理,此标志应设置为 false。

非颜色纹理通常存储为线性值,并且 GPU 不应进行任何颜色空间转换。 在这种情况下,此标志设置为 true。默认情况下,Unity 将各种非颜色纹理(如法线贴图)标记为“线性”。 旧版 IMGUI 纹理也应设置为“线性”。

此标志对应于 Advanced texture import settings 中的“Bypass sRGB Sampling”选项。

另请参阅:Linear and Gamma renderingPlayerSettings.colorSpace