Hable filmic (Uncharted 2) tonemapping
A parametric filmic curve from Uncharted 2 with separate toe, linear and shoulder terms. It gives contrasty blacks and a soft highlight roll-off, and is easy to tune by hand.
Also known as Uncharted 2 tonemapper, filmic curve
In the family Post-processing, color & imaging, tonemapping
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | Built in | new BABYLON.TonemapPostProcess('t', BABYLON.TonemappingOperator.Hable, exposure, camera) docs |
| Godot 4.7 | Built in | Environment.tonemap_mode = Environment.TONE_MAPPER_FILMIC (Hable Uncharted 2 filmic curve in tonemap.glsl) docs |
| Unity | Built in | Volume > Add Override > Post-processing > Tonemapping > Mode = Neutral docs Neutral mode is built on a Hable/Hejl/Frostbite curve, not the exact Uncharted 2 operator. |
| Unreal 5.7 | None found | Unreal uses the ACES Filmic tonemapper rather than Hable's Uncharted 2 curve. |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
The curve is a rational function ((x(Ax+CB)+DE)/(x(Ax+B)+DF)) - E/F with six constants controlling shoulder strength, linear strength, linear angle, toe strength, toe numerator and toe denominator. The input is scaled by an exposure bias, passed through the function, and divided by the same function evaluated at a linear white point so that white maps to 1. It is applied per channel in the shader, then gamma encoded. The toe crushes dark values for a film-like black, the linear section keeps mid-tones close to proportional, and the shoulder compresses highlights gradually. Because the constants are explicit, artists can re-fit the curve to a target look.
When to choose it
Reach for it when
- hdr image looks washed out with flat blacks
- want contrasty filmic look i can tune by hand
- highlights clip harshly to white
- need a simple tweakable shoulder and toe curve
Choose it when you want a simple filmic curve you can tune by hand with no matrices or LUTs.
Prefer ACES filmic tonemapping for an industry-standard look, AgX for hue stability, and Reinhard photographic tone reproduction for the least contrast. Hable's curve skews hue like ACES because it runs per channel.
Field marks
- Per-channel hue skew and desaturation of saturated highlights
- Constants are scene-dependent: the white point and exposure bias need re-tuning
- Crushed blacks when exposure is low
- Colours differ from authored albedo, unlike a neutral mapper
Presets
Filmic curve visualised against Reinhard and clamp
{
"A": 0.15,
"B": 0.5,
"C": 0.1,
"D": 0.2,
"E": 0.02,
"F": 0.3,
"W": 11.2,
"EXPOSURE_BIAS": 2
}Show GLSL (40 lines)
// GLSL ES 3.0, Shadertoy-style
// Plots Hable filmic, Reinhard and linear clamp for scene values 0..8.
const float A = 0.15, B = 0.50, C = 0.10, D = 0.20, E = 0.02, F = 0.30;
const float W = 11.2;
const float EXPOSURE_BIAS = 2.0;
const float X_MAX = 8.0;
float hable(float x) {
return ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;
}
float filmic(float x) { return hable(EXPOSURE_BIAS * x) / hable(W); }
float reinhard(float x) { return x / (1.0 + x); }
float line(float y, float f, float w) {
return smoothstep(w, w * 0.4, abs(y - f));
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
float x = uv.x * X_MAX;
vec3 col = vec3(0.07, 0.08, 0.10);
// grid
float gx = abs(fract(uv.x * X_MAX) - 0.5);
float gy = abs(fract(uv.y * 5.0) - 0.5);
col += 0.05 * smoothstep(0.47, 0.5, max(gx, gy));
// curves in the upper part, gradient strip below
float cy = (uv.y - 0.18) / 0.82;
if (uv.y > 0.18) {
col = mix(col, vec3(0.9), line(cy, min(x, 1.0), 0.008));
col = mix(col, vec3(0.2, 0.7, 1.0), line(cy, reinhard(x), 0.008));
col = mix(col, vec3(1.0, 0.55, 0.15), line(cy, filmic(x), 0.010));
} else if (uv.y > 0.09) {
float v = filmic(x);
col = vec3(pow(clamp(v, 0.0, 1.0), 1.0 / 2.2));
} else {
col = vec3(pow(clamp(x, 0.0, 1.0), 1.0 / 2.2));
}
fragColor = vec4(col, 1.0);
}
Attribution: written for this index; constants are the published ones from the primary source (0)
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| hable-filmic-curve-plot | Tesla T4 1920x1080 | 1.28× baseline (feather) · 0.042 ms / 0.044 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| hable-filmic-curve-plot | NVIDIA L4 1920x1080 | 1.03× baseline (feather) · 0.016 ms / 0.017 ms · 2.6× faster on L4 | opengl-timer-query · Cross-architecture validation |
| hable-filmic-curve-plot | NVIDIA A100-SXM4-40GB 1920x1080 | 1.00× baseline (feather) · 0.029 ms / 0.029 ms · 1.5× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- 3D LUT color grading: Tonemap first, then grade the LDR result with a LUT.
Sources
- primaryJohn Hable. Filmic Tonemapping Operators. filmicworlds.com.Verified via live page · 2026-11-29
- implementationdmnsgn (2019). dmnsgn/shaders-tone-map. Thirteen tone mapping operators for GLSL and WGSL, as ES module strings and as plain shader files.GitHub API · license MIT · 2026-11-29