fixed editing of color overlay filter

fix-456
javasabr 8 years ago
parent a64594eea9
commit 56fc653725
  1. 6
      jme3-effects/src/main/java/com/jme3/post/filters/ColorOverlayFilter.java

@ -69,8 +69,6 @@ public class ColorOverlayFilter extends Filter {
@Override
protected Material getMaterial() {
material.setColor("Color", color);
return material;
}
@ -88,11 +86,15 @@ public class ColorOverlayFilter extends Filter {
*/
public void setColor(ColorRGBA color) {
this.color = color;
if(material != null) {
material.setColor("Color", color);
}
}
@Override
protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) {
material = new Material(manager, "Common/MatDefs/Post/Overlay.j3md");
material.setColor("Color", color);
}
@Override

Loading…
Cancel
Save