[libcamera-devel] [PATCH v2 1/2] qcam: assets: shader: bayer_8.frag: Add precision
Kunal Agarwal
kunalagarwal1072002 at gmail.com
Tue Jun 28 21:12:38 CEST 2022
Currently there is no defined precision for data types
which results in compilation errors for shader.
Adding precision mediump for sufficient and required
range and accuracy. Also suitable for textures.
Precision highp also works but is not supported by some
older hardware devices and consumes more memory.
Signed-off-by: Kunal Agarwal <kunalagarwal1072002 at gmail.com>
---
src/qcam/assets/shader/bayer_8.frag | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qcam/assets/shader/bayer_8.frag b/src/qcam/assets/shader/bayer_8.frag
index 4ece44ab..7e35ca88 100644
--- a/src/qcam/assets/shader/bayer_8.frag
+++ b/src/qcam/assets/shader/bayer_8.frag
@@ -15,6 +15,9 @@ Copyright (C) 2021, Linaro
*/
//Pixel Shader
+#ifdef GL_ES
+precision mediump float;
+#endif
/** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/
uniform sampler2D tex_y;
--
2.25.1
More information about the libcamera-devel
mailing list