font alpha

main
Dominik Madarász 2023-10-19 11:07:59 +02:00
parent 1812fe7223
commit 697ad5581c
5 changed files with 12 additions and 8 deletions

@ -1 +1 @@
Subproject commit be43196a3d33412a5dbad92983af7e149b1b066d Subproject commit a239c188cadce8af6d28ae7402184cd7a3073fc2

2
depot

@ -1 +1 @@
Subproject commit ea89db8ecd2b32fca2a21f67f486601de5c6a93c Subproject commit 60088531fcb83f73c2b174d9308453bad639e0f7

View File

@ -32057,6 +32057,7 @@ int gladLoadGL( GLADloadfunc load) {
#define BQ_WEBSOCKET_IMPLEMENTATION // websocket #define BQ_WEBSOCKET_IMPLEMENTATION // websocket
#define XML_C // xml #define XML_C // xml
#ifdef __APPLE__ #ifdef __APPLE__
#define MA_NO_RUNTIME_LINKING // miniaudio
#define _GLFW_COCOA // glfw osx #define _GLFW_COCOA // glfw osx
#elif defined _WIN32 #elif defined _WIN32
#define _GLFW_WIN32 // glfw win32 #define _GLFW_WIN32 // glfw win32
@ -338737,9 +338738,9 @@ uniform float num_colors;\n\
out vec4 outColor;\n\ out vec4 outColor;\n\
\n\ \n\
void main() {\ void main() {\
vec3 col = texture(sampler_colors, (color_index+0.5)/num_colors).rgb;\n\ vec4 col = texture(sampler_colors, (color_index+0.5)/num_colors);\n\
float s = texture(sampler_font, uv).r;\n\ float s = texture(sampler_font, uv).r;\n\
outColor = vec4(col, s);\n\ outColor = vec4(col.rgb, s*col.a);\n\
}\n"; }\n";
enum { FONT_MAX_COLORS = 256}; enum { FONT_MAX_COLORS = 256};
@ -338891,6 +338892,7 @@ void font_face_from_mem(const char *tag, const void *ttf_bufferv, unsigned ttf_l
const char *vs = vs_filename ? file_read(vs_filename) : mv_vs_source; const char *vs = vs_filename ? file_read(vs_filename) : mv_vs_source;
const char *fs = fs_filename ? file_read(fs_filename) : mv_fs_source; const char *fs = fs_filename ? file_read(fs_filename) : mv_fs_source;
f->program = shader(vs, fs, "vertexPosition,instanceGlyph", "outColor", NULL); f->program = shader(vs, fs, "vertexPosition,instanceGlyph", "outColor", NULL);
ASSERT(f->program > 0);
// figure out what ranges we're about to bake // figure out what ranges we're about to bake
#define MERGE_TABLE(table) do { \ #define MERGE_TABLE(table) do { \

View File

@ -1541,9 +1541,9 @@ uniform float num_colors;\n\
out vec4 outColor;\n\ out vec4 outColor;\n\
\n\ \n\
void main() {\ void main() {\
vec3 col = texture(sampler_colors, (color_index+0.5)/num_colors).rgb;\n\ vec4 col = texture(sampler_colors, (color_index+0.5)/num_colors);\n\
float s = texture(sampler_font, uv).r;\n\ float s = texture(sampler_font, uv).r;\n\
outColor = vec4(col, s);\n\ outColor = vec4(col.rgb, s*col.a);\n\
}\n"; }\n";
enum { FONT_MAX_COLORS = 256}; enum { FONT_MAX_COLORS = 256};
@ -1695,6 +1695,7 @@ void font_face_from_mem(const char *tag, const void *ttf_bufferv, unsigned ttf_l
const char *vs = vs_filename ? file_read(vs_filename) : mv_vs_source; const char *vs = vs_filename ? file_read(vs_filename) : mv_vs_source;
const char *fs = fs_filename ? file_read(fs_filename) : mv_fs_source; const char *fs = fs_filename ? file_read(fs_filename) : mv_fs_source;
f->program = shader(vs, fs, "vertexPosition,instanceGlyph", "outColor", NULL); f->program = shader(vs, fs, "vertexPosition,instanceGlyph", "outColor", NULL);
ASSERT(f->program > 0);
// figure out what ranges we're about to bake // figure out what ranges we're about to bake
#define MERGE_TABLE(table) do { \ #define MERGE_TABLE(table) do { \

View File

@ -7663,9 +7663,9 @@ uniform float num_colors;\n\
out vec4 outColor;\n\ out vec4 outColor;\n\
\n\ \n\
void main() {\ void main() {\
vec3 col = texture(sampler_colors, (color_index+0.5)/num_colors).rgb;\n\ vec4 col = texture(sampler_colors, (color_index+0.5)/num_colors);\n\
float s = texture(sampler_font, uv).r;\n\ float s = texture(sampler_font, uv).r;\n\
outColor = vec4(col, s);\n\ outColor = vec4(col.rgb, s*col.a);\n\
}\n"; }\n";
enum { FONT_MAX_COLORS = 256}; enum { FONT_MAX_COLORS = 256};
@ -7817,6 +7817,7 @@ void font_face_from_mem(const char *tag, const void *ttf_bufferv, unsigned ttf_l
const char *vs = vs_filename ? file_read(vs_filename) : mv_vs_source; const char *vs = vs_filename ? file_read(vs_filename) : mv_vs_source;
const char *fs = fs_filename ? file_read(fs_filename) : mv_fs_source; const char *fs = fs_filename ? file_read(fs_filename) : mv_fs_source;
f->program = shader(vs, fs, "vertexPosition,instanceGlyph", "outColor", NULL); f->program = shader(vs, fs, "vertexPosition,instanceGlyph", "outColor", NULL);
ASSERT(f->program > 0);
// figure out what ranges we're about to bake // figure out what ranges we're about to bake
#define MERGE_TABLE(table) do { \ #define MERGE_TABLE(table) do { \