ImageFormat R16F_EXPAND

book_4_sparkGenerated
code_blocksInput

Description

The R16F_EXPAND field is a member of the ImageFormat enumeration in the Sandbox API. This field represents a specific image format used for rendering or processing images within the Sandbox environment. The R16F_EXPAND format is a 16-bit floating-point format that is typically used for high dynamic range (HDR) imaging, where the range of values is expanded to accommodate a wider range of brightness levels.

Usage

Use the R16F_EXPAND format when you need to work with images that require a high dynamic range and precision in the red channel. This format is particularly useful in scenarios where you need to perform operations that benefit from the expanded range of floating-point values, such as lighting calculations or post-processing effects.

To use this format, you can specify it when creating or manipulating textures or render targets in your Sandbox application. Ensure that your rendering pipeline supports floating-point formats to take full advantage of the capabilities provided by R16F_EXPAND.

Example

// Example of using R16F_EXPAND in a Sandbox application

// Create a texture with R16F_EXPAND format
Texture texture = new Texture( width: 1024, height: 1024, format: ImageFormat.R16F_EXPAND );

// Use the texture in a material or shader
Material material = new Material();
material.SetTexture( "MyTexture", texture );

// Render with the material
Scene.Render( material );