Difference between revisions of "Template:NifSE NiStencilProperty Stencil Functions"
Jump to navigation
Jump to search
Template:NifSE NiStencilProperty Stencil Functions (edit)
Revision as of 17:40, 23 January 2011
, 17:40, 23 January 2011no edit summary
imported>DragoonWraith |
imported>DragoonWraith |
||
Line 2: | Line 2: | ||
</noinclude>== Stencil Functions == | </noinclude>== Stencil Functions == | ||
This function determines whether a particular pixel will be drawn based on the contents of the stencil buffer at that location. The formula is <tt>StencilFunction([[NiStencilPropertyGetStencilMask|mask]] & buffer value, mask & [[NiStencilPropertyGetStencilRef|ref]])</tt>. Thus, assuming the default mask value of <tt>0xFFFFFFFF</tt>, a StencilFunction value of 1 (<tt>LESS</tt>)would mean that the stencil property tests <tt>value < ref</tt>, and if true, draws the pixel in question. | This function determines whether a particular pixel will be drawn based on the contents of the stencil buffer at that location. The formula is <tt>StencilFunction([[NiStencilPropertyGetStencilMask|mask]] & buffer value, mask & [[NiStencilPropertyGetStencilRef|ref]])</tt>. Thus, assuming the default mask value of <tt>0xFFFFFFFF</tt>, a StencilFunction value of 1 (i.e. <tt>LESS</tt>) would mean that the stencil property tests <tt>value < ref</tt>, and if true, draws the pixel in question. | ||
* <tt>NEVER = 0</tt> | * <tt>NEVER = 0</tt> |