Jump to content
  • Advertisement

Archived

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

matt_j

Textures - nasty problem

This topic is 5450 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!