gjdwebserver-overlay/media-video/megapixels/files/fix-preview-color.patch
Gerben Jan Dijkman 8b6c838803 Added megapixels
2021-07-29 23:17:56 +02:00

26 lines
880 B
Diff

From 055ff6e2669715550552206b4614832dc66eeb25 Mon Sep 17 00:00:00 2001
From: Benjamin Schaaf <ben.schaaf@gmail.com>
Date: Tue, 4 May 2021 23:40:45 +1000
Subject: [PATCH] Fix preview color
---
data/debayer.frag | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/debayer.frag b/data/debayer.frag
index 9a98c10..4244c2f 100644
--- a/data/debayer.frag
+++ b/data/debayer.frag
@@ -22,7 +22,7 @@ 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.w) / 2.0, samples.x);
+ vec3 color = vec3(samples.w, (samples.y + samples.z) / 2.0, samples.x);
// Fast SRGB estimate. See https://mimosa-pudica.net/fast-gamma/
vec3 srgb_color = (vec3(1.138) * inversesqrt(color) - vec3(0.138)) * color;
--
2.30.2