Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HRESULT resultHelper;
- D3D11_DEPTH_STENCIL_DESC enableDepth;
- enableDepth.DepthEnable = true;
- enableDepth.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; // enables writes to the depth buffer
- enableDepth.DepthFunc = D3D11_COMPARISON_LESS; //usual depth test is preformed
- //FrontFace indicates how the stencil buffer works for front facing triangles
- //Direct3D, Luna page 376
- enableDepth.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
- enableDepth.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
- enableDepth.FrontFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE;
- enableDepth.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
- //BackFace indicates how the stencil buffer works for back facing triangles
- //Direct3D, Luna page 376
- enableDepth.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
- enableDepth.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
- enableDepth.BackFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE;
- enableDepth.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
Advertisement
Add Comment
Please, Sign In to add comment