256x256 x 1600 = 104.8576 million pixels.
At 60 FPS: 6.291456 gigapixels per second.
My GTX 460M has a THEORETICAL fillrate of 5.4 Gpixel/s.
I have a fully GPU accelerated particle engine which renders particles as transparent untextured square points. The particles bounce on the screen edges (it’s in 2D), but they are treated as 1 pixel points, meaning that they’ll only bounce when half the particle is already outside the screen. This “increases” fillrate since that part is clipped, and is especially noticeable with larger particles. That combined with the increased number of vertices to process reduces performance as the particles become smaller.
Gpixel/s = numParticles * particleWidth * particleHeight * 60 / (10^9)
64x64 particles: 20 000 particles = 4.9152 Gpixel/s.
32x32 particles: 70 000 particles = 4.3008 Gpixel/s
16x16 particles: 230 000 particles = 3.5328 Gpixel/s.
8x8 particles: 750 000 particles = 2,8800 Gpixel/s.
4x4 particles: 1 750 000 particles = 1,6800 Gpixel/s.
2x2 particles: 2 400 000 particles = 0.5760 Gpixel/s.
1x1 particles: 2 750 000 particles = 0,1650 Gpixel/s.
If the above (256x256) result is with Java2D I’ll be surprised. Either:
- a big number of the particles are outside the screen and get clipped,
- you have a pretty powerful graphics card and Java2D has perfect OpenGL acceleration
It’s definitely not impossible though. With only 1600 particles the CPU cost of even glBegin/glEnd might be low enough to allow 60 FPS, so Java2D might be able to handle it even if it’s not very CPU effective. The hardware can handle it, just look at a GTX 680:
http://www.xbitlabs.com/images/graphics/nvidia-geforce-gtx-680/31_gtx68_gpu-z.png
32.2 Gpixel/s… drool
@StumpyStrust
Scaling images (textures) is hardware accelerated. Up-scaling it even with bilinear filtering should be free and faster than upscaling it and storing it in memory, since your GPU needs to read less texture memory. Transparency is also often free on newer GPUs since the blending is also handled by dedicated hardware. I have no idea why it gets faster with lower transparency. Your GPU should do the exact same work no matter what alpha value you have.