discosultan / penumbra

2D lighting with soft shadows for MonoGame
MIT License
321 stars 32 forks source link

Shadows casting in weird directions #17

Closed harrisse closed 6 years ago

harrisse commented 6 years ago

Hello, I'm a little stumped on an issue and was wondering if you've seen this before. I've got my hulls and lights setup and they appear to be in the correct locations, but shadows are getting cast in weird directions. They do change dynamically as I move around, but I can't exactly tell what's going on.

capture

harrisse commented 6 years ago

Update for anyone else who sees this, I'm applying my camera matrix manually to penumbra so that I can specify my hull coordinates in in-game meters. As a result, the default PointLight.Radius value of 20 is what was causing this issue because it was generating way too much penumbra for the scale of my game. Dropping PointLight.Radius down to .5f (half the width of one of the blocks above) seems to have completely solved the issue.