mvdevs / jk2mv

JK2MV - improved, modernized JK2 client and server
https://jk2mv.org
GNU General Public License v2.0
108 stars 33 forks source link

Lightmap atlasing #157

Closed SomaZ closed 1 year ago

SomaZ commented 1 year ago

Pretty simple replacement for the lightmap images in the bsp file. This will create atlases of 2048x2048 pixels and fill them with lightmaps. This also alters the lightmap texture coordinates for the surfaces.

Vanilla compatible maps should never use more than one atlas, as a 2048x2048 can store 256 128x128 lightmaps, which was the hard coded limit.

Personally I'm against exposing this feature to the user as a cvar. Though, one could argue that the lightmap atlas could be scaled down for maps using fewer lightmaps. Like not hardcoding the atlas size. Tell me how you feel about this, or what you think.

Cya