   Variance Shadow Maps - calculating derivatives on ATI cards
  Hi,I've got Variance Shadow Maps working in GLSL based on the code in http://http.developer.nvidia.com/GPUGems3/gpugems3_ch08.html. For example, my code for calculating the moments when generating the shadow map is:vec2 ComputeMoments(float depth){  vec2 moments;  moments.x = depth;  moments.y = depth * depth;  float dx = dFdx(depth);  float dy = dFdy(depth);  moments.y += 0.25 * (dx * dx + dy * dy);  return moments;}It works great on my nVidia card but the shader does not compile on ATI cards (Radeon HD 3670 and 3870) with the latest drivers returning the errors:"error(#202) No matching overloaded function found dFdx""error(#202) No matching overloaded function found dFdy"Can I get this to compile on these cards or are the derivative functions just not available on older ATI cards? Or is there a way to calculate the derivatives manually, anyone got a GLSL code sample?Thanks,Chris.   
  Ati drivers support derivatives. Make sure your drivers are up to date and add a "#version" declaration if you haven't already (IIRC, derivative functions need "#version 120" or higher).   ;  Found the problem! I was compiling the ComputeMoments function with both the vertex and fragment shaders. On nVidia this was okay but on ATI it gave the error. I'm guessing dFdx/dFdy are not supported in vertex shaders.Just out of interest, can the derivatives be calculated manualy for hardware that doesn't provide them?I've added the "#version 120" declaration anyway since it's good practice.[Edited by - Chris Weaver on April 21, 2010 5:22:08 AM]