|
@@ -35,7 +35,11 @@ package jme3test.post;
|
|
import com.jme3.app.SimpleApplication;
|
|
import com.jme3.app.SimpleApplication;
|
|
import com.jme3.light.PointLight;
|
|
import com.jme3.light.PointLight;
|
|
import com.jme3.material.Material;
|
|
import com.jme3.material.Material;
|
|
-import com.jme3.math.*;
|
|
|
|
|
|
+import com.jme3.math.ColorRGBA;
|
|
|
|
+import com.jme3.math.FastMath;
|
|
|
|
+import com.jme3.math.Matrix4f;
|
|
|
|
+import com.jme3.math.Quaternion;
|
|
|
|
+import com.jme3.math.Vector3f;
|
|
import com.jme3.post.SceneProcessor;
|
|
import com.jme3.post.SceneProcessor;
|
|
import com.jme3.renderer.RenderManager;
|
|
import com.jme3.renderer.RenderManager;
|
|
import com.jme3.renderer.ViewPort;
|
|
import com.jme3.renderer.ViewPort;
|
|
@@ -61,11 +65,11 @@ public class TestMultiRenderTarget extends SimpleApplication implements ScenePro
|
|
TestMultiRenderTarget app = new TestMultiRenderTarget();
|
|
TestMultiRenderTarget app = new TestMultiRenderTarget();
|
|
app.start();
|
|
app.start();
|
|
}
|
|
}
|
|
|
|
+ private String techOrig;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void simpleInitApp() {
|
|
public void simpleInitApp() {
|
|
viewPort.addProcessor(this);
|
|
viewPort.addProcessor(this);
|
|
- renderManager.setForcedTechnique("GBuf");
|
|
|
|
|
|
|
|
// flyCam.setEnabled(false);
|
|
// flyCam.setEnabled(false);
|
|
cam.setLocation(new Vector3f(4.8037705f, 4.851632f, 10.789033f));
|
|
cam.setLocation(new Vector3f(4.8037705f, 4.851632f, 10.789033f));
|
|
@@ -114,7 +118,7 @@ public class TestMultiRenderTarget extends SimpleApplication implements ScenePro
|
|
guiViewPort.setClearFlags(true, true, true);
|
|
guiViewPort.setClearFlags(true, true, true);
|
|
guiNode.attachChild(display);
|
|
guiNode.attachChild(display);
|
|
// guiNode.attachChild(display1);
|
|
// guiNode.attachChild(display1);
|
|
-// guiNode.attachChild(display2);
|
|
|
|
|
|
+ guiNode.attachChild(display2);
|
|
// guiNode.attachChild(display3);
|
|
// guiNode.attachChild(display3);
|
|
// guiNode.attachChild(display4);
|
|
// guiNode.attachChild(display4);
|
|
guiNode.updateGeometricState();
|
|
guiNode.updateGeometricState();
|
|
@@ -205,12 +209,15 @@ public class TestMultiRenderTarget extends SimpleApplication implements ScenePro
|
|
public void preFrame(float tpf) {
|
|
public void preFrame(float tpf) {
|
|
Matrix4f inverseViewProj = cam.getViewProjectionMatrix().invert();
|
|
Matrix4f inverseViewProj = cam.getViewProjectionMatrix().invert();
|
|
mat.setMatrix4("ViewProjectionMatrixInverse", inverseViewProj);
|
|
mat.setMatrix4("ViewProjectionMatrixInverse", inverseViewProj);
|
|
|
|
+ techOrig = renderManager.getForcedTechnique();
|
|
|
|
+ renderManager.setForcedTechnique("GBuf");
|
|
}
|
|
}
|
|
|
|
|
|
public void postQueue(RenderQueue rq) {
|
|
public void postQueue(RenderQueue rq) {
|
|
}
|
|
}
|
|
|
|
|
|
public void postFrame(FrameBuffer out) {
|
|
public void postFrame(FrameBuffer out) {
|
|
|
|
+ renderManager.setForcedTechnique(techOrig);
|
|
}
|
|
}
|
|
|
|
|
|
public void cleanup() {
|
|
public void cleanup() {
|