fix forward web + parabola blending

This commit is contained in:
SamGondelman 2019-07-11 12:23:04 -07:00
parent 9539664749
commit 22a7a97a9a
2 changed files with 3 additions and 8 deletions

View file

@ -405,7 +405,8 @@ gpu::PipelinePointer ParabolaPointer::RenderState::ParabolaRenderItem::getParabo
using namespace shader::render_utils::program;
static const std::vector<std::tuple<bool, bool, uint32_t>> keys = {
std::make_tuple(false, false, parabola), std::make_tuple(false, true, parabola_forward), std::make_tuple(true, false, parabola_translucent)
std::make_tuple(false, false, parabola), std::make_tuple(false, true, parabola_forward),
std::make_tuple(true, false, parabola_translucent), std::make_tuple(true, true, parabola_forward) // The forward opaque/translucent pipelines are the same for now
};
for (auto& key : keys) {
@ -423,9 +424,6 @@ gpu::PipelinePointer ParabolaPointer::RenderState::ParabolaRenderItem::getParabo
_parabolaPipelines[{std::get<0>(key), std::get<1>(key)}] = gpu::Pipeline::create(gpu::Shader::createProgram(std::get<2>(key)), state);
}
// The forward opaque/translucent pipelines are the same for now
_parabolaPipelines[{ true, true }] = _parabolaPipelines[{ false, true}];
}
return _parabolaPipelines[{ _parabolaData.color.a < 1.0f, forward }];
}

View file

@ -2119,7 +2119,7 @@ gpu::PipelinePointer GeometryCache::getWebBrowserProgram(bool transparent, bool
using namespace shader::render_utils::program;
static const std::vector<std::tuple<bool, bool, uint32_t>> keys = {
std::make_tuple(false, false, web_browser), std::make_tuple(false, true, web_browser_forward),
std::make_tuple(true, false, web_browser_translucent)
std::make_tuple(true, false, web_browser_translucent), std::make_tuple(true, true, web_browser_forward) // The forward opaque/translucent pipelines are the same for now
};
for (auto& key : keys) {
@ -2134,9 +2134,6 @@ gpu::PipelinePointer GeometryCache::getWebBrowserProgram(bool transparent, bool
_webPipelines[{std::get<0>(key), std::get<1>(key)}] = gpu::Pipeline::create(gpu::Shader::createProgram(std::get<2>(key)), state);
}
// The forward opaque/translucent pipelines are the same for now
_webPipelines[{ true, true }] = _webPipelines[{ false, true }];
}
return _webPipelines[{ transparent, forward }];