title: understanding the basics of dFdX and dFdY
body: <p>I've read numerous descriptions of the behavior of <code>dFdX(n)</code> and <code>dFdY(n)</code> and do believe I still have a handle on partial derivatives from school.  What I don't follow is where does 'n' come from in the simplest possible example?</p>
  
  <p>Reading the glsl built-in functions <code>dFdx(n)</code> and <code>dFdy(n)</code> without any context other than mathematics I would interpret them as "I have some function of x and y: <code>f(x,y)</code>, I take the partial derivative of that function w.r.t. <code>x d/dx(x,y)</code>, and I evaluate the partial derivative formula for some value of <code>x</code> and <code>y</code> which I assume is the input parameter <code>n</code> above.</p>
  
  <p>I've read many descriptions of how <code>dFdx()</code> and <code>dFdy()</code> allow you to find a window-space gradient for output fragments.  The output-fragment case is what I'm most interested in at the moment as I'm <em>not</em> trying to determine the rate of change of texture coordinates w.r.t how the texture is being rasterized.</p>
  
  <p>I'm looking to use <code>dFdx(n)</code> and <code>dFdy(n)</code> to find window-space color gradient of output fragments.  I don't fully understand how to mentally construct the function being differentiated and how that relates to the frame buffer and how <code>n</code> relates to that (e.g. does <code>n</code> relate to the 2x2 fragment neighborhood of the current fragment, window coordinate space of the entire framebuffer such that I'm evaluating the gradient at that value, other) ?</p>
  
  <p>I'm hoping that the input type of <code>n</code> in any responses to this question is a scalar (float) and that we just discuss one dimension, <code>dFdx()</code>, to simplify the discussion.</p>