Skip to content

Instantly share code, notes, and snippets.

@knarkowicz
knarkowicz / ACESFitting.cpp
Created August 6, 2018 17:20
ACES Fitting
// Mostly code from https://github.com/ampas/aces-dev
Vec3 ACES_RRT( Vec3 aces )
{
// --- Glow module --- //
float saturation = rgb_2_saturation( aces);
float ycIn = rgb_2_yc( aces);
float s = sigmoid_shaper( (saturation - 0.4f) / 0.2f);
float addedGlow = 1.0f + glow_fwd( ycIn, RRT_GLOW_GAIN * s, RRT_GLOW_MID);