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
3.0
rem..om 12 years ago
parent bd2695061d
commit e0df200dfd
  1. 6
      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);
}
}
/**

Loading…
Cancel
Save