|
|
|
@ -7,6 +7,7 @@ package com.jme3.shader; |
|
|
|
|
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; |
|
|
|
|
|
|
|
|
@ -29,18 +30,14 @@ public class UniformBindingManager { |
|
|
|
|
camLeft = new Vector3f(), |
|
|
|
|
camDir = new Vector3f(), |
|
|
|
|
camLoc = new Vector3f(); |
|
|
|
|
|
|
|
|
|
private Matrix4f tempMatrix = new Matrix4f(); |
|
|
|
|
|
|
|
|
|
private Matrix4f viewMatrix = new Matrix4f(); |
|
|
|
|
private Matrix4f projMatrix = new Matrix4f(); |
|
|
|
|
private Matrix4f viewProjMatrix = new Matrix4f(); |
|
|
|
|
private Matrix4f worldMatrix = new Matrix4f(); |
|
|
|
|
|
|
|
|
|
private Matrix4f worldViewMatrix = new Matrix4f(); |
|
|
|
|
private Matrix4f worldViewProjMatrix = new Matrix4f(); |
|
|
|
|
private Matrix3f normalMatrix = new Matrix3f(); |
|
|
|
|
|
|
|
|
|
private Matrix4f worldMatrixInv = new Matrix4f(); |
|
|
|
|
private Matrix4f viewMatrixInv = new Matrix4f(); |
|
|
|
|
private Matrix4f projMatrixInv = new Matrix4f(); |
|
|
|
@ -48,7 +45,6 @@ public class UniformBindingManager { |
|
|
|
|
private Matrix4f worldViewMatrixInv = new Matrix4f(); |
|
|
|
|
private Matrix3f normalMatrixInv = new Matrix3f(); |
|
|
|
|
private Matrix4f worldViewProjMatrixInv = new Matrix4f(); |
|
|
|
|
|
|
|
|
|
private Vector4f viewPort = new Vector4f(); |
|
|
|
|
private Vector2f resolution = new Vector2f(); |
|
|
|
|
private Vector2f resolutionInv = new Vector2f(); |
|
|
|
@ -221,4 +217,10 @@ public class UniformBindingManager { |
|
|
|
|
far = cam.getFrustumFar(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setViewPort(int viewX, int viewY, int viewWidth, int viewHeight) { |
|
|
|
|
this.viewX = viewX; |
|
|
|
|
this.viewY = viewY; |
|
|
|
|
this.viewWidth = viewWidth; |
|
|
|
|
this.viewHeight = viewHeight; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|