Explores ceiling division techniques for graphics programming, specifically for calculating mipmap sizes. Shows how the standard formula (n + k - 1) / k can cause overflow issues and presents an alternative (n - 1) / k + 1 that avoids this problem. Demonstrates how this optimization applies to texture block calculations in formats like BC1-BC7, where working with sizes-minus-1 throughout the pipeline eliminates bias terms and simplifies hardware implementations.

5m read timeFrom fgiesen.wordpress.com
Post cover image
Table of contents
So, where do the mip maps come in?Related

Sort: