Showing the changes to libraries/render-utils/src/ToneMappingEffect.cpp (1 of 19 files). Show all
Unified · Split
| @@ -15,7 +15,7 @@ · 14 unmodified lines | ||
| 15 | 15 | #include <gpu/StandardShaderLib.h> |
| 16 | 16 | |
| 17 | 17 | #include <RenderArgs.h> |
| 18 | − | |
| 18 | +#include "StencilMaskPass.h" | |
| 19 | 19 | #include "FramebufferCache.h" |
| 20 | 20 | |
| 21 | 21 | #include "toneMapping_frag.h" |
| @@ -39,6 +39,7 @@ void ToneMappingEffect::init() { · 17 unmodified lines | ||
| 39 | 39 | slotBindings.insert(gpu::Shader::Binding(std::string("colorMap"), ToneMappingEffect_LightingMapSlot)); |
| 40 | 40 | gpu::Shader::makeProgram(*blitProgram, slotBindings); |
| 41 | 41 | auto blitState = std::make_shared<gpu::State>(); |
| 42 | + blitState->setStencilTest(true, 0xFF, gpu::State::StencilTest(PrepareStencil::STENCIL_SCENE, 0xFF, gpu::EQUAL, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP)); | |
| 42 | 43 | blitState->setColorWriteMask(true, true, true, true); |
| 43 | 44 | _blitLightBuffer = gpu::PipelinePointer(gpu::Pipeline::create(blitProgram, blitState)); |
| 44 | 45 | } |