From 056fea9a8c0c02e8a7ef1368f38e5e1d72f9d71f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 3 Jul 2025 14:48:38 +0200 Subject: [PATCH] Fix forward shading compilation when using fog inside unlit material --- Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl b/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl index 08bb82698..22d9ca9b4 100644 --- a/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl +++ b/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl @@ -143,7 +143,7 @@ void PS_Forward( #endif -#if USE_FOG +#if USE_FOG && MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT // Calculate exponential height fog float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0, gBuffer.ViewPos.z);