Description
The DXT3
field is a member of the ImageFormat
enumeration in the Sandbox namespace. It represents a specific image format used for texture compression. DXT3 is a block compression format that provides a balance between image quality and file size, making it suitable for textures with sharp alpha transitions.
DXT3 uses a 4x4 block of pixels, compressing each block into 128 bits. It supports explicit alpha, meaning each pixel has a 4-bit alpha value, allowing for more detailed alpha transitions compared to DXT1, but at the cost of larger file size.
Usage
Use ImageFormat.DXT3
when you need to compress textures that require detailed alpha transitions, such as those with sharp edges or varying transparency. This format is particularly useful in scenarios where maintaining alpha detail is crucial, but you still want to benefit from the reduced file size offered by compression.
To apply this format, you typically specify it when loading or saving textures in your application, ensuring that the texture data is compressed using the DXT3 algorithm.
Example
// Example of using ImageFormat.DXT3
Texture texture = new Texture("path/to/texture.png");
texture.Format = ImageFormat.DXT3;
texture.Load();
// This sets the texture to use DXT3 compression, which is suitable for textures with detailed alpha transitions.