Heatmap layer (#1230)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alex Cristici
2023-07-03 16:50:10 +03:00
committed by Bart Louwers
parent e631bc3c42
commit 813ddb024a
46 changed files with 1247 additions and 26 deletions

View File

@@ -457,6 +457,8 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
commonInit(*builder);
builder->setDepthType((renderPass == RenderPass::Opaque) ? gfx::DepthMaskType::ReadWrite
: gfx::DepthMaskType::ReadOnly);
builder->setColorMode(renderPass == RenderPass::Translucent ? gfx::ColorMode::alphaBlended()
: gfx::ColorMode::unblended());
builder->setSubLayerIndex(0);
builder->setRenderPass(renderPass);
fillBuilder = std::move(builder);
@@ -467,6 +469,7 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
commonInit(*builder);
builder->setLineWidth(2.0f);
builder->setDepthType(gfx::DepthMaskType::ReadOnly);
builder->setColorMode(gfx::ColorMode::alphaBlended());
builder->setSubLayerIndex(unevaluated.get<FillOutlineColor>().isUndefined() ? 2 : 0);
builder->setRenderPass(RenderPass::Translucent);
outlineBuilder = std::move(builder);
@@ -512,6 +515,7 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
if (auto builder = context.createDrawableBuilder(layerPrefix + "fill-pattern")) {
commonInit(*builder);
builder->setDepthType(gfx::DepthMaskType::ReadWrite);
builder->setColorMode(gfx::ColorMode::alphaBlended());
builder->setSubLayerIndex(1);
builder->setRenderPass(RenderPass::Translucent);
patternBuilder = std::move(builder);
@@ -522,6 +526,7 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
commonInit(*builder);
builder->setLineWidth(2.0f);
builder->setDepthType(gfx::DepthMaskType::ReadOnly);
builder->setColorMode(gfx::ColorMode::alphaBlended());
builder->setSubLayerIndex(2);
builder->setRenderPass(RenderPass::Translucent);
outlinePatternBuilder = std::move(builder);