Re: How are 565 textures generated?

Michael I Gold <[email protected]> Wed, 25 Jan 2006 12:22:23 -0800
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
The texels are simply truncated.  No rounding or dithering, at least on 
NV cards.  The driver doesn't do anything special to preserve greyscale, 
either - but if you are using greyscale content, use a LUMINANCE format 
instead.

Hi Steve!  Its been a while.

Ray Ratelis wrote:

> The texture could be dithered. I've seen my 888 textures dithered to 
> 565 on rage128 cards on macosx.
>
> - Ray
>
> Stephen J Baker wrote:
>
>> If I create a texture with an external format that is 8+8+8 bit RGB,
>> and an internal format of 5+6+5 RGB, how is the data converted by
>> glTexImage2D ?
>>
>> Are the least significant bits dropped, rounded or something else?
>>
>> It *looks* like (at least on nVidia 6800 on their latest Linux drivers)
>> they are doing something other than just truncating the LSbits.
>>
>> I have two textures that don't match - one of which has been converted
>> to 5/6/5 in software (by just truncating bits) - the other has been
>> converted by the driver.  The path to this point is pretty convoluted
>> and it's *possible* that there is some other cause - but I'd like to
>> eliminate this cause if possible.
>>
>> It seems that if the driver rounded the data then there would be a 
>> problem
>> with numbers like 0xFF being rounded up to 0x100 and overflowing. That's
>> what made me assume they'd be truncating it.
>>
>> I also wonder what (if any) things are done to keep the extra bit of
>> green precision from generating magenta/green tints to otherwise grey
>> areas of the image.
>>
>> -----------------------------------------------------------------------
>> The second law of Frisbee throwing states: "Never precede any maneuver
>> by a comment more predictive than "Watch this!"...it turns out that
>> this also applies to writing Fragment Shaders.
>> -----------------------------------------------------------------------
>> Steve Baker                      (817)619-2657 (Vox/Vox-Mail)
>> L3Com/Link Simulation & Training (817)619-2466 (Fax)
>> Work: [email protected]           http://www.link.com
>> Home: [email protected]       http://www.sjbaker.org
>>
>> ----- FAQ and OpenGL Resources at:
>>  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
>>
> ----- FAQ and OpenGL Resources at:
>  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
>