Description
The D32FS8
field is a member of the ImageFormat
enumeration in the Sandbox namespace. It represents a specific image format used for rendering and texture management in the s&box game engine. This format is typically used for depth-stencil textures, combining a 32-bit floating-point depth component with an 8-bit stencil component.
Usage
Use ImageFormat.D32FS8
when you need to specify a texture format that requires high precision depth information along with stencil data. This is particularly useful in scenarios involving complex depth testing and stencil operations, such as shadow mapping or advanced rendering techniques.
Example
// Example of using ImageFormat.D32FS8 in a texture creation
Texture depthStencilTexture = new Texture(
width: 1024,
height: 1024,
format: ImageFormat.D32FS8
);
// Use the texture in a rendering pipeline
RenderTarget renderTarget = new RenderTarget(
depthStencil: depthStencilTexture
);