From 1f795a7485685a648c21a0959f1167be1f016984 Mon Sep 17 00:00:00 2001 From: pspeed42 Date: Tue, 16 Sep 2014 00:06:02 -0400 Subject: [PATCH] Forgot some other water height specific things that need to be initialized. --- jme3-effects/src/main/java/com/jme3/water/WaterFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java b/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java index 77ff253e7..e4a60d995 100644 --- a/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java +++ b/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java @@ -224,6 +224,7 @@ public class WaterFilter extends Filter { reflectionView.setOutputFrameBuffer(reflectionPass.getRenderFrameBuffer()); plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y)); reflectionProcessor = new ReflectionProcessor(reflectionCam, reflectionPass.getRenderFrameBuffer(), plane); + reflectionProcessor.setReflectionClipPlane(plane); reflectionView.addProcessor(reflectionProcessor); normalTexture = (Texture2D) manager.loadTexture("Common/MatDefs/Water/Textures/water_normalmap.dds"); @@ -279,7 +280,7 @@ public class WaterFilter extends Filter { material.setFloat("Radius", radius * radius); material.setBoolean("SquareArea", shapeType==AreaShape.Square); } - + material.setFloat("WaterHeight", waterHeight); }