summaryrefslogtreecommitdiff
path: root/src/render/shaders
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-09-07 15:06:14 -0400
committerAndrew Opalach <andrew@akon.city> 2026-09-07 15:06:14 -0400
commitc66c7c64ebd16287b892f8a780cffcabafba3799 (patch)
treeb2195902ef055147878b591cf1171be7e6133c97 /src/render/shaders
parent1758ae9e860bd3b65b661e3c804288c3599f4fd4 (diff)
downloadcamu-c66c7c64ebd16287b892f8a780cffcabafba3799.tar.gz
camu-c66c7c64ebd16287b892f8a780cffcabafba3799.tar.bz2
camu-c66c7c64ebd16287b892f8a780cffcabafba3799.zip
Better OSD behavior, lots of build stuff
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/render/shaders')
-rw-r--r--src/render/shaders/osd.h22
-rw-r--r--src/render/shaders/osd_binds.h575
-rw-r--r--src/render/shaders/osd_header.h28
3 files changed, 344 insertions, 281 deletions
diff --git a/src/render/shaders/osd.h b/src/render/shaders/osd.h
index 1109a50..8a5fd6c 100644
--- a/src/render/shaders/osd.h
+++ b/src/render/shaders/osd.h
@@ -5,32 +5,32 @@ static char osd_shader[] = \
" if (connecting != 0u) {\n"
" float t = mod(time,1.8);\n"
" for (int i = 0; i < 3; i++) {\n"
-" col += char(ch_per,uv)*float(t >= float(i)*0.6);\n"
+" col += ch(ch_per,uv)*float(t >= float(i)*0.6);\n"
" }\n"
" } else if (paused != 0u) {\n"
-" col = char(ch_p,uv)+char(ch_a,uv)+char(ch_u,uv)+char(ch_s,uv)+char(ch_e,uv)+char(ch_d,uv);\n"
+" col = ch(ch_p,uv)+ch(ch_a,uv)+ch(ch_u,uv)+ch(ch_s,uv)+ch(ch_e,uv)+ch(ch_d,uv);\n"
" }\n"
" pp = pos2;\n"
" if (negative != 0u) {\n"
-" col += char(ch_dsh,uv);\n"
+" col += ch(ch_dsh,uv);\n"
" }\n"
" if (show_hour != 0u) {\n"
-" col += integer(num1,uv)+char(ch_col,uv);\n"
+" col += integer(num1,uv)+ch(ch_col,uv);\n"
" }\n"
-" col += integer(num2,uv)+char(ch_col,uv)+integer(num3,uv)+char(ch_lsl,uv);\n"
+" col += integer(num2,uv)+ch(ch_col,uv)+integer(num3,uv)+ch(ch_lsl,uv);\n"
" if (show_hour != 0u) {\n"
-" col += integer(num4,uv)+char(ch_col,uv);\n"
+" col += integer(num4,uv)+ch(ch_col,uv);\n"
" }\n"
-" col += integer(num5,uv)+char(ch_col,uv)+integer(num6,uv);\n"
+" col += integer(num5,uv)+ch(ch_col,uv)+integer(num6,uv);\n"
" return col;\n"
"}\n"
"float text_over(vec2 uv, vec2 pos3) {\n"
" float col = 0.;\n"
" pp = pos3;\n"
" if (show_hour != 0u && bar_mode == 1u) {\n"
-" col = integer(num7,uv)+char(ch_col,uv);\n"
+" col = integer(num7,uv)+ch(ch_col,uv);\n"
" }\n"
-" col += integer(num8,uv)+((bar_mode == 2u) ? char(ch_per,uv) : char(ch_col,uv))+integer(num9,uv);\n"
+" col += integer(num8,uv)+((bar_mode == 2u) ? ch(ch_per,uv) : ch(ch_col,uv))+integer(num9,uv);\n"
" return col;\n"
"}\n"
"vec4 draw_osd() {\n"
@@ -45,7 +45,7 @@ static char osd_shader[] = \
" pos2.x -= STRW(0.5) * float(negative);\n"
" float ov = fract(bar);\n"
" ov = (-1.+(bar-ov)+float(c.x < ov))/1.5;\n"
-" vec4 color = mix(bcolor,mix(tcolor,vec4(0.7,0.45,0.,1.),ov),float(c.x < bar));\n"
+" vec4 color = mix(bcolor,mix(tcolor-0.075,vec4(0.7,0.45,0.,1.),ov),float(c.x < bar));\n"
" float alpha = (c.x >= bar) ? 0.7 : 1.;\n"
" color = mix(color,vec4(tcolor.xyz,alpha)+float(bar > dbar)*0.15,float(c.x < dbar));\n"
" color = mix(color,vec4(tcolor.xyz,alpha-0.1)+float(bar > bbar)*0.15,float(c.x < bbar)*0.5);\n"
@@ -62,7 +62,7 @@ static char osd_shader[] = \
" uv = c*ss;\n"
" float width2 = (show_hour != 0u && bar_mode == 1u) ? 8. : 5.;\n"
" vec2 pos3 = floor(vec2(ss.x/2.-STRW(width2)/2.,11.));\n"
-" float box = in_box(uv,pos3-vec2(2.,2.),pos3+vec2(STRW(width2)+1.,STRH(1.)+3.));\n"
+" float box = in_box(uv,pos3-vec2(4.,2.),pos3+vec2(STRW(width2)+3.,STRH(1.)+3.));\n"
" color.xyz = mix(color.xyz,bcolor.xyz,box);\n"
" color.w = color.w+(bcolor.w*box);\n"
" pixel = text_over(uv,pos3);\n"
diff --git a/src/render/shaders/osd_binds.h b/src/render/shaders/osd_binds.h
index 5d6806a..0f5ff19 100644
--- a/src/render/shaders/osd_binds.h
+++ b/src/render/shaders/osd_binds.h
@@ -2,298 +2,363 @@ 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"
+" col += ch(ch_L,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_f,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_R,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_g,uv);\n"
+" col += ch(ch_h,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_N,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_x,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_P,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_v,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_lpa,uv);\n"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_crs,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_dsh,uv);\n"
+" col += ch(ch_1,uv);\n"
+" col += ch(ch_0,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(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"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_p,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_c,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(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"
+" col += ch(ch_P,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(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"
+" col += ch(ch_M,uv);\n"
+" col += ch(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"
+" col += ch(ch_M,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_lpa,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_h,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_f,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_1,uv);\n"
+" col += ch(ch_0,uv);\n"
+" col += ch(ch_0,uv);\n"
+" col += ch(ch_pct,uv);\n"
+" col += ch(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"
+" col += ch(ch_T,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_b,uv);\n"
+" col += ch(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"
+" col += ch(ch_T,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_g,uv);\n"
+" col += ch(ch_g,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_O,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(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"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(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"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_h,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_w,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_O,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_D,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_k,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_lpa,uv);\n"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_c,uv);\n"
+" col += ch(ch_k,uv);\n"
+" col += ch(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"
+" col += ch(ch_S,uv);\n"
+" col += ch(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"
+" col += ch(ch_T,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_g,uv);\n"
+" col += ch(ch_g,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_b,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(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"
+" col += ch(ch_U,uv);\n"
+" col += ch(ch_p,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_D,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_w,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(ch_col,uv);\n"
+" spaces(4)\n"
+" col += ch(ch_T,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_c,uv);\n"
+" col += ch(ch_k,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_lpa,uv);\n"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_A,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_d,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_com,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_h,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_f,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_b,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(ch_rpa,uv);\n"
+" pos.y -= STRH(1.2);\n"
+" pp = vec2(pos.x,pos.y);\n"
+" col += ch(ch_E,uv);\n"
+" col += ch(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"
+" col += ch(ch_R,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(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"
+" col += ch(ch_crs,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_dsh,uv);\n"
+" col += ch(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"
+" col += ch(ch_Z,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_m,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_I,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_O,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(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"
+" col += ch(ch_N,uv);\n"
+" col += ch(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"
+" col += ch(ch_D,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_b,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_c,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(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"
+" col += ch(ch_C,uv);\n"
+" col += ch(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"
+" col += ch(ch_T,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(ch_p,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_W,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(ch_d,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_w,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"
+" col += ch(ch_V,uv);\n"
+" col += ch(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"
+" col += ch(ch_V,uv);\n"
+" col += ch(ch_R,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_lpa,uv);\n"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_n,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_com,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_h,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_f,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_3,uv);\n"
+" col += ch(ch_6,uv);\n"
+" col += ch(ch_0,uv);\n"
+" col += ch(ch_dgr,uv);\n"
+" col += ch(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"
+" col += ch(ch_B,uv);\n"
+" col += ch(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"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_w,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_p,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_E,uv);\n"
+" col += ch(ch_y,uv);\n"
+" col += ch(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"
+" col += ch(ch_R,uv);\n"
+" col += ch(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"
+" col += ch(ch_R,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_s,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_V,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_w,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_lpa,uv);\n"
+" col += ch(ch_C,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_r,uv);\n"
+" col += ch(ch_l,uv);\n"
+" col += ch(ch_lsl,uv);\n"
+" col += ch(ch_S,uv);\n"
+" col += ch(ch_h,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_f,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_col,uv);\n"
+" col += ch(ch_spc,uv);\n"
+" col += ch(ch_R,uv);\n"
+" col += ch(ch_o,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_a,uv);\n"
+" col += ch(ch_t,uv);\n"
+" col += ch(ch_e,uv);\n"
+" col += ch(ch_rpa,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"
+" col += ch(ch_Q,uv);\n"
+" col += ch(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"
+" col += ch(ch_Q,uv);\n"
+" col += ch(ch_u,uv);\n"
+" col += ch(ch_i,uv);\n"
+" col += ch(ch_t,uv);\n"
" return col;\n"
"}\n"
"vec4 draw_osd() {\n"
@@ -301,9 +366,9 @@ static char osd_binds_shader[] = \
" 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"
+" vec2 pos = floor(vec2(ss.x/2.-STRW(49.)/2.,(ss.y/1.25)));\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"
+" float box = in_box(uv,pos-vec2(8.,STRH(1.2*14.)+8.),pos+vec2(STRW(49.)+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"
diff --git a/src/render/shaders/osd_header.h b/src/render/shaders/osd_header.h
index 5ba6491..fad6921 100644
--- a/src/render/shaders/osd_header.h
+++ b/src/render/shaders/osd_header.h
@@ -95,11 +95,9 @@ static char osd_header_shader[] = \
"#define ch_rpa uvec4(0x00E030,0x30180C,0x183030,0xE00000)\n"
"#define ch_tid uvec4(0x0073DA,0xCE0000,0x000000,0x000000)\n"
"#define ch_lar uvec4(0x000000,0x10386C,0xC6C6FE,0x000000)\n"
-"#define spaces(n) for (int i = 0; i < n; i++) { col += char(ch_spc,uv); }\n"
+"#define spaces(n) for (int i = 0; i < n; i++) { col += ch(ch_spc,uv); }\n"
"#define STRW(c) (c*8.)\n"
"#define STRH(c) (c*12.)\n"
-"const vec4 tcolor = vec4(0.78,0.76,0.76,1.);\n"
-"const vec4 bcolor = vec4(0.1,0.1,0.1,0.65);\n"
"vec2 pp = vec2(0.);\n"
"float in_box(vec2 v, vec2 bl, vec2 tr) {\n"
" vec2 s = step(bl,v)-step(tr,v);\n"
@@ -117,30 +115,30 @@ static char osd_header_shader[] = \
" return in_box(uv,vec2(0.),vec2(8.,12.))*float(bv.x+bv.y+bv.z+bv.w);\n"
#endif
"}\n"
-"float char(uvec4 ch, vec2 uv) {\n"
+"float ch(uvec4 ch, vec2 uv) {\n"
" float px = sprite(ch,floor(uv-pp));\n"
" pp += vec2(8.,0.);\n"
" return px;\n"
"}\n"
"uvec4 digit(uint d) {\n"
" switch (d) {\n"
-" case 0: return ch_0;\n"
-" case 1: return ch_1;\n"
-" case 2: return ch_2;\n"
-" case 3: return ch_3;\n"
-" case 4: return ch_4;\n"
-" case 5: return ch_5;\n"
-" case 6: return ch_6;\n"
-" case 7: return ch_7;\n"
-" case 8: return ch_8;\n"
-" case 9:\n"
+" case 0u: return ch_0;\n"
+" case 1u: return ch_1;\n"
+" case 2u: return ch_2;\n"
+" case 3u: return ch_3;\n"
+" case 4u: return ch_4;\n"
+" case 5u: return ch_5;\n"
+" case 6u: return ch_6;\n"
+" case 7u: return ch_7;\n"
+" case 8u: return ch_8;\n"
+" case 9u:\n"
" default: return ch_9;\n"
" }\n"
"}\n"
"float integer(uint number, vec2 uv) {\n"
" float r = 0.;\n"
" for (int i = 1; i >= 0; i--) {\n"
-" r += char(digit(uint(mod(float(number)/max(1.,float(i)*10.),10.))),uv);\n"
+" r += ch(digit(uint(mod(float(number)/max(1.,float(i)*10.),10.))),uv);\n"
" }\n"
" return r;\n"
"}\n";