I am a little confused about what can be a possible implementation of textureGrad for 2d textures.

min/mag: linear_mipmap_linear / linear.

Implementation must be based on texelFetch.

Texture dimensions are w/h.

Which lod is chosen when du/dx=5 and dv/dy=20? (du/dy=dv/dx=0).

I am trying procedural texturing and this info will be helpful.

[QUOTE=Gessos Paul;1283307]I am a little confused about what can be a possible implementation of textureGrad for 2d textures.

min/mag: linear_mipmap_linear / linear.

Implementation must be based on texelFetch.

Texture dimensions are w/h.

Which lod is chosen when du/dx=5 and dv/dy=20? (du/dy=dv/dx=0)

[/QUOTE]

The LoD will be log2(20)~=4.32.

The calculation is given in ยง8.14.1 of the OpenGL 4.5 specification.