title: OpenGL/GLSL - implementation of texture filtering
body: <p>I would like to implement texture filtering (min and magfilter) myself in a GLSL shader (as i want to use image_load_and_store and not a sampler, and also I want to handle undefined pixels in a special way) and I'm looking for an article or so that discusses the filtering process.</p>
  
  <p>I can recall on how to implement texturefiltering from a raytracer I once wrote - I think you need to take into consideration the UV gradients at each pixel and depending on the length of those somehow scale your sampling raster.. but there I used a 49-samples circular kernel, I think that's too heavy. </p>
  
  <p>I think the UV gradients i can get using dFdx() and dFdy() - but I'd like to know how what kind of kernel openGL is using for the filtering and implement it in my glsl shader the same way.</p>
  
  <p>also - how to distinguish whether a minfilter or a magfilter needs to be applied? and is the filtering process different?</p>
  
  <p>last but not least: if its minification filtering, how to choose the appropriate mipmap level based on the UV gradients?</p>