* Fixed culling with asymmetric frustums

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9621 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 277a2bcc4d
commit dba5ba5851
  1. 4
      engine/src/core/com/jme3/renderer/Camera.java

@ -1169,11 +1169,11 @@ public class Camera implements Savable, Cloneable {
float topSquared = frustumTop * frustumTop; float topSquared = frustumTop * frustumTop;
float inverseLength = FastMath.invSqrt(nearSquared + leftSquared); float inverseLength = FastMath.invSqrt(nearSquared + leftSquared);
coeffLeft[0] = frustumNear * inverseLength; coeffLeft[0] = -frustumNear * inverseLength;
coeffLeft[1] = -frustumLeft * inverseLength; coeffLeft[1] = -frustumLeft * inverseLength;
inverseLength = FastMath.invSqrt(nearSquared + rightSquared); inverseLength = FastMath.invSqrt(nearSquared + rightSquared);
coeffRight[0] = -frustumNear * inverseLength; coeffRight[0] = frustumNear * inverseLength;
coeffRight[1] = frustumRight * inverseLength; coeffRight[1] = frustumRight * inverseLength;
inverseLength = FastMath.invSqrt(nearSquared + bottomSquared); inverseLength = FastMath.invSqrt(nearSquared + bottomSquared);

Loading…
Cancel
Save