skip to Main Content

Performance Tips

Volumetric Fog uses an extremely optimized ray-marching algorithm to provide “volumetric sense” fog in front of your player. If you need to improve performance, you can try the following options:

  • Increase the Downscaling option in Volumetric Fog Manager. Try values of 1.25, 1.5, 1.75, 2.0 or even more.

  • Increase RayMarch Min Step: increasing this value will improve performance but will make the fog effect less accurate and show more artifacts.

  • Reduce Raymarch Quality: reducing this value will indeed reduce the number of texture fetches per pixel.

  • Reduce Max Distance and use Max Distance FallOff to smooth the fade off. You may use the Distant Fog option to add a faster fog effect for the background instead of using very large values in Max Distance.

  • Reduce the Shadow Max Distance.

  • Use Fog of War instead of Fog Voids: consider switching to fog of war instead of fog voids if you use many voids.

  • Detail Noise adds an additional texture3D sample during the ray-marching loop: consider disabling this option to increase performance if needed.

  • Depth Gradient and Height Gradient options add additional texture sampling during the ray-marching loop. These gradient textures are very small and shouldn’t impact performance on PC but they can affect mobile performance.

  • Reduce Render Scale in the Universal Rendering Pipeline asset. This will reduce the resolution of the framebuffer, improving the overall performance. This setting is especially useful on mobile devices since they use very high DPI screens and can afford to use a lower resolution.

  • Edit Commons.hlsl file and reduce the MAX_ITERATIONS parameter. By default, a value of 500 as maximum should be good for most open/large areas. If you’re fog areas cover a small area, you may want to reduce this value to ensure no more samples than necessary are used. Note that this value is just a maximum. It doesn’t mean that 500 iterations as used. The maximum is provided to avoid loops excessively large.

Back To Top