@Override
    protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) {
        material = new Material(manager, "Common/MatDefs/Post/Posterization.j3md");
        material.setInt("NumColors", numColors);
        material.setFloat("Gamma", gamma);
        material.setFloat("Strength", strength);
    }
Creates a posterization Filter with the given number of colors and gamma

@param numColors the desired number of colors (&gt;0, default=8)
@param gamma the desired exponent (default=0.6)
jme3-effects/src/main/java/com/jme3/post/filters/PosterizationFilter.java