Sunday, September 27, 2009

Fun with Surface Extents

OK, I've followed up on my threat to revisit the lightmap generation code and implement variable sized lightmaps. DirectQ will now successfully generate a lightmap big enough for any size of surface extents up to the max your card can support. What this means is that maximum surface extents are now 4080 for a 3DFX (good luck running DirectQ on one of those!), up to 32752 for an integrated Intel card, and 65520 for a typical modern card (supporting 4096 x 4096 textures). Most Quake lightmaps are generated at 64 x 64, so we get the speed increases as well as the flexibility to have larger extents if we need them.

Of course, I already had a dynamically sized BlockLights array from a few generations back, which is also a requirement of this.

0 comments: