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.

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