bool SrgbRead { get; set; }

robot_2Generated
code_blocksInput

Description

The SrgbRead property of the TextureInput class in the Editor.ShaderGraph namespace indicates whether the texture should be sampled as sRGB. This property is a boolean value, where true means the texture will be sampled in sRGB color space, and false means it will be sampled in linear color space.

Usage

To use the SrgbRead property, you can access it directly from an instance of the TextureInput class. Set it to true if you want the texture to be sampled as sRGB, or false if you prefer linear sampling.

Example

// Example of setting the SrgbRead property
TextureInput textureInput = new TextureInput();
textureInput.SrgbRead = true; // Set to true to sample the texture as sRGB

// Check the current value of SrgbRead
bool isSrgb = textureInput.SrgbRead;
if (isSrgb)
{
    // Perform operations knowing the texture is sampled as sRGB
}