Aller au contenu

MultisampleState

data class MultisampleState(
    val count: GPUSize32, 
    val mask: GPUSampleMask, 
    val alphaToCoverageEnabled: Boolean = false
) : GPUMultisampleState
Describes sample count, sample mask, and alpha-to-coverage behavior.

Constructors

MultisampleState

constructor(
    count: GPUSize32, 
    mask: GPUSampleMask, 
    alphaToCoverageEnabled: Boolean = false
)

Properties

alphaToCoverageEnabled

open override val alphaToCoverageEnabled: Boolean
When true indicates that a fragment’s alpha channel should be used to generate a sample coverage mask.

count

open override val count: GPUSize32
Number of samples per pixel. This GPURenderPipeline will be compatible only with attachment textures (colorAttachments and depthStencilAttachment) with matching sampleCounts.

mask

open override val mask: GPUSampleMask
Mask determining which samples are written to. See [GPUMultisampleState.mask in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpumultisamplestate-mask).