Forgot some other water height specific things that need

to be initialized.
experimental
pspeed42 10 years ago
parent 45591c99a1
commit 1f795a7485
  1. 3
      jme3-effects/src/main/java/com/jme3/water/WaterFilter.java

@ -224,6 +224,7 @@ public class WaterFilter extends Filter {
reflectionView.setOutputFrameBuffer(reflectionPass.getRenderFrameBuffer()); reflectionView.setOutputFrameBuffer(reflectionPass.getRenderFrameBuffer());
plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y)); plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y));
reflectionProcessor = new ReflectionProcessor(reflectionCam, reflectionPass.getRenderFrameBuffer(), plane); reflectionProcessor = new ReflectionProcessor(reflectionCam, reflectionPass.getRenderFrameBuffer(), plane);
reflectionProcessor.setReflectionClipPlane(plane);
reflectionView.addProcessor(reflectionProcessor); reflectionView.addProcessor(reflectionProcessor);
normalTexture = (Texture2D) manager.loadTexture("Common/MatDefs/Water/Textures/water_normalmap.dds"); 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.setFloat("Radius", radius * radius);
material.setBoolean("SquareArea", shapeType==AreaShape.Square); material.setBoolean("SquareArea", shapeType==AreaShape.Square);
} }
material.setFloat("WaterHeight", waterHeight);
} }

Loading…
Cancel
Save