Source of the Volumetric Lines Asset from Unity's Asset Store.
Support the development of this asset by donating via the PayPal link above. Your donations are greatly appreciated and help to improve this asset. Volumetric Lines for the standard/built-in render pipeline is available for free on both, the Unity's Asset Store and here, on GitHub. There's also a version of this asset that supports the universal render pipeline --- it can be purchased on the Asset Store, but it is also available for free from this repository. For details, see below.
Volumetric Lines is a fast, GPU-based volumetric line renderer based on a technique by Sébastien Hillaire. It can be used to render lines with a volumetric appearance by smartly utilizing a texture. Through the use of different textures, different volumetric line effects can be achieved.
Some usage examples:
Example 1: A radial gradient texture can be used to render anti-aliased volumetric lines like laser shots or light sabers.
Example 2: A texture with a filled, solid circle positioned in the center of the square texture can be used to create the appearance of pipes.
Technically, the algorithm only uses as little as 8 vertices to describe a single line and positions them smartly on the screen to create a volumetric appearance. It also includes an algorithm to render volumetric line strips.
Support for the Universal Render Pipeline (URP) has been added and is available on the branch universal_render_pipeline
.