libgdx/box2dlights

Light Shadow somehow get's colored to color of light

azakhary opened this issue · 3 comments

Having weird bug with latest box2dlights.

Shadow, instead of being... black. is colored instead. so it feels inverted. light instead of shadow o_O
I cannot even explain it using words, take a look yourself:
https://www.youtube.com/watch?v=rkrl4_HdhzU

Here is my code:
http://pastebin.com/Sjnhg5jt

am I doing something wrong?

Thats not exactly a bug. This is caused by the lights softness length being larger than the lights size itself.
The default is 2.5f, had the same exact issue some time ago. It probably should be set to something like distance * 0.1f.

light.setSoftnessLength(light.getDistance() * 0.1f);

oh... got it. weird. would be cool if softness is not set the default value will adjust itself according to the distance. Because right now, you kinda try the simple default example, and that's what happens.

Thanks a lot! it works now.

Created a #80 for this.