Unity Volumetric Spotlight - Custom ray-marching shader

Subscribers:
2,820
Published on ● Video Link: https://www.youtube.com/watch?v=mHKIDXSmXNw



Duration: 1:27
3,025 views
34


Spotlight has a camera child that matches the field of view.
It renders everything in view with a world position shader to a rendertexture.
A cone mesh's pixel shader on the spotlight ray marches with 8 samples along the view direction.
It adds a light value to the final image if not behind an object, the light is added with the correct value on the cookie texture.







Tags:
unity
volumetric light
volumetric lights
volumetric spotlight
spotlight
shader
ray tracing
ray marching
ray
volumetric
tracing
effect