History

Removing cruft and organizing the stencil config

samcake committed 9 years ago

Commit 9c1e99f1 parent ea6be9319 files · +74 −249Browse files

Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 19 files). Show all

Unified · Split

libraries/render-utils/src/DeferredLightingEffect.cpp+2−2
@@ -243,7 +243,7 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo · 242 unmodified lines
243243 state->setColorWriteMask(true, true, true, false);
244244
245245 if (lightVolume) {
246− state->setStencilTest(true, 0x00, gpu::State::StencilTest(PrepareStencil::STENCIL_SCENE, 0xFF, gpu::EQUAL, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP));
246+ PrepareStencil::testShape(*state);
247247
248248 state->setCullMode(gpu::State::CULL_BACK);
249249 // state->setCullMode(gpu::State::CULL_FRONT);
@@ -256,7 +256,7 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo · 6 unmodified lines
256256
257257 } else {
258258 // Stencil test all the light passes for objects pixels only, not the background
259− state->setStencilTest(true, 0x00, gpu::State::StencilTest(PrepareStencil::STENCIL_SCENE, 0xFF, gpu::EQUAL, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP));
259+ PrepareStencil::testShape(*state);
260260
261261 state->setCullMode(gpu::State::CULL_BACK);
262262 // additive blending