LightScatteringFilter - Bug

Hello,

I think there is a small bug in the LightScatteringFilter: Implemented is

innerLightDensity = Math.max(lightDensity - Math.max(screenLightPos.x, screenLightPos.y), 0.0f);

But - as far as I understand it, the midpoint of the screen has coordinates (0.5,0.5). Thus I thiink the line shoud read something like

innerLightDensity = Math.max(0f,lightDensity - FastMath.sqrt((screenLightPos.x-0.5f)(screenLightPos.x-0.5f)+(screenLightPos.y-0.5f)(screenLightPos.y-0.5f)));

Here the distance is measured masimum senmce but with the radial distance.

I hope that helps,

Michael

Yep there’s already a post about it.
http://hub.jmonkeyengine.org/forum/topic/light-scattering/
I need to get that done…

The link you are referring to is dead (not found).

mhh yep.

Anyway, this bug has been fixed.

1 Like