
AMD FidelityFX™ SDK
The AMD FidelityFX SDK is our easy-to-integrate solution for developers looking to include FidelityFX features into their games.
We are happy to share that our AMD FidelityFX Software Development Kit (SDK) is now available for download!
The AMD FidelityFX SDK is our new and easy to integrate solution for developers looking to include AMD FidelityFX technologies into their games without any of the hassle of complicated porting procedures. In a nutshell, it is AMD FidelityFX graphics middleware.
In the last few years since we’ve started releasing AMD FidelityFX technologies, we’ve become one of the most used and trusted technology partners in the industry. Our outstanding open-source technology can now be found in over 250 games, made by some of the biggest names in gaming.
As our AMD FidelityFX technologies have grown and become more widely used, we recognized there were many ways we could improve the experience for developers looking to integrate them. The AMD FidelityFX SDK is the result of our aim to bring simplicity, structure, and consistency into all our great AMD FidelityFX technologies.
Of note, the SDK features:
To begin with, we’ve added three more effects to our roster:
AMD FidelityFX Blur is a compute-based, highly-optimized gaussian blur technique implemented in HLSL.
For more information on this brand-new effect check out AMD FidelityFX Blur on GPUOpen.
AMD FidelityFX Depth of Field (DoF) is a technique that aims to recreate the bokeh depth of field effect produced by camera lenses.
Check out AMD FidelityFX Depth of Field on GPUOpen for all of the details.
AMD FidelityFX Lens is a light-weight shader with lens and film effects. Currently, Lens includes three different effects:
The AMD FidelityFX Lens page on GPUOpen contains more information on this brand-new effect.
We have also made updates to all our existing AMD FidelityFX technologies, as well as adapting them to become a part of the AMD FidelityFX SDK:
AMD FidelityFX Combined Adaptive Compute Ambient Occlusion (CACAO) is a highly-optimized implementation of ambient occlusion, which uses intelligent and adaptive sampling techniques to produce excellent quality ambient occlusion at high performance.
v1.3 introduces the ability to view pure AO versus lit AO results.
The AMD FidelityFX CACAO page on GPUOpen shows some examples of CACAO in action.
AMD FidelityFX Contrast Adaptive Sharpening (CAS) is a low overhead adaptive sharpening algorithm with optional up-sampling which was created to provide natural sharpness without artifacts.
v1.1 introduces the option to expose up-sampling options.
Take a look at the AMD FidelityFX CAS page to see all the details.
AMD FidelityFX Super Resolution (FSR 1 and 2) technologies1 are our powerful upscaling solutions which allow you to produce crisp, high-resolution images from lower resolution inputs.
The samples for FSR 1.1 and FSR 2.2.1 have been updated by combining them into one sample for the AMD FidelityFX SDK.
The AMD FSR 1 andAMD FSR 2 pages are the best place to get started with our upscalers.
AMD FidelityFX Luminance Preserving Mapper (LPM) is a tone mapping and gamut mapping solution for HDR and wide gamut content.
v1.3 provides better HDR handling in Vulkan®, as well as various OS and swapchain fixes for Vulkan and DirectX®.
Check out the AMD FidelityFX LPM page for some examples of LPM being used in real games.
AMD FidelityFX Parallel Sort provides an easy-to-integrate, open-source header implementation of a highly-optimized compute-based radix sort. It is useful for sorting particles or other data sets.
v1.2 has various fixes applied.
For more information and an overview of the algorithmic details head over to the AMD FidelityFX Parallel Sort page.
AMD FidelityFX Single Pass Downsampler (SPD) provides an AMD RDNA™ architecture-optimized solution for generating up to 12 MIP levels of a texture without requiring multiple intermediate steps.
v2.1 allows you to select the filter kernel. Previously, only the mean was available, but now you can use the min and max as well.
The AMD FidelityFX SPD page provides much more information on SPD.
AMD FidelityFX Stochastic Screen Space Reflections (SSSR) is a highly-optimized hierarchical screen space traversal kernel for reflections. This allows you to create high-fidelity reflections in your scene, without costing the earth.
AMD FidelityFX Denoiser provides a set of denoising compute shaders which remove artifacts from reflection and shadow rendering. Useful for both ray-traced or rasterized content. The sample for Denoiser is part of SSSR.
v1.4 (SSSR) and v1.2 (Denoiser) have various bug fixes applied based on past integrations.
For an overview of how AMD FidelityFX SSSR works and some examples of the effect in action, check out the AMD FidelityFX SSSR page here on GPUOpen.
AMD FidelityFX Variable Shading (VS) provides an open-source header implementation to easily integrate Variable Rate Shading into your game.
v1.1 has also had various fixes applied.
The AMD FidelityFX Variable Shading page gives you all of the details on this effect.
Now joining the FidelityFX SDK, our hybrid ray-tracing samples are very useful for demonstrating ways to combine traditional rasterization techniques with ray-tracing to produce fast, high quality results.
The AMD FidelityFX Hybrid Reflections sample shows how to combine AMD FidelityFX Stochastic Screen Space Reflections (SSSR) with ray tracing in order to create high quality reflections.
v1.1 introduces Vulkan support.
Head over to the AMD FidelityFX Hybrid Reflections page to find out more.
The AMD FidelityFX Hybrid Shadows sample shows a way to combine traditional rasterized shadows with ray tracing to create fast high quality soft shadows.
v1.1 introduces Vulkan support.
A collection of comparison images for the AMD FidelityFX Hybrid Shadows sample is shown on the AMD FidelityFX Hybrid Shadows page.
Getting up and running with the SDK is quite simple:
Download or build the SDK libraries onto your system.
Build or link the SDK libraries into your game/application solution.
At application startup, query the amount of needed memory the backend will require given the number of feature contexts desired (the following show how to query memory needs of the dx12 backend for SPD and Blur)
#include <FidelityFX/ffx.h>#include <FidelityFX/host/backends/dx12/ffx_dx12.h>
// Query required memory for FidelityFX backend.const size_t scratchBufferSize = ffxGetScratchMemorySizeDX12(FFX_SPD_CONTEXT_COUNT + FFX_BLUR_CONTEXT_COUNT)
// Allocate required backing memoryvoid* scratchBuffer = malloc(scratchBufferSize);FFX_ASSERT(scratchBuffer);
// Initialize the FFX SDK backendFfxInterface* backendInterface = NULL;FfxErrorCode errorCode = ffxGetInterfaceDX12(&backendInterface, dx12Device, scratchBuffer, scratchBufferSize, FFX_SPD_CONTEXT_COUNT + FFX_BLUR_CONTEXT_COUNT);
// FidelityFX SPD information FfxSpdContextDescription spdInitParams = {}; FfxSpdContext spdContext = {};
// Setup and create SPD contextspdInitParams.flags = FFX_SPD_SAMPLER_LINEAR | FFX_SPD_WAVE_INTEROP_WAVE_OPS | FFX_SPD_MATH_PACKED;spdInitParams.downsampleFilter = FFX_SPD_DOWNSAMPLE_FILTER_MEAN;spdInitParams.backendInterface = backendInterface;errorCode = ffxSpdContextCreate(&spdContext, &spdInitParams);FFX_ASSERT(errorCode == FFX_OK);
// FidelityFX BLUR information FfxBlurContextDescription blurInitParams = {};FfxBlurContext blurContext = {};
// Setup and create BLUR contextblurInitParams.backendInterface = backendInterface;blurInitParams.kernelSizes = FFX_BLUR_KERNEL_SIZE_ALL; // allow all kernel sizesblurInitParams.floatPrecision = FFX_BLUR_FLOAT_PRECISION_16BIT;errorCode = ffxBlurContextCreate(&blurContext, &blurInitParams);FFX_ASSERT(errorCode == FFX_OK);
// Execute FidelityFX SPD FfxSpdDispatchDescription spdDispatchParams = {}; spdDispatchParams.commandList = pCmdList; spdDispatchParams.resource = ffxGetResourceDX12(downsampleResource, L"SPD_Downsample_Resource", FFX_RESOURCE_STATE_PIXEL_COMPUTE_READ, FFX_RESOURCE_USAGE_ARRAYVIEW);
FfxErrorCode errorCode = ffxSpdContextDispatch(&spdContext, &spdDispatchParams); FFX_ASSERT(errorCode == FFX_OK);
// Execute FidelityFX BLUR FfxBlurDispatchDescription blurDispatchParams = {};blurDispatchParams.commandList = pCmdList;blurDispatchParams.kernelSize = FFX_BLUR_KERNEL_SIZE_13x13;blurDispatchParams.inputAndOutputSize.width = AppGetWidth();blurDispatchParams.inputAndOutputSize.height = AppGetHeight();blurDispatchParams.input = ffxGetResourceDX12(inputResource, L"MyBlurInput", FFX_RESOURCE_STATE_PIXEL_COMPUTE_READ);blurDispatchParams.output = ffxGetResourceDX12(outputResource, L"MyBlurOutput", FFX_RESOURCE_STATE_UNORDERED_ACCESS);
errorCode = ffxBlurContextDispatch(&blurContext, &blurDispatchParams);FFX_ASSERT(errorCode == FFX_OK);
// Flush the GPU before releasing contexts/backends!GPUFlush();
// Destroy FidelityFX SPDffxSpdContextDestroy(&spdContext);
// Destroy FidelityFX BLUR ffxBlurContextDestroy(&blurContext);
// Destroy FidelityFX SDK backendfree(backendInterface.scratchBuffer);
Full source code and binaries are now available on GitHub under MIT license.
Don’t forget to check out our extensive AMD FidelityFX SDK documentation .
And of course, make sure you visit our brand new AMD FidelityFX SDK home page here on GPUOpen!
Do you have feature requests or found issues with the SDK? Please get in touch with your AMD representative, or reach out to us with @GPUOpen on Twitter or @GPUOpen@mastodon.gamedev.place.
All requests and feedback are very valuable to us, and we will read and try to respond to everyone.
1AMD FidelityFX Super Resolution (FSR) versions 1 and 2 are available on select games which require game developer integration and is supported on select AMD products. AMD does not provide technical or warranty support for AMD FidelityFX Super Resolution enablement on other vendors’ graphics cards. See https://www.amd.com/en/technologies/fidelityfx-super-resolution for additional information. GD-187
Additional developer and game attributions: https://www.amd.com/en/corporate/game-attributions © 2023 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo, FidelityFX, Radeon, RDNA, and combinations thereof are trademarks of Advanced Micro Devices, Inc. DirectX is either a registered trademark or trademark of Microsoft Corporation in the US and/or other countries. Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective owners.