Description
The WithMultiSample4X
method configures the TextureBuilder
to use 4x multisampling. Multisampling is a technique used in graphics rendering to improve image quality by reducing aliasing, which is the visual stair-stepping effect that can occur on the edges of objects. By using 4x multisampling, the texture will have a higher quality with smoother edges, at the cost of increased computational resources.
Usage
To use the WithMultiSample4X
method, you need to have an instance of TextureBuilder
. Call this method on the instance to set the multisampling level to 4x. This method is chainable, meaning you can call other configuration methods on the same TextureBuilder
instance in a fluent style.
Example
// Example of using WithMultiSample4X
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder.WithMultiSample4X();
// Continue configuring the texture as needed
textureBuilder.WithSize(1024, 1024);
textureBuilder.WithFormat(ImageFormat.RGBA8);
// Create the texture
Texture texture = textureBuilder.Create("MyTexture", false, data, data.Length);