Re-introduced WorldMatrixInverseTranspose in UniformBindingManager

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9603 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 2868741bbb
commit 91f2353a57
  1. 9
      engine/src/core/com/jme3/shader/UniformBindingManager.java

@ -4,10 +4,10 @@
*/
package com.jme3.shader;
import com.jme3.material.Material;
import com.jme3.math.*;
import com.jme3.renderer.Camera;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.system.Timer;
import java.util.List;
@ -39,6 +39,7 @@ public class UniformBindingManager {
private Matrix4f worldViewProjMatrix = new Matrix4f();
private Matrix3f normalMatrix = new Matrix3f();
private Matrix4f worldMatrixInv = new Matrix4f();
private Matrix3f worldMatrixInvTrsp = new Matrix3f();
private Matrix4f viewMatrixInv = new Matrix4f();
private Matrix4f projMatrixInv = new Matrix4f();
private Matrix4f viewProjMatrixInv = new Matrix4f();
@ -95,9 +96,9 @@ public class UniformBindingManager {
u.setValue(VarType.Matrix4, worldMatrixInv);
break;
case WorldMatrixInverseTranspose:
// worldMatrix.toRotationMatrix(tempMat3);
// tempMat3.invertLocal().transposeLocal();
// u.setValue(VarType.Matrix3, tempMat3, true);
worldMatrix.toRotationMatrix(worldMatrixInvTrsp);
worldMatrixInvTrsp.invertLocal().transposeLocal();
u.setValue(VarType.Matrix3, worldMatrixInvTrsp);
break;
case ViewMatrixInverse:
viewMatrixInv.set(viewMatrix);

Loading…
Cancel
Save