Efficiently Simulating the Bokeh of Polygonal Apertures in a Post‐Process Depth of Field Shader
Abstract
The effect of aperture shape on an image, known in photography as ‘bokeh’, is an important characteristic of depth of field in real‐world cameras. However, most real‐time depth of field techniques produce Gaussian bokeh rather than the circular or polygonal bokeh that is almost universal in real‐world cameras. ‘Scattering’ (i.e. point‐splatting) techniques provide a flexible way to model any aperture shape, but tend to have prohibitively slow performance, and require geometry‐shaders or significant engine changes to implement. This paper shows that simple post‐process ‘gathering’ depth of field shaders can be easily extended to simulate certain bokeh effects. Specifically we show that it is possible to efficiently model the bokeh effects of square, hexagonal and octagonal apertures using a novel separable filtering approach. Performance data from a video game engine test demonstrates that our shaders attain much better frame rates than a naive non‐separable approach.
Citing Literature
Number of times cited according to CrossRef: 6
- Yang Yang, Yanhong Peng, Lanling Zeng, Yan Zhao, Fuchang Liu, undefined, Eleventh International Conference on Digital Image Processing (ICDIP 2019), 10.1117/12.2540174, (158), (2019).
- Stefano Alletto, Casey Carlin, Luca Rigazio, Yasunori Ishii, Sotaro Tsukizawa, undefined, 2019 IEEE/CVF International Conference on Computer Vision Workshop (ICCVW), 10.1109/ICCVW.2019.00286, (2329-2338), (2019).
- Yang Yang, Yanhong Peng, Huiwen Bian, Lanling Zeng, Liangjun Wang, Accurate Depth of Field Rendering with Integral Image, Image and Graphics Technologies and Applications, 10.1007/978-981-13-1702-6_30, (302-309), (2018).
- Martin Weier, Thorsten Roth, André Hinkenjann, Philipp Slusallek, Foveated Depth-of-Field Filtering in Head-Mounted Displays, ACM Transactions on Applied Perception, 10.1145/3238301, 15, 4, (1-14), (2018).
- Hyuntae Joo, Soonhyeon Kwon, Sangmin Lee, Elmar Eisemann, Sungkil Lee, Efficient Ray Tracing Through Aspheric Lenses and Imperfect Bokeh Synthesis, Computer Graphics Forum, 10.1111/cgf.12953, 35, 4, (99-105), (2016).
- Tim McGraw, Fast Bokeh effects using low-rank linear filters, The Visual Computer, 10.1007/s00371-014-0986-6, 31, 5, (601-611), (2014).




