Lecture 5: Texture (65)
dawning77

Can L here lesser than 1.0? If so, we need clamp it to [0, MAX_LEVEL]?

yauwilliam69

I am not very sure - I don't think L could be smaller than 1.0. To be smaller than 1.0, it means either du/dx or dv/dx is smaller than 1.0. One would not have a texture image sampled at a higher resolution than the image itself - otherwise, it causes ambiguity as to what texture pixel value maps to that image pixel. If one does have a higher resolution texture image, I would imagine low-pass filtering has to be done to reconcile this.

colinsteidtmann

If you're like me and the previous slides flew over your head (you're confused) then hopefully this explanation helps:

I believe what's happening is we're taking a (x,y) pixel in screen space and computing the (u,v) coordinate for texture space.

The du/dx and dv/dx terms capture how the texture coordinates change as you move across the screen (texture gradient).

Steeper gradients (texture changing rapidly across pixels) require higher mipmap levels (more detail) to avoid blocky artifacts.

The larger the magnitude of these values, the higher the mipmap level (lower number) needed.

Shallower gradients (texture changing slowly across pixels) allow using lower mipmap levels (higher numbers) (less detail) without noticeable quality loss.

jasonTelanoff

It makes sense to use the max because that's for the worst case scenario, but is there a way to use the max and the min to sort of construct a rectangle of influence rather than a square? It would result in more reads, but it'd still be a constant number and should help when dealing with extremes.

You must be enrolled in the course to comment