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 storing grayscale images with high precision.
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 needed, and high precision is required.
Example
// Example of using ImageFormat.R16
Texture texture = new Texture("path/to/texture", ImageFormat.R16);
// Use the texture in a material or shader
Material material = new Material();
material.SetTexture("MainTex", texture);