Description
The WithMSAA
method is a member of the TextureBuilder
class in the Sandbox namespace. This method allows you to specify the level of multisample anti-aliasing (MSAA) to be used for the texture being built. MSAA is a technique used to improve image quality by reducing aliasing at the edges of rendered objects.
Usage
To use the WithMSAA
method, you need to have an instance of TextureBuilder
. Call this method with a MultisampleAmount
parameter to set the desired level of MSAA for the texture. This method returns the TextureBuilder
instance, allowing for method chaining.
Example
// Example of using WithMSAA method
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder.WithMSAA(MultisampleAmount.X4); // Sets the texture to use 4x MSAA
// Continue building the texture with other settings
textureBuilder.WithSize(1024, 1024)
.WithFormat(ImageFormat.RGBA8)
.Create("MyTexture", false, data, data.Length);