FidelityFX CAS

FidelityFX Contrast Adaptive Sharpening GPU documentation.

Functions

Return type

Description

FfxUInt32

ffxCasSupportScaling ( FFX_PARAMETER_IN FfxFloat32 outX, FFX_PARAMETER_IN FfxFloat32 outY, FFX_PARAMETER_IN FfxFloat32 inX, FFX_PARAMETER_IN FfxFloat32 inY )
A function to check if the scaling ratio is supported by CAS.

FFX_STATIC void

ffxCasSetup ( FFX_PARAMETER_INOUT FfxUInt32x4 const0, FFX_PARAMETER_INOUT FfxUInt32x4 const1, FFX_PARAMETER_IN FfxFloat32 sharpness, FFX_PARAMETER_IN FfxFloat32 inputSizeInPixelsX, FFX_PARAMETER_IN FfxFloat32 inputSizeInPixelsY, FFX_PARAMETER_IN FfxFloat32 outputSizeInPixelsX, FFX_PARAMETER_IN FfxFloat32 outputSizeInPixelsY )
Call to setup required constant values (works on CPU or GPU).

Macros

Name

Description

FFX_CAS_AREA_LIMIT (4.0)

The maximum scaling ratio that CAS can support.

Detailed description

FidelityFX Contrast Adaptive Sharpening GPU documentation.

Global functions

ffxCasSupportScaling

Copied!

FfxUInt32  ffxCasSupportScaling (
    FFX_PARAMETER_IN FfxFloat32  outX,
    FFX_PARAMETER_IN FfxFloat32  outY,
    FFX_PARAMETER_IN FfxFloat32  inX,
    FFX_PARAMETER_IN FfxFloat32  inY
)

A function to check if the scaling ratio is supported by CAS.

Contrast Adaptive Sharpening (CAS) supports a maximum scaling ratio expressed in FFX_CAS_AREA_LIMIT.

Parameters:

outX

The width of the target output, expressed in pixels.

outY

The height of the target output, expressed in pixels.

inX

The width of the input surface, expressed in pixels.

inY

The height of the input surface, expressed in pixels.

Returns:

True if CAS supports scaling in the given configuration.


ffxCasSetup

Copied!

FFX_STATIC  void ffxCasSetup (
    FFX_PARAMETER_INOUT FfxUInt32x4  const0,
    FFX_PARAMETER_INOUT FfxUInt32x4  const1,
    FFX_PARAMETER_IN FfxFloat32  sharpness,
    FFX_PARAMETER_IN FfxFloat32  inputSizeInPixelsX,
    FFX_PARAMETER_IN FfxFloat32  inputSizeInPixelsY,
    FFX_PARAMETER_IN FfxFloat32  outputSizeInPixelsX,
    FFX_PARAMETER_IN FfxFloat32  outputSizeInPixelsY
)

Call to setup required constant values (works on CPU or GPU).

Parameters:

const0

The first 4 32-bit values of the constant buffer which is populated by this function.

const1

The second 4 32-bit values of the constant buffer which is populated by this function.

sharpness

Set to 0 for the default (lower ringing), 1 for maximum (higest ringing).

inputSizeInPixelsX

The size of the input resolution in the X dimension.

inputSizeInPixelsY

The size of the input resolution in the Y dimension.

outputSizeInPixelsX

The size of the output resolution in the X dimension.

outputSizeInPixelsY

The size of the output resolution in the Y dimension.


Macros

FFX_CAS_AREA_LIMIT

Copied!

#define FFX_CAS_AREA_LIMIT (4.0)

The maximum scaling ratio that CAS can support.


Related pages

  • Visit the FidelityFX SDK product page for download links and more information.

Looking for more documentation on GPUOpen?

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.

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 Performance Guides

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

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!

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.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!