Interface GPUDepthStencilState

    interface GPUDepthStencilState {
        depthBias?: number;
        depthBiasClamp?: number;
        depthBiasSlopeScale?: number;
        depthCompare?: GPUCompareFunction;
        depthWriteEnabled?: boolean;
        format: GPUTextureFormat;
        stencilBack?: GPUStencilFaceState;
        stencilFront?: GPUStencilFaceState;
        stencilReadMask?: number;
        stencilWriteMask?: number;
    }

    Properties

    depthBias?: number

    Constant depth bias added to each fragment. See [$biased fragment depth$] for details.

    depthBiasClamp?: number

    The maximum depth bias of a fragment. See [$biased fragment depth$] for details.

    depthBiasSlopeScale?: number

    Depth bias that scales with the fragment’s slope. See [$biased fragment depth$] for details.

    depthCompare?: GPUCompareFunction

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

    depthWriteEnabled?: boolean

    Indicates if this GPURenderPipeline can modify GPURenderPassDescriptor#depthStencilAttachment depth values.

    stencilBack?: GPUStencilFaceState

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

    stencilFront?: GPUStencilFaceState

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

    stencilReadMask?: number

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

    stencilWriteMask?: number

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