Hi,
I am currently working on a 2d space side-scrolling shooter where each ship consists of geometrical shapes like triangle or square. I am currently drawing them with fillRect and fillPoly and performance is excellent.
As the shapes look a bit raggish on the black background, I tried to apply a Blur Filter like this:
BufferedImageOp blur;
float ninth = 1.0f / 9.0f;
float[] blurKernel = {
ninth, ninth, ninth,
ninth, ninth, ninth,
ninth, ninth, ninth
};
blur = new ConvolveOp(new Kernel(3, 3, blurKernel));
this is instantiated one time, and in the render loop, I apply it like this:
foreground = blur.filter(foreground, null);
Performance dropped tremendously and I only have like 4-5 frames left. I am using Fedora Core 3 Linux with Sun JRE 1.5 and a Geforce 6800 so I don’t think it has sth to do with pc performance.
Can someone suggest a better method or am I doing something wrong ?
Thanks a lot.