libmipflooding, a Mip Flooding C++ library
C++ implementation of the Mip Flooding algorithm, presented by Sean Feeley at GDC 2019 in the talk Interactive Wind and Vegetation in “God of War”. YouTube
Mip Flooding is a high performance alternative to edge padding / dilation and is not biased towards the edge color. It also improves the compressibility of output images, by only retaining a level of detail that is relevant for mip map generation.
- Features
8/16/32 bit input images and coverage masks, and (theoretically) up to 8 image channels
selective channel processing, e.g. you might want to preserve the original alpha channel
coverage input either as separate texture, or the alpha channel (or any last channel for that matter)
can optionally scale the last channel unweighted (regular box filtering)
can generate weighted mip maps, and optionally re-normalize vectors (for normal maps). Slerp scaling is planned but not yet implemented.
includes C-style function exports for easier interfacing using non-C++ code (e.g. Python)
Source code and releases are on GitHub