News for hackers. Stuff that matters.
Re:John Carmack on JPEG by Jare on Saturday June 05, 2021 @03:53AM (#27403124)
In Commandos 2 we stored the huge map images in YCbCr 420 in memory, and converted to RGB during rendering via lookup tables rather than shaders (this was back in 1999, all CPU!). We compressed the range of each component below 8 bits, running a histogram so our bits represented values inside the range actually present in the original image. We got it down to 6 bits per pixel or something close to that.

Converting via lookup tables, one for each component, made it very cheap to perform palette-style tricks like tonemapping and smooth color shifts from day to night.

[Edit: it may have actually been CIE Lab, not YUV/YCbCr, because the a&b tended to have narrower ranges. It's been too long!]

Re:John Carmack on JPEG by rgoulter on Saturday June 05, 2021 @04:47AM (#27403360)
The maps in Commandos 2 were beautiful and distinctive. I spent many hours playing through those levels.
Re:John Carmack on JPEG by Jare on Saturday June 05, 2021 @05:36AM (#27403572)
If they were hard to play, I can assure you they were MUCH harder to create. I look back and find it hard to believe how much blood and tears the artists and level designers had to sweat. All the kudos go to them, but I admit I felt very happy and proud when I finally found the right tech to make them justice at runtime.
Re:John Carmack on JPEG by zbendefy on Saturday June 05, 2021 @12:29PM (#27406395)
Do tell more! I would be curious of any details on the development of commandos2, I used to play that game a lot.