Zamuel_a wrote:Very impressive that you got it to work. Do you filter the lightmap when you scale it or just combine it as it is? (sharp shadows wouldn't look so good).
There's a slight advantage on the Falcon in that the PC version has to do a table translation to get an approx 8-bit colour for the original 8-bit pixel combined with the light level on each surface pixel. This means the lit pixels are re-quantized and some error creeps into the shading/lighting.
On the Falcon you can translate directly from 8bit colour + light -> RGB16 so you get nice smooth lighting You can do this direct from the original 24bit game palette.
I was going to attempt colour lighting like the GL version, but I see now that it would only work for static lightmaps. It would be difficult to make it work with dynamic lights which themselves need precombined before combining with the texture. Still I'll probably do a static version to see how it looks as it will probably be nicer visually.
Yes the lightmaps are filtered while they are being combined. There's a specific filter routine for each miplevel. It's done as tiles so the routines are hardcoded to 2x2, 4x4, 8x8 and 16x16 versions, making them easier to optimize. It's still going to be faster not to filter but will see how it goes.