In what order to apply lighting and translucency? I'm making a game that is supposed to like like a early 90s 3D game, so i'm rendering in software on an 8-bit indexed bitmap, using lookup tables for translucency and lighting.

Now I have to draw a translucent, lit sprite in front of an already-lit background (the light level of said background is lost at that point). I'm unsure whether to first darken all the pixels and then average them with the background or the other way round.
When blending multiple layers, physically the "right" thing to do is calculating lighting on each layer separately, then composite the lit layers together. This way, for instance, you can have a translucent sprite standing in a spotlight, in front of a dark background, and the sprite will be well-lit while the background visible through it stays dark. Or conversely, you can have a dark sprite silhouetted against a brightly lit background.

If you blended the sprite with the background before lighting, it wouldn't be clear which lighting environment you should use if the sprite and background have different ones.