From 0c403cfc9cd5e48965eeaa5543016e5f41824425 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Thu, 31 Jan 2013 16:38:00 +0000 Subject: [PATCH] Changed the way the light is phased out for the LightScattering filter git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10260 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/post/filters/LightScatteringFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/core-effects/com/jme3/post/filters/LightScatteringFilter.java b/engine/src/core-effects/com/jme3/post/filters/LightScatteringFilter.java index 40002307c..20e5e3397 100644 --- a/engine/src/core-effects/com/jme3/post/filters/LightScatteringFilter.java +++ b/engine/src/core-effects/com/jme3/post/filters/LightScatteringFilter.java @@ -101,12 +101,12 @@ public class LightScatteringFilter extends Filter { protected void postQueue(RenderQueue queue) { getClipCoordinates(lightPosition, screenLightPos, viewPort.getCamera()); viewPort.getCamera().getViewMatrix().mult(lightPosition, viewLightPos); - display = screenLightPos.x < 1.4f && screenLightPos.x > -0.6f && screenLightPos.y < 1.4f && screenLightPos.y > -0.6f && viewLightPos.z < 0; if (adaptative) { innerLightDensity = Math.max(lightDensity - Math.max(screenLightPos.x, screenLightPos.y), 0.0f); } else { innerLightDensity = lightDensity; } + display = innerLightDensity != 0.0 && viewLightPos.z < 0; } private Vector3f getClipCoordinates(Vector3f worldPosition, Vector3f store, Camera cam) {