Homeworld: Unbound 0.2 — the lighting fix
Someone who played 0.1 said it “seems to have a sort of lighting from all sides, where the original only had parallel lighting from one distant source”.
That is a good bug report, because it describes what was seen rather than what they assumed was wrong. And they were right.
It was not the shading
The shading code was doing the correct thing the whole way through. It works out the same sunlit and shadowed sides on the headset that it does on a desktop. The values it produced were right.
What went wrong was what happened to those values afterwards. The swapchain was being handed linear colour and treated as sRGB, so everything mid-tone was lifted. Shadowed faces came up towards the lit ones, the falloff across a hull flattened, and the net effect reads exactly as the player described: light arriving from everywhere instead of from one direction.
The fix is a colour space declaration, not a lighting change. Nothing about how the ships are lit was touched.
Worth remembering
A rendering bug that looks like a lighting bug is usually a colour bug. The tell is that it affects everything uniformly — if one model were wrong you would suspect its normals, but when the whole scene looks flat it is the pipeline.