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

Stencil Mask

module depth stencil depthbuffer dx11

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 | 406 downloads
Updated to RenderState Version

sebescudie 15/12/2016 - 10:43

interesting, thanks!

anonymous user login

Shoutbox

~19h ago

domj: Fun with feedback loops https://youtu.be/44ewBE2CQnE

~1d ago

~2d ago

joreg: @knoeterich thanks for the heads-up, you'll have another chance every 2 weeks..

~2d ago

knoeterich: i had to cancel my free ticket for the vvvv-gamma workshop today, cause i got sick over night. maybe someone can take my place?

~2d ago

bo27: Hi! I'll be in London at Oct 24-28, would have some spare time to talk about business/vvvv/NFL/drinks. Please contact me if interested

~2d ago

joreg: reminder: this tuesday, oct 22nd: #vvvv meetup in #berlin 14-berlin-vvvv-meetup #visualprogramming

~3d ago

metrowave: @h99, nice site + useful...

~5d ago

h99: Moon, dammit

~5d ago

h99: NASA's CGI Monn kit https://svs.gsfc.nasa.gov/4720

~5d ago