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
243 state->setColorWriteMask(true, true, true, false);243 state->setColorWriteMask(true, true, true, false);
244 244
245 if (lightVolume) {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 state->setCullMode(gpu::State::CULL_BACK);248 state->setCullMode(gpu::State::CULL_BACK);
249 // state->setCullMode(gpu::State::CULL_FRONT);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 } else {257 } else {
258 // Stencil test all the light passes for objects pixels only, not the background258 // 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 state->setCullMode(gpu::State::CULL_BACK);261 state->setCullMode(gpu::State::CULL_BACK);
262 // additive blending262 // additive blending