The fudging was only needed because fog was still applied on top of the palette emulation so after completely disabling the true color distance attenuation in palette mode it made the image too bright.
The alpha needs to be 1 because this is only the texel, not the combined color.
Brightness is now correct - I have no idea why this factor of 1/0.85 is needed - something must reduce the brightness of the entire scene but I have no idea what.
* the palette shader was not bound.
* the palette textures were not bound.
* palette mode still used regular lighting on top of the palette emulation
This works a lot better than before but is still not complete.