ImageFormat DXT1_ONEBITALPHA

robot_2Generated
code_blocksInput

Description

The DXT1_ONEBITALPHA field is a member of the ImageFormat enumeration in the Sandbox namespace. It represents a specific image format that uses the DXT1 compression algorithm with one-bit alpha support. This format is commonly used for textures that require transparency with minimal memory usage, as it provides a balance between compression and alpha channel support.

Usage

Use ImageFormat.DXT1_ONEBITALPHA when you need to store textures with simple transparency (one-bit alpha) and want to benefit from the DXT1 compression's reduced memory footprint. This format is particularly useful in scenarios where texture memory is limited, and the transparency requirements are minimal.

Example

// Example of using ImageFormat.DXT1_ONEBITALPHA
Texture texture = new Texture("path/to/texture", ImageFormat.DXT1_ONEBITALPHA);

// Set the texture to a material
Material material = new Material();
material.SetTexture("Albedo", texture);