1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Allow shaders with disabled post processing pipeline (#14338)

- Allow disabling of the post processing pipeline while leaving shaders enabled
- Also disable post processing on Android by default
This commit is contained in:
lhofhansl 2024-02-15 08:25:33 -08:00 committed by GitHub
parent ce97210eb1
commit c81e0b7433
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 13 deletions

View file

@ -103,7 +103,7 @@ void UpscaleStep::run(PipelineContext &context)
std::unique_ptr<RenderStep> create3DStage(Client *client, v2f scale)
{
RenderStep *step = new Draw3D();
if (g_settings->getBool("enable_shaders")) {
if (g_settings->getBool("enable_shaders") && g_settings->getBool("enable_post_processing")) {
RenderPipeline *pipeline = new RenderPipeline();
pipeline->addStep(pipeline->own(std::unique_ptr<RenderStep>(step)));
@ -128,7 +128,7 @@ RenderStep* addUpscaling(RenderPipeline *pipeline, RenderStep *previousStep, v2f
return previousStep;
// When shaders are enabled, post-processing pipeline takes care of rescaling
if (g_settings->getBool("enable_shaders"))
if (g_settings->getBool("enable_shaders") && g_settings->getBool("enable_post_processing"))
return previousStep;