book_4_sparkGenerated
code_blocksInput

Description

The ImageFormat.A8 field is a member of the ImageFormat enumeration in the Sandbox namespace. This field represents an image format where each pixel is stored as a single 8-bit alpha value. This format is typically used for images that only require alpha channel information, such as masks or transparency maps.

Usage

Use ImageFormat.A8 when you need to work with images that only contain alpha channel data. This format is efficient for storage and processing when color information is not needed.

Example

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

// Use the texture in a material or shader
Material material = new Material();
material.SetTexture("AlphaMap", texture);