Fix fog to be usable for transparent materials (if enabled)

#1408
This commit is contained in:
Wojtek Figat
2023-12-26 13:54:12 +01:00
parent 55066cd738
commit 4a42aa8c44

View File

@@ -133,6 +133,8 @@ void PS_Forward(
// Add lighting (apply ambient occlusion)
output.rgb += light.rgb * gBuffer.AO;
#endif
#if USE_FOG
// Calculate exponential height fog
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0);
@@ -148,7 +150,5 @@ void PS_Forward(
output = float4(lerp(float3(1, 1, 1), output.rgb, fog.aaa * fog.aaa), output.a);
#endif
#endif
#endif
}