From 12095fed96eff31ade799f75863f34e996cd9d8b Mon Sep 17 00:00:00 2001 From: Phil Palmer Date: Tue, 5 Jan 2021 00:05:11 -0500 Subject: [PATCH] Disable z-write for fonts, grid entities and teleport beams as suggested in the review here: https://github.com/vircadia/vircadia/pull/953#pullrequestreview-560779456 --- interface/src/raypick/ParabolaPointer.cpp | 2 +- libraries/render-utils/src/GeometryCache.cpp | 2 +- libraries/render-utils/src/text/Font.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/raypick/ParabolaPointer.cpp b/interface/src/raypick/ParabolaPointer.cpp index 216248f8b5..f9babcd999 100644 --- a/interface/src/raypick/ParabolaPointer.cpp +++ b/interface/src/raypick/ParabolaPointer.cpp @@ -415,7 +415,7 @@ gpu::PipelinePointer ParabolaPointer::RenderState::ParabolaRenderItem::getParabo for (auto& key : keys) { gpu::StatePointer state = gpu::StatePointer(new gpu::State()); - state->setDepthTest(true, true, gpu::LESS_EQUAL); + state->setDepthTest(true, false, gpu::LESS_EQUAL); if (std::get<0>(key)) { PrepareStencil::testMask(*state); } else { diff --git a/libraries/render-utils/src/GeometryCache.cpp b/libraries/render-utils/src/GeometryCache.cpp index 8a483a0352..e5c6178a83 100644 --- a/libraries/render-utils/src/GeometryCache.cpp +++ b/libraries/render-utils/src/GeometryCache.cpp @@ -2027,7 +2027,7 @@ void GeometryCache::useGridPipeline(gpu::Batch& batch, GridBuffer gridBuffer, bo for (auto& key : keys) { gpu::StatePointer state = gpu::StatePointer(new gpu::State()); - state->setDepthTest(true, true, gpu::LESS_EQUAL); + state->setDepthTest(true, false, gpu::LESS_EQUAL); if (std::get<0>(key)) { PrepareStencil::testMask(*state); } else { diff --git a/libraries/render-utils/src/text/Font.cpp b/libraries/render-utils/src/text/Font.cpp index a30bbad0e5..e0b3a020fe 100644 --- a/libraries/render-utils/src/text/Font.cpp +++ b/libraries/render-utils/src/text/Font.cpp @@ -276,7 +276,7 @@ void Font::setupGPU() { for (auto& key : keys) { auto state = std::make_shared(); state->setCullMode(gpu::State::CULL_BACK); - state->setDepthTest(true, true, gpu::LESS_EQUAL); + state->setDepthTest(true, false, gpu::LESS_EQUAL); state->setBlendFunction(std::get<0>(key), gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA, gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::ONE);