Description
The WithMultiSample2X
method is part of the Texture2DBuilder
class in the Sandbox namespace. This method configures the texture to use 2x multisampling, which can help reduce aliasing effects by sampling each pixel multiple times and averaging the results. This is particularly useful in rendering scenarios where image quality is a priority.
Usage
To use the WithMultiSample2X
method, first create an instance of Texture2DBuilder
. Then, call the WithMultiSample2X
method on this instance to set the multisampling level to 2x. Finally, use the Finish
method to build and retrieve the configured texture.
Example
// Example of using WithMultiSample2X
Texture2DBuilder builder = new Texture2DBuilder();
Texture texture = builder
.WithSize(1024, 768)
.WithFormat(ImageFormat.RGBA8)
.WithMultiSample2X()
.Finish();
// The texture is now configured with 2x multisampling.