
A simple god ray/light shaft shader with two slightly different variants aimed to create a realistic look but can easily be used for all sorts of genres.The package is created in URP but porting it to other render pipelines should be relatively straight forward, as it just uses the new RenderGraph API.Easy to use and implement using directional light sources. It's build to handle two light sources at the same time in case you are using a day and night cycle system and will acquire light color and intensity directly from those sources.Supports a day and night cycle system and is implemented as a fullscreen render pass before post processing effects. The light strength and direction automatically syncs with the set light sources. Only valid light sources will be taken into account, setting one to null will not break the shader. The details (density, light strength, "contrast", ...) are customizable in the inspector. The package contains two different renderer features using RenderGraph, both having a slightly different approach to get a different but believable result and are easily interchangeable by simply switching the added renderer feature. The shaders will render both light sources in a single shader pass and merge the result with the camera color texture. The effect can be rendered at half the resolution and use a 3x3 bicubic filter kernel with depth testing in order to smoothen results and keeping the image sharp. It's mainly made to have a low performance impact while providing a good result. The effect does not generate volumetric light, it provides godrays when looking towards the light sources, that will slowly fade out at larger angles.