Stencil Mask
Author: | everyoneishappy |
Date: | 15 Dec, 2016 |
Category: | module |
Download
64bit
Updated to RenderState Version
Description

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.
Comments
Comments are no longer accepted.Please create a new topic in the vvvv beta forum to discuss this contribution.
interesting, thanks!