FidelityFX-CLI – Testing FSR and FidelityFX CAS at the command-line

FidelityFX-CLI is a simple, command-line Windows® program that you can find in the FidelityFX-CLI repository in binary and source form. It lets you test our FidelityFX Super Resolution (FSR) 1.0, as well as Contrast Adaptive Sharpening (CAS) effects on image files such as screenshots from your game.

The usage is simple. If you have a screenshot from your game saved as an image file (PNG, JPG, or BMP) just open Windows® Terminal (Command Prompt). Then launch the program with parameters specifying target resolution of the upscaling, the name of the source file to read, and the target file to write, for example:

					FidelityFX_CLI.exe -Mode EASU -Scale 3840 2160 MyGame-01.png MyGame-01_Scaled.png

FSR involves two passes: Edge Adaptive Spatial Upsampling (EASU) and Robust Contrast Adaptive Sharpening (RCAS), so you need to launch the program a second time to perform the sharpening. You can also specify optional parameter -Sharpness to control the sharpening amount – from maximum (0.0) to minimum (2.0).

					FidelityFX_CLI.exe -Mode RCAS -Sharpness 0.2 MyGame-01_Scaled.png MyGame-01_Sharpened.png

Then you will be able to see how our FSR algorithm would affect your game by comparing the two images.

FidelityFX CLI

If you want to compare the FSR result with a simpler upscaling algorithm and see how much difference FSR introduces, use an additional parameter -Mode to choose a different algorithm.

  • NearestNeighbor – your result will then look pixelated.
  • Linear – to use linear interpolation – your result will look blurry.

For example:

					FidelityFX_CLI.exe -Mode Linear -Scale 3840 2160 MyGame-01.png MyGame-01_Linear.png

The tool also supports our Contrast Adaptive Sharpening (CAS) algorithm. To use it, pass a -Mode CAS parameter. It performs (optional) upscaling and sharpening in a single pass. This time, sharpness ranges from 0.0 (which means default sharpness) to 1.0 (maximum sharpness). For example:

					FidelityFX_CLI.exe -Mode CAS -Scale 3840 2160 -Sharpness 0 MyGame-01.png MyGame-01_CAS.png

The tool offers additional features for advanced users. By default, it assumes the image is saved with sRGB gamma encoding and performs conversion to linear space and back (gamma correction) whenever necessary. If you want to work on a dump of some intermediate texture from inside of your engine which is stored in linear space, use parameter -Linear to disable the gamma correction.

You can also increase the precision of processing by specifying -FP16 parameter. The program will then use R16G16B16A16_FLOAT texture format. By default, it is R8G8B8A8_UNORM. Note that using such high precision requires an appropriate file format.

Full documentation of the command line syntax is printed in the terminal when you launch the program without any parameters.

The tool is open source, based on the MIT license. The source is written in C++, uses Windows® Imaging Component (WIC) to load and save images, and initializes Direct3D® 11 (without any window or swapchain) to launch FSR or CAS shader. It may also serve as a simple example of FSR integration.

Related content

Adam Sawicki

Adam Sawicki

Adam works in the European Game Engineering team, primarily on Vulkan® and Direct3D®12 games technology and the games that use it. Links to third party sites, and references to third party trademarks, are provided for convenience and illustrative purposes only. Unless explicitly stated, AMD is not responsible for the contents of such links, and no third party endorsement of AMD or any of its products is implied.

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

You may also like...

Getting started: our software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on 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!

If slide decks are what you’re after, you’ll find 100+ of our finest presentations here. Plus there’s a handy list of our product manuals!

Developer guides

Browse our developer guides, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan, DirectX, UE4, and lots more.

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

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

Product Blogs

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


Discover our published publications.