Fast Volumetric Lighting

Posted by Bad Fat Dog on March 10, 2020

Fast Volumetric Lighting

Fast Volumetric Lighting is a fast and high quality volumetric lighting implematation based on Radial Blur.

Youtube

If you need a LWRP/URP version, check LWRP/URP Volumetric Lighting.

Features

  • Multi light casting.
  • Dynamic.
  • Customized lighting parameters and quality parameters.
  • Optimized for mobile, really fast.
  • Debuggable.
  • Support HDR.
  • PC && mobile examples supplied.
  • Indoor && outdoor examples supplied.
  • One light && multi light examples supplied.

How to use

  1. Add BGMainLight component to every light that you want to cast volumetric lighting.

  2. Add BGVolumetricLighting component to your main camera. BGVolumetricBehavior will be added automaticly when BGVolumetricLighting is added..

  3. Adjust BGMainLight’s Lighting Parameters for each light to set light color, light range, light intensity and so on.

  4. Adjust BGVolumetricLighting’s Quality Parameters for global lighting quality.

  5. When the light source is in your camera’s view, volumetric lighting will occur.

About performance

  1. Check BGVolumetricLighting’s Quality Area, it shows the parameters which are perfermance sensitive.
  2. For mobile devices, you need fewer BGMainLight(<=2), smaller Render Texture(<=512), fewer sample count(<= 12), and 2-3 blur count. You will get good quality with acceptable perfermance.
  3. The effect is auto disabled when all lights are out of view to save more perfermance.

About the examples

There are 5 example scenes.

  1. testPC
  2. testMobile
  3. testNight
  4. testOutdoor
  5. testMultiLight

Demo scenes include day and night, indoor and outdoor, pc and mobile, one light casting and multi light casting, you can check the difference between their Lighting Params and Quality Params.

To run these demos correctly, you should set Unity’s color space to Linear. If you are using Gamma Space, you need readjust Lighting Params yourself.

If you are using Unity’s PostProcessing Stack, please make sure that Fast Volumetric Lighting is executed first.

About the limitation

Radial Blur is fast, but it requires light source inside or not far away from your screen, check The limitation of radial blur before you buy it.

The video uses The Illustrated Nature as the example.

Customer Support:

email web
shenpan998@gmail.com https://fatdogsp.github.io/2020/02/20/My-Assets/