DepthOfFieldFX

DepthOfFieldFX

The DepthOfFieldFX library provides a GCN-optimized Compute Shader implementation of Depth of Field using the Fast Filter Spreading approach put forth by Todd Jerome Kosloff, Justin Hensley and Brian A. Barsky in their 2009 paper – Fast Filter Spreading and its Applications.

Download

Download the DepthOfFieldFX sampleView DepthOfFieldFX on GitHub

Features

The library implements depth of field using a Bartlett and Box filter. There is an option to run the Bartlett at quarter resolution for improved performance in some cases. 

The advantage of this approach is a fixed performance cost that is not dependent on kernel size. The library takes the scene Color Buffer and Circle of Confusion buffer as input and an Unordered Access View for the final results.

Requirements

  • AMD Radeon™ GCN-based GPU (HD 7000 series or newer)
    • Or other DirectX® 11 compatible discrete GPU with Shader Model 5 support
  • 64-bit Windows® 7 (SP1 with the Platform Update), Windows 8.1, or Windows 10
  • Visual Studio 2012, Visual Studio 2013, or Visual Studio 2015

Our other effects