SomaZ / OpenJK

Community effort to maintain and improve Jedi Academy + Jedi Outcast released by Raven Software
GNU General Public License v2.0
11 stars 4 forks source link

Add additional deluxemap loading #49

Closed SomaZ closed 1 year ago

SomaZ commented 1 year ago

Vanilla JKA has a hardcoded maximum of 256 lightmaps per map. Deluxemaps are usually put into the lightmap lump, which doubles the number of lightmaps. If you compile a map with more than 128 lightmaps with deluxemaps, the map is not compatible with the vanilla renderer anymore because of the hardcoded limit.

To solve this issue, we can externalize deluxemaps and load them next to the internal lightmaps. Additional deluxemaps will be stored where external lightmaps are usually stored: "/maps/map_name/dm_XXXX"

SomaZ commented 1 year ago

Added a very basic version of it to rend2 for now. Need to overhaul lightmap loading completely though. I want to switch to 2d arrays with atlases in it, so we can support packing differently sized lightmaps into one sampler.