Archived

This topic is now archived and is closed to further replies.

matt_j

Textures - nasty problem

Recommended Posts

How do I load a true color RGBA texture and display it with 16 bit color depth without the resulting posterization? I know this is possible, but I don''t know how to do it. I need the alpha channel, so GL_RGB5_A1 or GL_RGBA4 are the obvious choices. How do I clean up the resulting image?

Share this post


Link to post
Share on other sites
Use error diffusion; that is, on scanline basis, calculate the error between the 16-bit version of a pixel and it's original value. Now, add this error to the next pixel's nominal value, and repeat until scanline ends. Reset the error at the beginning of each scanline.

Another method is to use neural network for color remapping, but that cannot be explained so simply

-Nik

EDIT: Of course there are another methods - these are the first two that come to my mind.

[edited by - Nik02 on January 17, 2004 2:37:14 PM]

Share this post


Link to post
Share on other sites