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.
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.
Release Notes
Initial release on GitHub.
Prerequisites
- 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
- Microsoft Visual C++® 2013 Redistributable to run the pre-built binary (DepthOfFieldFX_Sample_v1.0.0_binary.zip)
- See
redist
for installer, if needed
- See
- Visual Studio® 2013 or Visual Studio® 2015 to build from source
- Visual Studio is not needed if you just want to run the binary (DepthOfFieldFX_Sample_v1.0.0_binary.zip)