Description
The WithMultiSample2X
method is a member of the TextureBuilder
class in the Sandbox namespace. This method configures the texture to use 2x multisampling, which is a technique used to improve image quality by reducing aliasing effects. Multisampling achieves this by sampling a pixel multiple times at different sample points and averaging the results.
Usage
To use the WithMultiSample2X
method, you need to have an instance of TextureBuilder
. Call this method on the instance to set the multisampling level to 2x. This method returns the TextureBuilder
instance, allowing for method chaining.
Example
// Example of using WithMultiSample2X
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder = textureBuilder.WithMultiSample2X();
// Continue configuring the texture
textureBuilder = textureBuilder.WithSize(1024, 768);
// Create the texture
Texture texture = textureBuilder.Create("MyTexture", false, data, data.Length);