Texture3DBuilder WithSize( int width, int height, int depth )
Texture3DBuilder WithSize( Vector3 size )

book_4_sparkGenerated
code_blocksInput

Description

The WithSize method of the Texture3DBuilder class allows you to specify the dimensions of a 3D texture. This method is essential for defining the size of the texture in terms of width, height, and depth, which are critical parameters for 3D texture creation.

Usage

To use the WithSize method, you need to provide three integer parameters: width, height, and depth. These parameters define the dimensions of the 3D texture you are building. After setting the size, you can chain other configuration methods to further customize the texture before finalizing it with the Finish method.

Example

// Example of using the WithSize method
Texture3DBuilder builder = new Texture3DBuilder();
builder.WithSize(256, 256, 256)
       .WithFormat(ImageFormat.RGBA8)
       .WithStaticUsage();

Texture texture = builder.Finish();
// The texture is now created with the specified size and format.