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

sebescudie 15/12/2016 - 10:43

interesting, thanks!

anonymous user login

Shoutbox

~1h ago

mino: @manuel current possibilities are hololens remote integration, which send video stream from PC

~1h ago

StiX: It is one week before deadline for LINK summer camp applications -> go and sing up! link-summer-camp-slovakia-edition

~1d ago

domj: Day 2 of Schéma workshop, stream now live. Starting at 15:00 CET https://www.twitch.tv/dominikjancik Yesterday dind't work out due to time issues.

~1d ago

udo2013: hello. does anyone know why with fractals no camera works? does this have something to do with raymarching?

~3d ago

manuel: Anyone doing stuff with hololens ?

~5d ago

domj: Here's the Schéma presentation from yesterday's meetup: https://youtu.be/_oqonrkE3xU