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
This commit is contained in:
parent
9b22b2538d
commit
0c403cfc9c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user