Description
The WithMultisample
method is a member of the TextureArrayBuilder
class in the Sandbox namespace. This method allows you to specify the multisampling level for the texture array 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 TextureArrayBuilder
. Call this method on the instance and pass a MultisampleAmount
value to specify the desired level of multisampling. This method returns the same TextureArrayBuilder
instance, allowing for method chaining.
Example
// Create a new TextureArrayBuilder instance
TextureArrayBuilder builder = new TextureArrayBuilder();
// Set the multisample amount to 4X
builder.WithMultisample(MultisampleAmount.X4);
// Continue configuring the builder as needed
builder.WithSize(1024, 1024)
.WithFormat(ImageFormat.RGBA8)
.Finish();