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.
Set the proper 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 URP Asset, make sure the Depth Texture property is enabled:
Check the URP Renderer properties
In the Universal Renderer Data, please make sure:
- the Depth Priming Mode is set at Disabled, otherwise the SD Dynamic Occlusion Depth Buffer and HD Volumetric Shadow features won't work.
- the Depth Texture Mode is set at After Opaques, otherwise your depth texture will be 1 frame late, and this might lead to visual artifacts when moving the camera.
Multiple URP Settings assets
Make sure to change this property for all URP assets (URP Asset and Universal Renderer Data), 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.
Set the proper 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!