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