FBO + Accumulation buffer support?

Started by
3 comments, last by HuntsMan 15 years, 1 month ago
Hi, I'm using FBO for multiple lights simulation in Geforce 8800 GTX. Does FBO supports accumulation buffer? It used to support only at normal framebuffer not in 32bit floating point FBO a year ago. I know a blending function can simluate the accumulation but I'd rather use accumulation buffer. Many thanks for any comments.
Advertisement
If you make a GL_RGBA16 format texture, then it will do the job.
no, you can't attach a accum buffer to a FBO.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
tried GL_RGBA16 format, but it doesn't work.
It works. Geforce 8800 supports that format. You probably would want to scale down the values that you are adding up. For example, in your shader you can do
gl_FragColor = total * 0.3;

and also setup the additive blending
glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND);
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Also, doesn't work doesn't mean anything. Do you get errors? Corrupted textures? Black textures? Something? Also posting testing code is useful :)

This topic is closed to new replies.

Advertisement