tonemapAces function
Vector3
tonemapAces(
- Vector3 color
TonemapAces from composite.frag: the Narkowicz fit.
Implementation
Vector3 tonemapAces(Vector3 color) {
const a = 2.51;
const b = 0.03;
const c = 2.43;
const d = 0.59;
const e = 0.14;
double curve(double x) =>
((x * (a * x + b)) / (x * (c * x + d) + e)).clamp(0.0, 1.0);
return Vector3(curve(color.x), curve(color.y), curve(color.z));
}