LWRP Volumetric Lighting

Posted by Bad Fat Dog on March 10, 2020

LWRP Volumetric Lighting

LWRP Volumetric Lighting is the LWRP version of Fast Volumetric Lighting.

Youtube

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

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. Install unity 2019 and LWRP related packages, then import LWRP Volumetric Ligthing asset. (All demos have been tested using Unity 2019.1 and 2019.2. Unity 2018 is not tested yet, but i think it will work well too, just try it).

  2. Make sure all LWRP related packages are all installed, including Unity’s Post-processing Stack v2, which installed with LWRP by default.

  3. Assign LightweightRenderPipelineAsset to Graphics Scritable Render Pipeline Settings slot, you can choose my pipeline asset under Examples/Settings folder or create your own.

  4. Add BGMainLight component to the light source which you need light casting. Multi light is also supported, if you need more than one light to cast, each light needs a BGMainLight.

  5. Add Post Process Layer to your main camera, and you will see BGVolumetricLighting below Custom Effect Sorting section.

  6. Add Post Process Volume to your volume gameobject, click Add effect… button and choose BGVolumetricLighting.

  7. Adjust Lighting Parameters using BGMainLight component for each light, you can set the light color, light range, light intensity and so on.

  8. Adjust Quality Parameters using BGVolumetricLighting for global lighting quality. Quality Parameters are performance sensitive, check About performance section for more details.

  9. Optional, add other Unity’s post processing effects like Bloom or ColorGrading for better image effect, BGVolumetricLighting is done ahead of them.

  10. When light is in your camera’s view, volumetric lighting will occur, that’ all.

About performance

  1. Quality Params Area shows the parameters which are perfermance sensitive.

  2. For mobile devices, you need fewer BGMainLight components(<=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.

Enjoy it!

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/