Description
The WithMips
method is part of the TextureBuilder
class in the Sandbox namespace. This method allows you to specify the number of mipmap levels for a texture. Mipmaps are pre-calculated, optimized sequences of images, each of which is a progressively lower resolution representation of the same image. They are used to increase rendering speed and reduce aliasing artifacts.
Usage
To use the WithMips
method, you need to have an instance of TextureBuilder
. Call this method with the desired number of mipmap levels as an integer parameter. This method returns the TextureBuilder
instance, allowing for method chaining.
Example
// Example of using WithMips method
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder = textureBuilder.WithMips(4);
// This sets the texture to have 4 mipmap levels.