Skip to main content
gamedev.net
🔒 Locked

Problem in OGL Texture...

Started by alex_r Jan 23, 2006 at 1:59 PM 4 replies 850+ views
Original Post
alex_r
alex_r
I have a problem... I don't know how can I explain the problem, here is the pictures, look the background picture (TGA 32Bits with Alpha): 16 Bits Screen Resolution (640x480x16): 640x480x16 32 Bits Screen Resolution (640x480x32): 640x480x16 There any solution to solve this problem in texture resolution??? Thanks>
Yann L
Yann L
I see no problem in your screenshots. As the AP said, the banding in the first picture comes from the 16bit screen colour resolution. Older graphics cards dealt with that using dithering. But I don't think modern GPUs do that anymore, because 16bit desktop colour modes are effectively dead nowadays. They're only supported for legacy purposes, and should never be used in practice (32bit is both faster and a lot better looking).
alex_r
alex_r
I think this is a problem in software, in my software, any error in values in glTexImage2D or a OGL limitation...
gold
gold
Is this on NVIDIA hardware? If you create a texture and pass an unsized internal format into the glTexImage call, the default texture size depends on the desktop color depth. In other words, if you request GL_RGB, you will get RGB565 or RGB888 depending on the desktop. If you want to control this, you can give a hint by requesting a sized internal format, i.e. GL_RGB8 means you want 8 bits per component regardless of the desktop color depth.

The rendered image will still be dithered on a 16-bit desktop but the banding will be less apparent. The banding is obvious if you get a 16-bit internal format because the data is thrown away during the TexImage call, where the LSBs of each texel are truncated. Dither during rendering cannot recover this lost information.

The control panel includes a setting for the default texel size but its better to do this programmatically as I described.
alex_r
alex_r
Thanks for the info gold!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.