Showing the changes to libraries/render-utils/src/RenderForwardTask.cpp (1 of 18 files). Show all
Unified · Split
| @@ -17,6 +17,7 @@ · 16 unmodified lines | |||
| 17 | #include <PathUtils.h> | 17 | #include <PathUtils.h> |
| 18 | #include <ViewFrustum.h> | 18 | #include <ViewFrustum.h> |
| 19 | #include <gpu/Context.h> | 19 | #include <gpu/Context.h> |
| 20 | #include "StencilMaskPass.h" | ||
| 20 | 21 | ||
| 21 | #include "FramebufferCache.h" | 22 | #include "FramebufferCache.h" |
| 22 | #include "TextureCache.h" | 23 | #include "TextureCache.h" |
| @@ -93,7 +94,7 @@ void PrepareFramebuffer::run(const RenderContextPointer& renderContext, · 70 unmodified lines | |||
| 93 | gpu::Framebuffer::BUFFER_COLOR0 | | 94 | gpu::Framebuffer::BUFFER_COLOR0 | |
| 94 | gpu::Framebuffer::BUFFER_DEPTH | | 95 | gpu::Framebuffer::BUFFER_DEPTH | |
| 95 | gpu::Framebuffer::BUFFER_STENCIL, | 96 | gpu::Framebuffer::BUFFER_STENCIL, |
| 96 | vec4(vec3(0), 1), 1.0, 0.0, true); | 97 | vec4(vec3(0), 1), 1.0, 0, true); |
| 97 | }); | 98 | }); |
| 98 | 99 | ||
| 99 | framebuffer = _framebuffer; | 100 | framebuffer = _framebuffer; |
| @@ -130,11 +131,7 @@ const gpu::PipelinePointer Stencil::getPipeline() { · 30 unmodified lines | |||
| 130 | 131 | ||
| 131 | auto state = std::make_shared<gpu::State>(); | 132 | auto state = std::make_shared<gpu::State>(); |
| 132 | state->setDepthTest(true, false, gpu::LESS_EQUAL); | 133 | state->setDepthTest(true, false, gpu::LESS_EQUAL); |
| 133 | const gpu::int8 STENCIL_OPAQUE = 1; | 134 | PrepareStencil::drawBackground(*state); |
| 134 | state->setStencilTest(true, 0xFF, gpu::State::StencilTest(STENCIL_OPAQUE, 0xFF, gpu::ALWAYS, | ||
| 135 | gpu::State::STENCIL_OP_REPLACE, | ||
| 136 | gpu::State::STENCIL_OP_REPLACE, | ||
| 137 | gpu::State::STENCIL_OP_KEEP)); | ||
| 138 | 135 | ||
| 139 | _stencilPipeline = gpu::Pipeline::create(program, state); | 136 | _stencilPipeline = gpu::Pipeline::create(program, state); |
| 140 | } | 137 | } |