Description
The WithMultiSample4X
method is a member of the Texture2DBuilder
class in the Sandbox namespace. This method configures the texture to use 4x multisampling, which is a technique used to improve the quality of the texture by reducing aliasing effects. Multisampling is particularly useful in rendering scenarios where smooth edges are desired.
Usage
To use the WithMultiSample4X
method, first create an instance of Texture2DBuilder
. Then, call the WithMultiSample4X
method on this instance to set the multisampling level to 4x. This method returns the same Texture2DBuilder
instance, allowing for method chaining. Finally, call the Finish
method to create the texture with the specified settings.
Example
// Example of using WithMultiSample4X
Texture2DBuilder builder = new Texture2DBuilder();
Texture texture = builder
.WithSize(1024, 1024)
.WithFormat(ImageFormat.RGBA8)
.WithMultiSample4X()
.Finish();
// The texture is now created with 4x multisampling.