Sign in to follow this  

Accumulation buffer question

This topic is 4666 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

I need to use accumulation buffer to add highlights. In the function void glAccum(GLenum op, GLfloat value); GL_ACCUM reads each pixel from the buffer currently selected for reading with glReadBuffer(), multiplies the R, G, B, and alpha values by value, and adds the result to the accumulation buffer. GL_RETURN takes values from the accumulation buffer, multiplies them by value, and places the result in the color buffer(s) enabled for writing. I thought color red (1.0, 0.0, 0.0) accumulated with color black (0.0, 0.0, 0.0) would result in red, and red accumulated with color white(1.0, 1.0, 1.0) would result in white.However, the result displayed are respectiveyly dark red and light red, just like the color mixed in painting. How can I gain the demanding result,that is just the accumulation of RGB color? Thanks a lot.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
the first rule of the accumulation buffer: never use the accumulation buffer, no drivers support it and you can get the same functionality using render to texture

Share this post


Link to post
Share on other sites
Actually, I'm implementing an method presented in a paper.

Although the problem you mentioned above does exist, I still want to know the answer to my question of accumulation buffer.

Thanks anyway.
Hope someone can help me with this.

Share this post


Link to post
Share on other sites
I've found the reason for the problem I arised above.But there is still one question, if the addition of RGB value in two times accmulation is larger than 1.0, it will be cut into 0.0. Why is that happening?

Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
the first rule of the accumulation buffer: never use the accumulation buffer, no drivers support it and you can get the same functionality using render to texture


Thats not correct;
ATI's cards have supported the hardware accum buffer for a couple of years now, however it is VERY heavy work for the card, just 12 passes accum into that buffer on a 9800xt makes it cry and the framerate crash (it was still faster than the 1 frame per hour you'd get in software but it was still VERY slow), simply because of the amount of data floating around.

Share this post


Link to post
Share on other sites
Thanks for the information.
Still, could someone help with my question?

"If the addition of RGB value in two times accmulation is larger than 1.0, it will be cut into 0.0. Why is that happening?"

Looking forward to your answers.


Share this post


Link to post
Share on other sites
If the addition of the RGB value is greater than 1.0, what would you expect the value to be? I thought I read somewhere it was supposed to be clipped to 1.0, not 0.0, but in any case, if it is showing up as 0.0, you could just clip anything greater than 1.0 to 1.0 yourself.

Share this post


Link to post
Share on other sites

This topic is 4666 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this