SimpleWaterProcessor: Use linear filtering for reflection / refraction textures

experimental
shadowislord 10 years ago
parent abb2b784e0
commit 9ad1992681
  1. 8
      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.scene.shape.Quad;
import com.jme3.texture.FrameBuffer; import com.jme3.texture.FrameBuffer;
import com.jme3.texture.Image.Format; import com.jme3.texture.Image.Format;
import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode; import com.jme3.texture.Texture.WrapMode;
import com.jme3.texture.Texture2D; import com.jme3.texture.Texture2D;
import com.jme3.ui.Picture; import com.jme3.ui.Picture;
@ -246,6 +247,13 @@ public class SimpleWaterProcessor implements SceneProcessor {
protected void createTextures() { protected void createTextures() {
reflectionTexture = new Texture2D(renderWidth, renderHeight, Format.RGBA8); reflectionTexture = new Texture2D(renderWidth, renderHeight, Format.RGBA8);
refractionTexture = 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); depthTexture = new Texture2D(renderWidth, renderHeight, Format.Depth);
} }

Loading…
Cancel
Save