use of com.jme3.renderer.RenderManager in project jmonkeyengine by jMonkeyEngine.
the class ToneMapFilter method initFilter.
@Override
protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) {
material = new Material(manager, "Common/MatDefs/Post/ToneMap.j3md");
material.setVector3("WhitePoint", whitePoint);
}
use of com.jme3.renderer.RenderManager in project jmonkeyengine by jMonkeyEngine.
the class TranslucentBucketFilter method initFilter.
@Override
protected void initFilter(AssetManager manager, RenderManager rm, ViewPort vp, int w, int h) {
this.renderManager = rm;
this.viewPort = vp;
material = new Material(manager, "Common/MatDefs/Post/Overlay.j3md");
material.setColor("Color", ColorRGBA.White);
Texture2D tex = processor.getFilterTexture();
material.setTexture("Texture", tex);
if (tex.getImage().getMultiSamples() > 1) {
material.setInt("NumSamples", tex.getImage().getMultiSamples());
} else {
material.clearParam("NumSamples");
}
renderManager.setHandleTranslucentBucket(false);
if (enabledSoftParticles && depthTexture != null) {
initSoftParticles(vp, true);
}
}
use of com.jme3.renderer.RenderManager in project jmonkeyengine by jMonkeyEngine.
the class SimpleWaterProcessor method initialize.
public void initialize(RenderManager rm, ViewPort vp) {
this.rm = rm;
this.vp = vp;
loadTextures(manager);
createTextures();
applyTextures(material);
createPreViews();
material.setVector2("FrustumNearFar", new Vector2f(vp.getCamera().getFrustumNear(), vp.getCamera().getFrustumFar()));
if (debug) {
dispRefraction = new Picture("dispRefraction");
dispRefraction.setTexture(manager, refractionTexture, false);
dispReflection = new Picture("dispRefraction");
dispReflection.setTexture(manager, reflectionTexture, false);
dispDepth = new Picture("depthTexture");
dispDepth.setTexture(manager, depthTexture, false);
}
}
use of com.jme3.renderer.RenderManager in project jmonkeyengine by jMonkeyEngine.
the class DepthOfFieldFilter method initFilter.
@Override
protected void initFilter(AssetManager assets, RenderManager renderManager, ViewPort vp, int w, int h) {
material = new Material(assets, "Common/MatDefs/Post/DepthOfField.j3md");
material.setFloat("FocusDistance", focusDistance);
material.setFloat("FocusRange", focusRange);
xScale = 1.0f / w;
yScale = 1.0f / h;
material.setFloat("XScale", blurScale * xScale);
material.setFloat("YScale", blurScale * yScale);
}
use of com.jme3.renderer.RenderManager in project jmonkeyengine by jMonkeyEngine.
the class FXAAFilter method initFilter.
@Override
protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) {
material = new Material(manager, "Common/MatDefs/Post/FXAA.j3md");
material.setFloat("SubPixelShift", subPixelShift);
material.setFloat("VxOffset", vxOffset);
material.setFloat("SpanMax", spanMax);
material.setFloat("ReduceMul", reduceMul);
}
Aggregations