TextureProcessor EncodeRGBM

robot_2Generated
code_blocksInput

Description

The EncodeRGBM field is a member of the TextureProcessor enumeration within the Editor.ShaderGraph namespace. This enumeration is used to specify different processing techniques that can be applied to textures within the Shader Graph editor. The EncodeRGBM option is specifically used to encode textures using the RGBM (Red, Green, Blue, Multiplier) format, which is a method for encoding high dynamic range (HDR) images into a standard 8-bit per channel format.

Usage

To use the EncodeRGBM field, you would typically select it as a processing option when configuring a texture in the Shader Graph editor. This is useful when you need to store HDR data in a format that is compatible with standard 8-bit textures, allowing for efficient storage and rendering.

Example usage in code might involve setting a texture's processing mode to EncodeRGBM when preparing it for use in a shader:

Example

// Example of setting a texture processor to EncodeRGBM
TextureProcessor processor = TextureProcessor.EncodeRGBM;

// Use the processor in a hypothetical texture processing function
ProcessTexture(myTexture, processor);

void ProcessTexture(Texture texture, TextureProcessor processor)
{
    // Implementation of texture processing based on the processor type
    switch (processor)
    {
        case TextureProcessor.EncodeRGBM:
            // Apply RGBM encoding to the texture
            break;
        // Handle other cases
    }
}