   Mipmap Level of texture2D in GLSL
  Hi guysIs there a way of getting the mipmap level of a texture2D lookup? So far the best advice I can find is to encode the data in the texture itself. I thought there might be a better way that someone is aware of.   
  I'm not sure how it can be done exactly but probably dFdx(texcoord.x) and dFdy(texcoord.y) which should tell what the difference is between this and the next pixel which somehow can be used to decide on which mipmap should be sampled.These 2 can be used in the FS : dFdx() and dFdy()   