The issue that I have is at the edges where the rays are ending it looks bad, is not interpolated smoothly alpha alpha-based, on a glitch, is looks acceptable but on my project in Vite is even worse, not sure what is going on and how to fix it, I tried AI, no luck…
I think you probably need to control the source of the godrays to never create the situation where it clips with camera.. or make it fade out when you detect that its going to intersect the camera.
something like.. opacity = abs(normalize(emitter.position - camera.position) dot ( camera look direction ))
edit: NVM, this isn’t actual “godrays” in the 3d sense. its a 2d shader effect on a plane.
The issue is the fading out, at the end of the rays, it is not getting all the way to zero smoothly interpolated, and it creates those artifacts. the issue is created here float alpha = min(c, c1);
On the glitch version, it looks much better than on my version, which is also something I don’t understand…