Skip to main content
GameDev.net gamedev.net
🔒 Locked

Textures - nasty problem

Started by matt_j Jan 17, 2004 at 1:19 PM 0 replies 300+ views
Original Post
matt_j
matt_j
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?
Nik02
Nik02
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]
Niko Suni

Topic Locked

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

Sign in to reply to this topic.