LWRP/URP Volumetric Lighting
LWRP/URP Volumetric Lighting is the LWRP/URP version of Fast Volumetric Lighting.
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?
-
LWRP version is based on Post Processing Stack V2, and URP version is based on SRP’s Renderer Features. The document is for URP, if you are interesting in LWRP version, please check LWRP-Volumetric-Lighting’s Document.
-
URP version requires Unity 2019.3 and above, you need to install all URP related packages first.
-
Assign UniversalRenderPipelineAsset in graphic settings. Check Assets/BadDog/VolumetricLighitng_URP/Settings folder, there are two predefined pipeline assets, one is for PC, the other is for mobile.
-
Check each UniversalRenderPipelineAsset_Renderer, and you will find BGVolumetricLighting Renderer Features, it’s my Volumetric Lighitng, it’s executed before URP’s Post Processing.
-
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.
-
Now everything is ready, volumetric lighting will occur when the light source is in your camera’s view, check the demo scenes for more details.
About performance
-
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.
-
The effect is auto disabled when all lights are out of view to save more perfermance.
About the examples
There are 5 example scenes.
- testPC
- testMobile
- testNight
- testOutdoor
- 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:
web | |
---|---|
shenpan998@gmail.com | https://fatdogsp.github.io/2020/02/20/My-Assets/ |