Convert Figma logo to code with AI

GPUOpen-LibrariesAndSDKs logoFidelityFX-SDK

The main repository for the FidelityFX SDK.

1,576
307
1,576
125

Top Related Projects

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.

Unity Graphics - Including Scriptable Render Pipeline

One stop solution for all Vulkan samples

Quick Overview

The FidelityFX-SDK is an open-source graphics development kit provided by AMD. It offers a collection of optimized visual technologies and effects for game developers to enhance image quality and performance in their projects. The SDK includes various techniques such as upscaling, super resolution, and ambient occlusion.

Pros

  • Provides high-quality, optimized graphics effects for game development
  • Open-source and freely available for developers
  • Cross-platform support for multiple graphics APIs (DirectX 12, Vulkan)
  • Regularly updated with new features and improvements

Cons

  • Primarily optimized for AMD GPUs, may not perform as well on other hardware
  • Requires some graphics programming knowledge to implement effectively
  • Documentation could be more comprehensive for some features
  • May have compatibility issues with certain game engines or rendering pipelines

Code Examples

  1. Initializing FidelityFX Super Resolution (FSR):
FfxFsr2Context context;
FfxFsr2ContextDescription contextDescription = {};
contextDescription.flags = FFX_FSR2_ENABLE_HIGH_DYNAMIC_RANGE;
contextDescription.maxRenderSize.width = 1920;
contextDescription.maxRenderSize.height = 1080;
contextDescription.displaySize.width = 3840;
contextDescription.displaySize.height = 2160;
ffxFsr2ContextCreate(&context, &contextDescription);
  1. Applying FidelityFX Contrast Adaptive Sharpening (CAS):
FfxCasContext context;
FfxCasContextDescription contextDescription = {};
contextDescription.flags = FFX_CAS_SHARPEN_ONLY;
contextDescription.inputWidth = 1920;
contextDescription.inputHeight = 1080;
ffxCasContextCreate(&context, &contextDescription);

FfxCasDispatchDescription dispatchDescription = {};
dispatchDescription.commandList = commandList;
dispatchDescription.inputTexture = inputResource;
dispatchDescription.outputTexture = outputResource;
dispatchDescription.sharpness = 0.5f;
ffxCasContextDispatch(&context, &dispatchDescription);
  1. Using FidelityFX Single Pass Downsampler (SPD):
FfxSpdContext context;
FfxSpdContextDescription contextDescription = {};
contextDescription.flags = FFX_SPD_WAVE_INTEROP_WAVE32;
contextDescription.windowSize = 5;
ffxSpdContextCreate(&context, &contextDescription);

FfxSpdDispatchDescription dispatchDescription = {};
dispatchDescription.commandList = commandList;
dispatchDescription.resource = inputResource;
dispatchDescription.resourceSize = {1920, 1080};
ffxSpdContextDispatch(&context, &dispatchDescription);

Getting Started

  1. Clone the FidelityFX-SDK repository:

    git clone https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git
    
  2. Include the necessary headers in your project:

    #include "ffx_fsr2.h"
    #include "ffx_cas.h"
    #include "ffx_spd.h"
    
  3. Link against the FidelityFX library in your build system.

  4. Initialize the desired FidelityFX effects in your rendering pipeline using the provided context creation and dispatch functions.

  5. Integrate the effects into your render loop, passing the appropriate resources and parameters.

Competitor Comparisons

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs

Pros of Compressonator

  • Compressonator provides a comprehensive set of tools for texture compression, including support for various compression formats like DXT, ETC, and ASTC.
  • The project offers a GUI-based application, making it easier for users to interact with the compression tools.
  • Compressonator includes a command-line interface, allowing for automated compression workflows and integration with other tools.

Cons of Compressonator

  • The FidelityFX SDK offers a more focused set of tools and libraries specifically designed for game development, while Compressonator covers a broader range of texture compression tasks.
  • The FidelityFX SDK may have better integration and compatibility with game engines and other game development tools compared to the more general-purpose Compressonator.
  • The documentation and community support for the FidelityFX SDK may be more extensive, as it is a dedicated game development-focused project.

Code Comparison

FidelityFX-SDK (sample from the FidelityFX-CAS module):

float FidelityFX_CAS(float3 color, float sharpness)
{
    float3 luma = float3(0.2126, 0.7152, 0.0722);
    float3 weights = float3(1.0, 1.0, 1.0) - abs(dot(color, luma) - color) * sharpness;
    return dot(color, weights) / dot(weights, float3(1.0, 1.0, 1.0));
}

Compressonator (sample from the CompressonatorCLI module):

void CompressTexture(
    CMP_Texture* pSourceTexture,
    CMP_Texture* pDestTexture,
    CMP_CompressOptions* pOptions,
    CMP_Feedback_Proc pFeedbackProc = NULL)
{
    CMP_ERROR result = CMP_Compress(pSourceTexture, pDestTexture, pOptions, pFeedbackProc);
    if (result != CMP_OK)
        throw std::runtime_error("Texture compression failed.");
}

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.

Pros of DirectX-Graphics-Samples

  • Comprehensive coverage of DirectX features and techniques
  • Official Microsoft samples, ensuring compatibility and best practices
  • Regular updates aligned with DirectX API changes

Cons of DirectX-Graphics-Samples

  • Focused solely on DirectX, limiting cross-platform applicability
  • May have a steeper learning curve for beginners compared to FidelityFX-SDK
  • Less emphasis on specific optimization techniques for different GPU architectures

Code Comparison

FidelityFX-SDK (HLSL shader example):

FFX_GROUPSHARED FfxFloat32x3 g_ffxSharedColor[16][16];
FFX_ATTRIBUTES void ComputeShader(FfxUInt32x3 LocalThreadId : SV_GroupThreadID)
{
    // FidelityFX-specific optimizations and computations
}

DirectX-Graphics-Samples (HLSL shader example):

groupshared float3 g_sharedColor[16][16];
[numthreads(16, 16, 1)]
void CSMain(uint3 DTid : SV_DispatchThreadID)
{
    // Standard DirectX computations
}

The FidelityFX-SDK code uses custom types and macros for potential cross-platform compatibility and optimizations, while DirectX-Graphics-Samples focuses on standard DirectX syntax and practices.

Unity Graphics - Including Scriptable Render Pipeline

Pros of Graphics

  • Integrated with Unity engine, providing seamless compatibility for Unity developers
  • Extensive documentation and community support through Unity's ecosystem
  • Covers a wide range of graphics features beyond just post-processing effects

Cons of Graphics

  • Primarily focused on Unity-specific implementations, limiting cross-platform flexibility
  • May have a steeper learning curve for developers not familiar with Unity's architecture
  • Potentially heavier resource footprint due to integration with the larger Unity framework

Code Comparison

FidelityFX-SDK:

FFX_CACAO_DispatchDescription dispatch = {};
dispatch.commandList = commandList;
dispatch.screenSize = { width, height };
FFX_CACAO_Dispatch(context, &dispatch);

Graphics:

[ImageEffectOpaque]
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
    Graphics.Blit(source, destination, material);
}

The FidelityFX-SDK code shows a lower-level API for dispatching CACAO (Combined Adaptive Compute Ambient Occlusion) effects, while the Graphics example demonstrates Unity's high-level approach to post-processing using the built-in rendering pipeline.

One stop solution for all Vulkan samples

Pros of Vulkan-Samples

  • Comprehensive collection of Vulkan samples covering various aspects of the API
  • Regularly updated with new features and best practices
  • Cross-platform support for Windows, Linux, Android, and macOS (MoltenVK)

Cons of Vulkan-Samples

  • Focused solely on Vulkan, lacking support for other graphics APIs
  • May be overwhelming for beginners due to its extensive coverage

Code Comparison

Vulkan-Samples (Initialization):

VkInstanceCreateInfo instance_info = {};
instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
instance_info.pApplicationInfo = &app_info;
vkCreateInstance(&instance_info, nullptr, &instance);

FidelityFX-SDK (Effect Setup):

FfxFsr2ContextDescription contextDescription = {};
contextDescription.flags = FFX_FSR2_ENABLE_HIGH_DYNAMIC_RANGE;
contextDescription.maxRenderSize.width = backBufferWidth;
contextDescription.maxRenderSize.height = backBufferHeight;
ffxFsr2ContextCreate(&context, &contextDescription);

The Vulkan-Samples code focuses on low-level Vulkan setup, while FidelityFX-SDK provides higher-level abstractions for specific graphics effects. Vulkan-Samples is more suitable for learning Vulkan internals, whereas FidelityFX-SDK offers ready-to-use optimized graphics features.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Welcome to the AMD FSR™ SDK 2.1.0 - "Redstone"

alt text

The AMD FSR™ SDK is a collection of heavily optimized technologies that can be used by developers to improve their DirectX® 12 or Vulkan® applications.

The FSR™ SDK includes:

FSR™ SDK TechniqueSamplesGPUOpen pageDescription
FidelityFX™ Super Resolution (Temporal) 2.3.4FidelityFX™ FSR sampleFidelityFX™ Super Resolution 2Offers a temporal (multi-frame accumulation) solution for producing high resolution frames from lower resolution inputs.
FidelityFX™ Super Resolution (Upscaler) 3.1.5FidelityFX™ FSR sampleFidelityFX™ Super Resolution 3Offers a temporal (multi-frame accumulation) solution for producing high resolution frames from lower resolution inputs.
FSR™ Upscaling (ML-Upscaler) 4.0.3FidelityFX™ FSR sampleFSR™ Upscaling 4Offers a machine learning-based solution for producing high resolution frames from lower resolution inputs.
FidelityFX™ Super Resolution Frame Generation 3.1.6FidelityFX™ FSR sampleFidelityFX™ Super Resolution Frame Generation 3Offers generation of interpolated frames from multiple real input frames, and multiple sources of motion vector data.
FidelityFX™ Super Resolution Frame Generation SwapChain 3.1.6FidelityFX™ FSR sampleFidelityFX™ Super Resolution Frame Generation Swapchain 3A replacement DXGI Swapchain implementation for DX12 which allows for additional frames to be presented along with real game frames, with relevant frame pacing.
FSR™ Frame Generation (ML) 4.0.0FidelityFX™ FSR sampleFSR™ Frame Generation 4Offers generation of interpolated frames from multiple real input frames, and multiple sources of motion vector data.
FSR™ Frame Generation SwapChain (ML) 4.0.0FidelityFX™ FSR sampleFSR™ Frame Generation Swapchain 4A replacement DXGI Swapchain implementation for DX12 which allows for additional frames to be presented along with real game frames, with relevant frame pacing.
FSR™ Ray Regeneration (ML-Denoiser) 1.0.0FidelityFX Denoiser sampleFSR™ Ray Regeneration 1Offers a machine learning-based solution for denoising.
FSR™ Radiance Caching (Preview)FidelityFX NRC (Preview) sampleFSR™ Radiance Caching (Preview)Offers a machine learning-based solution for path tracing result caching.

Further information

Known issues

AMD FSR™ SDK SampleAPI / ConfigurationProblem Description
All FSR™ SDK SamplesAll APIs / All ConfigsWindows path length restrictions may cause compile issues. It is recommended to place the SDK close to the root of a drive or use subst or a mklink to shorten the path.
All FSR™ SDK SamplesVulkan / All ConfigsVulkan is currently not supported in SDK 2.1

Open source

AMD FSR™ Samples are open source, and available under the MIT license.

For more information on the license terms please refer to license.

Disclaimer

The information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD’s products are as set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale.

AMD, the AMD Arrow logo, Radeon, Ryzen, CrossFire, RDNA and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.

DirectX is a registered trademark of Microsoft Corporation in the US and other jurisdictions.

Microsoft is a registered trademark of Microsoft Corporation in the US and other jurisdictions.

Windows is a registered trademark of Microsoft Corporation in the US and other jurisdictions.

© 2022-2025 Advanced Micro Devices, Inc. All rights reserved.