Description
The WithMultiSample8X
method is part of the TextureBuilder
class in the Sandbox API. This method configures the texture to utilize 8x 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 WithMultiSample8X
method, you need to have an instance of TextureBuilder
. Call this method on the instance to set the texture's multisampling level to 8x. This method returns the TextureBuilder
instance, allowing for method chaining.
Example
// Example of using WithMultiSample8X
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder = textureBuilder.WithMultiSample8X();
// Continue configuring the texture
textureBuilder = textureBuilder.WithSize(1024, 768);
// Create the texture
Texture texture = textureBuilder.Create("MyTexture", false, data, data.Length);