#pragma once /* #version:1# (machine generated, don't edit!) Generated by sokol-shdc (https://github.com/floooh/sokol-tools) Cmdline: sokol-shdc --input E:/box/box3d/samples/shaders/overlays/world_text.glsl --output E:/box/box3d/samples/shaders/generated/world_text.glsl.h --slang hlsl5:metal_macos:glsl430 Overview: ========= Shader program: 'prog': Get shader desc: world_text_prog_shader_desc(sg_query_backend()); Vertex Shader: vs Fragment Shader: fs Attributes: Bindings: Uniform block 'ub_frame': C struct: world_text_ub_frame_t Bind slot: UB_world_text_ub_frame => 0 Uniform block 'ub_text_style': C struct: world_text_ub_text_style_t Bind slot: UB_world_text_ub_text_style => 1 Storage buffer 'glyph_instances': C struct: world_text_glyph_instance_t Bind slot: VIEW_world_text_glyph_instances => 0 Readonly: true Texture 'tex_sdf': Image type: SG_IMAGETYPE_2D Sample type: SG_IMAGESAMPLETYPE_FLOAT Multisampled: false Bind slot: VIEW_world_text_tex_sdf => 1 Sampler 'smp_sdf': Type: SG_SAMPLERTYPE_FILTERING Bind slot: SMP_world_text_smp_sdf => 0 */ #if !defined(SOKOL_GFX_INCLUDED) #error "Please include sokol_gfx.h before world_text.glsl.h" #endif #if !defined(SOKOL_SHDC_ALIGN) #if defined(_MSC_VER) #define SOKOL_SHDC_ALIGN(a) __declspec(align(a)) #else #define SOKOL_SHDC_ALIGN(a) __attribute__((aligned(a))) #endif #endif #define UB_world_text_ub_frame (0) #define UB_world_text_ub_text_style (1) #define VIEW_world_text_glyph_instances (0) #define VIEW_world_text_tex_sdf (1) #define SMP_world_text_smp_sdf (0) #pragma pack(push,1) SOKOL_SHDC_ALIGN(16) typedef struct world_text_ub_frame_t { Mat4 view; Mat4 proj; Mat4 view_proj; Mat4 inv_view_proj; Vec4 camera_pos; Vec4 viewport; } world_text_ub_frame_t; #pragma pack(pop) #pragma pack(push,1) SOKOL_SHDC_ALIGN(16) typedef struct world_text_ub_text_style_t { Vec4 style_params; Vec4 halo_params; } world_text_ub_text_style_t; #pragma pack(pop) #pragma pack(push,1) SOKOL_SHDC_ALIGN(16) typedef struct world_text_glyph_instance_t { Vec4 anchor; Vec4 rect; Vec4 uv; Vec4 color; } world_text_glyph_instance_t; #pragma pack(pop) /* #version 430 struct glyph_instance { vec4 anchor; vec4 rect; vec4 uv; vec4 color; }; layout(binding = 0, std430) readonly buffer glyph_instances { glyph_instance instances[]; } _15; uniform vec4 ub_frame[18]; layout(location = 0) out vec2 v_uv; layout(location = 1) flat out vec4 v_color; void main() { bool _46 = gl_VertexID == 2; bool _50 = gl_VertexID == 4; vec2 _75 = (vec2((((gl_VertexID == 1) || _46) || _50) ? 1.0 : (-1.0), ((_46 || _50) || (gl_VertexID == 5)) ? 1.0 : (-1.0)) * 0.5) + vec2(0.5); vec4 _92 = mat4(ub_frame[8], ub_frame[9], ub_frame[10], ub_frame[11]) * vec4(_15.instances[gl_InstanceID].anchor.xyz, 1.0); float _99 = _92.w; vec2 _123 = _15.instances[gl_InstanceID].rect.xy + (_75 * _15.instances[gl_InstanceID].rect.zw); gl_Position = vec4(((((floor(((((_92.xy / vec2(_99)) * 0.5) + vec2(0.5)) * ub_frame[17].xy) + vec2(0.5)) + vec2(_123.x, -_123.y)) * ub_frame[17].zw) * 2.0) - vec2(1.0)) * _99, _92.z, _99); v_uv = mix(_15.instances[gl_InstanceID].uv.xy, _15.instances[gl_InstanceID].uv.zw, _75); v_color = _15.instances[gl_InstanceID].color; } */ static const uint8_t world_text_vs_source_glsl430[1132] = { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x73,0x74, 0x72,0x75,0x63,0x74,0x20,0x67,0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73,0x74,0x61, 0x6e,0x63,0x65,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x61, 0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20, 0x72,0x65,0x63,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x75, 0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f, 0x72,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69, 0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x30,0x2c,0x20,0x73,0x74,0x64,0x34,0x33, 0x30,0x29,0x20,0x72,0x65,0x61,0x64,0x6f,0x6e,0x6c,0x79,0x20,0x62,0x75,0x66,0x66, 0x65,0x72,0x20,0x67,0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63, 0x65,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x79,0x70,0x68,0x5f,0x69, 0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65, 0x73,0x5b,0x5d,0x3b,0x0a,0x7d,0x20,0x5f,0x31,0x35,0x3b,0x0a,0x0a,0x75,0x6e,0x69, 0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x75,0x62,0x5f,0x66,0x72,0x61, 0x6d,0x65,0x5b,0x31,0x38,0x5d,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,0x32,0x20,0x76,0x5f,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,0x66,0x6c,0x61,0x74,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x76, 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,0x62,0x6f,0x6f,0x6c,0x20, 0x5f,0x34,0x36,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49, 0x44,0x20,0x3d,0x3d,0x20,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c, 0x20,0x5f,0x35,0x30,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78, 0x49,0x44,0x20,0x3d,0x3d,0x20,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63, 0x32,0x20,0x5f,0x37,0x35,0x20,0x3d,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x28,0x28, 0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x20,0x3d,0x3d,0x20, 0x31,0x29,0x20,0x7c,0x7c,0x20,0x5f,0x34,0x36,0x29,0x20,0x7c,0x7c,0x20,0x5f,0x35, 0x30,0x29,0x20,0x3f,0x20,0x31,0x2e,0x30,0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,0x30, 0x29,0x2c,0x20,0x28,0x28,0x5f,0x34,0x36,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x30,0x29, 0x20,0x7c,0x7c,0x20,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44, 0x20,0x3d,0x3d,0x20,0x35,0x29,0x29,0x20,0x3f,0x20,0x31,0x2e,0x30,0x20,0x3a,0x20, 0x28,0x2d,0x31,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2b, 0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x76,0x65,0x63,0x34,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28, 0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x38,0x5d,0x2c,0x20,0x75,0x62,0x5f, 0x66,0x72,0x61,0x6d,0x65,0x5b,0x39,0x5d,0x2c,0x20,0x75,0x62,0x5f,0x66,0x72,0x61, 0x6d,0x65,0x5b,0x31,0x30,0x5d,0x2c,0x20,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65, 0x5b,0x31,0x31,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x35, 0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x67,0x6c,0x5f,0x49,0x6e, 0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x5d,0x2e,0x61,0x6e,0x63,0x68,0x6f,0x72, 0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x39,0x20,0x3d,0x20,0x5f,0x39,0x32,0x2e, 0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x32,0x33, 0x20,0x3d,0x20,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73, 0x5b,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x5d,0x2e, 0x72,0x65,0x63,0x74,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,0x5f,0x37,0x35,0x20,0x2a, 0x20,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x67, 0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x5d,0x2e,0x72,0x65, 0x63,0x74,0x2e,0x7a,0x77,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, 0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x28,0x28,0x28,0x5f,0x39,0x32, 0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x39,0x39,0x29,0x29, 0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x30, 0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b, 0x31,0x37,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x30, 0x2e,0x35,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x31,0x32,0x33, 0x2e,0x78,0x2c,0x20,0x2d,0x5f,0x31,0x32,0x33,0x2e,0x79,0x29,0x29,0x20,0x2a,0x20, 0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x31,0x37,0x5d,0x2e,0x7a,0x77,0x29, 0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31, 0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x5f,0x39,0x39,0x2c,0x20,0x5f,0x39,0x32,0x2e, 0x7a,0x2c,0x20,0x5f,0x39,0x39,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x75, 0x76,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73,0x74, 0x61,0x6e,0x63,0x65,0x73,0x5b,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63, 0x65,0x49,0x44,0x5d,0x2e,0x75,0x76,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31,0x35,0x2e, 0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x67,0x6c,0x5f,0x49,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x5d,0x2e,0x75,0x76,0x2e,0x7a,0x77,0x2c,0x20, 0x5f,0x37,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f, 0x72,0x20,0x3d,0x20,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65, 0x73,0x5b,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x5d, 0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; /* #version 430 uniform vec4 ub_text_style[2]; layout(binding = 0) uniform sampler2D tex_sdf_smp_sdf; layout(location = 0) in vec2 v_uv; layout(location = 1) flat in vec4 v_color; layout(location = 0) out vec4 out_color; void main() { vec4 _24 = texture(tex_sdf_smp_sdf, v_uv); float _51 = _24.x * v_color.w; float _68 = (1.0 - smoothstep(0.0, ub_text_style[0].x * ub_text_style[0].z, -(_24.y - ub_text_style[0].y))) * ub_text_style[1].w; float _73 = 1.0 - _51; out_color = vec4((v_color.xyz * _51) + ((ub_text_style[1].xyz * _68) * _73), _51 + (_68 * _73)); } */ static const uint8_t world_text_fs_source_glsl430[583] = { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e, 0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x75,0x62,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x74,0x79,0x6c,0x65,0x5b,0x32,0x5d,0x3b,0x0a,0x6c,0x61,0x79, 0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x30,0x29, 0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72, 0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x64,0x66,0x5f,0x73,0x6d,0x70,0x5f,0x73, 0x64,0x66,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,0x76,0x5f,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,0x66,0x6c,0x61, 0x74,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f, 0x72,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,0x6f,0x75,0x74,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,0x76, 0x65,0x63,0x34,0x20,0x5f,0x32,0x34,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72, 0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x64,0x66,0x5f,0x73,0x6d,0x70,0x5f,0x73,0x64, 0x66,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, 0x6f,0x61,0x74,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x5f,0x32,0x34,0x2e,0x78,0x20, 0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20,0x28,0x31,0x2e, 0x30,0x20,0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30, 0x2e,0x30,0x2c,0x20,0x75,0x62,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x74,0x79,0x6c, 0x65,0x5b,0x30,0x5d,0x2e,0x78,0x20,0x2a,0x20,0x75,0x62,0x5f,0x74,0x65,0x78,0x74, 0x5f,0x73,0x74,0x79,0x6c,0x65,0x5b,0x30,0x5d,0x2e,0x7a,0x2c,0x20,0x2d,0x28,0x5f, 0x32,0x34,0x2e,0x79,0x20,0x2d,0x20,0x75,0x62,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73, 0x74,0x79,0x6c,0x65,0x5b,0x30,0x5d,0x2e,0x79,0x29,0x29,0x29,0x20,0x2a,0x20,0x75, 0x62,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x74,0x79,0x6c,0x65,0x5b,0x31,0x5d,0x2e, 0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x33, 0x20,0x3d,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20, 0x20,0x20,0x6f,0x75,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65, 0x63,0x34,0x28,0x28,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x20, 0x2a,0x20,0x5f,0x35,0x31,0x29,0x20,0x2b,0x20,0x28,0x28,0x75,0x62,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x74,0x79,0x6c,0x65,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x20, 0x2a,0x20,0x5f,0x36,0x38,0x29,0x20,0x2a,0x20,0x5f,0x37,0x33,0x29,0x2c,0x20,0x5f, 0x35,0x31,0x20,0x2b,0x20,0x28,0x5f,0x36,0x38,0x20,0x2a,0x20,0x5f,0x37,0x33,0x29, 0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; /* struct glyph_instance { float4 anchor; float4 rect; float4 uv; float4 color; }; ByteAddressBuffer _15 : register(t0); cbuffer ub_frame : register(b0) { row_major float4x4 _80_view : packoffset(c0); row_major float4x4 _80_proj : packoffset(c4); row_major float4x4 _80_view_proj : packoffset(c8); row_major float4x4 _80_inv_view_proj : packoffset(c12); float4 _80_camera_pos : packoffset(c16); float4 _80_viewport : packoffset(c17); }; static float4 gl_Position; static int gl_VertexIndex; static int gl_InstanceIndex; static float2 v_uv; static float4 v_color; struct SPIRV_Cross_Input { uint gl_VertexIndex : SV_VertexID; uint gl_InstanceIndex : SV_InstanceID; }; struct SPIRV_Cross_Output { float2 v_uv : TEXCOORD0; nointerpolation float4 v_color : TEXCOORD1; float4 gl_Position : SV_Position; }; void vert_main() { glyph_instance _23; _23.anchor = asfloat(_15.Load4(gl_InstanceIndex * 64 + 0)); _23.rect = asfloat(_15.Load4(gl_InstanceIndex * 64 + 16)); _23.uv = asfloat(_15.Load4(gl_InstanceIndex * 64 + 32)); _23.color = asfloat(_15.Load4(gl_InstanceIndex * 64 + 48)); bool _46 = gl_VertexIndex == 2; bool _50 = gl_VertexIndex == 4; float2 _75 = (float2((((gl_VertexIndex == 1) || _46) || _50) ? 1.0f : (-1.0f), ((_46 || _50) || (gl_VertexIndex == 5)) ? 1.0f : (-1.0f)) * 0.5f) + 0.5f.xx; float4 _92 = mul(float4(_23.anchor.xyz, 1.0f), _80_view_proj); float _99 = _92.w; float2 _123 = _23.rect.xy + (_75 * _23.rect.zw); gl_Position = float4(((((floor(((((_92.xy / _99.xx) * 0.5f) + 0.5f.xx) * _80_viewport.xy) + 0.5f.xx) + float2(_123.x, -_123.y)) * _80_viewport.zw) * 2.0f) - 1.0f.xx) * _99, _92.z, _99); v_uv = lerp(_23.uv.xy, _23.uv.zw, _75); v_color = _23.color; } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) { gl_VertexIndex = int(stage_input.gl_VertexIndex); gl_InstanceIndex = int(stage_input.gl_InstanceIndex); vert_main(); SPIRV_Cross_Output stage_output; stage_output.gl_Position = gl_Position; stage_output.v_uv = v_uv; stage_output.v_color = v_color; return stage_output; } */ static const uint8_t world_text_vs_source_hlsl5[2157] = { 0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x67,0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61, 0x74,0x34,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, 0x6c,0x6f,0x61,0x74,0x34,0x20,0x72,0x65,0x63,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, 0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x3b,0x0a, 0x0a,0x42,0x79,0x74,0x65,0x41,0x64,0x64,0x72,0x65,0x73,0x73,0x42,0x75,0x66,0x66, 0x65,0x72,0x20,0x5f,0x31,0x35,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65, 0x72,0x28,0x74,0x30,0x29,0x3b,0x0a,0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x75, 0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74, 0x65,0x72,0x28,0x62,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,0x77, 0x5f,0x6d,0x61,0x6a,0x6f,0x72,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20, 0x5f,0x38,0x30,0x5f,0x76,0x69,0x65,0x77,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f, 0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72, 0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78, 0x34,0x20,0x5f,0x38,0x30,0x5f,0x70,0x72,0x6f,0x6a,0x20,0x3a,0x20,0x70,0x61,0x63, 0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x34,0x78,0x34,0x20,0x5f,0x38,0x30,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f, 0x6a,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63, 0x38,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f, 0x72,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x5f,0x38,0x30,0x5f,0x69, 0x6e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20,0x3a,0x20,0x70, 0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x31,0x32,0x29,0x3b,0x0a, 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x38,0x30,0x5f,0x63, 0x61,0x6d,0x65,0x72,0x61,0x5f,0x70,0x6f,0x73,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b, 0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x31,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x38,0x30,0x5f,0x76,0x69,0x65,0x77, 0x70,0x6f,0x72,0x74,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65, 0x74,0x28,0x63,0x31,0x37,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,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,0x69, 0x6e,0x74,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65, 0x78,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x74,0x20,0x67,0x6c, 0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x3b,0x0a, 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f, 0x75,0x76,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x34,0x20,0x76,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,0x75,0x69,0x6e,0x74,0x20, 0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x3a, 0x20,0x53,0x56,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,0x20,0x20, 0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e, 0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x3a,0x20,0x53,0x56,0x5f,0x49,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x49,0x44,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,0x76,0x5f,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f, 0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x69,0x6e,0x74,0x65, 0x72,0x70,0x6f,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34, 0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f, 0x4f,0x52,0x44,0x31,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,0x67,0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x20,0x5f,0x32,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f, 0x32,0x33,0x2e,0x61,0x6e,0x63,0x68,0x6f,0x72,0x20,0x3d,0x20,0x61,0x73,0x66,0x6c, 0x6f,0x61,0x74,0x28,0x5f,0x31,0x35,0x2e,0x4c,0x6f,0x61,0x64,0x34,0x28,0x67,0x6c, 0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x2a, 0x20,0x36,0x34,0x20,0x2b,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f, 0x32,0x33,0x2e,0x72,0x65,0x63,0x74,0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61, 0x74,0x28,0x5f,0x31,0x35,0x2e,0x4c,0x6f,0x61,0x64,0x34,0x28,0x67,0x6c,0x5f,0x49, 0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x2a,0x20,0x36, 0x34,0x20,0x2b,0x20,0x31,0x36,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x32, 0x33,0x2e,0x75,0x76,0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f, 0x31,0x35,0x2e,0x4c,0x6f,0x61,0x64,0x34,0x28,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74, 0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x2a,0x20,0x36,0x34,0x20,0x2b, 0x20,0x33,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x32,0x33,0x2e,0x63, 0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f, 0x31,0x35,0x2e,0x4c,0x6f,0x61,0x64,0x34,0x28,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74, 0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x2a,0x20,0x36,0x34,0x20,0x2b, 0x20,0x34,0x38,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20, 0x5f,0x34,0x36,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49, 0x6e,0x64,0x65,0x78,0x20,0x3d,0x3d,0x20,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62, 0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x30,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72, 0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x3d,0x3d,0x20,0x34,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x37,0x35,0x20,0x3d,0x20, 0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x28,0x28,0x28,0x67,0x6c,0x5f,0x56,0x65, 0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x3d,0x3d,0x20,0x31,0x29,0x20, 0x7c,0x7c,0x20,0x5f,0x34,0x36,0x29,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x30,0x29,0x20, 0x3f,0x20,0x31,0x2e,0x30,0x66,0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,0x30,0x66,0x29, 0x2c,0x20,0x28,0x28,0x5f,0x34,0x36,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x30,0x29,0x20, 0x7c,0x7c,0x20,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64, 0x65,0x78,0x20,0x3d,0x3d,0x20,0x35,0x29,0x29,0x20,0x3f,0x20,0x31,0x2e,0x30,0x66, 0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,0x30,0x66,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e, 0x35,0x66,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x66,0x2e,0x78,0x78,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20, 0x6d,0x75,0x6c,0x28,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x32,0x33,0x2e,0x61, 0x6e,0x63,0x68,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29, 0x2c,0x20,0x5f,0x38,0x30,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x29, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x39,0x20, 0x3d,0x20,0x5f,0x39,0x32,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x32,0x20,0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x5f,0x32,0x33,0x2e,0x72, 0x65,0x63,0x74,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,0x5f,0x37,0x35,0x20,0x2a,0x20, 0x5f,0x32,0x33,0x2e,0x72,0x65,0x63,0x74,0x2e,0x7a,0x77,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,0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72, 0x28,0x28,0x28,0x28,0x28,0x5f,0x39,0x32,0x2e,0x78,0x79,0x20,0x2f,0x20,0x5f,0x39, 0x39,0x2e,0x78,0x78,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x66,0x29,0x20,0x2b,0x20, 0x30,0x2e,0x35,0x66,0x2e,0x78,0x78,0x29,0x20,0x2a,0x20,0x5f,0x38,0x30,0x5f,0x76, 0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x2e,0x78,0x79,0x29,0x20,0x2b,0x20,0x30,0x2e, 0x35,0x66,0x2e,0x78,0x78,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28, 0x5f,0x31,0x32,0x33,0x2e,0x78,0x2c,0x20,0x2d,0x5f,0x31,0x32,0x33,0x2e,0x79,0x29, 0x29,0x20,0x2a,0x20,0x5f,0x38,0x30,0x5f,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74, 0x2e,0x7a,0x77,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x31, 0x2e,0x30,0x66,0x2e,0x78,0x78,0x29,0x20,0x2a,0x20,0x5f,0x39,0x39,0x2c,0x20,0x5f, 0x39,0x32,0x2e,0x7a,0x2c,0x20,0x5f,0x39,0x39,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x6c,0x65,0x72,0x70,0x28,0x5f,0x32,0x33,0x2e, 0x75,0x76,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x32,0x33,0x2e,0x75,0x76,0x2e,0x7a,0x77, 0x2c,0x20,0x5f,0x37,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6f, 0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x32,0x33,0x2e,0x63,0x6f,0x6c,0x6f,0x72,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,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20, 0x3d,0x20,0x69,0x6e,0x74,0x28,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75, 0x74,0x2e,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78, 0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e, 0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x73,0x74, 0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x49,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x29,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, 0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x76,0x5f,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x76,0x5f, 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,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, }; /* cbuffer ub_text_style : register(b1) { float4 _34_style_params : packoffset(c0); float4 _34_halo_params : packoffset(c1); }; Texture2D tex_sdf : register(t0); SamplerState smp_sdf : register(s0); static float2 v_uv; static float4 v_color; static float4 out_color; struct SPIRV_Cross_Input { float2 v_uv : TEXCOORD0; nointerpolation float4 v_color : TEXCOORD1; }; struct SPIRV_Cross_Output { float4 out_color : SV_Target0; }; void frag_main() { float4 _24 = tex_sdf.Sample(smp_sdf, v_uv); float _51 = _24.x * v_color.w; float _68 = (1.0f - smoothstep(0.0f, _34_style_params.x * _34_style_params.z, -(_24.y - _34_style_params.y))) * _34_halo_params.w; float _73 = 1.0f - _51; out_color = float4((v_color.xyz * _51) + ((_34_halo_params.xyz * _68) * _73), _51 + (_68 * _73)); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) { v_uv = stage_input.v_uv; v_color = stage_input.v_color; frag_main(); SPIRV_Cross_Output stage_output; stage_output.out_color = out_color; return stage_output; } */ static const uint8_t world_text_fs_source_hlsl5[1071] = { 0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x75,0x62,0x5f,0x74,0x65,0x78,0x74,0x5f, 0x73,0x74,0x79,0x6c,0x65,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72, 0x28,0x62,0x31,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x34,0x20,0x5f,0x33,0x34,0x5f,0x73,0x74,0x79,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61, 0x6d,0x73,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,0x34,0x20, 0x5f,0x33,0x34,0x5f,0x68,0x61,0x6c,0x6f,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,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,0x74,0x65,0x78,0x5f,0x73,0x64,0x66,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,0x73,0x6d,0x70, 0x5f,0x73,0x64,0x66,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,0x76,0x5f,0x75,0x76,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63, 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b, 0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6f, 0x75,0x74,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,0x76,0x5f,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44, 0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x69,0x6e,0x74,0x65,0x72,0x70,0x6f, 0x6c,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x76,0x5f, 0x63,0x6f,0x6c,0x6f,0x72,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,0x34,0x20,0x6f,0x75, 0x74,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,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x32,0x34,0x20,0x3d,0x20,0x74,0x65, 0x78,0x5f,0x73,0x64,0x66,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70, 0x5f,0x73,0x64,0x66,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20, 0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x5f,0x32,0x34, 0x2e,0x78,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x3b,0x0a, 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20, 0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74, 0x65,0x70,0x28,0x30,0x2e,0x30,0x66,0x2c,0x20,0x5f,0x33,0x34,0x5f,0x73,0x74,0x79, 0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x2e,0x78,0x20,0x2a,0x20,0x5f,0x33, 0x34,0x5f,0x73,0x74,0x79,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x2e,0x7a, 0x2c,0x20,0x2d,0x28,0x5f,0x32,0x34,0x2e,0x79,0x20,0x2d,0x20,0x5f,0x33,0x34,0x5f, 0x73,0x74,0x79,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x2e,0x79,0x29,0x29, 0x29,0x20,0x2a,0x20,0x5f,0x33,0x34,0x5f,0x68,0x61,0x6c,0x6f,0x5f,0x70,0x61,0x72, 0x61,0x6d,0x73,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x20,0x5f,0x37,0x33,0x20,0x3d,0x20,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x5f,0x35, 0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72, 0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x76,0x5f,0x63,0x6f,0x6c, 0x6f,0x72,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x35,0x31,0x29,0x20,0x2b,0x20, 0x28,0x28,0x5f,0x33,0x34,0x5f,0x68,0x61,0x6c,0x6f,0x5f,0x70,0x61,0x72,0x61,0x6d, 0x73,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x20,0x2a,0x20,0x5f, 0x37,0x33,0x29,0x2c,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x5f,0x36,0x38,0x20, 0x2a,0x20,0x5f,0x37,0x33,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,0x76,0x5f,0x75,0x76,0x20,0x3d,0x20, 0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x76,0x5f,0x75,0x76, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20, 0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x76,0x5f,0x63,0x6f, 0x6c,0x6f,0x72,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,0x6f,0x75,0x74,0x5f, 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x6f,0x75,0x74,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 glyph_instance { float4 anchor; float4 rect; float4 uv; float4 color; }; struct glyph_instances { glyph_instance instances[1]; }; struct ub_frame { float4x4 view; float4x4 proj; float4x4 view_proj; float4x4 inv_view_proj; float4 camera_pos; float4 viewport; }; struct main0_out { float2 v_uv [[user(locn0)]]; float4 v_color [[user(locn1)]]; float4 gl_Position [[position]]; }; vertex main0_out main0(constant ub_frame& _80 [[buffer(0)]], const device glyph_instances& _15 [[buffer(8)]], uint gl_InstanceIndex [[instance_id]], uint gl_VertexIndex [[vertex_id]]) { main0_out out = {}; bool _46 = int(gl_VertexIndex) == 2; bool _50 = int(gl_VertexIndex) == 4; float2 _75 = (float2((((int(gl_VertexIndex) == 1) || _46) || _50) ? 1.0 : (-1.0), ((_46 || _50) || (int(gl_VertexIndex) == 5)) ? 1.0 : (-1.0)) * 0.5) + float2(0.5); float4 _92 = _80.view_proj * float4(_15.instances[int(gl_InstanceIndex)].anchor.xyz, 1.0); float _99 = _92.w; float2 _123 = _15.instances[int(gl_InstanceIndex)].rect.xy + (_75 * _15.instances[int(gl_InstanceIndex)].rect.zw); out.gl_Position = float4(((((floor(((((_92.xy / float2(_99)) * 0.5) + float2(0.5)) * _80.viewport.xy) + float2(0.5)) + float2(_123.x, -_123.y)) * _80.viewport.zw) * 2.0) - float2(1.0)) * _99, _92.z, _99); out.v_uv = mix(_15.instances[int(gl_InstanceIndex)].uv.xy, _15.instances[int(gl_InstanceIndex)].uv.zw, _75); out.v_color = _15.instances[int(gl_InstanceIndex)].color; return out; } */ static const uint8_t world_text_vs_source_metal_macos[1618] = { 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,0x67, 0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x0a,0x7b,0x0a, 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x61,0x6e,0x63,0x68,0x6f, 0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x72,0x65, 0x63,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x75, 0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f, 0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20, 0x67,0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x0a, 0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x79,0x70,0x68,0x5f,0x69,0x6e,0x73,0x74, 0x61,0x6e,0x63,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x31, 0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x75,0x62, 0x5f,0x66,0x72,0x61,0x6d,0x65,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x34,0x78,0x34,0x20,0x76,0x69,0x65,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20, 0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x70,0x72,0x6f,0x6a,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x76,0x69,0x65,0x77, 0x5f,0x70,0x72,0x6f,0x6a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x34,0x78,0x34,0x20,0x69,0x6e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f, 0x6a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x61, 0x6d,0x65,0x72,0x61,0x5f,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, 0x6f,0x61,0x74,0x34,0x20,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,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,0x32, 0x20,0x76,0x5f,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,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72, 0x28,0x6c,0x6f,0x63,0x6e,0x31,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,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30, 0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x63,0x6f,0x6e,0x73,0x74, 0x61,0x6e,0x74,0x20,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x26,0x20,0x5f,0x38, 0x30,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c, 0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x67,0x6c, 0x79,0x70,0x68,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x26,0x20,0x5f, 0x31,0x35,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x38,0x29,0x5d,0x5d, 0x2c,0x20,0x75,0x69,0x6e,0x74,0x20,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e, 0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x5b,0x5b,0x69,0x6e,0x73,0x74,0x61,0x6e, 0x63,0x65,0x5f,0x69,0x64,0x5d,0x5d,0x2c,0x20,0x75,0x69,0x6e,0x74,0x20,0x67,0x6c, 0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x5b,0x5b,0x76, 0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x64,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,0x62,0x6f,0x6f,0x6c,0x20,0x5f, 0x34,0x36,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74, 0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x29,0x20,0x3d,0x3d,0x20,0x32,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x30,0x20,0x3d,0x20,0x69,0x6e, 0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78, 0x29,0x20,0x3d,0x3d,0x20,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61, 0x74,0x32,0x20,0x5f,0x37,0x35,0x20,0x3d,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32, 0x28,0x28,0x28,0x28,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65, 0x78,0x49,0x6e,0x64,0x65,0x78,0x29,0x20,0x3d,0x3d,0x20,0x31,0x29,0x20,0x7c,0x7c, 0x20,0x5f,0x34,0x36,0x29,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x30,0x29,0x20,0x3f,0x20, 0x31,0x2e,0x30,0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,0x30,0x29,0x2c,0x20,0x28,0x28, 0x5f,0x34,0x36,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x30,0x29,0x20,0x7c,0x7c,0x20,0x28, 0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64, 0x65,0x78,0x29,0x20,0x3d,0x3d,0x20,0x35,0x29,0x29,0x20,0x3f,0x20,0x31,0x2e,0x30, 0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35, 0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x39,0x32,0x20, 0x3d,0x20,0x5f,0x38,0x30,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20, 0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x49,0x6e, 0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x29,0x5d,0x2e,0x61,0x6e, 0x63,0x68,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a, 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x39,0x20,0x3d,0x20, 0x5f,0x39,0x32,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, 0x32,0x20,0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73, 0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x49,0x6e, 0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x29,0x5d,0x2e,0x72,0x65, 0x63,0x74,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,0x5f,0x37,0x35,0x20,0x2a,0x20,0x5f, 0x31,0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x69,0x6e,0x74, 0x28,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65, 0x78,0x29,0x5d,0x2e,0x72,0x65,0x63,0x74,0x2e,0x7a,0x77,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,0x28,0x28,0x28,0x66, 0x6c,0x6f,0x6f,0x72,0x28,0x28,0x28,0x28,0x28,0x5f,0x39,0x32,0x2e,0x78,0x79,0x20, 0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x39,0x39,0x29,0x29,0x20,0x2a, 0x20,0x30,0x2e,0x35,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30, 0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x5f,0x38,0x30,0x2e,0x76,0x69,0x65,0x77,0x70, 0x6f,0x72,0x74,0x2e,0x78,0x79,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32, 0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28, 0x5f,0x31,0x32,0x33,0x2e,0x78,0x2c,0x20,0x2d,0x5f,0x31,0x32,0x33,0x2e,0x79,0x29, 0x29,0x20,0x2a,0x20,0x5f,0x38,0x30,0x2e,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74, 0x2e,0x7a,0x77,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c, 0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x5f,0x39,0x39, 0x2c,0x20,0x5f,0x39,0x32,0x2e,0x7a,0x2c,0x20,0x5f,0x39,0x39,0x29,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x6d,0x69, 0x78,0x28,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b, 0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49, 0x6e,0x64,0x65,0x78,0x29,0x5d,0x2e,0x75,0x76,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31, 0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b,0x69,0x6e,0x74,0x28, 0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78, 0x29,0x5d,0x2e,0x75,0x76,0x2e,0x7a,0x77,0x2c,0x20,0x5f,0x37,0x35,0x29,0x3b,0x0a, 0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20, 0x3d,0x20,0x5f,0x31,0x35,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x5b, 0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49, 0x6e,0x64,0x65,0x78,0x29,0x5d,0x2e,0x63,0x6f,0x6c,0x6f,0x72,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 ub_text_style { float4 style_params; float4 halo_params; }; struct main0_out { float4 out_color [[color(0)]]; }; struct main0_in { float2 v_uv [[user(locn0)]]; float4 v_color [[user(locn1), flat]]; }; fragment main0_out main0(main0_in in [[stage_in]], constant ub_text_style& _34 [[buffer(1)]], texture2d tex_sdf [[texture(0)]], sampler smp_sdf [[sampler(0)]]) { main0_out out = {}; float4 _24 = tex_sdf.sample(smp_sdf, in.v_uv); float _51 = _24.x * in.v_color.w; float _68 = (1.0 - smoothstep(0.0, _34.style_params.x * _34.style_params.z, -(_24.y - _34.style_params.y))) * _34.halo_params.w; float _73 = 1.0 - _51; out.out_color = float4((in.v_color.xyz * _51) + ((_34.halo_params.xyz * _68) * _73), _51 + (_68 * _73)); return out; } */ static const uint8_t world_text_fs_source_metal_macos[874] = { 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,0x75, 0x62,0x5f,0x74,0x65,0x78,0x74,0x5f,0x73,0x74,0x79,0x6c,0x65,0x0a,0x7b,0x0a,0x20, 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x74,0x79,0x6c,0x65,0x5f, 0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61, 0x74,0x34,0x20,0x68,0x61,0x6c,0x6f,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,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,0x6f,0x75,0x74,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,0x76,0x5f,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,0x76,0x5f,0x63,0x6f, 0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31, 0x29,0x2c,0x20,0x66,0x6c,0x61,0x74,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,0x75,0x62,0x5f,0x74,0x65, 0x78,0x74,0x5f,0x73,0x74,0x79,0x6c,0x65,0x26,0x20,0x5f,0x33,0x34,0x20,0x5b,0x5b, 0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78, 0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65, 0x78,0x5f,0x73,0x64,0x66,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,0x73,0x6d, 0x70,0x5f,0x73,0x64,0x66,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,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x32,0x34,0x20,0x3d, 0x20,0x74,0x65,0x78,0x5f,0x73,0x64,0x66,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28, 0x73,0x6d,0x70,0x5f,0x73,0x64,0x66,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x75,0x76, 0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x35,0x31, 0x20,0x3d,0x20,0x5f,0x32,0x34,0x2e,0x78,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x76,0x5f, 0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20, 0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x30,0x2c,0x20, 0x5f,0x33,0x34,0x2e,0x73,0x74,0x79,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73, 0x2e,0x78,0x20,0x2a,0x20,0x5f,0x33,0x34,0x2e,0x73,0x74,0x79,0x6c,0x65,0x5f,0x70, 0x61,0x72,0x61,0x6d,0x73,0x2e,0x7a,0x2c,0x20,0x2d,0x28,0x5f,0x32,0x34,0x2e,0x79, 0x20,0x2d,0x20,0x5f,0x33,0x34,0x2e,0x73,0x74,0x79,0x6c,0x65,0x5f,0x70,0x61,0x72, 0x61,0x6d,0x73,0x2e,0x79,0x29,0x29,0x29,0x20,0x2a,0x20,0x5f,0x33,0x34,0x2e,0x68, 0x61,0x6c,0x6f,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x2e,0x77,0x3b,0x0a,0x20,0x20, 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x33,0x20,0x3d,0x20,0x31,0x2e, 0x30,0x20,0x2d,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, 0x2e,0x6f,0x75,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x34,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e, 0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x35,0x31,0x29,0x20,0x2b,0x20,0x28,0x28,0x5f, 0x33,0x34,0x2e,0x68,0x61,0x6c,0x6f,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x2e,0x78, 0x79,0x7a,0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x20,0x2a,0x20,0x5f,0x37,0x33,0x29, 0x2c,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x5f,0x36,0x38,0x20,0x2a,0x20,0x5f, 0x37,0x33,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, 0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; static inline const sg_shader_desc* world_text_prog_shader_desc(sg_backend backend) { if (backend == SG_BACKEND_GLCORE) { static sg_shader_desc desc; static bool valid; if (!valid) { valid = true; desc.vertex_func.source = (const char*)world_text_vs_source_glsl430; desc.vertex_func.entry = "main"; desc.fragment_func.source = (const char*)world_text_fs_source_glsl430; desc.fragment_func.entry = "main"; desc.uniform_blocks[0].stage = SG_SHADERSTAGE_VERTEX; desc.uniform_blocks[0].layout = SG_UNIFORMLAYOUT_STD140; desc.uniform_blocks[0].size = 288; desc.uniform_blocks[0].glsl_uniforms[0].type = SG_UNIFORMTYPE_FLOAT4; desc.uniform_blocks[0].glsl_uniforms[0].array_count = 18; desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "ub_frame"; desc.uniform_blocks[1].stage = SG_SHADERSTAGE_FRAGMENT; desc.uniform_blocks[1].layout = SG_UNIFORMLAYOUT_STD140; desc.uniform_blocks[1].size = 32; desc.uniform_blocks[1].glsl_uniforms[0].type = SG_UNIFORMTYPE_FLOAT4; desc.uniform_blocks[1].glsl_uniforms[0].array_count = 2; desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "ub_text_style"; desc.views[0].storage_buffer.stage = SG_SHADERSTAGE_VERTEX; desc.views[0].storage_buffer.readonly = true; desc.views[0].storage_buffer.glsl_binding_n = 0; desc.views[1].texture.stage = SG_SHADERSTAGE_FRAGMENT; desc.views[1].texture.image_type = SG_IMAGETYPE_2D; desc.views[1].texture.sample_type = SG_IMAGESAMPLETYPE_FLOAT; desc.views[1].texture.multisampled = false; desc.samplers[0].stage = SG_SHADERSTAGE_FRAGMENT; desc.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; desc.texture_sampler_pairs[0].stage = SG_SHADERSTAGE_FRAGMENT; desc.texture_sampler_pairs[0].view_slot = 1; desc.texture_sampler_pairs[0].sampler_slot = 0; desc.texture_sampler_pairs[0].glsl_name = "tex_sdf_smp_sdf"; desc.label = "world_text_prog_shader"; } return &desc; } if (backend == SG_BACKEND_D3D11) { static sg_shader_desc desc; static bool valid; if (!valid) { valid = true; desc.vertex_func.source = (const char*)world_text_vs_source_hlsl5; desc.vertex_func.d3d11_target = "vs_5_0"; desc.vertex_func.entry = "main"; desc.fragment_func.source = (const char*)world_text_fs_source_hlsl5; desc.fragment_func.d3d11_target = "ps_5_0"; desc.fragment_func.entry = "main"; desc.uniform_blocks[0].stage = SG_SHADERSTAGE_VERTEX; desc.uniform_blocks[0].layout = SG_UNIFORMLAYOUT_STD140; desc.uniform_blocks[0].size = 288; desc.uniform_blocks[0].hlsl_register_b_n = 0; desc.uniform_blocks[1].stage = SG_SHADERSTAGE_FRAGMENT; desc.uniform_blocks[1].layout = SG_UNIFORMLAYOUT_STD140; desc.uniform_blocks[1].size = 32; desc.uniform_blocks[1].hlsl_register_b_n = 1; desc.views[0].storage_buffer.stage = SG_SHADERSTAGE_VERTEX; desc.views[0].storage_buffer.readonly = true; desc.views[0].storage_buffer.hlsl_register_t_n = 0; desc.views[1].texture.stage = SG_SHADERSTAGE_FRAGMENT; desc.views[1].texture.image_type = SG_IMAGETYPE_2D; desc.views[1].texture.sample_type = SG_IMAGESAMPLETYPE_FLOAT; desc.views[1].texture.multisampled = false; desc.views[1].texture.hlsl_register_t_n = 0; desc.samplers[0].stage = SG_SHADERSTAGE_FRAGMENT; desc.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; desc.samplers[0].hlsl_register_s_n = 0; desc.texture_sampler_pairs[0].stage = SG_SHADERSTAGE_FRAGMENT; desc.texture_sampler_pairs[0].view_slot = 1; desc.texture_sampler_pairs[0].sampler_slot = 0; desc.label = "world_text_prog_shader"; } return &desc; } if (backend == SG_BACKEND_METAL_MACOS) { static sg_shader_desc desc; static bool valid; if (!valid) { valid = true; desc.vertex_func.source = (const char*)world_text_vs_source_metal_macos; desc.vertex_func.entry = "main0"; desc.fragment_func.source = (const char*)world_text_fs_source_metal_macos; desc.fragment_func.entry = "main0"; desc.uniform_blocks[0].stage = SG_SHADERSTAGE_VERTEX; desc.uniform_blocks[0].layout = SG_UNIFORMLAYOUT_STD140; desc.uniform_blocks[0].size = 288; desc.uniform_blocks[0].msl_buffer_n = 0; desc.uniform_blocks[1].stage = SG_SHADERSTAGE_FRAGMENT; desc.uniform_blocks[1].layout = SG_UNIFORMLAYOUT_STD140; desc.uniform_blocks[1].size = 32; desc.uniform_blocks[1].msl_buffer_n = 1; desc.views[0].storage_buffer.stage = SG_SHADERSTAGE_VERTEX; desc.views[0].storage_buffer.readonly = true; desc.views[0].storage_buffer.msl_buffer_n = 8; desc.views[1].texture.stage = SG_SHADERSTAGE_FRAGMENT; desc.views[1].texture.image_type = SG_IMAGETYPE_2D; desc.views[1].texture.sample_type = SG_IMAGESAMPLETYPE_FLOAT; desc.views[1].texture.multisampled = false; desc.views[1].texture.msl_texture_n = 0; desc.samplers[0].stage = SG_SHADERSTAGE_FRAGMENT; desc.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; desc.samplers[0].msl_sampler_n = 0; desc.texture_sampler_pairs[0].stage = SG_SHADERSTAGE_FRAGMENT; desc.texture_sampler_pairs[0].view_slot = 1; desc.texture_sampler_pairs[0].sampler_slot = 0; desc.label = "world_text_prog_shader"; } return &desc; } return 0; }