libcamera: shaders: Use highp not mediump for float precision
mediump gives 10 bits of mantissa as the resolution. At higher resolutions 10 bits of accuracy is insufficient - for example at a width of 1928 bytes we need log2(1928) = ~11 bit resolution. Switching to highp gives us 23 bits of mantissa giving a sample width precision of about 2^23 ~ 8,388,608. Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Tested-by: Robert Mader <robert.mader@collabora.com> Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen 6 (arm64) ov02c10 + X1c gen 12 ov08x40 Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> # Lenovo X13s Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
c31d6dba03
commit
c9954de93d
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
varying vec2 textureOut;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
varying vec2 textureOut;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
varying vec2 textureOut;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
varying vec2 textureOut;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,7 +16,7 @@ Copyright (C) 2021, Linaro
|
||||
|
||||
//Pixel Shader
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
/** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/
|
||||
|
||||
Reference in New Issue
Block a user