Change stencil mask used with Haze.

This commit is contained in:
Nissim Hadar 2017-11-01 17:39:37 -07:00
parent be74b5c9ed
commit 67552d2b7d
3 changed files with 8 additions and 2 deletions

View file

@ -140,7 +140,7 @@ void DrawHaze::run(const render::RenderContextPointer& renderContext, const Inpu
gpu::StatePointer state = gpu::StatePointer(new gpu::State());
// Mask out haze on the tablet
PrepareStencil::testNoAA(*state);
PrepareStencil::testMaskNoAA(*state);
gpu::Shader::BindingSet slotBindings;
slotBindings.insert(gpu::Shader::Binding(std::string("hazeBuffer"), HazeEffect_ParamsSlot));

View file

@ -128,6 +128,11 @@ void PrepareStencil::testNoAA(gpu::State& state) {
gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP));
}
void PrepareStencil::testMaskNoAA(gpu::State& state) {
state.setStencilTest(true, 0x00, gpu::State::StencilTest(0, STENCIL_MASK | STENCIL_NO_AA, gpu::EQUAL,
gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP));
}
// Pass if this area WAS marked as BACKGROUND
// (see: model/src/Skybox.cpp, procedural/src/ProceduralSkybox.cpp)
void PrepareStencil::testBackground(gpu::State& state) {

View file

@ -49,8 +49,9 @@ public:
static void drawMask(gpu::State& state);
static void drawBackground(gpu::State& state);
static void testNoAA(gpu::State& state);
static void testMask(gpu::State& state);
static void testNoAA(gpu::State& state);
static void testMaskNoAA(gpu::State& state);
static void testBackground(gpu::State& state);
static void testShape(gpu::State& state);
static void testMaskDrawShape(gpu::State& state);