FidelityFX LPM

FidelityFX Luma Preserving Mapper GPU documentation.

Functions

Return type

Description

FFX_STATIC void

FfxCalculateLpmConsts ( FfxBoolean shoulder, FfxBoolean con, FfxBoolean soft, FfxBoolean con2, FfxBoolean clip, FfxBoolean scaleOnly, FfxFloat32x2 xyRedW, FfxFloat32x2 xyGreenW, FfxFloat32x2 xyBlueW, FfxFloat32x2 xyWhiteW, FfxFloat32x2 xyRedO, FfxFloat32x2 xyGreenO, FfxFloat32x2 xyBlueO, FfxFloat32x2 xyWhiteO, FfxFloat32x2 xyRedC, FfxFloat32x2 xyGreenC, FfxFloat32x2 xyBlueC, FfxFloat32x2 xyWhiteC, FfxFloat32 scaleC, FfxFloat32 softGap, FfxFloat32 hdrMax, FfxFloat32 exposure, FfxFloat32 contrast, FfxFloat32 shoulderContrast, FfxFloat32x3 saturation, FfxFloat32x3 crosstalk )
Setup required constant values for LPM (works on CPU or GPU). Output goes to the user-defined LpmSetupOut() function.

Detailed description

FidelityFX Luma Preserving Mapper GPU documentation.

Global functions

FfxCalculateLpmConsts

Copied!

FFX_STATIC  void FfxCalculateLpmConsts (
    FfxBoolean  shoulder,
    FfxBoolean  con,
    FfxBoolean  soft,
    FfxBoolean  con2,
    FfxBoolean  clip,
    FfxBoolean  scaleOnly,
    FfxFloat32x2  xyRedW,
    FfxFloat32x2  xyGreenW,
    FfxFloat32x2  xyBlueW,
    FfxFloat32x2  xyWhiteW,
    FfxFloat32x2  xyRedO,
    FfxFloat32x2  xyGreenO,
    FfxFloat32x2  xyBlueO,
    FfxFloat32x2  xyWhiteO,
    FfxFloat32x2  xyRedC,
    FfxFloat32x2  xyGreenC,
    FfxFloat32x2  xyBlueC,
    FfxFloat32x2  xyWhiteC,
    FfxFloat32  scaleC,
    FfxFloat32  softGap,
    FfxFloat32  hdrMax,
    FfxFloat32  exposure,
    FfxFloat32  contrast,
    FfxFloat32  shoulderContrast,
    FfxFloat32x3  saturation,
    FfxFloat32x3  crosstalk
)

Setup required constant values for LPM (works on CPU or GPU). Output goes to the user-defined LpmSetupOut() function.

Parameters:

shoulder

Use optional extra shoulderContrast tuning (set to false if shoulderContrast is 1.0).

con

Use first RGB conversion matrix, if ‘soft’ then ‘con’ must be true also.

soft

Use soft gamut mapping.

con2

Use last RGB conversion matrix.

clip

Use clipping in last conversion matrix.

scaleOnly

Scale only for last conversion matrix (used for 709 HDR to scRGB).

xyRedW

Red Chroma coordinates for working color space.

xyGreenW

Green Chroma coordinates for working color space.

xyBlueW

Blue Chroma coordinates for working color space.

xyWhiteW

White Chroma coordinates for working color space.

xyRedO

Red Chroma coordinates for output color space.

xyGreenO

Green Chroma coordinates for output color space.

xyBlueO

Blue Chroma coordinates for output color space.

xyWhiteO

White Chroma coordinates for output color space.

xyRedC

Red Chroma coordinates for output container or display colour space.

xyGreenC

Green Chroma coordinates for output container or display color space.

xyBlueC

Blue Chroma coordinates for output container or display color space.

xyWhiteC

White Chroma coordinates for output container or display color space.

scaleC

scale factor for PQ or scRGB adjustment

softGap

Range of 0 to a little over zero, controls how much feather region in out-of-gamut mapping, 0=clip.

hdrMax

Maximum input value.

exposure

Number of stops between ‘hdrMax’ and 18% mid-level on input.

contrast

Input range {0.0 (no extra contrast) to 1.0 (maximum contrast)}.

shoulderContrast

Shoulder shaping, 1.0 = no change (fast path).

saturation

A per channel adjustment, use <0 decrease, 0=no change, >0 increase.

crosstalk

One channel must be 1.0, the rest can be <= 1.0 but not zero. Lenghtnes colours path to white by walking across gamut. Check documentation for usage


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!