The Skylanders SWAP Force Depth-of-Field Shader

Published in GPU Pro 4: Advanced Rendering Techniques

Mike Bukowski, Vicarious Visions
Padraic Hennessy, Vicarious Visions
Brian Osman, Vicarious Visions
Morgan McGuire, Williams College

Blog Post
Book
Demo (130 MB Windows binary with source)
Notes
BibTex

Abstract

We developed our depth of field effect from Gillham's ShaderX5 one. Like his and other similar techniques, we work with low-resolution buffers when they are blurry and lerp between blurred and sharp versions of the screen. The elements of our improvements to previous methods are treating near field separately to produce blurry silhouettes on the near field, inpainting behind blurry near-field objects, a selective background blur kernel, using circle of confusion instead of depth to resolve occlusion and blur simultaneously, and processing multiple blurs in parallel with dual render targets.

Notes

The algorithm is continuously maintained as open source (BSD license) in the G3D Innovation Engine. The files are:

  1. GLSL Shaders
  2. C++ Header
  3. C++ Source
  4. C++ Configuration
Variants of this algorithm have been used in several games and engines, many of which we can't report publicly because of NDAs. One publicly acknowledged version is the Fabric RTR engine for film previsualization.

The single chapter may be purchsed from the publisher.

BibTex

@incollection{Bukowski2013DepthOfField, 
  author = {Mike Bukowski and Padraic Hennessy and Brian Osman and Morgan McGuire}, 
  title = {The {Skylanders SWAP Force} Depth-of-Field Shader}, 
  booktitle = {Published in {GPU} Pro 4: Advanced Rendering Techniques},
  note = {GPU Pro4},
  month = {April},
  day = {26},
  year = {2013}, 
  pages = {175--184},
  url = {https://casual-effects.com/research/Bukowski2013DepthOfField/index.html}, 
}