This implementation of godrays works in conjunction with a rotating combination of two directional lights, which represent the sun and moon. The rotation of these lights mean shadows move over time. The godrays were created using a script to change their colour depending on whether it is currently day or night, and to move the point the godrays appear to originate from to approximately where the sun would be given that time of day, matching the shadows. The screenshots show godrays and shadows at night and day.
This implementation of godrays works in conjunction with a rotating combination of two directional lights, which represent the sun and moon. The rotation of these lights mean shadows move over time. The godrays were created using a script to change their colour depending on whether it is currently day or night, and to move the point the godrays appear to originate from to approximately where the sun would be given that time of day, matching the shadows. The screenshots show godrays and shadows at night and day.