Texture3DBuilder WithMips( int mips )

book_4_sparkGenerated
code_blocksInput

Description

The WithMips method is a member of the Texture3DBuilder class in the Sandbox namespace. This method allows you to specify the number of mipmap levels for a 3D texture being constructed. Mipmaps are used to improve texture rendering performance and quality by providing multiple resolutions of the texture.

Usage

To use the WithMips method, call it on an instance of Texture3DBuilder and pass the desired number of mipmap levels as an integer parameter. This method returns the Texture3DBuilder instance, allowing for method chaining.

Example

// Example of using WithMips method
Texture3DBuilder builder = new Texture3DBuilder();
builder.WithSize(256, 256, 256) // Set the size of the texture
       .WithFormat(ImageFormat.RGBA8) // Set the format of the texture
       .WithMips(4) // Specify 4 mipmap levels
       .Finish(); // Finalize and create the texture