Texture size for HDR buffer - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Texture size for HDR buffer (/thread-2829.html)
Texture size for HDR buffer - sohta - Jan 13, 2008 05:27 PM
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?
Texture size for HDR buffer - OneSadCookie - Jan 13, 2008 05:40 PM
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).
Texture size for HDR buffer - sohta - Jan 13, 2008 08:28 PM
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...
OneSadCookie Wrote:works back to original Radeon / GeForce 2MX).
Considering my post-processing effects pipeline requires FBOs, I should be safe
Texture size for HDR buffer - maximile - Jan 13, 2008 09:04 PM
sohta Wrote:...(or even going the Halo route and undersample)...
Out of interest, what's that about?
Texture size for HDR buffer - sohta - Jan 13, 2008 09:21 PM
maximile Wrote:Out of interest, what's that about?
A little down this page, under "You Owe me 80p!":
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.
Texture size for HDR buffer - arekkusu - Jan 14, 2008 04:59 PM
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.
Texture size for HDR buffer - sohta - Jan 14, 2008 05:13 PM
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.