PDA

View Full Version : Mipmaps and HDR



Aekold
02-01-2008, 09:12 AM
Hi,
I'm trying to create an HDR (use GL_RGB16F_ARB as components and GL_FLOAT as data type) mipmap texture. When I render it to the screen it's less bright than simple texture (obtained with glTexImage2D) and seems to be low dynamic range.
What could be a reason for it?
Thanks,
Peter

-NiCo-
02-01-2008, 09:38 AM
Do you mean that:

reading float data into a texture with GL_RGB16F_ARB + GL_FLOAT + mipmap

gives lower brightness than

reading the same float data into a texture with GL_RGB8 + GL_FLOAT + mipmap?

N.

Aekold
02-01-2008, 10:28 AM
Do you mean that:

reading float data into a texture with GL_RGB16F_ARB + GL_FLOAT + mipmap

gives lower brightness than

reading the same float data into a texture with GL_RGB8 + GL_FLOAT + mipmap?

N.

Nope, it gives lower brightness than same data in GL_RGB16F_ARB + GL_FLOAT + no mipmap

-NiCo-
02-01-2008, 10:36 AM
Ah, I see. You probably didn't generate the other mipmap levels. Call glGenerateMipmapEXT(GL_TEXTURE_2D) right after your glTexImage2D call . Right now, you're possible performing an interpolation between mipmap level 0 with the texture data and level 1 which is all black.

N.

Aekold
02-01-2008, 10:49 AM
Thanks