Render Pipelines / SRP
The Volumetric Light Beam plugin fully supports the Scriptable Render Pipelines (SRP) introduced in Unity 2018.1.
You can specify or disable the current SRP in use via the SRP Settings property in the Graphics Settings menu (Edit -> Project Settings -> Graphics).
Since the SRP feature is "by design" highly customizable, supporting the Volumetric Light Beam plugin with a SRP requires some configuration. Depending on the SRP you are using, please follow the corresponding steps.
Learn how to use the Volumetric Light Beam Unity plugin with URP or HDRP in less than 3 minutes:
Unity Built-In Pipeline (Legacy)
The Unity's Build-In Rendering Pipeline refers to the default rendering pipeline (RP) in use when no custom RP is specified. No configuration is required to support this legacy RP.
Universal Render Pipeline (URP)
More info about the Universal Render Pipeline.
Open the Config asset (menu Edit/Volumetric Light Beam/Open Config) and make sure the Render Pipeline property is set to URP.
Enable the 'Depth Texture'
You have to configure a property in the Scriptable Render Pipeline Settings to force the rendering to the depth texture, in order to:
- Use HD Beams.
- Use SD Beams with the Soft Blending with opaque geometry feature.
Access to this asset through the Project Settings:
In the Scriptable Render Pipeline Settings, make sure the Depth Texture property is enabled:
Disabling the "Depth Texture" property
If you do not enable the Depth Texture property on the URP asset, you won't be able to use:
- HD Beams
- SD Beams with the Soft Blending with opaque geometry property other than 0.
Multiple Scriptable Render Pipeline Settings assets
Make sure to change this property for all SRP assets, depending in which Quality levels you want to use this feature.
And that's it!
High Definition Render Pipeline (HDRP)
More info about the High Definition Render Pipeline.
Open the Config asset (menu Edit/Volumetric Light Beam/Open Config) and make sure the Render Pipeline property is set to HDRP.
And that's it!
Custom Pipelines
You have to make sure the function RenderPipeline.BeginCameraRendering(context, camera) is called before each camera starts rendering.
And you have to make sure the depth texture (accessible via _CameraDepthTexture) is properly updated.
And that's it!