diff --git a/jme3-effects/src/main/resources/Common/MatDefs/Post/LightScattering.frag b/jme3-effects/src/main/resources/Common/MatDefs/Post/LightScattering.frag index bc85142e0..55372bda1 100644 --- a/jme3-effects/src/main/resources/Common/MatDefs/Post/LightScattering.frag +++ b/jme3-effects/src/main/resources/Common/MatDefs/Post/LightScattering.frag @@ -14,23 +14,23 @@ void main(void) if(m_Display){ vec4 colorRes= texture2D(m_Texture,texCoord); - float factor=(m_BlurWidth/float(m_NbSamples-1.0)); + float factor=(m_BlurWidth/(float(m_NbSamples)-1.0)); float scale; vec2 texCoo=texCoord - m_LightPosition.xy; vec2 scaledCoord; vec4 res = vec4(0.0); for(int i=0; i