From 9ad1992681760deed5cf6c91789604717c297932 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sat, 21 Feb 2015 15:39:58 -0500 Subject: [PATCH] SimpleWaterProcessor: Use linear filtering for reflection / refraction textures --- .../main/java/com/jme3/water/SimpleWaterProcessor.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jme3-effects/src/main/java/com/jme3/water/SimpleWaterProcessor.java b/jme3-effects/src/main/java/com/jme3/water/SimpleWaterProcessor.java index 51bec6a8b..996720904 100644 --- a/jme3-effects/src/main/java/com/jme3/water/SimpleWaterProcessor.java +++ b/jme3-effects/src/main/java/com/jme3/water/SimpleWaterProcessor.java @@ -45,6 +45,7 @@ import com.jme3.scene.Spatial; import com.jme3.scene.shape.Quad; import com.jme3.texture.FrameBuffer; import com.jme3.texture.Image.Format; +import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.texture.Texture2D; import com.jme3.ui.Picture; @@ -246,6 +247,13 @@ public class SimpleWaterProcessor implements SceneProcessor { protected void createTextures() { reflectionTexture = new Texture2D(renderWidth, renderHeight, Format.RGBA8); refractionTexture = new Texture2D(renderWidth, renderHeight, Format.RGBA8); + + reflectionTexture.setMinFilter(Texture.MinFilter.Trilinear); + reflectionTexture.setMagFilter(Texture.MagFilter.Bilinear); + + refractionTexture.setMinFilter(Texture.MinFilter.Trilinear); + refractionTexture.setMagFilter(Texture.MagFilter.Bilinear); + depthTexture = new Texture2D(renderWidth, renderHeight, Format.Depth); }