ericwa / ericw-tools

Quake/Hexen 2 Map compiling tools - branch of http://disenchant.net/utils
http://ericwa.github.io/ericw-tools
GNU General Public License v2.0
336 stars 57 forks source link

bsp compiler option to write bspx lump of lightmap dimensions to avoid compiler and engines disagreeing on size of lightmaps #309

Open Kinnuu opened 3 years ago

Kinnuu commented 3 years ago

the width and height of each lightmap is calculated independently by the compiler, and the engine. If they disagree, you can see lightmap glitches on faces - famous examples can be seen in ad_cruical and honey.

If a bspx lump of the compiler-calculated lightmap dimensions was written, then any future engines could just read this lump to guarantee no more of these glitches.

Paril commented 1 year ago

The dev version now supports this via -world_units_per_luxel, which also emits a width/height for the lightmap and simplifies the lightmap calculations in the engine.