Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 19 files). Show all
Unified · Split
| @@ -243,7 +243,7 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo · 242 unmodified lines | ||
| 243 | 243 | state->setColorWriteMask(true, true, true, false); |
| 244 | 244 | |
| 245 | 245 | 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); | |
| 247 | 247 | |
| 248 | 248 | state->setCullMode(gpu::State::CULL_BACK); |
| 249 | 249 | // state->setCullMode(gpu::State::CULL_FRONT); |
| @@ -256,7 +256,7 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo · 6 unmodified lines | ||
| 256 | 256 | |
| 257 | 257 | } else { |
| 258 | 258 | // 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); | |
| 260 | 260 | |
| 261 | 261 | state->setCullMode(gpu::State::CULL_BACK); |
| 262 | 262 | // additive blending |