title: Efficient Bicubic filtering code in GLSL?
body: <p>I'm wondering if anyone has complete, working, and efficient code to do bicubic texture filtering in glsl. There is this:</p>
  
  <p><a href="http://www.codeproject.com/Articles/236394/Bi-Cubic-and-Bi-Linear-Interpolation-with-GLSL" rel="nofollow noreferrer">http://www.codeproject.com/Articles/236394/Bi-Cubic-and-Bi-Linear-Interpolation-with-GLSL</a>
  or
  <a href="https://github.com/visionworkbench/visionworkbench/blob/master/src/vw/GPU/Shaders/Interp/interpolation-bicubic.glsl" rel="nofollow noreferrer">https://github.com/visionworkbench/visionworkbench/blob/master/src/vw/GPU/Shaders/Interp/interpolation-bicubic.glsl</a></p>
  
  <p>but both do 16 texture reads where only 4 are necessary:</p>
  
  <p><a href="https://groups.google.com/forum/#!topic/comp.graphics.api.opengl/kqrujgJfTxo" rel="nofollow noreferrer">https://groups.google.com/forum/#!topic/comp.graphics.api.opengl/kqrujgJfTxo</a></p>
  
  <p>However the method above uses a missing "cubic()" function that I don't know what it is supposed to do, and also takes an unexplained "texscale" parameter. </p>
  
  <p>There is also the NVidia version:</p>
  
  <p><a href="https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/chapter-20-fast-third-order-texture-filtering" rel="nofollow noreferrer">https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/chapter-20-fast-third-order-texture-filtering</a></p>
  
  <p>but I believe this uses CUDA, which is specific to NVidia's cards. I need glsl.</p>
  
  <p>I could probably port the nvidia version to glsl, but thought I'd ask first to see if anyone already has a complete, working glsl bicubic shader.</p>