What you want is not possible.
The LOD bias is exactly that: a bias. It is added to the LOD that is automatically computed from texture2D
.
textureLOD
doesn't work that way. It selects a specific LOD, which is not based on anything automatically computed by anyone.
The only way to do what you want would be to perform the automatic LOD computations yourself, then try to compute a bias between that value and the LOD you actually want, and then apply that with texture2D
. I would tell you how to do that, but that would require the functions dFdx
and dFdy
, which are not in OpenGL ES 2.0. So you can't.
But don't feel bad, because even if you could, it wouldn't work. The other problem there is that the LOD bias is clamped within a specific range. Note that you won't find this in the ES 2.0 spec, but that's OK; you also won't find any language about how that bias gets applied to the lambda computed for mipmapping. Yes, really; go ahead and search for it. The closest you get is in the GLSL ES spec, but the OpenGL ES spec says nothing about applying a bias to the lambda.
So yeah, it's just not possible.
textureLOD
; because it can't. – Nicol Bolas