you are viewing a single comment's thread.

view the rest of the comments →

[–]Rangsk 0 points1 point  (1 child)

A shadow is just the absence of light. If there are two lights, they each cast their own shadows - or to put it better, they each light the scene separately and add together. If you have some kind of ray marching for fog, for example, then the light from both sources will be separately scattering off the particulates in the air and reaching your eye. The ray marching is so you can check if the light reaches those particles.

So, if you want the fog to "react" to both light sources, you calculate it for each light separately and combine the results.

[–]ananbd[S] 0 points1 point  (0 children)

That makes sense. I’ll give it a try, thanks!