Skip to content

GPUDepthStencilState

Describes depth testing, stencil testing, and depth bias for a render pipeline.

Properties

depthBias

abstract val depthBias: GPUDepthBias
Constant depth bias added to each triangle fragment. See biased fragment depth for details.

depthBiasClamp

abstract val depthBiasClamp: Float
The maximum depth bias of a triangle fragment. See biased fragment depth for details.

depthBiasSlopeScale

abstract val depthBiasSlopeScale: Float
Depth bias that scales with the triangle fragment’s slope. See biased fragment depth for details.

depthCompare

The comparison operation used to test fragment depths against depthStencilAttachment depth values.

depthWriteEnabled

abstract val depthWriteEnabled: Boolean?
Indicates if this GPURenderPipeline can modify depthStencilAttachment depth values.

format

abstract val format: GPUTextureFormat
The format of depthStencilAttachment this GPURenderPipeline will be compatible with.

stencilBack

Defines how stencil comparisons and operations are performed for back-facing primitives.

stencilFront

Defines how stencil comparisons and operations are performed for front-facing primitives.

stencilReadMask

Bitmask controlling which depthStencilAttachment stencil value bits are read when performing stencil comparison tests.

stencilWriteMask

Bitmask controlling which depthStencilAttachment stencil value bits are written to when performing stencil operations.