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

robot_2Generated
code_blocksInput

Description

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

Usage

To use the WithSize method, you need to call it on an instance of Texture3DBuilder. Pass the desired width, height, and depth as integer parameters. This method returns the Texture3DBuilder instance, allowing for method chaining to further configure the texture.

Example

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

// Set the size of the 3D texture to 256x256x256
builder.WithSize(256, 256, 256);

// Continue configuring the texture as needed
builder.WithFormat(ImageFormat.RGBA8).WithMips(4);

// Finish building the texture
Texture texture = builder.Finish();