View Single Post
Old January 29th, 2007   #47 (permalink)
SimoneT
Not so likeable!
 
SimoneT's Avatar
 
Join Date: Feb 2004
Location: Torino (Italy)
Posts: 107
Quote:
Originally Posted by chancet View Post
question i've had for a while: can you write an algorithm to increase the colour depth for sprites on 16 or 8 bit? I thought it would be a simple matter of blending the two nearest pixels together and getting a new colour as a result when the resolution is heightened? isn't it that simple? just wondering why i've seen all manners of plugins for graphics smoothing and what not for the super nintendo but no colour depth increasing plugins...
All shaders runs without know the color depth. Color is a vector with four components (RGBA), every component is in 0.0 to 1.0 range. For example, if the depth is 16bit(R5G5B5A1) the steps from 0.0 to 1.0 are equals to 1.0/31.0 for R, G and B, and for 32bit (R8G8B8A8) are equals to 1.0/255.0. You can decrease the number of steps (from 1.0/255.0 to 1.0/31.0, AKA dithering) but you can't increase the number of the steps (from 1.0/31.0 to 1.0/255.0) without some interpolation. In other words: you can decrease color depth but you cannot increase it.
I hope that my Engrish (for Hushypushy) is comprehensible.
Ciao.
SimoneT is offline   Reply With Quote