From 8e2c11d5e44be95ed9cf37915b0246bf287f846c Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Sun, 13 Jun 2021 21:43:41 +0200 Subject: [PATCH] Disable matrices in preview For some reason it looks work with the matrices, skipped for now --- data/debayer.frag | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/debayer.frag b/data/debayer.frag index 0bed108..c143f1c 100644 --- a/data/debayer.frag +++ b/data/debayer.frag @@ -23,7 +23,12 @@ void main() { // Assume BGGR for now. Currently this just takes 3 of the four samples // for each pixel, there's room here to do some better debayering. vec3 color = vec3(samples.w, (samples.y + samples.z) / 2.0, samples.x); - vec3 corrected = color * color_matrix; + + // Some crude blacklevel correction to make the preview a bit nicer, this should be an uniform + vec3 corrected = color - 0.02; + + // Apply the color matrices + //vec3 corrected = color_matrix * color2; // Fast SRGB estimate. See https://mimosa-pudica.net/fast-gamma/ vec3 srgb_color = (vec3(1.138) * inversesqrt(corrected) - vec3(0.138)) * corrected;