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.
enum | ToneMapping { None, Reinhard, Filmic, Uncharted } |
float | exposure() const |
float | gamma() const |
Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping | toneMappingAlgorithm() const |
void | setExposure(float exposure) |
void | setGamma(float gamma) |
void | setToneMappingAlgorithm(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm) |
void | exposureChanged(float exposure) |
void | gammaChanged(float gamma) |
void | toneMappingAlgorithmChanged(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm) |
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.
This enum lists the various Tone Mapping Algorithms
Constant | Value | Description |
---|---|---|
Kuesa::ToneMappingAndGammaCorrectionEffect::None | 0 | - No Tone Mapping (default) |
Kuesa::ToneMappingAndGammaCorrectionEffect::Reinhard | 1 | - Reinhard Tone Mapping |
Kuesa::ToneMappingAndGammaCorrectionEffect::Filmic | 2 | - Filmic Tone Mapping |
Kuesa::ToneMappingAndGammaCorrectionEffect::Uncharted | 3 | - Hable John's Uncharted Tone Mapping |
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) |
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) |
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) |
[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().
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().