From c9b5f9eb593d8e1872fa24fe1dfc31061883f527 Mon Sep 17 00:00:00 2001 From: tiatin Date: Wed, 13 Jul 2016 21:49:24 +0300 Subject: [PATCH] Added ability to set framebuffer image format used in FilterPostProcessor. https://hub.jmonkeyengine.org/t/ability-to-change-image-format-for-filterpostprocessor/36379 --- .../src/main/java/com/jme3/post/FilterPostProcessor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java index e9515142e..fc7fdd6bf 100644 --- a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java +++ b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java @@ -141,7 +141,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { fsQuad.setWidth(1); fsQuad.setHeight(1); - if (!renderer.getCaps().contains(Caps.PackedFloatTexture)) { + if (fbFormat == Format.RGB111110F && !renderer.getCaps().contains(Caps.PackedFloatTexture)) { fbFormat = Format.RGB8; } @@ -520,6 +520,10 @@ public class FilterPostProcessor implements SceneProcessor, Savable { this.assetManager = assetManager; } + public void setFrameBufferFormat(Format fbFormat) { + this.fbFormat = fbFormat; + } + public void write(JmeExporter ex) throws IOException { OutputCapsule oc = ex.getCapsule(this); oc.write(numSamples, "numSamples", 0);