From 1a9569912879f52c69a6f301719e5b543fe86cc6 Mon Sep 17 00:00:00 2001 From: datenwolf <@datenwolf.net> Date: Thu, 3 Jul 2025 00:19:42 +0200 Subject: base commit, SDL2, EGL and OpenGL-ES 2 setup, texture upload and basic de-Bayer --- debayer.fs.glsl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 debayer.fs.glsl (limited to 'debayer.fs.glsl') diff --git a/debayer.fs.glsl b/debayer.fs.glsl new file mode 100644 index 0000000..e6eace4 --- /dev/null +++ b/debayer.fs.glsl @@ -0,0 +1,41 @@ +uniform sampler2D u_sampler; +uniform highp mat4 u_coef_r; +uniform highp mat4 u_coef_g; +uniform highp mat4 u_coef_b; +varying highp vec2 v_position; + +/* Evaluate power serial polynomial of degree 16, with 0-th order term 0 */ +highp float polyeval(highp mat4 c, highp float x){ + highp float y = c[3][3]; + for(int i=4, j=3; 0