Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect¶
Module: Kuesa Qt 3D API
Perform conversion from linear color space to sRGB space. This effects performs exposure correction, tone mapping and gamma correction in this order. More...
#include <tonemappingandgammacorrectioneffect.h>
Inherits from Kuesa::Qt3D::AbstractPostProcessingEffect, Qt3DCore::QNode
Public Types¶
Name | |
---|---|
enum | ToneMapping { None = 0, Reinhard, Filmic, Uncharted} |
Public Slots¶
Name | |
---|---|
void | setExposure(float exposure) |
void | setGamma(float gamma) |
void | setToneMappingAlgorithm(Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm) |
Public Signals¶
Name | |
---|---|
void | exposureChanged(float exposure) |
void | gammaChanged(float gamma) |
void | toneMappingAlgorithmChanged(Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm) |
Public Functions¶
Name | |
---|---|
ToneMappingAndGammaCorrectionEffect(Qt3DCore::QNode * parent =nullptr) | |
~ToneMappingAndGammaCorrectionEffect() | |
float | exposure() const |
float | gamma() const |
ToneMapping | toneMappingAlgorithm() const |
virtual FrameGraphNodePtr | frameGraphSubTree() const override |
virtual void | setInputTexture(Qt3DRender::QAbstractTexture * texture) override |
virtual QVector< Qt3DRender::QLayer * > | layers() const override |
Public Properties¶
Name | |
---|---|
float | exposure |
float | gamma |
Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping | toneMappingAlgorithm |
Additional inherited members¶
Public Types inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
Name | |
---|---|
enum | Type { Custom} |
using QSharedPointer< Qt3DRender::QFrameGraphNode > | FrameGraphNodePtr |
Public Functions inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
Name | |
---|---|
~AbstractPostProcessingEffect() | |
Type | type() const |
virtual void | setDepthTexture(Qt3DRender::QAbstractTexture * texture) |
virtual void | setCamera(Qt3DCore::QEntity * camera) |
virtual void | setWindowSize(const QSize & sceneSize) |
Protected Functions inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
Name | |
---|---|
AbstractPostProcessingEffect(Qt3DCore::QNode * parent =nullptr, Type type =Custom) |
Protected Attributes inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
Name | |
---|---|
const Type | m_type |
Detailed Description¶
1 |
|
Perform conversion from linear color space to sRGB space. This effects performs exposure correction, tone mapping and gamma correction in this order.
Since: Kuesa 2.0
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.
It uses a gamma of 2.2 to perform the correction, but this can be overridden if required.
If you care about Tone Mapping implementation details, the algorithms in use are detailly explained
Public Types Documentation¶
enum ToneMapping¶
Enumerator | Value | Description |
---|---|---|
None | 0 | |
Reinhard | ||
Filmic | ||
Uncharted |
This enum lists the various Tone Mapping Algorithms
- None - No Tone Mapping (default)
- Reinhard - Reinhard Tone Mapping
- Filmic - Filmic Tone Mapping
- Uncharted - Hable John's Uncharted Tone Mapping
Public Slots Documentation¶
slot setExposure¶
1 2 3 |
|
slot setGamma¶
1 2 3 |
|
slot setToneMappingAlgorithm¶
1 2 3 |
|
Since: Kuesa 2.0
Sets the tone mapping algorithm to algorithm,
Public Signals Documentation¶
signal exposureChanged¶
1 2 3 |
|
signal gammaChanged¶
1 2 3 |
|
signal toneMappingAlgorithmChanged¶
1 2 3 |
|
Public Functions Documentation¶
function ToneMappingAndGammaCorrectionEffect¶
1 2 3 |
|
function ~ToneMappingAndGammaCorrectionEffect¶
1 |
|
function exposure¶
1 |
|
function gamma¶
1 |
|
function toneMappingAlgorithm¶
1 |
|
Since: Kuesa 2.0
Returns the tone mapping algorithm used by the shader. \default ToneMappingAndGammaCorrectionEffect::None
function frameGraphSubTree¶
1 |
|
Note: The lifetime of the returned subtree is assumed to be managed by the shared pointer. Any caller reparenting the subtree to add to a
Reimplements: Kuesa::Qt3D::AbstractPostProcessingEffect::frameGraphSubTree
Returns a FrameGraph subtree corresponding to the effect's implementation.
function setInputTexture¶
1 2 3 |
|
Reimplements: Kuesa::Qt3D::AbstractPostProcessingEffect::setInputTexture
Sets the input texture to texture for this effect. The texture contain the rendered scene that the effect will be applied to. This is set automatically by the ForwardRenderer when the effect is added.
function layers¶
1 |
|
Reimplements: Kuesa::Qt3D::AbstractPostProcessingEffect::layers
Return the layers provided by this effect. This will generally be the layer of a
Public Property Documentation¶
property exposure¶
1 |
|
Exposure correction factor used before the linear to sRGB conversion. \default 0
property gamma¶
1 |
|
Holds the gamma value to use for gamma correction conversion that brings linear colors to sRGB colors. \default 2.2
property toneMappingAlgorithm¶
1 |
|
Tone mapping specifies how we perform color conversion from HDR (high dynamic range) content to LDR (low dynamic range) content which our monitor displays.
\default ToneMappingAndGammaCorrectionEffect::None
Updated on 2023-07-03 at 11:02:10 +0000