Java examples for Game:JME3
Shadow jme3 SSAO
package Effects;/* w w w . j a v a2 s .c o m*/ import template.*; import com.jme3.app.SimpleApplication; import com.jme3.asset.plugins.ZipLocator; import com.jme3.light.AmbientLight; import com.jme3.material.Material; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; import com.jme3.post.FilterPostProcessor; import com.jme3.post.ssao.SSAOFilter; import com.jme3.renderer.RenderManager; import com.jme3.scene.Geometry; import com.jme3.scene.Spatial; import com.jme3.scene.shape.Box; /** * test * * @author normenhansen */ public class ShadowSSAO extends SimpleApplication { public static void main(String[] args) { ShadowSSAO app = new ShadowSSAO(); app.start(); } @Override public void simpleInitApp() { FilterPostProcessor fpp = new FilterPostProcessor(assetManager); viewPort.addProcessor(fpp); SSAOFilter ssaoFilter = new SSAOFilter(5.94f, 10.93f, .33f, .60f); fpp.addFilter(ssaoFilter); AmbientLight ambientLight = new AmbientLight(); rootNode.addLight(ambientLight); assetManager.registerLocator("town.zip", ZipLocator.class); Spatial sceneGeo = assetManager.loadModel("main.scene"); rootNode.attachChild(sceneGeo); } @Override public void simpleUpdate(float tpf) { //TODO: add update code } @Override public void simpleRender(RenderManager rm) { //TODO: add render code } }