From e0df200dfd872994cb2826c0ef5f01cd10ac056e Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Sun, 23 Sep 2012 18:38:36 +0000 Subject: [PATCH] Properly update the Height map and normal map to the water filter material when setting those textures to the filter git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9764 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-effects/com/jme3/water/WaterFilter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/src/core-effects/com/jme3/water/WaterFilter.java b/engine/src/core-effects/com/jme3/water/WaterFilter.java index 39ebeccea..b22a2444c 100644 --- a/engine/src/core-effects/com/jme3/water/WaterFilter.java +++ b/engine/src/core-effects/com/jme3/water/WaterFilter.java @@ -720,6 +720,9 @@ public class WaterFilter extends Filter { public void setHeightTexture(Texture2D heightTexture) { this.heightTexture = heightTexture; heightTexture.setWrap(WrapMode.Repeat); + if (material != null) { + material.setTexture("HeightMap", heightTexture); + } } /** @@ -729,6 +732,9 @@ public class WaterFilter extends Filter { public void setNormalTexture(Texture2D normalTexture) { this.normalTexture = normalTexture; normalTexture.setWrap(WrapMode.Repeat); + if (material != null) { + material.setTexture("NormalMap", normalTexture); + } } /**