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 | #include <gpu/StandardShaderLib.h> | 15 | #include <gpu/StandardShaderLib.h> |
| 16 | 16 | ||
| 17 | #include <RenderArgs.h> | 17 | #include <RenderArgs.h> |
| 18 | 18 | #include "StencilMaskPass.h" | |
| 19 | #include "FramebufferCache.h" | 19 | #include "FramebufferCache.h" |
| 20 | 20 | ||
| 21 | #include "toneMapping_frag.h" | 21 | #include "toneMapping_frag.h" |
| @@ -39,6 +39,7 @@ void ToneMappingEffect::init() { · 17 unmodified lines | |||
| 39 | slotBindings.insert(gpu::Shader::Binding(std::string("colorMap"), ToneMappingEffect_LightingMapSlot)); | 39 | slotBindings.insert(gpu::Shader::Binding(std::string("colorMap"), ToneMappingEffect_LightingMapSlot)); |
| 40 | gpu::Shader::makeProgram(*blitProgram, slotBindings); | 40 | gpu::Shader::makeProgram(*blitProgram, slotBindings); |
| 41 | auto blitState = std::make_shared<gpu::State>(); | 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 | blitState->setColorWriteMask(true, true, true, true); | 43 | blitState->setColorWriteMask(true, true, true, true); |
| 43 | _blitLightBuffer = gpu::PipelinePointer(gpu::Pipeline::create(blitProgram, blitState)); | 44 | _blitLightBuffer = gpu::PipelinePointer(gpu::Pipeline::create(blitProgram, blitState)); |
| 44 | } | 45 | } |