Author Topic: Paletted 8bit -> 24bit shading.  (Read 27608 times)

Offline Bloax

  • Colonel
  • ****
  • Posts: 325
  • do you want to be any of those things
    • View Profile
Re: Paletted 8bit -> 24bit shading.
« Reply #75 on: September 08, 2015, 12:45:27 pm »
In AndO3131 version I made some error making unit more flat that it should be.

I made some screenshoots showing that this isn't simply blend.

I did 3 things, calculate effective shade of pixel based on sum value of colors.
subtract some linear values based on new shade.
finally blend with background color.

This 3 steps allowed me recreate most of behavior of TFTD palette.
You can toy with my implementation here: https://jsfiddle.net/hgcufgL7/14/ and see difference with original colors (upper is calculated, lower is original in each depth line).
I have not played TFTD (or UFO for that manner) but that does look positively sexy.