Description
The DXT1_ONEBITALPHA
field is a member of the ImageFormat
enumeration in the Sandbox namespace. This format is used for images that require DXT1 compression with a single bit of alpha transparency. It is particularly useful for textures that need to maintain a small file size while still supporting simple transparency, such as binary alpha masks.
Usage
Use ImageFormat.DXT1_ONEBITALPHA
when you need to compress textures with a single bit of alpha transparency. This format is ideal for scenarios where you need to save memory and bandwidth, such as in game development for textures that do not require full alpha channel precision.
Example
// Example of using ImageFormat.DXT1_ONEBITALPHA
Texture texture = new Texture("path/to/texture.png");
texture.Format = ImageFormat.DXT1_ONEBITALPHA;
// Load the texture with the specified format
texture.Load();