StencilMode
Allows to set function and reference value for stencil testing, which modifies stencil buffer values to enable or disable drawing on a per-pixel basis. The stencil test conditionally eliminates a pixel based on the outcome of a comparison between the value in the stencil buffer and a reference value.
Inheritance
Code
XML encoding
<StencilMode stencilFunc='none' stencilValue='0' stencilMask='0' stencilOpFail='keep' stencilOpZFail='keep' stencilOpZPass='keep' bitMask='-1' logFeature='' />
Classic encoding
StencilMode { stencilFunc "none" stencilValue 0 stencilMask 0 stencilOpFail "keep" stencilOpZFail "keep" stencilOpZPass "keep" bitMask -1 logFeature [""] }
Interface
Filter: X3D only | Avalon only | All
id | Name | DataType | PartType | Default | ValueType | Description |
---|---|---|---|---|---|---|
stencilFunc | SFString | inputOutput | none | [NONE, NEVER, LESS, LEQUAL, GREATER, GEQUAL, EQUAL, NOTEQUAL, ALWAYS] | comparison function for stencil test | |
stencilValue | SFInt32 | inputOutput | 0 | reference value (between 0 and 2*numberOfBitplanes-1), comparison only if bitmask 1 | ||
stencilMask | SFInt32 | inputOutput | 0 | non negative bitmask, ANDed with the reference value and the stored stencil value when the test is done | ||
stencilOpFail | SFString | inputOutput | keep | [KEEP, ZERO, REPLACE, INCR, DECR, INVERT] | applied if fragment fails stencil test | |
stencilOpZFail | SFString | inputOutput | keep | [KEEP, ZERO, REPLACE, INCR, DECR, INVERT] | applied if fragment fails depth test | |
stencilOpZPass | SFString | inputOutput | keep | [KEEP, ZERO, REPLACE, INCR, DECR, INVERT] | applied if fragment passes depth test | |
bitMask | SFInt32 | inputOutput | -1 | Controls writing of individual bits in stencil planes, here 0 means write protected and 1 write enabled (per bit), defaults to all bits are set. | ||
logFeature | MFString | inputOutput | state, child, parent, route, eventIn, eventOut | controls the logging of changes, state: log state changes (e.g. live), child: log child add/remove, parent: log parent add/remove, route: log route add/remove; eventIn: log receiving of events, eventOut: log sending of events: guiView, runtime system should create node-view, guiEdit: runtime system should create node-editeverything: log everything | ||
metadata | SFNode | inputOutput | MetadataObject | container for payload metadata inside MetadataSet element |