TextureArrayBuilder WithDepthFormat()

book_4_sparkGenerated
code_blocksInput

Description

The WithDepthFormat method is a part of the TextureArrayBuilder class in the Sandbox namespace. This method configures the texture array to use a depth format, which is typically used for depth buffering in rendering pipelines. This method is useful when you need to create textures that store depth information, such as shadow maps or depth textures for post-processing effects.

Usage

To use the WithDepthFormat method, you must first create an instance of the TextureArrayBuilder class. Then, call the WithDepthFormat method on this instance to specify that the texture array should use a depth format. This method can be chained with other configuration methods provided by TextureArrayBuilder to further customize the texture array.

Example

// Example of using WithDepthFormat
TextureArrayBuilder builder = new TextureArrayBuilder();
builder.WithDepthFormat();

// Continue configuring the builder as needed
builder.WithSize(1024, 1024)
       .WithCount(1)
       .Finish();