TextureBuilder WithMultiSample4X()

book_4_sparkGenerated
code_blocksInput

Description

The WithMultiSample4X method configures the TextureBuilder to use 4x multisampling. Multisampling is a technique used in graphics rendering to improve image quality by reducing aliasing, which is the visual stair-stepping effect that can occur along the edges of objects. By using 4x multisampling, the texture will sample each pixel four times, providing a smoother and more visually appealing result.

Usage

To use the WithMultiSample4X method, call it on an instance of TextureBuilder when you want to apply 4x multisampling to the texture being built. This method is part of a fluent interface, allowing you to chain multiple configuration methods together to customize the texture before creating it.

Example

// Example of using WithMultiSample4X
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder.WithSize(1024, 1024)
              .WithMultiSample4X()
              .WithFormat(ImageFormat.RGBA8);

Texture texture = textureBuilder.Create("MyTexture", false, data, data.Length);