Hello, I'm working on a underwater simulator for ROVs (or that least that is the excuse I'm using to learn Godot). Right now I'm trying to implement a caustics shader.
I have it mostly working. I generate voronoi noise, modify it a little, and apply it as a light shader. The issue with this approach is that the shader affects all the lights. I put a mix in there to try to balance caustics and regular lightning, but that didn't solve the issue properly.
The caustics look ok:
But when I turn the ROV lights on, they are also affected by the shaders. In this area the ship wreck casts a shadow, so the only lightning present should be from the ROV (and yes, my shadows need tuning): https://gfycat.com/braveellipticalfugu
I have three main questions:
- Is this even the right approach?
- Is there a way to tell which light is currently running so I can run only the directional light through the caustics shader?
- Will I have to apply this light shader independently to each material for each object underwater?
Thank you in advance!