PDA

View Full Version : Use of Framebuffers for HDR



nickels
03-15-2010, 10:10 AM
I am attempting an HDR pipeline.
For this pipeline I will need to render to texture for a hierarchy of texture sizes.
I am wondering which way I should go:

1) Create 1 framebuffer object and rebind the various texture sizes before each render (is this even possible?)
or
2) Create a different framebuffer object for each texture size.

Which would be more appropriate/faster?
Thanks.

Dark Photon
03-15-2010, 07:58 PM
1) Create 1 framebuffer object and rebind the various texture sizes before each render (is this even possible?)
or
2) Create a different framebuffer object for each texture size.
Test and see!

I can tell you years back on NVidia there was a pretty serious perf penalty whenever you switched the size of texture that was bound as the FBO as a render target, confirmed by an NVidia guy. He suggested creating one FBO per size and I got a nice speed-up in response.

That's was 4-5 generations of cards ago though. As the FBO abstraction layer I wrote uses separate GL FBOs per res and hides this odd quirk, I've never bothered to retest this on recent cards. Next time I rip into FBO perf I probably will though.

Along with different resolutions, test different formats too, if you care.

nickels
03-16-2010, 08:40 AM
Thanks for the background and reply, interesting.

I've got a lot on the programming plate, so I will likely just use separate FBO's per layer for now (too many other experiments to do)...

nickels
03-18-2010, 03:24 PM
http://public.blu.livefilestore.com/y1pPqybMpIZceBG_QYk02S3EBAXMKqIRpM1Iwf4auVa9gbdEWJ Id_b-BX70LKCo1vumzvnjaSeBPhzoF5_en8QrEQ/gl_hdr.jpg

HDR + bloom working, if tasteless. Needs some fine tuning, but the technology is there....

the pipeline:
http://public.blu.livefilestore.com/y1plJkwiSjrHitdjmjC6dmrjmLG9FNveJDQmDQ3Lia70RTincl n5J7qPtO8C1MzTZAS_bdlE3JNbatPfoaAix5Psg/gl_hdr_pipe.jpg

nickels
03-19-2010, 11:23 AM
Okay, so my gateway P-7811FX laptop lost its motherboard, second time in 1.5 years, so my opengl will be stalled for a while....
Okay now its working again. Weird. Unsettling at best....