When rendering an equirectangular encoded 360 texture, there is usually a lookup like
u = atan(x,z)
v = acos(y)
The equirectangular texture is already very prefiltered. Just turning on mipmaping does not work. u
is not continuous and the texture itself has non uniform data in uv
. And creating mipmaps with a 2x2 box downsample is also not right for the equirectangular.
But assuming the 2x2 box for miplevels, and hardware mipmap lookup, is there a good way to compute either lod or gradients that makes any sense?
Using just dFdx(v) and dFdy(v) kind of works to handle small viewports. But there must be a better way?