New blog post! The discussions about mipmapping alpha-tested textures made me wanna try all the methods I could find and post the results with a ton of textures to compare these methods: https://lisyarus.github.io/blog/posts/exploring-ways-to-mipmap-alpha-tested-textures.html
@lisyarus It does make sense that the coverage preservation method does not produce the desired results for your use case. That said, here are some things I would try:
- In your initial coverage calculation try different thresholds. We generally used higher values, but we were doing alpha to coverage, not alpha testing.
- Test the coverage of the bilinearly upsampled texture. See the implementation here: https://github.com/castano/nvidia-texture-tools/blob/master/src/nvimage/FloatImage.cpp#L1379
- Estimate the coverage locally, instead of globally. For example, using a small kernel around each texel, or only considering texels within a certain radius.
Another old-school alternative is to simply compute the mipmaps using nearest neighbor sampling, or selecting one of the 4 nearest samples randomly.
As others have pointed out, for the look that you seem to be targeting distance field methods may work best.