10 Commits (b0e6083d133b611217b4c4191ff459701b924d2a)

Author SHA1 Message Date
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 ac84af48f2 Create a reusable texture space transform matrix per face, and use it to build up the texture boundaries. 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 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 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 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