DepthStencilState¶
data class DepthStencilState(
val format: GPUTextureFormat,
val depthWriteEnabled: Boolean? = null,
val depthCompare: GPUCompareFunction? = null,
val stencilFront: GPUStencilFaceState = StencilFaceState(),
val stencilBack: GPUStencilFaceState = StencilFaceState(),
val stencilReadMask: GPUStencilValue,
val stencilWriteMask: GPUStencilValue,
val depthBias: GPUDepthBias = 0,
val depthBiasSlopeScale: Float = 0.0f,
val depthBiasClamp: Float = 0.0f
) : GPUDepthStencilState
Constructors¶
DepthStencilState¶
constructor(
format: GPUTextureFormat,
depthWriteEnabled: Boolean? = null,
depthCompare: GPUCompareFunction? = null,
stencilFront: GPUStencilFaceState = StencilFaceState(),
stencilBack: GPUStencilFaceState = StencilFaceState(),
stencilReadMask: GPUStencilValue,
stencilWriteMask: GPUStencilValue,
depthBias: GPUDepthBias = 0,
depthBiasSlopeScale: Float = 0.0f,
depthBiasClamp: Float = 0.0f
)
Properties¶
depthBias¶
open override val depthBias: GPUDepthBias
Constant depth bias added to each triangle fragment. See biased fragment depth for details.
depthBiasClamp¶
open override val depthBiasClamp: Float
The maximum depth bias of a triangle fragment. See biased fragment depth for details.
depthBiasSlopeScale¶
open override val depthBiasSlopeScale: Float
Depth bias that scales with the triangle fragment’s slope. See biased fragment depth for details.
depthCompare¶
open override val depthCompare: GPUCompareFunction?
The comparison operation used to test fragment depths against depthStencilAttachment depth values.
depthWriteEnabled¶
open override val depthWriteEnabled: Boolean?
Indicates if this GPURenderPipeline can modify depthStencilAttachment depth values.
format¶
open override val format: GPUTextureFormat
The format of depthStencilAttachment this GPURenderPipeline will be compatible with.
stencilBack¶
open override val stencilBack: GPUStencilFaceState
Defines how stencil comparisons and operations are performed for back-facing primitives.
stencilFront¶
open override val stencilFront: GPUStencilFaceState
Defines how stencil comparisons and operations are performed for front-facing primitives.
stencilReadMask¶
open override val stencilReadMask: GPUStencilValue
Bitmask controlling which depthStencilAttachment stencil value bits are read when performing stencil comparison tests.
stencilWriteMask¶
open override val stencilWriteMask: GPUStencilValue
Bitmask controlling which depthStencilAttachment stencil value bits are written to when performing stencil operations.