Thin-lens CoC

Started by
-1 comments, last by Thomas M 13 years, 8 months ago
Hi,

i'm trying to do DOF based on the thin lens model:


Based on camera parameters (focal length F, aperture number n, focal plane distance P) the distance between the image plane and the lens is given.

If I want to compute the screen-space CoC, from where should I render the scene?

My first idea was to put the camera behind the image plane and set the near plane as my image plane. D in the figure should be linear eye-space Z - V_p in this case. C (diameter of CoC) can be then computed for every fragment based on D and the camera parameters. Then I would compute the CoC in screen-space coords by dividing C by the near-plane size... I have trouble though figuring out if this is correct.

Thanks~

This topic is closed to new replies.

Advertisement