From ea0af5159feedec81e5c973af636baf600e6ef48 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 14 Jan 2025 23:28:48 +0300 Subject: [PATCH] only enable fog for 3d --- src/rendering/twn_gl_15_rendering.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index da3db66..807f225 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -458,7 +458,7 @@ void finally_draw_command(DeferredCommandDraw command) { glDepthRange(command.depth_range_low, command.depth_range_high); /* TODO: cache it for constant parameters, which is a common case */ - if (fabsf(0.0f - ctx.game_copy.fog_density) >= 0.00001f) { + if (command.pipeline == PIPELINE_SPACE && fabsf(0.0f - ctx.game_copy.fog_density) >= 0.00001f) { glEnable(GL_FOG); /* clamp to valid range */