Kuesa Runtime

ToneMappingAndGammaCorrectionEffect Class

class Kuesa::ToneMappingAndGammaCorrectionEffect

Perform conversion from linear color space to sRGB space. More...

Header: #include <ToneMappingAndGammaCorrectionEffect>
Since: Kuesa 1.1
Inherits: Kuesa::AbstractPostProcessingEffect

This class was introduced in Kuesa 1.1.

Public Types

enum ToneMapping { None, Reinhard, Filmic, Uncharted }

Properties

Public Functions

float exposure() const
float gamma() const
Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm() const

Public Slots

void setExposure(float exposure)
void setGamma(float gamma)
void setToneMappingAlgorithm(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)

Signals

void exposureChanged(float exposure)
void gammaChanged(float gamma)
void toneMappingAlgorithmChanged(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm)

Detailed Description

This effects performs exposure correction, tone mapping and gamma correction in this order.

It uses a gamma of 2.2 to perform the correction, but this can be overridden if required.

Note: If using the ForwardRenderer FrameGraph, this effect is automatically added as the last step of the pipeline, after any user defined post processing effect. Therefore, you shouldn't need to instantiate this effect yourself if using that FrameGraph.

If you care about Tone Mapping implementation details, the algorithms in use are detailly explained here.

Member Type Documentation

enum ToneMappingAndGammaCorrectionEffect::ToneMapping

This enum lists the various Tone Mapping Algorithms

ConstantValueDescription
Kuesa::ToneMappingAndGammaCorrectionEffect::None0- No Tone Mapping (default)
Kuesa::ToneMappingAndGammaCorrectionEffect::Reinhard1- Reinhard Tone Mapping
Kuesa::ToneMappingAndGammaCorrectionEffect::Filmic2- Filmic Tone Mapping
Kuesa::ToneMappingAndGammaCorrectionEffect::Uncharted3- Hable John's Uncharted Tone Mapping

Property Documentation

exposure : float

Exposure correction factor used before the linear to sRGB conversion.

Access functions:

float exposure() const
void setExposure(float exposure)

Notifier signal:

void exposureChanged(float exposure)

gamma : float

Holds the gamma value to use for gamma correction conversion that brings linear colors to sRGB colors.

Access functions:

float gamma() const
void setGamma(float gamma)

Notifier signal:

void gammaChanged(float gamma)

toneMappingAlgorithm : Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping

Tone mapping specifies how we perform color conversion from HDR (high dynamic range) content to LDR (low dynamic range) content which our monitor displays.

Access functions:

Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm() const
void setToneMappingAlgorithm(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)

Notifier signal:

void toneMappingAlgorithmChanged(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm)

Member Function Documentation

[slot] void ToneMappingAndGammaCorrectionEffect::setToneMappingAlgorithm(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)

Sets the tone mapping algorithm to algorithm,

Note: Setter function for property toneMappingAlgorithm.

This function was introduced in Kuesa 1.1.

See also toneMappingAlgorithm().

Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping ToneMappingAndGammaCorrectionEffect::toneMappingAlgorithm() const

Returns the tone mapping algorithm used by the shader.

Note: Getter function for property toneMappingAlgorithm.

This function was introduced in Kuesa 1.1.

See also setToneMappingAlgorithm().