14 Commits (f5ffefce4c32acf8d067a9672e62350ecf97e42a)

Author SHA1 Message Date
Nico de Poel f5ffefce4c Additional debugging output 3 years ago
Nico de Poel 64865249a4 Removed the baselight addition during light sampling, as that was actually the cause of weird lighting bugs in some areas. 3 years ago
Nico de Poel 727c5bf724 Tweaked light sampling a bit more, should be more accurate to Quake's original implementation now (though it hardly makes any difference in practice) 3 years ago
Nico de Poel 0a077b426c Reworked lightmap sampling using a lightmap space transform and correctly rounding values, using the Quake source for reference. Finally fixes a bunch of lingering lighting artifacts. 3 years ago
Nico de Poel c6a8abbb7b Made the texture space transform available outside of Tessellator and used it to generate some more Face bounds data for later use. 3 years ago
Nico de Poel fc281251ea Overhaul of geometry conversion: 3 years ago
Nico de Poel 568f2450eb Added a new lighting sampler to take advantage of the improved lightmap indexing: use a pseudo-random jitter pattern to take multiple light samples in an area around the sample point, from all surrounding faces at a shallow angle. 3 years ago
Nico de Poel fb3d1ac6a1 Upgraded dot product and cross product-related functions to doubles, to improve accuracy of various calculations 3 years ago
Nico de Poel 161ef0acee Improved lightmap sampling accuracy. The generated UVs now more closely match what Quake is doing, we can reject invalid UVs, and we're getting less false rejects of valid faces to sample from. 3 years ago
Nico de Poel 5137fe0a15 A bit of cleanup and moved the facesWithPoint function to world_t, for easier reuse 3 years ago
Nico de Poel e0373524ca Further improvement to lightmapping system: 3 years ago
Nico de Poel bf3bf810f6 Added computation of face area by projecting its vertices onto its plane and then generating a bounding box. Will be used for determining tessellation subdivisions. 3 years ago
Nico de Poel 219fc6db32 Implemented an alternative method for computing lighting per face vertex, one that's simpler, faster and that produces better results. 3 years ago
Nico de Poel e65ce7b673 First attempt at calculating lighting per face-vertex with smoothing based on the angle between faces, using edge adjacency to determine neighbouring faces. 3 years ago