Intel card with Accumulation buffer

I wanted to use Accumulation buffer for some effect. I didn’t have any problem to do it but when I try it on an Intel card… it was slow… horribly slow :-. Without I have 60 fps (capped), and it drop to 30 fps only by doing an “ADD” in the accumulation buffer.

Does anyone have experience with accumulation buffer and Intel card (to know if it is normal or if my card/driver has a problem) ?

Even so I’m pretty sure it is a performance problem of the card. If I have understand, it convert RGBA value from INT to FLOAT for each pixel, right ?

The accumulation buffer is pretty old tech – Intel is probably emulating it in pure software. If you can do it in terms of FBOs, I suspect you’ll get a lot better performance out of it.

The accumulation buffer also has a higher precision than 8 bits, sometimes floats, so it could just be that. I’ll just say: drop support for Intel cards. Use an FBO if you want to accumulate something. It might even be possible to avoid accumulating all together using shaders and/or MRT rendering. It’ll even be faster in that case.

I can’t avoid them :wink:

I don’t really see how to do accumulation with FBO (I will stick with blending for now).
I should find a good link for MRT rendering.

Sucks for you. FBOs aren’t even supported on older Intel cards.

FBOs are easy to use for accumulation. Remember that the accumulation is deprecated in OpenGL 3.x, replaced by FBOs. The accumulation buffer is basically a screen sized off-screen buffer that can have higher precision. FBOs are exactly the same except you can decide the format and resolution yourself. Just create two FBOs. One will be your screen buffer replacement (so you can read from it as a texture), and the other will be your accumulation buffer. Bind a TEXTURE_2D to each of them with the desired properties. Then use it as an accumulation buffer blending the screen buffer texture to the accumulation FBO. A GL_ADD would be in psuedo-code:


GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, accumulationFBO); //You can also use EXT_framebuffer_object instead of GL30
GL11.glBindTexture(GL11.GL_TEXTURE_2D, screenBufferTexture);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);

//Fullscreen pass over the screen, using glBegin/glEnd or with a vertex array.

Setting up FBOs is a little trickier, but there are plenty of tutorials out there. Just start out really easy so you can experiment with how FBOs work. They are tricky.

Like I said though, FBOs aren’t supported on older Intel cards, but you can always have two options. I’m a little curious about what special effect you want to achieve. Is it motion blur? =D