discosultan / penumbra

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

Limit the penumbra effect to a specific area? #40

Open krfgbhoiaeuzr opened 1 year ago

krfgbhoiaeuzr commented 1 year ago

Hello,

I'm trying to use penumbra to draw shadows in a sub-section of my game/screen. However, after some experimentation it seems that penumbra always uses the full screen size, as i have to call it before any other draw calls. Is there really no way to limit the affected area to a smaller part of the game window or am I just not thinking about this right?

RamiMorrar commented 1 year ago

You have to use hulls and reshape light sizes to get it to work the way you intend to.

RamiMorrar commented 1 year ago

If you put a single light on the screen, it'll fill the entire screen. You have to adjust the size.