Skip to main content
correct the rounding; just learned that it's down, not up.
Source Link
Nathan Reed
  • 25.3k
  • 2
  • 69
  • 111

The rule is that to compute the next mipmap size, you divide by two and round updown to the nearest integer (unless it rounds down to 0, in which case, it's 1 instead). For example, a 57x43 image would have mipmaps like:

level 0: 57x43
level 1: 29x2228x21
level 2: 15x1114x10
level 3: 8x67x5
level 4: 4x33x2
level 5: 2x2
level 6: 1x1

UV mapping, LOD selection, and filtering work just the same way as for power-of-two texture sizes.

Generating good quality mips for a non-power-of-two texture is a little trickier, as you can't simply average a 2x2 box of pixels to downsample in all cases. However, a 2x2 box filter wasn't that great to begin with, so using a better downsampling filter such as Mitchell-Netravali is recommended regardless of the texture size.

The rule is that to compute the next mipmap size, you divide by two and round up to the nearest integer. For example, a 57x43 image would have mipmaps like:

level 0: 57x43
level 1: 29x22
level 2: 15x11
level 3: 8x6
level 4: 4x3
level 5: 2x2
level 6: 1x1

UV mapping, LOD selection, and filtering work just the same way as for power-of-two texture sizes.

Generating good quality mips for a non-power-of-two texture is a little trickier, as you can't simply average a 2x2 box of pixels to downsample in all cases. However, a 2x2 box filter wasn't that great to begin with, so using a better downsampling filter such as Mitchell-Netravali is recommended regardless of the texture size.

The rule is that to compute the next mipmap size, you divide by two and round down to the nearest integer (unless it rounds down to 0, in which case, it's 1 instead). For example, a 57x43 image would have mipmaps like:

level 0: 57x43
level 1: 28x21
level 2: 14x10
level 3: 7x5
level 4: 3x2
level 5: 1x1

UV mapping, LOD selection, and filtering work just the same way as for power-of-two texture sizes.

Generating good quality mips for a non-power-of-two texture is a little trickier, as you can't simply average a 2x2 box of pixels to downsample in all cases. However, a 2x2 box filter wasn't that great to begin with, so using a better downsampling filter such as Mitchell-Netravali is recommended regardless of the texture size.

Source Link
Nathan Reed
  • 25.3k
  • 2
  • 69
  • 111

The rule is that to compute the next mipmap size, you divide by two and round up to the nearest integer. For example, a 57x43 image would have mipmaps like:

level 0: 57x43
level 1: 29x22
level 2: 15x11
level 3: 8x6
level 4: 4x3
level 5: 2x2
level 6: 1x1

UV mapping, LOD selection, and filtering work just the same way as for power-of-two texture sizes.

Generating good quality mips for a non-power-of-two texture is a little trickier, as you can't simply average a 2x2 box of pixels to downsample in all cases. However, a 2x2 box filter wasn't that great to begin with, so using a better downsampling filter such as Mitchell-Netravali is recommended regardless of the texture size.