Fix code style

This commit is contained in:
Wojtek Figat
2020-12-21 23:37:28 +01:00
parent d322015e6e
commit 2a29abcc39
13 changed files with 47 additions and 89 deletions

View File

@@ -38,22 +38,14 @@ float4 CalculateCombinedFog(float3 worldPosition, float sceneDepth, float3 volum
float excludeDistance = 0;
#if VOLUMETRIC_FOG
// Volumetric fog covers up to MaxDistance along ViewZ, exclude analytical fog from this range
excludeDistance = max(ExponentialHeightFog.VolumetricFogMaxDistance - 100, 0);
#endif
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, worldPosition, GBuffer.ViewPos, excludeDistance);
#if VOLUMETRIC_FOG
// Sample volumetric fog lookup table
float4 volumetricFog = IntegratedLightScattering.SampleLevel(SamplerLinearClamp, volumeUV, 0);
// Mix volumetric and analytical fog
fog = float4(volumetricFog.rgb + fog.rgb * volumetricFog.a, volumetricFog.a * fog.a);
#endif
return fog;