Texture size for HDR buffer
I finally decided to make the jump to HDR, at least for experimentation purposes. The process is relatively simple: Render to a floating point texture, use one of various approaches to determine your exposition, and render in LDR using one big quad to the framebuffer.
My major hesitation lies in the floating point texture. Should I be going for a non-power-of-two texture to match the final framebuffer's resolution directly, or am I better off using the closest (rectangular) higher power of two texture and set a viewport that only uses part of the texture?
Doing oversampling is definitely in the cards in the long run (or even going the Halo route and undersample), so that will make my life easier when the time comes, but I would really like to support texel -> pixel rendering in the first place.
It's really a good old memory <-> performance problem in the end, so it really boils down to this: In modern OpenGL implementations, how much of a performance impact does gl_arb_texture_non_power_of_two have? For that matter are there any video card out there that I have to worry about it not being supported?
My major hesitation lies in the floating point texture. Should I be going for a non-power-of-two texture to match the final framebuffer's resolution directly, or am I better off using the closest (rectangular) higher power of two texture and set a viewport that only uses part of the texture?
Doing oversampling is definitely in the cards in the long run (or even going the Halo route and undersample), so that will make my life easier when the time comes, but I would really like to support texel -> pixel rendering in the first place.
It's really a good old memory <-> performance problem in the end, so it really boils down to this: In modern OpenGL implementations, how much of a performance impact does gl_arb_texture_non_power_of_two have? For that matter are there any video card out there that I have to worry about it not being supported?
Use ARB_texture_rectangle if you don't need mipmaps (no performance penalty, possibly a performance benefit, works back to original Radeon / GeForce 2MX).
ARB_texture_non_power_of_two (those features beyond ARB_texture_rectangle, at least) isn't supported on Radeons prior to HD 2x00, or GeForces prior to 6x00, and is *very* slow on GeForce 6 and GeForce 7 (dunno about other hardware).
ARB_texture_non_power_of_two (those features beyond ARB_texture_rectangle, at least) isn't supported on Radeons prior to HD 2x00, or GeForces prior to 6x00, and is *very* slow on GeForce 6 and GeForce 7 (dunno about other hardware).
Thanks for the clarifications, I had a feeling that it would look a lot like this. Wasted memory looks like the way to go then. Who knows, I might be able to use these wasted texels as side-buffers somehow...
Considering my post-processing effects pipeline requires FBOs, I should be safe
OneSadCookie Wrote:works back to original Radeon / GeForce 2MX).
Considering my post-processing effects pipeline requires FBOs, I should be safe
sohta Wrote:...(or even going the Halo route and undersample)...
Out of interest, what's that about?
maximile Wrote:Out of interest, what's that about?
A little down this page, under "You Owe me 80p!":
http://www.bungie.net/News/content.aspx?...&cid=12821
They effectively render in a lower resolution and rely on texture interpolation to "fill in the blanks". Since they are only losing 1/9 pixel, the difference onscreen is minimal, but the impact on their fillrate is massive, allowing them a better framerate. In short, since we are already rendering to a texture, we can use use texture properties to render the HDR pass at a lower resolution. Bi-linear interpolation does the rest.
sohta Wrote:Wasted memory looks like the way to go then.
Be warned, some hardware (i.e. the GeForce 5200) only supports floating point textures with rectangle targets.
arekkusu Wrote:Be warned, some hardware (i.e. the GeForce 5200) only supports floating point textures with rectangle targets.
Hmm, I wasn't aware of this. It does not really matter as I am already using rectangle targets, but it's still a bit strange.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Render video (e.g. QuickTime) to buffer or texture? | Ingemar | 14 | 11,143 |
Jun 8, 2011 04:09 PM Last Post: mdejong1024 |
|
| OpenGL Texture from Char* Buffer | gradyeightythree | 0 | 3,424 |
May 15, 2009 08:26 PM Last Post: gradyeightythree |
|
| Max texture size | Leroy | 4 | 4,370 |
Jul 5, 2007 05:21 PM Last Post: arekkusu |
|

