The ColorSpace
property of the TextureInput
class specifies the color space used when compiling a texture in the Shader Graph editor. This property is crucial for ensuring that textures are processed with the correct color space, which can affect the appearance of the texture in the final rendered scene.
To use the ColorSpace
property, you need to have an instance of the TextureInput
class. You can then get or set the ColorSpace
property to define how the texture should be compiled in terms of color space.
Example usage:
TextureInput textureInput = new TextureInput();
textureInput.ColorSpace = Editor.ShaderGraph.TextureColorSpace.Linear;
In this example, the color space for the texture is set to linear, which is often used for physically based rendering workflows.