Description
The WithMultisample
method is used to specify the multisampling level for a 3D texture being built using the Texture3DBuilder
. 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, call it on an instance of Texture3DBuilder
and pass a MultisampleAmount
value that specifies the desired level of multisampling. This method returns the Texture3DBuilder
instance, allowing for method chaining.
Example
// Create a new Texture3DBuilder instance
var textureBuilder = new Texture3DBuilder();
// Set the multisample amount to 4X
textureBuilder.WithMultisample(MultisampleAmount.X4);
// Continue configuring the texture
textureBuilder.WithSize(256, 256, 256)
.WithFormat(ImageFormat.RGBA8)
.Finish();