Overlay: Fix overlays being washed out by render colors

Clamping here might be a bit too much if output is expected to be HDR.
But we don't support HDR atm so clamping is fine.
This commit is contained in:
Clément Foucault
2020-02-25 13:58:28 +01:00
parent 7bc893c827
commit 190fd795a9
2 changed files with 2 additions and 0 deletions

View File

@@ -163,6 +163,7 @@ vec4 OCIO_ProcessColor(vec4 col, vec4 col_overlay, vec2 noise_uv)
col = OCIO_to_display_linear_with_look(col, lut3d_texture);
if (overlay) {
col = clamp(col, 0.0, 1.0);
col *= 1.0 - col_overlay.a;
col += col_overlay; /* Assumed unassociated alpha. */
}