book_4_sparkGenerated
code_blocksInput

Description

The R16 field is a member of the ImageFormat enumeration in the Sandbox namespace. It represents an image format where each pixel is stored as a single 16-bit red channel. This format is typically used for grayscale images or for storing depth information in a compact form.

Usage

Use the R16 format when you need to store images with a single channel of 16-bit precision. This is particularly useful for depth maps or other data where only one channel is required, and high precision is necessary.

Example

// Example of using ImageFormat.R16
Texture texture = new Texture( width, height, ImageFormat.R16 );

// Set the texture data
texture.SetData( data );

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