We are using a 16 bit per channel accumulation buffer for implementing high quality motion blur. Thus, we’re trying to glAccum lots of frames(50+). We expect to be able to accumulate up to 256 frames with a 16 bit accum buffer. However, we seem to get visible banding once we accumulate over ~16 frames. Here’s pseudocode:
for n frames
We’re just wondering other people’s experience with this, and how many frames they can accum before banding is noticeable. What would be a maximum number of frames to accum with 16bit accumbuffer and still not get banding.
Thanks for any responses.
for n frames
The banding is because you first degrade the information before you add it to the 16 bit buffer and not within it.
adding all frames to the accum buffer before reducing the brightness might help reducing banding
The spec doesn’t dictate how those 16 bits of precision are utilized, so the driver may implement the accumulation buffer using a half_float (fp16) format. You might try doing the motion blur into an FBO - you’d have more control over the precision and be able to do more complex effects.
I just did a test with the above method in a separable blur filter(using a pair of GL_RGB16F_ARB FBOs).
I start to get visible banding at around 4+4 samples and some hints towards banding at 3+3 samples.
At 256+256 samples, it looks like you only had 16 colors, but the blur is nice.
I do need to swich to a shader sampler to get full 32f sampling.
The blur test i did with 10+10 sampling
According to the red book, you should scale as you accum to make use of the full range of the accumulation buffer. I tried both methods and don’t really visibly notice any difference.
Looks like zeoverlord is getting similar results with fp16 fbo’s. Leads me to believe the accumulation buffer is fp16. I guess you can’t really blend more than 10-20 frames without visible banding with only an fp16 buffer.