Radeon ProRender

Photographic Tone Mapping Filter

Filter

RIF_IMAGE_FILTER_PHOTO_TONEMAP

Description

Photographic tone mapper that emulates the work of camera.

Based on following formulas:

https://en.wikipedia.org/wiki/Film_speed#Measurements_and_calculations

First we compute the luminous exposure H (in lux seconds):

../../_images/photographic_tone_mapper_f1.svg

where q is:

../../_images/photographic_tone_mapper_f2.svg

For the theta angle, we use a typical value of 10°, for T - 0.9, vignette v is an input parameter.

Then computation diverge based on weather or not a user wants to provide an input value for film ISO or wants to compute film sensitivity in kernel. If ISO is provided and user enables useISO define (see the Parameters section), we compute the final film sensitivity as ISO / 100 and use it in the final pixel value computation. Otherwise, we compute standard output sensitivity using the following formula:

../../_images/photographic_tone_mapper_f3.svg

where lx * s = H and Hsos is the exposure that will lead to values of @saturation in pixels.

Parameters

Parameter Type Input/Output Description
gamma float input Gamma correction value.
Value range is [0, 5], default value is 1.
exposureTime float input Film exposure time.
Value range is [0, 100], default value is 0.125.
sensitivity float input Luminance of the scene (in candela per m^2).
Value range is [0, 100], default value is 1.
fstop float input Aperture f-number.
Value range is [0.00001, 100], default value is 1.
focalL float input Camera focal length.
Value range is [0.1, 10], default value is 1.
vignette float input Vignette value.
Value range is [0, 1], default value is 0.
saturation float input Saturation used for sensitivity computation.
Value range is [0, 1], default value is 0.5.
lighten float input Brighten up highlights. Higher settings bring highlights closer to white.
Value range is [0, 10], default value is 0.5.
darken float input Darken shadowed areas. Higher settings bring shadowed areas closer to black.
Value range is [0, 10], default value is 0.5.
ISO uint input Film ISO value.
Value range is [100, 2000], default value is 100.
useclampN uint input If set to RIF_TRUE, negative values are clamped to zero.
Values are RIF_FALSE and RIF_TRUE (default).
whitepoint float4 input The color that will be mapped to white in the output.
Default value is (1, 1, 1, 1).
useISO uint input If set to RIF_FALSE, use saturation to compute sensitivity. Otherwise, use the provided ISO.
Values are RIF_FALSE (default) and RIF_TRUE.