This is a known issue with Unity when compiling shaders with many keywords. You may want to reduce the shader complexity removing some keywords that you don’t use by using the “Shader Options” section on top of the Volumetric Fog inspector. This is the recommended solution. If you want to further optimize the shader, you can edit it and modify the VolumetricFog.shader file and look for lines that contains #pragma multi_compile sentences: I don’t need that feature: just remove the corresponding keyword or the entire #pragma line. I need that feature: you may remove the #pragma line AND remove all #if related statements in the shader so that code will always execute. Used when you set Starting Distance > 0. Used when you enable fog void option. Used when you enable fog area option.. Used when you Sky Haze setting is > 0. Used when you enable Fog of War feature. Used when the range setting of the optional point light setting is > 0. Used for light scattering (god rays, sun shafts). Used for terrain fit feature. If you want to further optimize shader keywords at project level, consider using Shader Control asset (check it on the Asset Store).
#pragma multi_compile __ FOG_DISTANCE_ON
#pragma multi_compile __ FOG_VOID_SPHERE FOG_VOID_BOX
#pragma multi_compile __ FOG_AREA_SPHERE FOG_AREA_BOX
#pragma multi_compile __ FOG_HAZE_ON
#pragma multi_compile __ FOG_OF_WAR_ON
#pragma multi_compile __ FOG_POINT_LIGHTS
#pragma multi_compile __ FOG_SCATTERING_ON
#pragma multi_compile __ FOG_SURFACE
To reduce banding artifacts (ie. circles on the sky), make sure your camera has HDR enabled and use the Dithering and Jittering options found in the Optimization & Quality settings section. You can customize the dither effect using the slider next to the toggle. For low density fog, you may need to increase the dithering intensity.
To reduce noise, you can use the Blur option under the Optimizations section at the bottom of the inspector. You may need to enable “Force Composition” to make the blur option visible. Also, you can enable “Blue Noise” option in Shader Options as well.
You can edit the custom inspector to increase that cap. However, increasing that value will impact performance. If you need to cover vast or far areas with fog, consider adding Dynamic Fog & Mist in addition to Volumetric Fog & Mist. Use Volumetric Fog & Mist for short distance effects and Dynamic Fog & Mist for the background.
In this case, make sure Volumetric Fog & Mist camera scripts are first on the camera stack of components, before any other image effect.
Please use the Support Forum and post your question there. Our team will get back to you shortly.