package ve_sokol import sg "thirdparty:sokol/gfx" /* #version:1# (machine generated, don't edit!) Generated by sokol-shdc (https://github.com/floooh/sokol-tools) Cmdline: sokol-shdc --input C:\projects\VEFontCache-Odin\backend\sokol\draw_text.shdc.glsl --output C:\projects\VEFontCache-Odin\backend\sokol\draw_text.odin --slang glsl410:glsl300es:hlsl4:metal_macos:wgsl --format=sokol_odin Overview: ========= Shader program: 've_draw_text': Get shader desc: ve_draw_text_shader_desc(sg.query_backend()) Vertex Shader: ve_draw_text_vs Fragment Shader: ve_draw_text_fs Attributes: ATTR_ve_draw_text_v_position => 0 ATTR_ve_draw_text_v_texture => 1 Bindings: Uniform block 've_draw_text_fs_params': Odin struct: Ve_Draw_Text_Fs_Params Bind slot: UB_ve_draw_text_fs_params => 0 Image 've_draw_text_src_texture': Image type: ._2D Sample type: .FLOAT Multisampled: false Bind slot: IMG_ve_draw_text_src_texture => 0 Sampler 've_draw_text_src_sampler': Type: .FILTERING Bind slot: SMP_ve_draw_text_src_sampler => 0 */ ATTR_ve_draw_text_v_position :: 0 ATTR_ve_draw_text_v_texture :: 1 UB_ve_draw_text_fs_params :: 0 IMG_ve_draw_text_src_texture :: 0 SMP_ve_draw_text_src_sampler :: 0 Ve_Draw_Text_Fs_Params :: struct #align(16) { using _: struct #packed { glyph_buffer_size: [2]f32, over_sample: f32, _: [4]u8, colour: [4]f32, }, } /* #version 410 layout(location = 0) out vec2 uv; layout(location = 1) in vec2 v_texture; layout(location = 0) in vec2 v_position; void main() { uv = vec2(v_texture.x, v_texture.y); gl_Position = vec4((v_position * 2.0) - vec2(1.0), 0.0, 1.0); } */ @(private="file") ve_draw_text_vs_source_glsl410 := [255]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x6c,0x61, 0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20, 0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a, 0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20, 0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x74, 0x65,0x78,0x74,0x75,0x72,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c, 0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20, 0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b, 0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a, 0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x76,0x5f, 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f, 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28, 0x28,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2a,0x20,0x32,0x2e, 0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20, 0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* #version 410 uniform vec4 ve_draw_text_fs_params[2]; uniform sampler2D ve_draw_text_src_texture_ve_draw_text_src_sampler; layout(location = 0) in vec2 uv; layout(location = 0) out vec4 frag_color; void main() { frag_color = vec4(ve_draw_text_fs_params[1].xyz, ve_draw_text_fs_params[1].w * ((1.0 / ve_draw_text_fs_params[0].z) * (((texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, fma(vec2(-0.5), ve_draw_text_fs_params[0].xy, uv)).x + texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, fma(vec2(-0.5, 0.5), ve_draw_text_fs_params[0].xy, uv)).x) + texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, fma(vec2(0.5, -0.5), ve_draw_text_fs_params[0].xy, uv)).x) + texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, fma(vec2(0.5), ve_draw_text_fs_params[0].xy, uv)).x))); } */ @(private="file") ve_draw_text_fs_source_glsl410 := [812]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e, 0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x65,0x5f,0x64,0x72, 0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, 0x73,0x5b,0x32,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61, 0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65, 0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72, 0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f, 0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29, 0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79, 0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30, 0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f, 0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69, 0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63, 0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x76,0x65,0x5f,0x64, 0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61, 0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x5f,0x64,0x72, 0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, 0x73,0x5b,0x31,0x5d,0x2e,0x77,0x20,0x2a,0x20,0x28,0x28,0x31,0x2e,0x30,0x20,0x2f, 0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73, 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x7a,0x29,0x20,0x2a,0x20, 0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x76,0x65,0x5f,0x64,0x72, 0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74, 0x75,0x72,0x65,0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74, 0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x66,0x6d, 0x61,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x35,0x29,0x2c,0x20,0x76,0x65, 0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61, 0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x2c,0x20,0x75,0x76,0x29,0x29, 0x2e,0x78,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65, 0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20, 0x66,0x6d,0x61,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x35,0x2c,0x20,0x30, 0x2e,0x35,0x29,0x2c,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78, 0x79,0x2c,0x20,0x75,0x76,0x29,0x29,0x2e,0x78,0x29,0x20,0x2b,0x20,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65, 0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73, 0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x66,0x6d,0x61,0x28,0x76,0x65,0x63,0x32, 0x28,0x30,0x2e,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x35,0x29,0x2c,0x20,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72, 0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x2c,0x20,0x75,0x76,0x29,0x29,0x2e, 0x78,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65, 0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20, 0x66,0x6d,0x61,0x28,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x2c,0x20,0x76, 0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70, 0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x2c,0x20,0x75,0x76,0x29, 0x29,0x2e,0x78,0x29,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* #version 300 es out vec2 uv; layout(location = 1) in vec2 v_texture; layout(location = 0) in vec2 v_position; void main() { uv = vec2(v_texture.x, v_texture.y); gl_Position = vec4((v_position * 2.0) - vec2(1.0), 0.0, 1.0); } */ @(private="file") ve_draw_text_vs_source_glsl300es := [237]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a, 0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61, 0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20, 0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63, 0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65, 0x63,0x32,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x0a, 0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20, 0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x76,0x5f,0x74,0x65, 0x78,0x74,0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x74,0x65,0x78,0x74,0x75, 0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f, 0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x76, 0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29, 0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x30,0x2e, 0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* #version 300 es precision mediump float; precision highp int; uniform highp vec4 ve_draw_text_fs_params[2]; uniform highp sampler2D ve_draw_text_src_texture_ve_draw_text_src_sampler; in highp vec2 uv; layout(location = 0) out highp vec4 frag_color; void main() { frag_color = vec4(ve_draw_text_fs_params[1].xyz, ve_draw_text_fs_params[1].w * ((1.0 / ve_draw_text_fs_params[0].z) * (((texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, vec2(-0.5) * ve_draw_text_fs_params[0].xy + uv).x + texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, vec2(-0.5, 0.5) * ve_draw_text_fs_params[0].xy + uv).x) + texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, vec2(0.5, -0.5) * ve_draw_text_fs_params[0].xy + uv).x) + texture(ve_draw_text_src_texture_ve_draw_text_src_sampler, vec2(0.5) * ve_draw_text_fs_params[0].xy + uv).x))); } */ @(private="file") ve_draw_text_fs_source_glsl300es := [852]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a, 0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d, 0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69, 0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75, 0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63, 0x34,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66, 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x3b,0x0a,0x75,0x6e,0x69, 0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c, 0x65,0x72,0x32,0x44,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65, 0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73, 0x61,0x6d,0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68, 0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75, 0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20, 0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66, 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64, 0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72, 0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28, 0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f, 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76, 0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70, 0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x77,0x20,0x2a,0x20,0x28,0x28,0x31, 0x2e,0x30,0x20,0x2f,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x7a, 0x29,0x20,0x2a,0x20,0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x76, 0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f, 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72, 0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x76, 0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70, 0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x20,0x2b,0x20,0x75,0x76, 0x29,0x2e,0x78,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x76,0x65, 0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74, 0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74, 0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c, 0x20,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x35,0x2c,0x20,0x30,0x2e,0x35,0x29, 0x20,0x2a,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f, 0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x20, 0x2b,0x20,0x75,0x76,0x29,0x2e,0x78,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75, 0x72,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f, 0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x76,0x65,0x5f,0x64, 0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d, 0x70,0x6c,0x65,0x72,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x2c,0x20, 0x2d,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30, 0x5d,0x2e,0x78,0x79,0x20,0x2b,0x20,0x75,0x76,0x29,0x2e,0x78,0x29,0x20,0x2b,0x20, 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65, 0x5f,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72, 0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x76,0x65,0x63,0x32,0x28, 0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74, 0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d, 0x2e,0x78,0x79,0x20,0x2b,0x20,0x75,0x76,0x29,0x2e,0x78,0x29,0x29,0x29,0x3b,0x0a, 0x7d,0x0a,0x0a,0x00, } /* static float4 gl_Position; static float2 uv; static float2 v_texture; static float2 v_position; struct SPIRV_Cross_Input { float2 v_position : TEXCOORD0; float2 v_texture : TEXCOORD1; }; struct SPIRV_Cross_Output { float2 uv : TEXCOORD0; float4 gl_Position : SV_Position; }; void vert_main() { uv = float2(v_texture.x, 1.0f - v_texture.y); gl_Position = float4((v_position * 2.0f) - 1.0f.xx, 0.0f, 1.0f); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) { v_texture = stage_input.v_texture; v_position = stage_input.v_position; vert_main(); SPIRV_Cross_Output stage_output; stage_output.gl_Position = gl_Position; stage_output.uv = uv; return stage_output; } */ @(private="file") ve_draw_text_vs_source_hlsl4 := [724]u8 { 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c, 0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69, 0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b,0x0a,0x73,0x74,0x61, 0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x32,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a, 0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72, 0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20, 0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f, 0x6e,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f,0x74,0x65,0x78,0x74, 0x75,0x72,0x65,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b, 0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52, 0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a, 0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69, 0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e, 0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x76,0x65,0x72,0x74,0x5f, 0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20, 0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x76,0x5f,0x74,0x65,0x78,0x74,0x75, 0x72,0x65,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x76,0x5f,0x74, 0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67, 0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x34,0x28,0x28,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20, 0x2a,0x20,0x32,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x31,0x2e,0x30,0x66,0x2e,0x78, 0x78,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a, 0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f, 0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56, 0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61, 0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20, 0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x20,0x3d,0x20,0x73,0x74,0x61,0x67, 0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72, 0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f, 0x6e,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e, 0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74, 0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70, 0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d, 0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20, 0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x75, 0x76,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, 0x72,0x6e,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b, 0x0a,0x7d,0x0a,0x00, } /* cbuffer ve_draw_text_fs_params : register(b0) { float2 _32_glyph_buffer_size : packoffset(c0); float _32_over_sample : packoffset(c0.z); float4 _32_colour : packoffset(c1); }; Texture2D ve_draw_text_src_texture : register(t0); SamplerState ve_draw_text_src_sampler : register(s0); static float2 uv; static float4 frag_color; struct SPIRV_Cross_Input { float2 uv : TEXCOORD0; }; struct SPIRV_Cross_Output { float4 frag_color : SV_Target0; }; void frag_main() { frag_color = float4(_32_colour.xyz, _32_colour.w * ((1.0f / _32_over_sample) * (((ve_draw_text_src_texture.Sample(ve_draw_text_src_sampler, mad((-0.5f).xx, _32_glyph_buffer_size, uv)).x + ve_draw_text_src_texture.Sample(ve_draw_text_src_sampler, mad(float2(-0.5f, 0.5f), _32_glyph_buffer_size, uv)).x) + ve_draw_text_src_texture.Sample(ve_draw_text_src_sampler, mad(float2(0.5f, -0.5f), _32_glyph_buffer_size, uv)).x) + ve_draw_text_src_texture.Sample(ve_draw_text_src_sampler, mad(0.5f.xx, _32_glyph_buffer_size, uv)).x))); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) { uv = stage_input.uv; frag_main(); SPIRV_Cross_Output stage_output; stage_output.frag_color = frag_color; return stage_output; } */ @(private="file") ve_draw_text_fs_source_hlsl4 := [1231]u8 { 0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3a, 0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,0x29,0x0a,0x7b,0x0a, 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x33,0x32,0x5f,0x67, 0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a,0x65, 0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30, 0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x32, 0x5f,0x6f,0x76,0x65,0x72,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x20,0x3a,0x20,0x70, 0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30,0x2e,0x7a,0x29,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x33,0x32,0x5f, 0x63,0x6f,0x6c,0x6f,0x75,0x72,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66, 0x73,0x65,0x74,0x28,0x63,0x31,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x54,0x65,0x78, 0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,0x3e,0x20,0x76, 0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f, 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74, 0x65,0x72,0x28,0x74,0x30,0x29,0x3b,0x0a,0x53,0x61,0x6d,0x70,0x6c,0x65,0x72,0x53, 0x74,0x61,0x74,0x65,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x3a,0x20, 0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x73,0x30,0x29,0x3b,0x0a,0x0a,0x73, 0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b, 0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66, 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75, 0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49, 0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30, 0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49, 0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a, 0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61, 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72, 0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66, 0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20, 0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c, 0x6f,0x61,0x74,0x34,0x28,0x5f,0x33,0x32,0x5f,0x63,0x6f,0x6c,0x6f,0x75,0x72,0x2e, 0x78,0x79,0x7a,0x2c,0x20,0x5f,0x33,0x32,0x5f,0x63,0x6f,0x6c,0x6f,0x75,0x72,0x2e, 0x77,0x20,0x2a,0x20,0x28,0x28,0x31,0x2e,0x30,0x66,0x20,0x2f,0x20,0x5f,0x33,0x32, 0x5f,0x6f,0x76,0x65,0x72,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x29,0x20,0x2a,0x20, 0x28,0x28,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f, 0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x53,0x61,0x6d,0x70, 0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f, 0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x6d,0x61,0x64, 0x28,0x28,0x2d,0x30,0x2e,0x35,0x66,0x29,0x2e,0x78,0x78,0x2c,0x20,0x5f,0x33,0x32, 0x5f,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69, 0x7a,0x65,0x2c,0x20,0x75,0x76,0x29,0x29,0x2e,0x78,0x20,0x2b,0x20,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65, 0x78,0x74,0x75,0x72,0x65,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61, 0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x6d,0x61,0x64,0x28,0x66,0x6c,0x6f,0x61,0x74, 0x32,0x28,0x2d,0x30,0x2e,0x35,0x66,0x2c,0x20,0x30,0x2e,0x35,0x66,0x29,0x2c,0x20, 0x5f,0x33,0x32,0x5f,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72, 0x5f,0x73,0x69,0x7a,0x65,0x2c,0x20,0x75,0x76,0x29,0x29,0x2e,0x78,0x29,0x20,0x2b, 0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72, 0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65, 0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72, 0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x6d,0x61,0x64,0x28,0x66, 0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x35,0x66,0x2c,0x20,0x2d,0x30,0x2e,0x35, 0x66,0x29,0x2c,0x20,0x5f,0x33,0x32,0x5f,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75, 0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a,0x65,0x2c,0x20,0x75,0x76,0x29,0x29,0x2e, 0x78,0x29,0x20,0x2b,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x53,0x61, 0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x6d, 0x61,0x64,0x28,0x30,0x2e,0x35,0x66,0x2e,0x78,0x78,0x2c,0x20,0x5f,0x33,0x32,0x5f, 0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a, 0x65,0x2c,0x20,0x75,0x76,0x29,0x29,0x2e,0x78,0x29,0x29,0x29,0x3b,0x0a,0x7d,0x0a, 0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74, 0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43, 0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65, 0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76, 0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x75, 0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e, 0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72, 0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65, 0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61, 0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63, 0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f, 0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74, 0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00, } /* #include #include using namespace metal; struct main0_out { float2 uv [[user(locn0)]]; float4 gl_Position [[position]]; }; struct main0_in { float2 v_position [[attribute(0)]]; float2 v_texture [[attribute(1)]]; }; vertex main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; out.uv = float2(in.v_texture.x, 1.0 - in.v_texture.y); out.gl_Position = float4((in.v_position * 2.0) - float2(1.0), 0.0, 1.0); return out; } */ @(private="file") ve_draw_text_vs_source_metal_macos := [495]u8 { 0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f, 0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65, 0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a, 0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20, 0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d, 0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66, 0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28, 0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, 0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e, 0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d, 0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f, 0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20, 0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x61,0x74,0x74, 0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72, 0x65,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29, 0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d, 0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d, 0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61, 0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d, 0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b, 0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20, 0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x74,0x65,0x78,0x74, 0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x69,0x6e,0x2e, 0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20, 0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f, 0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x69,0x6e,0x2e,0x76, 0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29, 0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20, 0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72, 0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* #include #include using namespace metal; struct ve_draw_text_fs_params { float2 glyph_buffer_size; float over_sample; float4 colour; }; struct main0_out { float4 frag_color [[color(0)]]; }; struct main0_in { float2 uv [[user(locn0)]]; }; fragment main0_out main0(main0_in in [[stage_in]], constant ve_draw_text_fs_params& _32 [[buffer(0)]], texture2d ve_draw_text_src_texture [[texture(0)]], sampler ve_draw_text_src_sampler [[sampler(0)]]) { main0_out out = {}; out.frag_color = float4(_32.colour.xyz, _32.colour.w * ((1.0 / _32.over_sample) * (((ve_draw_text_src_texture.sample(ve_draw_text_src_sampler, fma(float2(-0.5), _32.glyph_buffer_size, in.uv)).x + ve_draw_text_src_texture.sample(ve_draw_text_src_sampler, fma(float2(-0.5, 0.5), _32.glyph_buffer_size, in.uv)).x) + ve_draw_text_src_texture.sample(ve_draw_text_src_sampler, fma(float2(0.5, -0.5), _32.glyph_buffer_size, in.uv)).x) + ve_draw_text_src_texture.sample(ve_draw_text_src_sampler, fma(float2(0.5), _32.glyph_buffer_size, in.uv)).x))); return out; } */ @(private="file") ve_draw_text_fs_source_metal_macos := [1094]u8 { 0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f, 0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65, 0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a, 0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20, 0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76, 0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f,0x70, 0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61, 0x74,0x32,0x20,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f, 0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20, 0x6f,0x76,0x65,0x72,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x75,0x72,0x3b,0x0a, 0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30, 0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63, 0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73, 0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x5b, 0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a, 0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,0x69, 0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69, 0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65, 0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20, 0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f, 0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x33,0x32,0x20,0x5b,0x5b,0x62,0x75, 0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75, 0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x76,0x65,0x5f,0x64, 0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30, 0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61, 0x6d,0x70,0x6c,0x65,0x72,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28, 0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e, 0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a, 0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c, 0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x33,0x32,0x2e, 0x63,0x6f,0x6c,0x6f,0x75,0x72,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x33,0x32,0x2e, 0x63,0x6f,0x6c,0x6f,0x75,0x72,0x2e,0x77,0x20,0x2a,0x20,0x28,0x28,0x31,0x2e,0x30, 0x20,0x2f,0x20,0x5f,0x33,0x32,0x2e,0x6f,0x76,0x65,0x72,0x5f,0x73,0x61,0x6d,0x70, 0x6c,0x65,0x29,0x20,0x2a,0x20,0x28,0x28,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77, 0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72, 0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77, 0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65, 0x72,0x2c,0x20,0x66,0x6d,0x61,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x30, 0x2e,0x35,0x29,0x2c,0x20,0x5f,0x33,0x32,0x2e,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62, 0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a,0x65,0x2c,0x20,0x69,0x6e,0x2e,0x75, 0x76,0x29,0x29,0x2e,0x78,0x20,0x2b,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65, 0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f, 0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72, 0x2c,0x20,0x66,0x6d,0x61,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x30,0x2e, 0x35,0x2c,0x20,0x30,0x2e,0x35,0x29,0x2c,0x20,0x5f,0x33,0x32,0x2e,0x67,0x6c,0x79, 0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a,0x65,0x2c,0x20, 0x69,0x6e,0x2e,0x75,0x76,0x29,0x29,0x2e,0x78,0x29,0x20,0x2b,0x20,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65, 0x78,0x74,0x75,0x72,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61, 0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x66,0x6d,0x61,0x28,0x66,0x6c,0x6f,0x61,0x74, 0x32,0x28,0x30,0x2e,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x35,0x29,0x2c,0x20,0x5f,0x33, 0x32,0x2e,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73, 0x69,0x7a,0x65,0x2c,0x20,0x69,0x6e,0x2e,0x75,0x76,0x29,0x29,0x2e,0x78,0x29,0x20, 0x2b,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73, 0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c, 0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73, 0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x66,0x6d,0x61,0x28, 0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x35,0x29,0x2c,0x20,0x5f,0x33,0x32, 0x2e,0x67,0x6c,0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69, 0x7a,0x65,0x2c,0x20,0x69,0x6e,0x2e,0x75,0x76,0x29,0x29,0x2e,0x78,0x29,0x29,0x29, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74, 0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* diagnostic(off, derivative_uniformity); var uv : vec2f; var v_texture : vec2f; var v_position : vec2f; var gl_Position : vec4f; fn main_1() { let x_16 : f32 = v_texture.x; let x_20 : f32 = v_texture.y; uv = vec2f(x_16, (1.0f - x_20)); let x_31 : vec2f = v_position; let x_35 : vec2f = ((x_31 * 2.0f) - vec2f(1.0f, 1.0f)); gl_Position = vec4f(x_35.x, x_35.y, 0.0f, 1.0f); return; } struct main_out { @location(0) uv_1 : vec2f, @builtin(position) gl_Position : vec4f, } @vertex fn main(@location(1) v_texture_param : vec2f, @location(0) v_position_param : vec2f) -> main_out { v_texture = v_texture_param; v_position = v_position_param; main_1(); return main_out(uv, gl_Position); } */ @(private="file") ve_draw_text_vs_source_wgsl := [756]u8 { 0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20, 0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f, 0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69, 0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66, 0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20, 0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x20,0x3a,0x20,0x76,0x65,0x63,0x32, 0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e, 0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65, 0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74, 0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a, 0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e, 0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31, 0x36,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x76,0x5f,0x74,0x65,0x78,0x74, 0x75,0x72,0x65,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32, 0x30,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x76,0x5f,0x74,0x65,0x78,0x74, 0x75,0x72,0x65,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x76,0x65, 0x63,0x32,0x66,0x28,0x78,0x5f,0x31,0x36,0x2c,0x20,0x28,0x31,0x2e,0x30,0x66,0x20, 0x2d,0x20,0x78,0x5f,0x32,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, 0x78,0x5f,0x33,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x76, 0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, 0x20,0x78,0x5f,0x33,0x35,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20, 0x28,0x28,0x78,0x5f,0x33,0x31,0x20,0x2a,0x20,0x32,0x2e,0x30,0x66,0x29,0x20,0x2d, 0x20,0x76,0x65,0x63,0x32,0x66,0x28,0x31,0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,0x30, 0x66,0x29,0x29,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69, 0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x78,0x5f,0x33,0x35,0x2e, 0x78,0x2c,0x20,0x78,0x5f,0x33,0x35,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c, 0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, 0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e, 0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69, 0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x75,0x76,0x5f,0x31,0x20,0x3a,0x20,0x76, 0x65,0x63,0x32,0x66,0x2c,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,0x6e, 0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,0x5f, 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66, 0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66,0x6e,0x20, 0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31, 0x29,0x20,0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x70,0x61,0x72,0x61, 0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61, 0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69, 0x6f,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66, 0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a, 0x20,0x20,0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x20,0x3d,0x20,0x76,0x5f, 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20, 0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x5f, 0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a, 0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65, 0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x75,0x76, 0x2c,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x3b,0x0a, 0x7d,0x0a,0x0a,0x00, } /* diagnostic(off, derivative_uniformity); struct ve_draw_text_fs_params { /_ @offset(0) _/ glyph_buffer_size : vec2f, /_ @offset(8) _/ over_sample : f32, /_ @offset(16) _/ colour : vec4f, } @group(1) @binding(64) var ve_draw_text_src_texture : texture_2d; @group(1) @binding(80) var ve_draw_text_src_sampler : sampler; var uv : vec2f; @group(0) @binding(8) var x_32 : ve_draw_text_fs_params; var frag_color : vec4f; fn main_1() { var alpha : f32; var texture_size : vec2f; var down_sample : f32; let x_22 : vec2f = uv; let x_24 : vec4f = textureSample(ve_draw_text_src_texture, ve_draw_text_src_sampler, x_22); alpha = x_24.x; let x_37 : vec2f = x_32.glyph_buffer_size; texture_size = x_37; let x_43 : f32 = x_32.over_sample; down_sample = (1.0f / x_43); let x_48 : vec2f = uv; let x_51 : vec2f = texture_size; let x_54 : vec4f = textureSample(ve_draw_text_src_texture, ve_draw_text_src_sampler, (x_48 + (vec2f(-0.5f, -0.5f) * x_51))); let x_56 : f32 = down_sample; let x_61 : vec2f = uv; let x_64 : vec2f = texture_size; let x_67 : vec4f = textureSample(ve_draw_text_src_texture, ve_draw_text_src_sampler, (x_61 + (vec2f(-0.5f, 0.5f) * x_64))); let x_69 : f32 = down_sample; let x_75 : vec2f = uv; let x_77 : vec2f = texture_size; let x_80 : vec4f = textureSample(ve_draw_text_src_texture, ve_draw_text_src_sampler, (x_75 + (vec2f(0.5f, -0.5f) * x_77))); let x_82 : f32 = down_sample; let x_88 : vec2f = uv; let x_90 : vec2f = texture_size; let x_93 : vec4f = textureSample(ve_draw_text_src_texture, ve_draw_text_src_sampler, (x_88 + (vec2f(0.5f, 0.5f) * x_90))); let x_95 : f32 = down_sample; alpha = ((((x_54.x * x_56) + (x_67.x * x_69)) + (x_80.x * x_82)) + (x_93.x * x_95)); let x_104 : vec4f = x_32.colour; let x_105 : vec3f = vec3f(x_104.x, x_104.y, x_104.z); let x_108 : f32 = x_32.colour.w; let x_109 : f32 = alpha; frag_color = vec4f(x_105.x, x_105.y, x_105.z, (x_108 * x_109)); return; } struct main_out { @location(0) frag_color_1 : vec4f, } @fragment fn main(@location(0) uv_param : vec2f) -> main_out { uv = uv_param; main_1(); return main_out(frag_color); } */ @(private="file") ve_draw_text_fs_source_wgsl := [2202]u8 { 0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20, 0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f, 0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20, 0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x66,0x73,0x5f, 0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x7b,0x0a,0x20,0x20,0x2f,0x2a,0x20,0x40,0x6f, 0x66,0x66,0x73,0x65,0x74,0x28,0x30,0x29,0x20,0x2a,0x2f,0x0a,0x20,0x20,0x67,0x6c, 0x79,0x70,0x68,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a,0x65,0x20, 0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x0a,0x20,0x20,0x2f,0x2a,0x20,0x40,0x6f, 0x66,0x66,0x73,0x65,0x74,0x28,0x38,0x29,0x20,0x2a,0x2f,0x0a,0x20,0x20,0x6f,0x76, 0x65,0x72,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x20,0x3a,0x20,0x66,0x33,0x32,0x2c, 0x0a,0x20,0x20,0x2f,0x2a,0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x31,0x36, 0x29,0x20,0x2a,0x2f,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x75,0x72,0x20,0x3a,0x20, 0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70, 0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x36,0x34,0x29, 0x20,0x76,0x61,0x72,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78, 0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x20,0x3a,0x20, 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b, 0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e, 0x64,0x69,0x6e,0x67,0x28,0x38,0x30,0x29,0x20,0x76,0x61,0x72,0x20,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61, 0x6d,0x70,0x6c,0x65,0x72,0x20,0x3a,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x3b, 0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75, 0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f, 0x75,0x70,0x28,0x30,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x38, 0x29,0x20,0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78, 0x5f,0x33,0x32,0x20,0x3a,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,0x0a,0x0a,0x76, 0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67, 0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a, 0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20, 0x20,0x76,0x61,0x72,0x20,0x61,0x6c,0x70,0x68,0x61,0x20,0x3a,0x20,0x66,0x33,0x32, 0x3b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f, 0x73,0x69,0x7a,0x65,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x20,0x20, 0x76,0x61,0x72,0x20,0x64,0x6f,0x77,0x6e,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x20, 0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32, 0x32,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a, 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x34,0x20,0x3a,0x20,0x76,0x65,0x63, 0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70, 0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f, 0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2c,0x20,0x76,0x65,0x5f, 0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61, 0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x78,0x5f,0x32,0x32,0x29,0x3b,0x0a,0x20,0x20, 0x61,0x6c,0x70,0x68,0x61,0x20,0x3d,0x20,0x78,0x5f,0x32,0x34,0x2e,0x78,0x3b,0x0a, 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x37,0x20,0x3a,0x20,0x76,0x65,0x63, 0x32,0x66,0x20,0x3d,0x20,0x78,0x5f,0x33,0x32,0x2e,0x67,0x6c,0x79,0x70,0x68,0x5f, 0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20,0x20,0x74, 0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x78,0x5f, 0x33,0x37,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x33,0x20,0x3a, 0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x32,0x2e,0x6f,0x76,0x65,0x72, 0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x3b,0x0a,0x20,0x20,0x64,0x6f,0x77,0x6e,0x5f, 0x73,0x61,0x6d,0x70,0x6c,0x65,0x20,0x3d,0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2f, 0x20,0x78,0x5f,0x34,0x33,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, 0x34,0x38,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b, 0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x31,0x20,0x3a,0x20,0x76,0x65, 0x63,0x32,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x73,0x69, 0x7a,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x34,0x20,0x3a, 0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65, 0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74, 0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2c, 0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72, 0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x28,0x78,0x5f,0x34,0x38, 0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x66,0x28,0x2d,0x30,0x2e,0x35,0x66,0x2c, 0x20,0x2d,0x30,0x2e,0x35,0x66,0x29,0x20,0x2a,0x20,0x78,0x5f,0x35,0x31,0x29,0x29, 0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x36,0x20,0x3a,0x20, 0x66,0x33,0x32,0x20,0x3d,0x20,0x64,0x6f,0x77,0x6e,0x5f,0x73,0x61,0x6d,0x70,0x6c, 0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x31,0x20,0x3a,0x20, 0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65, 0x74,0x20,0x78,0x5f,0x36,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d, 0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20, 0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, 0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c, 0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73, 0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2c,0x20,0x76,0x65,0x5f,0x64, 0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d, 0x70,0x6c,0x65,0x72,0x2c,0x20,0x28,0x78,0x5f,0x36,0x31,0x20,0x2b,0x20,0x28,0x76, 0x65,0x63,0x32,0x66,0x28,0x2d,0x30,0x2e,0x35,0x66,0x2c,0x20,0x30,0x2e,0x35,0x66, 0x29,0x20,0x2a,0x20,0x78,0x5f,0x36,0x34,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x6c, 0x65,0x74,0x20,0x78,0x5f,0x36,0x39,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20, 0x64,0x6f,0x77,0x6e,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x3b,0x0a,0x20,0x20,0x6c, 0x65,0x74,0x20,0x78,0x5f,0x37,0x35,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20, 0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x37,0x37, 0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75, 0x72,0x65,0x5f,0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, 0x5f,0x38,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65, 0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f,0x64, 0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x2c,0x20,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20, 0x28,0x78,0x5f,0x37,0x35,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x66,0x28,0x30, 0x2e,0x35,0x66,0x2c,0x20,0x2d,0x30,0x2e,0x35,0x66,0x29,0x20,0x2a,0x20,0x78,0x5f, 0x37,0x37,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x38, 0x32,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x64,0x6f,0x77,0x6e,0x5f,0x73, 0x61,0x6d,0x70,0x6c,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x38, 0x38,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a, 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x30,0x20,0x3a,0x20,0x76,0x65,0x63, 0x32,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x73,0x69,0x7a, 0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x33,0x20,0x3a,0x20, 0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53, 0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x72,0x63,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2c,0x20, 0x76,0x65,0x5f,0x64,0x72,0x61,0x77,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x72,0x63, 0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x2c,0x20,0x28,0x78,0x5f,0x38,0x38,0x20, 0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x66,0x28,0x30,0x2e,0x35,0x66,0x2c,0x20,0x30, 0x2e,0x35,0x66,0x29,0x20,0x2a,0x20,0x78,0x5f,0x39,0x30,0x29,0x29,0x29,0x3b,0x0a, 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x35,0x20,0x3a,0x20,0x66,0x33,0x32, 0x20,0x3d,0x20,0x64,0x6f,0x77,0x6e,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x3b,0x0a, 0x20,0x20,0x61,0x6c,0x70,0x68,0x61,0x20,0x3d,0x20,0x28,0x28,0x28,0x28,0x78,0x5f, 0x35,0x34,0x2e,0x78,0x20,0x2a,0x20,0x78,0x5f,0x35,0x36,0x29,0x20,0x2b,0x20,0x28, 0x78,0x5f,0x36,0x37,0x2e,0x78,0x20,0x2a,0x20,0x78,0x5f,0x36,0x39,0x29,0x29,0x20, 0x2b,0x20,0x28,0x78,0x5f,0x38,0x30,0x2e,0x78,0x20,0x2a,0x20,0x78,0x5f,0x38,0x32, 0x29,0x29,0x20,0x2b,0x20,0x28,0x78,0x5f,0x39,0x33,0x2e,0x78,0x20,0x2a,0x20,0x78, 0x5f,0x39,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31, 0x30,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x33, 0x32,0x2e,0x63,0x6f,0x6c,0x6f,0x75,0x72,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, 0x78,0x5f,0x31,0x30,0x35,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20, 0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x31,0x30,0x34,0x2e,0x78,0x2c,0x20,0x78, 0x5f,0x31,0x30,0x34,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x31,0x30,0x34,0x2e,0x7a,0x29, 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x30,0x38,0x20,0x3a,0x20, 0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x32,0x2e,0x63,0x6f,0x6c,0x6f,0x75, 0x72,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x30,0x39, 0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x61,0x6c,0x70,0x68,0x61,0x3b,0x0a, 0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76, 0x65,0x63,0x34,0x66,0x28,0x78,0x5f,0x31,0x30,0x35,0x2e,0x78,0x2c,0x20,0x78,0x5f, 0x31,0x30,0x35,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x31,0x30,0x35,0x2e,0x7a,0x2c,0x20, 0x28,0x78,0x5f,0x31,0x30,0x38,0x20,0x2a,0x20,0x78,0x5f,0x31,0x30,0x39,0x29,0x29, 0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73, 0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b, 0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a, 0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a, 0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x66,0x72,0x61,0x67, 0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f, 0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x75,0x76,0x5f,0x70,0x61,0x72, 0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d, 0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d, 0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69, 0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, 0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f, 0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } ve_draw_text_shader_desc :: proc (backend: sg.Backend) -> sg.Shader_Desc { desc: sg.Shader_Desc desc.label = "ve_draw_text_shader" #partial switch backend { case .GLCORE: desc.vertex_func.source = transmute(cstring)&ve_draw_text_vs_source_glsl410 desc.vertex_func.entry = "main" desc.fragment_func.source = transmute(cstring)&ve_draw_text_fs_source_glsl410 desc.fragment_func.entry = "main" desc.attrs[0].glsl_name = "v_position" desc.attrs[1].glsl_name = "v_texture" desc.uniform_blocks[0].stage = .FRAGMENT desc.uniform_blocks[0].layout = .STD140 desc.uniform_blocks[0].size = 32 desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4 desc.uniform_blocks[0].glsl_uniforms[0].array_count = 2 desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "ve_draw_text_fs_params" desc.images[0].stage = .FRAGMENT desc.images[0].multisampled = false desc.images[0].image_type = ._2D desc.images[0].sample_type = .FLOAT desc.samplers[0].stage = .FRAGMENT desc.samplers[0].sampler_type = .FILTERING desc.image_sampler_pairs[0].stage = .FRAGMENT desc.image_sampler_pairs[0].image_slot = 0 desc.image_sampler_pairs[0].sampler_slot = 0 desc.image_sampler_pairs[0].glsl_name = "ve_draw_text_src_texture_ve_draw_text_src_sampler" case .GLES3: desc.vertex_func.source = transmute(cstring)&ve_draw_text_vs_source_glsl300es desc.vertex_func.entry = "main" desc.fragment_func.source = transmute(cstring)&ve_draw_text_fs_source_glsl300es desc.fragment_func.entry = "main" desc.attrs[0].glsl_name = "v_position" desc.attrs[1].glsl_name = "v_texture" desc.uniform_blocks[0].stage = .FRAGMENT desc.uniform_blocks[0].layout = .STD140 desc.uniform_blocks[0].size = 32 desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4 desc.uniform_blocks[0].glsl_uniforms[0].array_count = 2 desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "ve_draw_text_fs_params" desc.images[0].stage = .FRAGMENT desc.images[0].multisampled = false desc.images[0].image_type = ._2D desc.images[0].sample_type = .FLOAT desc.samplers[0].stage = .FRAGMENT desc.samplers[0].sampler_type = .FILTERING desc.image_sampler_pairs[0].stage = .FRAGMENT desc.image_sampler_pairs[0].image_slot = 0 desc.image_sampler_pairs[0].sampler_slot = 0 desc.image_sampler_pairs[0].glsl_name = "ve_draw_text_src_texture_ve_draw_text_src_sampler" case .D3D11: desc.vertex_func.source = transmute(cstring)&ve_draw_text_vs_source_hlsl4 desc.vertex_func.d3d11_target = "vs_4_0" desc.vertex_func.entry = "main" desc.fragment_func.source = transmute(cstring)&ve_draw_text_fs_source_hlsl4 desc.fragment_func.d3d11_target = "ps_4_0" desc.fragment_func.entry = "main" desc.attrs[0].hlsl_sem_name = "TEXCOORD" desc.attrs[0].hlsl_sem_index = 0 desc.attrs[1].hlsl_sem_name = "TEXCOORD" desc.attrs[1].hlsl_sem_index = 1 desc.uniform_blocks[0].stage = .FRAGMENT desc.uniform_blocks[0].layout = .STD140 desc.uniform_blocks[0].size = 32 desc.uniform_blocks[0].hlsl_register_b_n = 0 desc.images[0].stage = .FRAGMENT desc.images[0].multisampled = false desc.images[0].image_type = ._2D desc.images[0].sample_type = .FLOAT desc.images[0].hlsl_register_t_n = 0 desc.samplers[0].stage = .FRAGMENT desc.samplers[0].sampler_type = .FILTERING desc.samplers[0].hlsl_register_s_n = 0 desc.image_sampler_pairs[0].stage = .FRAGMENT desc.image_sampler_pairs[0].image_slot = 0 desc.image_sampler_pairs[0].sampler_slot = 0 case .METAL_MACOS: desc.vertex_func.source = transmute(cstring)&ve_draw_text_vs_source_metal_macos desc.vertex_func.entry = "main0" desc.fragment_func.source = transmute(cstring)&ve_draw_text_fs_source_metal_macos desc.fragment_func.entry = "main0" desc.uniform_blocks[0].stage = .FRAGMENT desc.uniform_blocks[0].layout = .STD140 desc.uniform_blocks[0].size = 32 desc.uniform_blocks[0].msl_buffer_n = 0 desc.images[0].stage = .FRAGMENT desc.images[0].multisampled = false desc.images[0].image_type = ._2D desc.images[0].sample_type = .FLOAT desc.images[0].msl_texture_n = 0 desc.samplers[0].stage = .FRAGMENT desc.samplers[0].sampler_type = .FILTERING desc.samplers[0].msl_sampler_n = 0 desc.image_sampler_pairs[0].stage = .FRAGMENT desc.image_sampler_pairs[0].image_slot = 0 desc.image_sampler_pairs[0].sampler_slot = 0 case .WGPU: desc.vertex_func.source = transmute(cstring)&ve_draw_text_vs_source_wgsl desc.vertex_func.entry = "main" desc.fragment_func.source = transmute(cstring)&ve_draw_text_fs_source_wgsl desc.fragment_func.entry = "main" desc.uniform_blocks[0].stage = .FRAGMENT desc.uniform_blocks[0].layout = .STD140 desc.uniform_blocks[0].size = 32 desc.uniform_blocks[0].wgsl_group0_binding_n = 8 desc.images[0].stage = .FRAGMENT desc.images[0].multisampled = false desc.images[0].image_type = ._2D desc.images[0].sample_type = .FLOAT desc.images[0].wgsl_group1_binding_n = 64 desc.samplers[0].stage = .FRAGMENT desc.samplers[0].sampler_type = .FILTERING desc.samplers[0].wgsl_group1_binding_n = 80 desc.image_sampler_pairs[0].stage = .FRAGMENT desc.image_sampler_pairs[0].image_slot = 0 desc.image_sampler_pairs[0].sampler_slot = 0 } return desc }