instantreality 1.0

Component:
Shape
Status:
fully implemented
Structure type:
concrete
Standard:
Avalon

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
SFInt32 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.
MFString 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
SFNode metadata SFNode inputOutput MetadataObject container for payload metadata inside MetadataSet element
SFString stencilFunc SFString inputOutput none [NONE, NEVER, LESS, LEQUAL, GREATER, GEQUAL, EQUAL, NOTEQUAL, ALWAYS] comparison function for stencil test
SFInt32 stencilMask SFInt32 inputOutput 0 non negative bitmask, ANDed with the reference value and the stored stencil value when the test is done
SFString stencilOpFail SFString inputOutput keep [KEEP, ZERO, REPLACE, INCR, DECR, INVERT] applied if fragment fails stencil test
SFString stencilOpZFail SFString inputOutput keep [KEEP, ZERO, REPLACE, INCR, DECR, INVERT] applied if fragment fails depth test
SFString stencilOpZPass SFString inputOutput keep [KEEP, ZERO, REPLACE, INCR, DECR, INVERT] applied if fragment passes depth test
SFInt32 stencilValue SFInt32 inputOutput 0 reference value (between 0 and 2*numberOfBitplanes-1), comparison only if bitmask 1