ColorGradientFactory gradientFactory = new ColorGradientFactory();
gradientFactory.addSourceSegment(50, 0, 50, 255, 150, new Color4f(1, 0, 0, 1));
gradientFactory.addSourceSegment(205, 0, 205, 255,150, new Color4f(0, 0, 1, 1));
// gradientFactory.addSourceSegment(0, 0, 0, 255, 256, new Color4f(0, 0, 0, 1));
// gradientFactory.addSourceSegment(255, 0, 255, 255, 256, new Color4f(1, 1, 1, 1));
gradientFactory.drawGradient(gradient);
// gradient.setDirty();
gradientFactory.clearSources();
gradientFactory.addSourcePoint(light.getWidth() / 2, light.getHeight() / 2, light.getWidth() / 2f * .9f, new Color4f(0,0,0,0));
gradientFactory.setBaseColor(new Color4f(1,1,1,1));