add tonemapping shaders
This commit is contained in:
11
shader/ToneMap/ACES.glsl
Normal file
11
shader/ToneMap/ACES.glsl
Normal file
@@ -0,0 +1,11 @@
|
||||
// ACES tone map
|
||||
// see: https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
|
||||
vec3 ToneMapping(vec3 color)
|
||||
{
|
||||
const float A = 2.51;
|
||||
const float B = 0.03;
|
||||
const float C = 2.43;
|
||||
const float D = 0.59;
|
||||
const float E = 0.14;
|
||||
return linearTosRGB(clamp((color * (A * color + B)) / (color * (C * color + D) + E), 0.0, 1.0));
|
||||
}
|
Reference in New Issue
Block a user