summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/meson.build8
-rw-r--r--src/render/renderer_libplacebo.c130
-rw-r--r--src/render/renderer_libplacebo.h2
-rw-r--r--src/render/renderer_momo.c6
-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
7 files changed, 429 insertions, 342 deletions
diff --git a/src/render/meson.build b/src/render/meson.build
index ee0017a..3cbca4c 100644
--- a/src/render/meson.build
+++ b/src/render/meson.build
@@ -56,9 +56,8 @@ elif get_option('renderer') == 'libplacebo'
shaderc_opts.add_cmake_defines({ 'SPIRV_COLOR_TERMINAL': false })
shaderc_opts.add_cmake_defines({ 'ENABLE_EXCEPTIONS_ON_MSVC': false })
shaderc_proj = cmake.subproject('shaderc', options: shaderc_opts)
- shaderc = shaderc_proj.dependency('shaderc')
- meson.override_dependency('shaderc', declare_dependency(dependencies: shaderc, version: '2026.2'))
- render_deps += [
+ shaderc_deps = [
+ shaderc_proj.dependency('shaderc'),
shaderc_proj.dependency('shaderc_util'),
shaderc_proj.dependency('MachineIndependent'),
shaderc_proj.dependency('OSDependent'),
@@ -68,8 +67,9 @@ elif get_option('renderer') == 'libplacebo'
shaderc_proj.dependency('SPIRV-Tools-static')
]
if spirv_optimizer
- render_deps += [shaderc_proj.dependency('SPIRV-Tools-opt')]
+ shaderc_deps += [shaderc_proj.dependency('SPIRV-Tools-opt')]
endif
+ meson.override_dependency('shaderc', declare_dependency(dependencies: shaderc_deps, version: '2026.3'))
endif
libplacebo_opts += ['shaderc=enabled', 'glslang=disabled']
else
diff --git a/src/render/renderer_libplacebo.c b/src/render/renderer_libplacebo.c
index 8c28162..c0a413a 100644
--- a/src/render/renderer_libplacebo.c
+++ b/src/render/renderer_libplacebo.c
@@ -117,7 +117,7 @@ static void log_callback(void *userdata, enum pl_log_level level, const char *me
// will be shot anyway so allow it.
log_info(message);
} else {
- log_info(message);
+ log_debug(message);
}
}
@@ -166,9 +166,11 @@ static bool renderer_lp_create_renderer(struct camu_renderer *renderer, u32 *wid
struct camu_renderer_lp *lr = (struct camu_renderer_lp *)renderer;
#ifndef CRT_BACKGROUND
- clear_color[0] = ((global_color_palette.colors[0] >> 16) & 0xff) / 255.f;
- clear_color[1] = ((global_color_palette.colors[0] >> 8) & 0xff) / 255.f;
- clear_color[2] = ((global_color_palette.colors[0]) & 0xff) / 255.f;
+ if (global_color_palette.supplied) {
+ clear_color[0] = ((global_color_palette.colors[CAMU_COLOR_BACKGROUND] >> 16) & 0xff) / 255.f;
+ clear_color[1] = ((global_color_palette.colors[CAMU_COLOR_BACKGROUND] >> 8) & 0xff) / 255.f;
+ clear_color[2] = (global_color_palette.colors[CAMU_COLOR_BACKGROUND] & 0xff) / 255.f;
+ }
#endif
lr->logger = pl_log_create(PL_API_VER, pl_log_params(
@@ -319,7 +321,7 @@ static bool renderer_lp_create_renderer(struct camu_renderer *renderer, u32 *wid
al_memset(&lr->params, 0, sizeof(struct pl_render_params));
lr->params = default_params;
- lr->params.deband_params = NULL;
+ //lr->params.deband_params = NULL;
//lr->params.frame_mixer = NULL;
// Clear manually so we can draw multiple images per frame.
@@ -331,26 +333,28 @@ static bool renderer_lp_create_renderer(struct camu_renderer *renderer, u32 *wid
lr->params.correct_subpixel_offsets = true;
lr->osd.vars[0].var = pl_var_uvec2("screen");
- lr->osd.vars[1].var = pl_var_uint("scale");
- lr->osd.vars[2].var = pl_var_float("time");
- lr->osd.vars[3].var = pl_var_uint("show_osd");
- lr->osd.vars[4].var = pl_var_uint("connecting");
- lr->osd.vars[5].var = pl_var_uint("paused");
- lr->osd.vars[6].var = pl_var_uint("bar_mode");
- lr->osd.vars[7].var = pl_var_float("bar");
- lr->osd.vars[8].var = pl_var_float("dbar");
- lr->osd.vars[9].var = pl_var_float("bbar");
- lr->osd.vars[10].var = pl_var_uint("show_hour");
- lr->osd.vars[11].var = pl_var_uint("negative");
+ lr->osd.vars[1].var = pl_var_vec4("tcolor");
+ lr->osd.vars[2].var = pl_var_vec4("bcolor");
+ lr->osd.vars[3].var = pl_var_uint("scale");
+ lr->osd.vars[4].var = pl_var_float("time");
+ lr->osd.vars[5].var = pl_var_uint("show_osd");
+ lr->osd.vars[6].var = pl_var_uint("connecting");
+ lr->osd.vars[7].var = pl_var_uint("paused");
+ lr->osd.vars[8].var = pl_var_uint("bar_mode");
+ lr->osd.vars[9].var = pl_var_float("bar");
+ lr->osd.vars[10].var = pl_var_float("dbar");
+ lr->osd.vars[11].var = pl_var_float("bbar");
+ lr->osd.vars[12].var = pl_var_uint("show_hour");
+ lr->osd.vars[13].var = pl_var_uint("negative");
static const char num_names[9][6] = {
"num1", "num2", "num3", "num4",
"num5", "num6", "num7", "num8",
"num9"
};
for (u32 i = 0; i < 9; i++) {
- lr->osd.vars[12 + i].var = pl_var_uint(num_names[i]);
+ lr->osd.vars[14 + i].var = pl_var_uint(num_names[i]);
}
- for (u32 i = 0; i < 21; i++) {
+ for (u32 i = 0; i < 23; i++) {
lr->osd.vars[i].dynamic = true;
}
@@ -491,7 +495,7 @@ static inline intptr_t float_64_hash(f64 value)
static inline bool render_osd(struct camu_renderer_lp *lr, struct camu_screen *scr)
{
f64 duration = scr->osd.duration / 1000000.0;
- f32 bar, dbar, bbar;
+ static f32 bar, dbar, bbar;
f32 progress = ((duration != 0) ? scr->osd.pts / duration : 0.f);
if (scr->osd.bar_mode != CAMU_OSD_BAR_VOLUME) {
dbar = progress;
@@ -504,68 +508,84 @@ static inline bool render_osd(struct camu_renderer_lp *lr, struct camu_screen *s
lr->osd.screen_size[0] = scr->width;
lr->osd.screen_size[1] = scr->height;
lr->osd.vars[0].data = lr->osd.screen_size;
- u32 scale = 1;
- lr->osd.vars[1].data = &scale;
+ static float tcolor[4] = { 0.89f, 0.87f, 0.87f, 1.f };
+ if (global_color_palette.supplied) {
+ tcolor[0] = ((global_color_palette.colors[CAMU_COLOR_FOREGROUND] >> 16) & 0xff) / 255.f;
+ tcolor[1] = ((global_color_palette.colors[CAMU_COLOR_FOREGROUND] >> 8) & 0xff) / 255.f;
+ tcolor[2] = (global_color_palette.colors[CAMU_COLOR_FOREGROUND] & 0xff) / 255.f;
+ }
+ lr->osd.vars[1].data = tcolor;
+ static float bcolor[4] = { 0.04f, 0.04f, 0.04f, 0.575f };
+ if (global_color_palette.supplied) {
+ bcolor[0] = ((global_color_palette.colors[CAMU_COLOR_BACKGROUND] >> 16) & 0xff) / 255.f;
+ bcolor[1] = ((global_color_palette.colors[CAMU_COLOR_BACKGROUND] >> 8) & 0xff) / 255.f;
+ bcolor[2] = (global_color_palette.colors[CAMU_COLOR_BACKGROUND] & 0xff) / 255.f;
+ }
+ lr->osd.vars[2].data = bcolor;
+ static u32 scale = 1;
+ lr->osd.vars[3].data = &scale;
f64 tick = nn_get_tick();
if (lr->osd.tick_time == -1.0) lr->osd.tick_time = tick;
lr->osd.time = (f32)(tick - lr->osd.tick_time);
- lr->osd.vars[2].data = &lr->osd.time;
- lr->osd.vars[3].data = &scr->osd.show;
- lr->osd.vars[4].data = &scr->osd.connecting;
- lr->osd.vars[5].data = &scr->osd.paused;
- lr->osd.vars[6].data = &scr->osd.bar_mode;
- lr->osd.vars[7].data = &bar;
- lr->osd.vars[8].data = &dbar;
- lr->osd.vars[9].data = &bbar;
- u32 hours1, minutes1, seconds1, hundredths;
- u32 show_hour;
+ lr->osd.vars[4].data = &lr->osd.time;
+ lr->osd.vars[5].data = &scr->osd.show;
+ lr->osd.vars[6].data = &scr->osd.connecting;
+ lr->osd.vars[7].data = &scr->osd.paused;
+ lr->osd.vars[8].data = &scr->osd.bar_mode;
+ lr->osd.vars[9].data = &bar;
+ lr->osd.vars[10].data = &dbar;
+ lr->osd.vars[11].data = &bbar;
+ static u32 hours1, minutes1, seconds1, hundredths;
+ static u32 show_hour;
show_hour = camu_split_time(scr->osd.duration, &hours1, &minutes1, &seconds1, &hundredths);
ROUND_SECONDS(hours1, minutes1, seconds1, hundredths);
- lr->osd.vars[10].data = &show_hour;
- u32 negative;
+ lr->osd.vars[12].data = &show_hour;
+ static u32 negative;
negative = scr->osd.pts < 0.0f;
- lr->osd.vars[11].data = &negative;
- lr->osd.vars[15].data = &hours1;
- lr->osd.vars[16].data = &minutes1;
- lr->osd.vars[17].data = &seconds1;
- u32 hours2, minutes2, seconds2;
- camu_split_time(fabs(scr->osd.pts) * 1000000u, &hours2, &minutes2, &seconds2, &hundredths);
+ lr->osd.vars[13].data = &negative;
+ lr->osd.vars[17].data = &hours1;
+ lr->osd.vars[18].data = &minutes1;
+ lr->osd.vars[19].data = &seconds1;
+ static u32 hours2, minutes2, seconds2;
+ u64 time = fabs(scr->osd.pts) * 1000000u;
+ time = MIN(time, scr->osd.duration);
+ camu_split_time(time, &hours2, &minutes2, &seconds2, &hundredths);
// The trade-off of rounding PTS is that if we do, second 0 will be shown for only half a second.
// If we don't, more noticeably, PTS will never equal duration if duration rounds up.
// There's also the option of not rounding either.
ROUND_SECONDS(hours2, minutes2, seconds2, hundredths);
- lr->osd.vars[12].data = &hours2;
- lr->osd.vars[13].data = &minutes2;
- lr->osd.vars[14].data = &seconds2;
- u32 zero = 0;
- lr->osd.vars[18].data = &zero;
- lr->osd.vars[19].data = &zero;
+ lr->osd.vars[14].data = &hours2;
+ lr->osd.vars[15].data = &minutes2;
+ lr->osd.vars[16].data = &seconds2;
+ static u32 zero = 0;
lr->osd.vars[20].data = &zero;
+ lr->osd.vars[21].data = &zero;
+ lr->osd.vars[22].data = &zero;
if (scr->osd.bar_mode == CAMU_OSD_BAR_SEEK) {
- u32 hours3, minutes3, seconds3;
+ static u32 hours3, minutes3, seconds3;
camu_split_time(fabs(duration * bar) * 1000000u, &hours3, &minutes3, &seconds3, &hundredths);
ROUND_SECONDS(hours3, minutes3, seconds3, hundredths);
- lr->osd.vars[18].data = &hours3;
- lr->osd.vars[19].data = &minutes3;
- lr->osd.vars[20].data = &seconds3;
+ lr->osd.vars[20].data = &hours3;
+ lr->osd.vars[21].data = &minutes3;
+ lr->osd.vars[22].data = &seconds3;
} else {
f64 whole = floor(bar);
f64 frac = (bar - whole) * 100.0;
- u32 num1, num2;
+ static u32 num1, num2;
num1 = (u32)whole;
num2 = (u32)round(frac);
- lr->osd.vars[19].data = &num1;
- lr->osd.vars[20].data = &num2;
+ lr->osd.vars[21].data = &num1;
+ lr->osd.vars[22].data = &num2;
}
lr->osd.sh = pl_dispatch_begin(lr->dispatch);
pl_shader_custom(lr->osd.sh, &(struct pl_custom_shader){
.description = "osd",
.prelude = lr->osd.prelude,
- .header = scr->osd.show_binds ? lr->osd.binds : lr->osd.header,
+ .header = scr->osd.alt ? lr->osd.binds : lr->osd.header,
.body = "color = (show_osd == 0u) ? vec4(0.) : draw_osd();",
.output = PL_SHADER_SIG_COLOR,
- .num_variables = 21,
+ .num_variables = 23,
.variables = lr->osd.vars
});
@@ -703,7 +723,7 @@ static bool renderer_lp_render(struct camu_renderer *renderer, struct camu_scree
target->rotation = mix.frames[0]->rotation - video->view.rotation;
//lr->params.color_map_params = pl_color_map_params(.inverse_tone_mapping = true);
/*
- if () {
+ if (1) {
target->color = pl_color_space_srgb;
target->color.hdr.max_luma = PL_COLOR_SDR_WHITE - 50.f;
target->color.hdr.min_luma = (PL_COLOR_SDR_WHITE - 50.f) / PL_COLOR_SDR_CONTRAST;
diff --git a/src/render/renderer_libplacebo.h b/src/render/renderer_libplacebo.h
index a8a5001..dba71bb 100644
--- a/src/render/renderer_libplacebo.h
+++ b/src/render/renderer_libplacebo.h
@@ -51,7 +51,7 @@ struct camu_renderer_lp {
pl_shader sh;
u32 screen_size[2];
f32 time;
- struct pl_shader_var vars[21];
+ struct pl_shader_var vars[23];
f32 vertices[24];
struct pl_vertex_attrib attribs[2];
f64 tick_time;
diff --git a/src/render/renderer_momo.c b/src/render/renderer_momo.c
index 02ccaee..2372213 100644
--- a/src/render/renderer_momo.c
+++ b/src/render/renderer_momo.c
@@ -21,7 +21,11 @@ static void renderer_momo_set(struct camu_renderer *renderer, u8 option, u8 valu
}
static bool renderer_momo_create_renderer(struct camu_renderer *renderer, u32 *width, u32 *height,
-#if defined STELA_API_OPENGL
+#if defined STELA_API_VULKAN
+#error "MOMO cannot support Vulkan"
+#elif defined STELA_API_DX11
+ HWND win32_window,
+#elif defined STELA_API_OPENGL
#ifdef STELA_USE_EGL
EGLDisplay display,
EGLContext context,
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";