discosultan / penumbra

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

Light Origin: invalid value allowed #5

Closed InfiniteProductions closed 8 years ago

InfiniteProductions commented 8 years ago

Following my previous issue, using an Origin with x or y component outside [0,1] interval is allowed by light constructor or setter without raising an exception OR normalizing it before (does it make sens ?) leading to... don't know, unpredictable or invalid result.

discosultan commented 8 years ago

While it may result in an invalid or unpredictable result, there may be cases where setting it outside the [0..1] range might be beneficial (for example, rotating around some arbitrary origin). Therefore, I wouldn't restrict the value to [0..1] range but try to document it well enough so that it was understood that it usually should be in that range.