18 #ifndef PIC_UTIL_GL_TONE_HPP 19 #define PIC_UTIL_GL_TONE_HPP 23 #include "../../base.hpp" 37 vec3 SimpleTMO(vec3 col,
float exposure,
float gamma) {
38 pow(color.xyz * exposure, vec3(gamma))
54 const vec3 LUM_XYZ = vec3(0.213, 0.715, 0.072);
58 vec3
DragoTMO(vec3 col,
float maxL,
float c1,
float c2) {
59 float Lw = dot(LUM_XYZ, col);
60 float Ld = c2 * log(1 + L) / log(2.0 + 8.0 * pow((L / maxL), c2));
61 return (col.xyz * Ld) / Lw;
#define MAKE_STRING(input_string)
PIC_INLINE std::string GLSL_DRAGO_TMO()
GLSL_DRAGO_TMO returns Drago et al.'s tone mapping operator.
Definition: tone.hpp:49
#define PIC_INLINE
Definition: base.hpp:33
PIC_INLINE std::string GLSL_SIMPLE_EXPOSURE_GAMMA()
GLSL_SIMPLE_EXPOSURE_GAMMA applies a simple gamma correctiona and exposure in a shader.
Definition: tone.hpp:32
The DragoTMO class.
Definition: drago_tmo.hpp:33
Definition: bilateral_separation.hpp:25