Fixed an issue where AA was not taken into account when using SSAO filter

experimental
Nehon 10 years ago
parent 64ba4794e4
commit 3f3ef99b86
  1. 5
      jme3-core/src/main/java/com/jme3/post/Filter.java
  2. 4
      jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java

@ -233,11 +233,12 @@ public abstract class Filter implements Savable {
* @param vp the viewport
* @param w the width
* @param h the height
* @param numSamples the number of samples for anti aliasing
*/
protected final void init(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) {
protected final void init(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h, int numSamples) {
// cleanup(renderManager.getRenderer());
defaultPass = new Pass();
defaultPass.init(renderManager.getRenderer(), w, h, getDefaultPassTextureFormat(), getDefaultPassDepthFormat());
defaultPass.init(renderManager.getRenderer(), w, h, getDefaultPassTextureFormat(), getDefaultPassDepthFormat(), numSamples);
initFilter(manager, renderManager, vp, w, h);
}

@ -170,10 +170,10 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
renderFrameBuffer.setDepthTexture(depthTexture);
}
computeDepth = true;
filter.init(assetManager, renderManager, vp, width, height);
filter.init(assetManager, renderManager, vp, width, height, numSamples);
filter.setDepthTexture(depthTexture);
} else {
filter.init(assetManager, renderManager, vp, width, height);
filter.init(assetManager, renderManager, vp, width, height, numSamples);
}
}

Loading…
Cancel
Save