Home

Awesome

FidelityFX LPM

What is LPM?

Luma Preserving Mapper is a tone mapping and gamut mapping solution for HDR and wide gamut content. LPM tone maps the luma of the RGB pixel instead of the colors itself, but it makes sure that tonemap(luma(RGB)) would be very similar to luma(tonemap(RGB)), that is, it preserves the luma of the pixel.

Sample Overview:

FidelityFX LPM Off

NoLPM

FidelityFX LPM On

LPM

Build Instructions

Prerequisites

Running the LPM Sample:

High-level overview:

For a detailed explanation of LPM, please read sample/docs/LPM_doc.pdf and read the comments in ffx-lpm/ffx_lpm.h.

LPM is split into two parts: a setup call and filter call. The setup call writes pertinent data to a fixed size control block with regards to what the tone and gamut mapping calculations need and the filter call reads from the control block and calculates and outputs a tone and gamut mapped color value or pair of values for the FP16 version.

ffx_lpm.h:

LPMPS.cpp:

LPMPS.hlsl/glsl: