» Stencil Mask
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Stencil Mask

module

about

Demo/helper modules for using the stencil buffer in DX11.

Contains 2 modules: StencilMask (DX11.RenderState Write), & StencilMask (DX11.RenderState Read)

You can use 8 bits of the depth-buffer as a stencil buffer. With the Write module we set each bit individually to render 8 independent masks for free (or at slightly-reduced-but-still-quite-ok depth accuracy).

Using the Read module you can limit a shader to only drawing the pixels flagged by any of your mask(s)

You can set all of this in your shader also, but can be handy to not have to modify everything.

Edit: Have changed these to be renderstate only, as StencilReference (DX11.Layer) had some issues and is being depreciated.

download

StencilMaskRenderState.zip
16.12.16 [07:44 UTC] by everyoneishappy | 794 downloads
Updated to RenderState Version

sebescudie 15/12/2016 - 10:43

interesting, thanks!

anonymous user login

Shoutbox

~5d ago

joreg: The summer season of vvvv workshops at The NODE Institute is out: https://thenodeinstitute.org/ss24-vvvv-intermediates/

~5d ago

domj: If you happen to be in Prague, come join us at the Schema workshop on Thursday 25.4. :) https://www.facebook.com/events/395516526614988/?ti=ls

~16d ago

joreg: Postponed: Next vvvv beginner course starting April 29: https://thenodeinstitute.org/courses/vvvv-beginner-class-summer-2024/

~1mth ago

~2mth ago

joreg: The Winter Season of vvvv workshops is now over but all recordings are still available for purchase: https://thenodeinstitute.org/ws23-vvvv-intermediates/