From b8071a2f5077440b9f4520ebd099db36f7f49495 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Fri, 1 Nov 2013 20:24:02 +0000 Subject: [PATCH] Properly set the number of samples in some of the tests to find other filters that worked and didn't work in the presence of AA. (CrossHatch is broken similarly to the way DoF was broken.) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10865 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/test/jme3test/post/TestBloom.java | 5 +++++ engine/src/test/jme3test/post/TestCartoonEdge.java | 4 ++++ engine/src/test/jme3test/post/TestCrossHatch.java | 6 ++++++ engine/src/test/jme3test/post/TestDepthOfField.java | 4 ++++ engine/src/test/jme3test/post/TestFog.java | 4 ++++ 5 files changed, 23 insertions(+) diff --git a/engine/src/test/jme3test/post/TestBloom.java b/engine/src/test/jme3test/post/TestBloom.java index a6200e378..b73d234d7 100644 --- a/engine/src/test/jme3test/post/TestBloom.java +++ b/engine/src/test/jme3test/post/TestBloom.java @@ -119,6 +119,11 @@ public class TestBloom extends SimpleApplication { fpp=new FilterPostProcessor(assetManager); // fpp.setNumSamples(4); + int numSamples = getContext().getSettings().getSamples(); + if( numSamples > 0 ) { + fpp.setNumSamples(numSamples); + } + BloomFilter bloom=new BloomFilter(); bloom.setDownSamplingFactor(2); bloom.setBlurScale(1.37f); diff --git a/engine/src/test/jme3test/post/TestCartoonEdge.java b/engine/src/test/jme3test/post/TestCartoonEdge.java index 5d578256d..1ca328a8a 100644 --- a/engine/src/test/jme3test/post/TestCartoonEdge.java +++ b/engine/src/test/jme3test/post/TestCartoonEdge.java @@ -61,6 +61,10 @@ public class TestCartoonEdge extends SimpleApplication { if (renderer.getCaps().contains(Caps.GLSL100)){ fpp=new FilterPostProcessor(assetManager); //fpp.setNumSamples(4); + int numSamples = getContext().getSettings().getSamples(); + if( numSamples > 0 ) { + fpp.setNumSamples(numSamples); + } CartoonEdgeFilter toon=new CartoonEdgeFilter(); toon.setEdgeColor(ColorRGBA.Yellow); fpp.addFilter(toon); diff --git a/engine/src/test/jme3test/post/TestCrossHatch.java b/engine/src/test/jme3test/post/TestCrossHatch.java index d0873c7d9..2164ec229 100644 --- a/engine/src/test/jme3test/post/TestCrossHatch.java +++ b/engine/src/test/jme3test/post/TestCrossHatch.java @@ -118,6 +118,12 @@ public class TestCrossHatch extends SimpleApplication { rootNode.attachChild(sky); fpp=new FilterPostProcessor(assetManager); + + int numSamples = getContext().getSettings().getSamples(); + if( numSamples > 0 ) { + fpp.setNumSamples(numSamples); + } + CrossHatchFilter chf=new CrossHatchFilter(); diff --git a/engine/src/test/jme3test/post/TestDepthOfField.java b/engine/src/test/jme3test/post/TestDepthOfField.java index 5426a335d..9966adc61 100644 --- a/engine/src/test/jme3test/post/TestDepthOfField.java +++ b/engine/src/test/jme3test/post/TestDepthOfField.java @@ -73,6 +73,10 @@ public class TestDepthOfField extends SimpleApplication { fpp = new FilterPostProcessor(assetManager); // fpp.setNumSamples(4); + int numSamples = getContext().getSettings().getSamples(); + if( numSamples > 0 ) { + fpp.setNumSamples(numSamples); + } dofFilter = new DepthOfFieldFilter(); dofFilter.setFocusDistance(0); diff --git a/engine/src/test/jme3test/post/TestFog.java b/engine/src/test/jme3test/post/TestFog.java index ed5ebd2a6..729ebdf18 100644 --- a/engine/src/test/jme3test/post/TestFog.java +++ b/engine/src/test/jme3test/post/TestFog.java @@ -98,6 +98,10 @@ public class TestFog extends SimpleApplication { fpp=new FilterPostProcessor(assetManager); //fpp.setNumSamples(4); + int numSamples = getContext().getSettings().getSamples(); + if( numSamples > 0 ) { + fpp.setNumSamples(numSamples); + } fog=new FogFilter(); fog.setFogColor(new ColorRGBA(0.9f, 0.9f, 0.9f, 1.0f)); fog.setFogDistance(155);