summaryrefslogtreecommitdiff
path: root/src/render/shaders/osd_binds.h
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-08-26 17:56:52 -0400
committerAndrew Opalach <andrew@akon.city> 2026-08-26 17:56:52 -0400
commit197d41a3e23cab35848f623c6133baccc62aacbe (patch)
tree04943c1de9653de53615e10ced1eab07c2562325 /src/render/shaders/osd_binds.h
parent6094c907b26e21f13373bae6bf3306dbae40af3c (diff)
downloadcamu-197d41a3e23cab35848f623c6133baccc62aacbe.tar.gz
camu-197d41a3e23cab35848f623c6133baccc62aacbe.tar.bz2
camu-197d41a3e23cab35848f623c6133baccc62aacbe.zip
OSD stuff and Android fixes
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/render/shaders/osd_binds.h')
-rw-r--r--src/render/shaders/osd_binds.h311
1 files changed, 311 insertions, 0 deletions
diff --git a/src/render/shaders/osd_binds.h b/src/render/shaders/osd_binds.h
new file mode 100644
index 0000000..5d6806a
--- /dev/null
+++ b/src/render/shaders/osd_binds.h
@@ -0,0 +1,311 @@
+static char osd_binds_shader[] = \
+"float text(vec2 uv, vec2 pos) {\n"
+" float col = 0.;\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_L,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_f,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_lsl,uv);\n"
+" col += char(ch_R,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_g,uv);\n"
+" col += char(ch_h,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(1)\n"
+" col += char(ch_N,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_x,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_lsl,uv);\n"
+" col += char(ch_P,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_v,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_lpa,uv);\n"
+" col += char(ch_C,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_col,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_crs,uv);\n"
+" col += char(ch_lsl,uv);\n"
+" col += char(ch_dsh,uv);\n"
+" col += char(ch_1,uv);\n"
+" col += char(ch_0,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_rpa,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_p,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_c,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(6)\n"
+" col += char(ch_P,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_e,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_M,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_M,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_lpa,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_h,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_f,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_col,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_1,uv);\n"
+" col += char(ch_0,uv);\n"
+" col += char(ch_0,uv);\n"
+" col += char(ch_pct,uv);\n"
+" col += char(ch_rpa,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_T,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_b,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(8)\n"
+" col += char(ch_T,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_g,uv);\n"
+" col += char(ch_g,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_O,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_D,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_C,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(7)\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_h,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_w,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_O,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_D,uv);\n"
+" col += char(ch_lsl,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_k,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_lpa,uv);\n"
+" col += char(ch_C,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_c,uv);\n"
+" col += char(ch_k,uv);\n"
+" col += char(ch_rpa,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_T,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_g,uv);\n"
+" col += char(ch_g,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_b,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_s,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_E,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_R,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_k,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_crs,uv);\n"
+" col += char(ch_lsl,uv);\n"
+" col += char(ch_dsh,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(8)\n"
+" col += char(ch_Z,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_m,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_I,uv);\n"
+" col += char(ch_n,uv);\n"
+" col += char(ch_lsl,uv);\n"
+" col += char(ch_O,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_t,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_N,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_D,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_b,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_c,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_n,uv);\n"
+" col += char(ch_g,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_C,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_T,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_n,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_p,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_n,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_B,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_c,uv);\n"
+" col += char(ch_k,uv);\n"
+" col += char(ch_g,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_o,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_n,uv);\n"
+" col += char(ch_d,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_V,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_V,uv);\n"
+" col += char(ch_R,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_lpa,uv);\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_h,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_f,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_col,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_3,uv);\n"
+" col += char(ch_6,uv);\n"
+" col += char(ch_0,uv);\n"
+" col += char(ch_dgr,uv);\n"
+" col += char(ch_com,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_C,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_l,uv);\n"
+" col += char(ch_col,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_C,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_n,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_r,uv);\n"
+" col += char(ch_rpa,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_B,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_S,uv);\n"
+" col += char(ch_w,uv);\n"
+" col += char(ch_a,uv);\n"
+" col += char(ch_p,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_E,uv);\n"
+" col += char(ch_y,uv);\n"
+" col += char(ch_e,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_R,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_R,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_s,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_t,uv);\n"
+" col += char(ch_spc,uv);\n"
+" col += char(ch_V,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_e,uv);\n"
+" col += char(ch_w,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += char(ch_Q,uv);\n"
+" col += char(ch_col,uv);\n"
+" spaces(10)\n"
+" col += char(ch_Q,uv);\n"
+" col += char(ch_u,uv);\n"
+" col += char(ch_i,uv);\n"
+" col += char(ch_t,uv);\n"
+" return col;\n"
+"}\n"
+"vec4 draw_osd() {\n"
+" vec2 sf = vec2(screen/scale);\n"
+" vec2 ss = sf/2.;\n"
+" vec2 c = vec2(coord.x,1.-coord.y);\n"
+" vec2 uv = c*ss;\n"
+" vec2 pos = floor(vec2(ss.x/2.-STRW(43.)/2.,(ss.y/2.)+STRH(1.2*10.)));\n"
+" float pixel = text(uv, pos);\n"
+" float box = in_box(uv,pos-vec2(8.,STRH(1.2*13.)+8.),pos+vec2(STRW(43.)+8.,STRH(1.2)+8.));\n"
+" vec4 color = bcolor*box;\n"
+" color = mix(color,tcolor,pixel);\n"
+" color -= pixel*float(mod(c.y*sf.y,3.) < 1.)*0.5;\n"
+" return color;\n"
+"}\n";