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

sebescudie 15/12/2016 - 09:43

interesting, thanks!

anonymous user login

Shoutbox

~3d ago

auralscapes: By the way, if anyone would like to use any of my tracks or even parts thereof you are welcome. No fee. jerome@auralscapes.com

~3d ago

auralscapes: Thx for the advice. Much appreciated.

~3d ago

tonfilm: @auralscapes you can contact the author @dottore and ask him for the conditions.

~3d ago

auralscapes: A question for the group. I came across an application called Partitura. Is this app commercially available?

~4d ago

auralscapes: Don't have a clue how this all works but it is going to be an interesting journey indeed.

~7d ago

tonfilm: @all #vl now also has pin groups! vl-input-and-output-pin-groups #vvvv #creativecoding #visualprogramming #dotnet

~8d ago

evvvvil: Hey, broski, check my shader "The gamma ray feast" it goes bang and is commented with bad to mediocre jokes. https://www.shadertoy.com/view/wssXWl

~10d ago

hrovac: someone at b-seite on saturday?