LGhassen / EnvironmentalVisualEnhancements

Visual enhancements including clouds, lights, etc.
76 stars 9 forks source link

Weird behavior of shadows with multistar lighting #7

Open WhirligigGirl opened 3 years ago

WhirligigGirl commented 3 years ago

First of all I have to say it is extremely exciting that shadows exist with multistar lighting in the first place, and I love the new smoother lighting. However, it doesn't quite work with multiple stars.

The shadows exist on the far side of the planet as well as the side they are shadowing. This means that they can cast shadows on a part of the planet that should be sunlit. This also doesn't play nice with ambient lighting but that's not as big a concern as I always turn ambient lighting in scaledspace off.

image

In this screenshot we see Ollym in front of the star Kaywell casting a shadow, through Lowel, onto Lowel's Gememma-lit side.

image

here we can see where the Kaywell shadow and the Gememma shadow meet up.

The correct behavior would be for a second star to light up the shadow where the primary isn't shining (and vice versa). Until this has been fixed I'll have to disable shadow casting for some systems. (assuming it can be fixed)

A second solution (if the correct behavior is impossible) would be to be able to choose which stars can have shadows cast from, plus cutting off the shadow projection at the terminator so it doesn't bleed over to the other side.

That way I could have, in the above case, only shadows in the Gememma-shine (no shadows cast from Kaywell's light), and the Kaywell-lit side at night will not be darkened mysteriously during eclipses of Gememma.