Looking at the Wikipedia page for Circle of Confusion, and at such posts as this one, I completely understand how to calculate the values for near, far, focal planes and hyperfocal distance. I am also aware of the Zeiss formula for my desired format.
What I'm trying to find out is how to take real camera parameters (focal distance, aperture, focal length) and get a blur radius or similar usable value to configure a blur with them.
Currently, I'm simply using this function:
float getBlurSize(float depth, float focusPoint, float focusScale) {
float coc = clamp((1.0 / focusPoint - 1.0 / depth)*focusScale, -1.0, 1.0);
return abs(coc) * MAX_BLUR_SIZE;
}
All real-world inputs are available to the shader - Aperture f-Number, focal distance, format dimensions (35mm in this case), maximum acceptable CoC from the Zeiss formula, focal length etc., as well as depth and colour. Currently, I am applying the calculations and blur in post.