Description
The ImageFormat.I8
field is a member of the ImageFormat
enumeration in the Sandbox namespace. This enumeration is used to specify different image formats that can be used within the s&box game engine. The I8
format represents an 8-bit grayscale image format, where each pixel is represented by a single 8-bit intensity value.
Usage
Use the ImageFormat.I8
when you need to work with grayscale images that require minimal storage and processing overhead. This format is particularly useful for images where color information is not necessary, such as height maps or masks.
Example
// Example of using ImageFormat.I8
Texture texture = new Texture("path/to/texture", ImageFormat.I8);
// Use the texture in a material or other rendering component
Material material = new Material();
material.SetTexture("DiffuseMap", texture);