Falcor icon indicating copy to clipboard operation
Falcor copied to clipboard

Any example of stencil and depth test ?

Open 625673575 opened this issue 6 years ago • 3 comments

I am try to render an object that have 2 passes,but involve different depth test ,and simply create a new DepthStencilState set with different Desc DepthStencilState::Desc::setDepthFunc(DepthStencilState::Func::Greater); is not working at all,and as well the stencil test op, Is DepthPass class is what I exactly looking for?

625673575 avatar Feb 28 '19 06:02 625673575

Does your depth-buffer have a stencil channel? Falcor defaults to D32Float which has no stencil

nbentyNV avatar Feb 28 '19 20:02 nbentyNV

My idea don't involve depth-buffer or stencil yet,but simply render an object behind anther one in grey is unable. and i ve try almost all permutation.all those things may need a handy example.

625673575 avatar Mar 04 '19 10:03 625673575

If you want to use depth and stencil tests, you need a depth-stencil buffer.

nbentyNV avatar Mar 04 '19 19:03 nbentyNV