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/ToneMappingEffect.cpp (1 of 19 files). Show all

Unified · Split

libraries/render-utils/src/ToneMappingEffect.cpp+2−1
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 #include <gpu/StandardShaderLib.h>
1616
1717 #include <RenderArgs.h>
18−
18+#include "StencilMaskPass.h"
1919 #include "FramebufferCache.h"
2020
2121 #include "toneMapping_frag.h"
@@ -39,6 +39,7 @@ void ToneMappingEffect::init() { · 17 unmodified lines
3939 slotBindings.insert(gpu::Shader::Binding(std::string("colorMap"), ToneMappingEffect_LightingMapSlot));
4040 gpu::Shader::makeProgram(*blitProgram, slotBindings);
4141 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));
4243 blitState->setColorWriteMask(true, true, true, true);
4344 _blitLightBuffer = gpu::PipelinePointer(gpu::Pipeline::create(blitProgram, blitState));
4445 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t