286
Programming / Re: Paletted 8bit -> 24bit shading.
« on: June 23, 2015, 06:21:43 pm »
Doom's palette and colormap are really bad, and it does look better in OpenGL with a certain lighting hack to imitate the software depth fog - the thing that causes things close to the camera to be lightened up.
It would definitely look better paletted with a 24-bit colormap though.
I can imagine rendering the entire scene in fullbright to capture the palette colors into one texture, rendering all the lighting into a separate texture - and then modifying the fullbright texture's colors by matching colors onto the appropriate index of the colormap for the X position and then setting the pixel's Y position on the colormap texture to the brightness on the lighting texture might work.
But that's wishful thinking. :-)
It would definitely look better paletted with a 24-bit colormap though.
I can imagine rendering the entire scene in fullbright to capture the palette colors into one texture, rendering all the lighting into a separate texture - and then modifying the fullbright texture's colors by matching colors onto the appropriate index of the colormap for the X position and then setting the pixel's Y position on the colormap texture to the brightness on the lighting texture might work.
But that's wishful thinking. :-)