Jump to content
  • Advertisement
Sign in to follow this  

Accum buffer or shader for summing images

This topic is 3702 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I am developing a shader that needs to sum various images generated in realtime. I dunno if using the accum buffer to sum the images while generating them would be faster than summing them afterwards using a shader. Somebody knows about this? Thanks in advance, Jorge

Share this post


Link to post
Share on other sites
Advertisement
I'd say a shader.

Didn't the accumulation buffer use 64 bit numbers?


And I also quote from another topic I just read:
"As for accumulation buffer, you really don't want to use it for anything serious, as it is not accelerated in any current hardware i can think of."

Share this post


Link to post
Share on other sites
Last time I tried it, it was accelerated. So anything that is Radeon 9700 and above, Geforce FX and above, accum buffers is fast.

For doing summation there was some paper someone had written on how to do that efficiently.
In principle, use a shader. Read the texture as many times as possible and add the values, then write result to a float buffer.
You can just submit GL_POINTS to the GPU, properly positioned.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!