Texture3DBuilder WithDepthFormat()

robot_2Generated
code_blocksInput

Description

The WithDepthFormat method is a part of the Texture3DBuilder class in the Sandbox namespace. This method configures the texture to use a depth format, which is typically used for depth buffering in 3D graphics. This method is useful when you need to create a 3D texture that will be used for depth-related operations, such as shadow mapping or depth testing.

Usage

To use the WithDepthFormat method, you should first create an instance of Texture3DBuilder. Then, call the WithDepthFormat method on this instance to specify that the texture should use a depth format. Finally, use the Finish method to build and retrieve the configured texture.

Example

// Create a new Texture3DBuilder instance
Texture3DBuilder builder = new Texture3DBuilder();

// Configure the builder to use a depth format
builder.WithDepthFormat();

// Finalize the texture creation
Texture texture = builder.Finish();