Description
The WithMultisample
method is part of the Texture2DBuilder
class in the Sandbox namespace. This method allows you to specify the multisampling level for a texture being built. Multisampling is a technique used to improve image quality by reducing aliasing, which is the visual stair-stepping effect that can occur along the edges of objects.
Usage
To use the WithMultisample
method, you need to have an instance of Texture2DBuilder
. Call this method with a MultisampleAmount
parameter to set the desired level of multisampling for the texture. This method returns the Texture2DBuilder
instance, allowing for method chaining.
Example
// Example of using WithMultisample method
Texture2DBuilder builder = new Texture2DBuilder();
// Set multisampling to 4X
builder.WithMultisample(MultisampleAmount.X4);
// Continue building the texture
Texture texture = builder.Finish();