hjoykim / THREE

c# port of Three.js
MIT License
135 stars 24 forks source link

Something weird is up with Shadow Maps. #5

Closed michaelsakharov closed 2 years ago

michaelsakharov commented 2 years ago

If you put a Directional Light with Shadows on the world, then a Point Light.

Only places the Directional Light doesn't cast a shadow on will Point Lights apply any light. It's as if Every Shadowmap is affecting every light. If you then turn on the Point lights shadow it does the same. The directional light will only light up places the Point light doesn't cast a shadow onto

Here's a pic of the Directional shadows but no Point light shadows. You can see the only places lit are the places the Sun lights up, everywhere else remains dark. (Red circle is where the Point Light is, the Point Light is Red) image

Now here's a pic of the Point light also casting shadows, now the Sun only lights up places that don't have shadows from the Point Light. image

michaelsakharov commented 2 years ago

shadow maps seem to act like their Additive with each other or something weird like that. Not sure if I'm simply doing something wrong.

michaelsakharov commented 2 years ago

Actually, this appears to be normal Behaviour for Lambert materials. Other materials work fine.