   Decent Kernel for Depth Of Field
  I've just implemented auto-focus depth of field for my camera's.The problem i've got is that when I increase the focal distance, the blur messes up close to the camera...Currently i'm just using a 3x3 pcf kernel, and increaing the texcoord offset depnding upon the linear distance the pixel is from the focal distance.I'm assuming there's a better kernel to use than a pcf, and I vaguely remember something about a 'circle of confusion' filter, but have not been able to find an implementation of it.Can anyone point me in the right direction?   
  The artifacts are not caused by the particular kernel you're using, but its size. 3x3 is insufficient for the degree of blurring you want. Try 7x7 and things will look much nicer. For that, you'll want to use a linearly separable filter, such as a gaussian or box filter, to cut down on processing time. For depth of field, I suggest a box filter.   ;  cheers. Could you possibly post a decent filter?;  Well, a box filter is just 1/n2 for each position (or 1/n if you're separating it into two dimensional passes). Equations for a Gaussian convolution kernel are available here.   