Skip to content
  • Richard Gobeille's avatar
    engine: re-enable voxel model mipmaps in software mode with some changes: · 0e45842e
    Richard Gobeille authored
    -Missing mip levels are now drawn by scaling the highest mip level present in the file, not just taking mip 0 when e.g we want mip 4 but 0-3 are available
    -Algorithm for determining which mip level to use has been adjusted to bias for rendering quality and not just speed (e.g don't display the chunkier mip levels at such close distances)
    -Mip levels other than the default are now run through a conversion process that standardizes the colors used based on those found in mip 0, to work around issues where the mip levels ended up with fullbright colors substituted in place of regular palette entries when the mips were originally generated by SLABSPRI/SLAB6
    -Add terrible heuristic for mip level rejection based on how many visible voxels are present in the higher mip level versus the lower mip levels for the same voxel. This is intended to work around issues where SLABSPRI and SLAB6 both generated their mips by removing cubes a bit too liberally, resulting in any feature of the model that was only 1 voxel thick being completely obliterated by the mip generation process. This can be observed by setting r_novoxmips to 0 in older builds and viewing 8756_FLOORLAMP_ON.kvx from Ion Fury 2.0 or earlier at various distances in-game. Without this heuristic, poorly generated mip levels that end up obliterating the entire lampshade are drawn.
    0e45842e