View Full Version : Blending the accumulation buffer into the color buffer

04-20-2004, 09:42 AM

I am playing a bit with the accumulation buffer and right now i am trying to do motion blur.
Well, actually it is very easy to do "full scene" motion blur, but headache is just round the corner.

So, i am now trying to only do motion blur for actually moving objects, so that when the viewer moves the world does not get blurred, too.

My idea was to do it this way:
-render the moving objects
-blur them with the accumulation buffer
-render the world, overriting all previous stuff
-blend the accumulation buffer over the color buffer to add the blur
-render the moving objects again, to get sharp edges

However, it seems not to be possible to blend the content of the ab into the cb, only to copy it.

Any clever idea how to work around that?


04-20-2004, 05:36 PM
I've honestly never used the accumulation buffer before, but how about. . .

1) Render the world to a texture.
2) Do your accumulation buffer rendering.
3) Dump the accumlation buffer stuff to the framebuffer.
4) Render the texture fullscreen using the desired blending parameters.

04-21-2004, 02:35 AM
Yes, that works. Its possible to get the desired effect this way.
The only thing i donīt like about it is, that - on my Radeon - i have to use a standard-sized texture, meaning 1024^2 or even 2048^2 only to store the framebuffer (because i don want to shrink the image.

Does anyone know, if the non-power-of-two-texture extension gets supported in the near future?


04-23-2004, 09:15 AM
According to delphi3d (http://www.delphi3d.net/hardware/extsupport.php?extension=GL_EXT_texture_rectangle) , the Radeon line supports EXT_texture_rectangle, which is an alias for NV_texture_rectangle (http://oss.sgi.com/projects/ogl-sample/registry/NV/texture_rectangle.txt) . I don't know if that's helpful at all in this case since they don't support WGL_NV_render_texture_rectangle (http://oss.sgi.com/projects/ogl-sample/registry/NV/render_texture_rectangle.txt) . :(