StencilState
On this page

StencilState

Interface in Runtime

The stencil test of a pipeline.

import type { StencilState } from 'typeshade/runtime'

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

Syntax

interface StencilState extends StencilFaceState {
readonly front?: StencilFaceState;
readonly back?: StencilFaceState;
readonly readMask?: number;
readonly writeMask?: number;
readonly reference?: number;
}

Description

The four face fields apply to both faces.

Instance properties

frontoptionalread only StencilFaceState

stencilFront. Overrides for the front face. Each field replaces the shared field for that face.

backoptionalread only StencilFaceState

stencilBack. Overrides for the back face. Each field replaces the shared field for that face.

readMaskoptionalread only number

stencilReadMask: 0 to 0xFFFFFFFF, default 0xFFFFFFFF. Both tiers keep the low 8 bits.

writeMaskoptionalread only number

stencilWriteMask: 0 to 0xFFFFFFFF, default 0xFFFFFFFF. Both tiers keep the low 8 bits.

referenceoptionalread only number

setStencilReference: the reference of each draw of this pipeline, which has depth.stencil. A whole number from 0 to 255. A fraction is refused. Unset, the draw sets the pass value. A declared reference overrides pass.setStencilReference for its draws.

Source

src/runtime/program.ts, line 135, at commit af54ddad5

Edit this page Report a problem