1. There is no need to store the light table width as it is always 256.
2. Use a fixed-extent `std::span` rather than a pointer for readability.
This should optimize to the exact same code.
1. Extracts duplicate expressions into functions.
2. Addds `const` throughout to make it more obvious what's being modified
in the loop.
3. Add early return on out of bounds.
4. Extract `minx +` out of the `std::min({...})`.
3+4 lead to a nice perf increase
Before:
```
---------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
---------------------------------------------------------------------------
BM_BuildLightmap 77181 ns 77152 ns 9092 bytes_per_second=2.7194Gi/s items_per_second=3.24034M/s
```
After:
```
---------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
---------------------------------------------------------------------------
BM_BuildLightmap 65134 ns 65114 ns 10773 bytes_per_second=3.22218Gi/s items_per_second=3.83943M/s
```