Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
GPUShaders::Frag::Tonemap Class Reference

Tonemap fragment shader. More...

Public Member Functions

vec3 reinhard (vec3 hdrColor)
 
vec3 simpleExposure (vec3 hdrColor, float exposure)
 
vec3 aces (vec3 hdrColor)
 
vec3 cineon (vec3 hdrColor)
 
vec3 uncharted2 (vec3 hdrColor)
 
void main ()
 

Public Attributes

in vec2 uv
 UV coordinates.
 
uniform uniform float customExposure
 Exposure.
 
uniform bool apply
 Apply the tonemapping operator (or just clamp).
 
out vec3 fragColor
 Color.
 

Detailed Description

Tonemap fragment shader.

See also
GPUShaders::Common::Samplers

Member Function Documentation

◆ aces()

vec3 GPUShaders::Frag::Tonemap::aces ( vec3  hdrColor)
inline

ACES tonemapping operator.

Parameters
hdrColorinput HDR color
Returns
the LDR color

◆ cineon()

vec3 GPUShaders::Frag::Tonemap::cineon ( vec3  hdrColor)
inline

Cineon tonemapping operator.

Parameters
hdrColorinput HDR color
Returns
the LDR color

◆ main()

void GPUShaders::Frag::Tonemap::main ( )
inline

Apply a tonemapping operator to bring a HDR image to LDR.

◆ reinhard()

vec3 GPUShaders::Frag::Tonemap::reinhard ( vec3  hdrColor)
inline

Reinhard tonemapping operator.

Parameters
hdrColorinput HDR color
Returns
the LDR color

◆ simpleExposure()

vec3 GPUShaders::Frag::Tonemap::simpleExposure ( vec3  hdrColor,
float  exposure 
)
inline

Simple exposure-based tonemapping operator.

Parameters
hdrColorinput HDR color
exposurethe current image overall exposure
Returns
the LDR color

◆ uncharted2()

vec3 GPUShaders::Frag::Tonemap::uncharted2 ( vec3  hdrColor)
inline

Uncharted 2 tonemapping operator.

Parameters
hdrColorinput HDR color
Returns
the LDR color

The documentation for this class was generated from the following file: