Disable z-write for transparent fonts, grid entities and teleport beams

as suggested in the review here: https://github.com/vircadia/vircadia/pull/953#pullrequestreview-560779456
This commit is contained in:
Phil Palmer 2021-01-05 00:05:11 -05:00
parent 4f71cb5945
commit 1cdc3610c3
3 changed files with 3 additions and 3 deletions

View file

@ -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, !std::get<0>(key), gpu::LESS_EQUAL);
if (std::get<0>(key)) {
PrepareStencil::testMask(*state);
} else {

View file

@ -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, !std::get<0>(key), gpu::LESS_EQUAL);
if (std::get<0>(key)) {
PrepareStencil::testMask(*state);
} else {

View file

@ -276,7 +276,7 @@ void Font::setupGPU() {
for (auto& key : keys) {
auto state = std::make_shared<gpu::State>();
state->setCullMode(gpu::State::CULL_BACK);
state->setDepthTest(true, true, gpu::LESS_EQUAL);
state->setDepthTest(true, !std::get<0>(key), 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);