Chapter 28. Practical Post-Process Depth of Field — Earl Hammon Jr. (Infinity Ward)
- Source: https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-28-practical-post-process-depth-field
- Volume: GPU Gems 3
- Note: add-only excerpt; images omitted.
Summary
CoD4/Modern Warfare DoF: prioritize quality UX over physical accuracy; SM2.0. Background gather (Scheuermann-style) leaves sharp FG silhouettes. Scatter-as-gather too expensive/ringy. Solution: blur the near CoC itself so FG bleeds past silhouettes.
Pipeline: (1) downsample near CoC (+ medium blur color in RGB) to 1/4; (2) Gaussian blur CoC; (3) D = 2*max(D0, DB)-D0 edge expansion then tiny blur; (4) variable-width blur via piecewise lerp among unblurred / 17-tap small / medium / large. Artistic piecewise-linear CoC vs depth (near/far regions). FPS: separate weapon vs world CoC (negative depth flag). ~9.6 texels/pixel, ~1–1.5 ms at 1024x768 on X1900/7900. Limitations: focused bleeds onto BG; huge near radius looks like whole-screen smear; transparency ignored (usually OK).