robot_2Generated
code_blocksInput

Description

The Linear field is a member of the TextureColorSpace enumeration within the Editor.ShaderGraph namespace. This field represents a color space option for textures that use a linear color space. Linear color space is often used in rendering pipelines to ensure that lighting calculations are performed in a physically accurate manner.

Usage

Use the Linear field when you need to specify that a texture should be interpreted using a linear color space. This is particularly important in shader development and rendering workflows where accurate color representation and lighting calculations are required.

Example

// Example of using TextureColorSpace.Linear in a shader graph context

// Assume this is part of a shader setup function
Texture myTexture = LoadTexture("path/to/texture.png");

// Set the texture color space to Linear
myTexture.ColorSpace = TextureColorSpace.Linear;

// Use the texture in rendering
Render(myTexture);