Home » Blogs » The AMD FidelityFX SDK 1.0 is now available on GPUOpen

The AMD FidelityFX™ SDK 1.0 is now available on GPUOpen

GPUOpen
GPUOpen

The home for games and graphics developers. Discover how our open source tools, SDKs, and effects can help you find your best graphics performance. Learn tips and tricks with our extensive tutorials and samples.

link to The AMD FidelityFX SDK 1.0 is now available on GPUOpen

We are happy to share that our AMD FidelityFX Software Development Kit (SDK) is now available for download!

What is the AMD FidelityFX SDK?

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.

Background

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:

  • A consistent standard and style that is much more user-friendly.
  • Easier application spawning letting us focus on core algorithm details rather than boilerplate setup code.
  • A re-architected graphical framework that is not only more robust and ready, but is also API agnostic, allowing us to develop our effects across intended targets simultaneously.
    • This also doubles as a great how-to in creating a custom backend implementation for developers’ own multi-platform engines.
  • Extensive documentation.
  • And lastly, we’ve taken a lot of the guesswork out of implementation steps by offering complete pre-built solutions for all of our effects. Most of which can be supported in under 20 lines of code.
    • That being said, if you were a fan of taking the code we put out and manually integrating yourself, you are still free to do that. We’ve taken nothing away. All we’ve done is moved things into a more coherent structure on disk, and cleaned up the code to make it more consistent in style.

Introducing three new AMD FidelityFX technologies

To begin with, we’ve added three more effects to our roster:

AMD FidelityFX Blur 1.0

AMD FidelityFX Blur logo

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 1.0

AMD FidelityFX Depth of Field logo

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 1.0

AMD FidelityFX Lens logo

AMD FidelityFX Lens is a light-weight shader with lens and film effects. Currently, Lens includes three different effects:

  • Chromatic aberration
  • Vignette
  • Film-grain

The AMD FidelityFX Lens page on GPUOpen contains more information on this brand-new effect.

Our existing AMD FidelityFX technologies

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 CACAO (aka AMD FidelityFX Ambient Occlusion) 1.3

AMD FidelityFX CACAO logo

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 CAS 1.1

AMD FidelityFX CAS logo

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)

AMD FidelityFX Super Resolution logo

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 and AMD FSR 2 pages are the best place to get started with our upscalers.

FSR 1

AMD FidelityFX FSR 1

FSR 2.2.1

AMD FidelityFX FSR 2

AMD FidelityFX LPM (aka AMD FidelityFX HDR Mapper) 1.3

FidelityFX LPM logo

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.

FidelityFX LPM

AMD FidelityFX Parallel Sort 1.2

AMD FidelityFX Parallel Sort logo

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 SPD (aka AMD FidelityFX Downsampler) 2.1

AMD FidelityFX SPD logo

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 SPD

AMD FidelityFX SSSR (aka AMD FidelityFX Screen Space Reflections) 1.4 and AMD FidelityFX Denoiser 1.2

AMD FidelityFX SSSR logo

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 1.1

AMD FidelityFX Variable Shading logo

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.

Our hybrid ray-tracing samples are now a part of the AMD FidelityFX family

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.

AMD FidelityFX Hybrid Reflections 1.1

AMD FidelityFX Hybrid Reflections logo

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.

AMD FidelityFX Hybrid Reflections

AMD FidelityFX Hybrid Shadows 1.1

AMD FidelityFX Hybrid Shadows logo

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.

How to use the AMD FidelityFX SDK

Getting up and running with the SDK is quite simple:

  1. Download or build the SDK libraries onto your system.
  2. Build or link the SDK libraries into your game/application solution.
  3. 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)

    Copied!

    #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) 
  4. Allocate the required memory using your own memory allocator, and initialize the SDK backend with said memory.

    Copied!

    // Allocate required backing memory
    void* scratchBuffer = malloc(scratchBufferSize);
    FFX_ASSERT(scratchBuffer);
    
    // Initialize the FFX SDK backend
    FfxInterface* backendInterface = NULL;
    FfxErrorCode errorCode = ffxGetInterfaceDX12(&backendInterface, dx12Device, scratchBuffer, scratchBufferSize, FFX_SPD_CONTEXT_COUNT + FFX_BLUR_CONTEXT_COUNT);
    
  5. Create the FidelityFX feature contexts

    Copied!

    // FidelityFX SPD information
    FfxSpdContextDescription spdInitParams = {};
    FfxSpdContext            spdContext = {};
    
    // Setup and create SPD context
    spdInitParams.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 context
    blurInitParams.backendInterface = backendInterface;
    blurInitParams.kernelSizes = FFX_BLUR_KERNEL_SIZE_ALL; // allow all kernel sizes
    blurInitParams.floatPrecision = FFX_BLUR_FLOAT_PRECISION_16BIT;
    errorCode = ffxBlurContextCreate(&blurContext, &blurInitParams);
    FFX_ASSERT(errorCode == FFX_OK);
    
  6. Use the FidelityFX feature context at run time

    Copied!

    // 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);
    
  7. Release memory when done

    Copied!

    // Flush the GPU before releasing contexts/backends!
    GPUFlush();
    
    // Destroy FidelityFX SPD
    ffxSpdContextDestroy(&spdContext);
    
    // Destroy FidelityFX BLUR
    ffxBlurContextDestroy(&blurContext);
    
    // Destroy FidelityFX SDK backend
    free(backendInterface.scratchBuffer);
    

Try it out!

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!

Help contribute to the SDK!

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.

Here’s a list of all our AMD FidelityFX technologies

An image of a toy train blurring into the background

AMD FidelityFX™ Blur

AMD FidelityFX Blur is an AMD RDNA™ architecture optimized collection of blur kernels from 3×3 up to 21×21.

Shadow Denoiser

AMD FidelityFX™ Denoiser

AMD FidelityFX Denoiser is a set of denoising compute shaders which remove artefacts from reflection and shadow rendering.

FidelityFX Lens - bar room

AMD FidelityFX™ Lens

AMD FidelityFX Lens is an AMD RDNA™ architecture optimized implementation of some of gaming’s most used post-processing effects.

AMD FidelityFX Parallel Sort

AMD FidelityFX™ Parallel Sort

AMD FidelityFX Parallel Sort makes sorting data on the GPU quicker, and easier. Use our SM6.0 compute shaders to get your data in order.

Radeon™ Cauldron Framework

Radeon Cauldron is our open-source experimentation framework for DirectX®12 and Vulkan®, provided in the AMD FidelityFX SDK.

DISCLAIMERS AND FOOTNOTES

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

ATTRIBUTIONS

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.

GPUOpen
GPUOpen

The home for games and graphics developers. Discover how our open source tools, SDKs, and effects can help you find your best graphics performance. Learn tips and tricks with our extensive tutorials and samples.

Enjoy this blog post? If you found it useful, why not share it with other game developers?

You may also like...

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

AMD GPUOpen videos

Words not enough? How about pictures? How about moving pictures? We have some amazing videos to share with you!

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

AMD GPUOpen publications

Discover our published publications.