You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 5: Texture Mapping (62)
GuardHei

Mipmaps not only prefilter the texture to reduce alias, but also improve the speed of sampling textures. This is because as the mipmap level gets higher, the resolution is smaller, and there's a higher chance for neighboring pixels on screen to pick up neighboring texels, which is very cache friendly on GPU.

Using significantly higher level mipmaps on far objects is commonly used on portable and switch games due to bandwidth limitation

CeHao1

This example only shows the condition that the pixels are the folds of 2, such as 32, 64,... So what if the image has odd pixels or prime numbers such as 97 127.

Maybe we need to first resample the image using 128 or 64 at first and then apply Minmap method?

Stafftancik

@CeHao1 Yes resampling prior to mipmapping is a reasonable approach (though it will degrade the quality). The best option is to start with a texture that has a power of 2 resolution, this is something that artists take into account when creating assets.

GuardHei

@CeHao1 Images are always stored in power of 2 resolutions on the GPU. The hardware will adjust that to the nearest higher pot resolution.

CeHao1

I see, great thanks!

sinood

One cool application of mipmaps in gaming: Minecraft textures allow you to adjust mipmap settings to improve graphics performance! https://fictionhorizon.com/what-are-mipmap-levels-in-minecraft/

You must be enrolled in the course to comment