Textures
Textures

Textures

Texture Filtering

An observation is that the coefficient of c0, c1, c2 and c3 are the opposite square area.

Texture Units

Texture Unit in GPU Pipeline

Texture Setup: Data
Texture Setup: Parameters

Texture Setup: Binding

Texture Setup: Shader Access

It’s very simple here, we don’t see anything that’s specific to bilinear filtering, or nearest filtering or mipmap filtering or Anisotropic filtering, all of that stuff will be done automatically for us. So GPU will do all these complicated filtering operations when I just call this. If the GPU needs to use mip maps, or anisotropic filtering, it will need to know the screen space derivatives of the texture coordinate, and the GPU will automatically compute the screen space derivatives of the texture coordinate here, and it will send it to that function, so all that stuff will be done automatically, I won’t even have to worry about it. Anything you send to your fragment shader, you can ask the GPU to give you the screen space derivatives, there is a GLSL function you can use for that. And the GPU will use the screen space derivatives of the texture coordinates to determine which mip map level to use automatically. In vertex shader, you don’t have screen space derivatives, so you won’t have mip maps or anisotropic filtering in the vertex shader.

[Note: Contents come from Professor Cem Yuksel’s Interactive Graphics course, check out his website for more details]