box3d/samples/shaders/generated/overlay_line.glsl.h
Erin Catto 9e02b7f3b3
New sample renderer and UI (#10)
No changes to simulation
2026-06-06 10:06:05 -07:00

1691 lines
106 KiB
C++

#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/line.glsl --output E:/box/box3d/samples/shaders/generated/overlay_line.glsl.h --slang hlsl5:metal_macos:glsl430
Overview:
=========
Shader program: 'prog':
Get shader desc: overlay_line_prog_shader_desc(sg_query_backend());
Vertex Shader: vs
Fragment Shader: fs
Attributes:
Bindings:
Uniform block 'ub_frame':
C struct: overlay_line_ub_frame_t
Bind slot: UB_overlay_line_ub_frame => 0
Storage buffer 'line_instances':
C struct: overlay_line_line_instance_t
Bind slot: VIEW_overlay_line_line_instances => 0
Readonly: true
Texture 'tex_depth':
Image type: SG_IMAGETYPE_2D
Sample type: SG_IMAGESAMPLETYPE_FLOAT
Multisampled: false
Bind slot: VIEW_overlay_line_tex_depth => 1
Sampler 'smp_depth':
Type: SG_SAMPLERTYPE_FILTERING
Bind slot: SMP_overlay_line_smp_depth => 0
*/
#if !defined(SOKOL_GFX_INCLUDED)
#error "Please include sokol_gfx.h before overlay_line.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_overlay_line_ub_frame (0)
#define VIEW_overlay_line_line_instances (0)
#define VIEW_overlay_line_tex_depth (1)
#define SMP_overlay_line_smp_depth (0)
#pragma pack(push,1)
SOKOL_SHDC_ALIGN(16) typedef struct overlay_line_ub_frame_t {
Mat4 view;
Mat4 proj;
Mat4 view_proj;
Mat4 inv_view_proj;
Vec4 camera_pos;
Vec4 viewport;
} overlay_line_ub_frame_t;
#pragma pack(pop)
#pragma pack(push,1)
SOKOL_SHDC_ALIGN(16) typedef struct overlay_line_line_instance_t {
Vec4 a;
Vec4 b;
Vec4 color;
uint32_t flags[4];
} overlay_line_line_instance_t;
#pragma pack(pop)
/*
#version 430
struct line_instance
{
vec4 a;
vec4 b;
vec4 color;
uvec4 flags;
};
layout(binding = 0, std430) readonly buffer line_instances
{
line_instance instances[];
} _17;
uniform vec4 ub_frame[18];
layout(location = 0) out vec2 v_screen_a;
layout(location = 1) out vec2 v_screen_b;
layout(location = 2) noperspective out float v_dist_from_axis_px;
layout(location = 3) out float v_half_width_px;
layout(location = 4) out float v_view_z;
layout(location = 5) flat out vec4 v_color;
layout(location = 6) flat out uint v_occ_mode;
void main()
{
bool _49 = gl_VertexID == 2;
bool _53 = gl_VertexID == 4;
bool _54 = ((gl_VertexID == 1) || _49) || _53;
float _68 = ((_49 || _53) || (gl_VertexID == 5)) ? 1.0 : (-1.0);
mat4 _86 = mat4(ub_frame[8], ub_frame[9], ub_frame[10], ub_frame[11]);
vec4 _91 = vec4(_17.instances[gl_InstanceID].a.xyz, 1.0);
vec4 _92 = _86 * _91;
vec4 _100 = vec4(_17.instances[gl_InstanceID].b.xyz, 1.0);
vec4 _101 = _86 * _100;
mat4 _104 = mat4(ub_frame[0], ub_frame[1], ub_frame[2], ub_frame[3]);
bvec4 _125 = bvec4(_54);
vec4 _126 = vec4(_125.x ? _101.x : _92.x, _125.y ? _101.y : _92.y, _125.z ? _101.z : _92.z, _125.w ? _101.w : _92.w);
float _129;
if (_54)
{
_129 = (_104 * _100).z;
}
else
{
_129 = (_104 * _91).z;
}
v_screen_a = (((_92.xy / vec2(_92.w)) * 0.5) + vec2(0.5)) * ub_frame[17].xy;
v_screen_b = (((_101.xy / vec2(_101.w)) * 0.5) + vec2(0.5)) * ub_frame[17].xy;
vec2 _181 = v_screen_b - v_screen_a;
float _184 = length(_181);
vec2 _189;
if (_184 > 9.9999999747524270787835121154785e-07)
{
_189 = _181 / vec2(_184);
}
else
{
_189 = vec2(1.0, 0.0);
}
float half_width_px;
if (_17.instances[gl_InstanceID].flags.x == 0u)
{
half_width_px = _17.instances[gl_InstanceID].a.w * 0.5;
}
else
{
half_width_px = (_17.instances[gl_InstanceID].a.w * 0.5) * ((ub_frame[17].y * ub_frame[5].y) / (_129 * (-2.0)));
}
float _237 = half_width_px;
float _238 = max(_237, 0.5);
half_width_px = _238;
float _242 = _238 + 1.5;
vec2 _264 = _126.xy + ((((vec2(-_189.y, _189.x) * _68) * _242) * (ub_frame[17].zw * 2.0)) * _126.w);
vec4 _309 = _126;
_309.x = _264.x;
_309.y = _264.y;
gl_Position = _309;
v_dist_from_axis_px = _68 * _242;
v_half_width_px = _238;
v_view_z = -_129;
v_color = _17.instances[gl_InstanceID].color;
v_occ_mode = _17.instances[gl_InstanceID].flags.y;
}
*/
static const uint8_t overlay_line_vs_source_glsl430[2568] = {
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x73,0x74,
0x72,0x75,0x63,0x74,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,
0x63,0x65,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x61,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x62,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x75,0x76,0x65,0x63,0x34,0x20,0x66,0x6c,0x61,0x67,0x73,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,0x6c,0x69,
0x6e,0x65,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x0a,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,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,0x37,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,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,
0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,
0x6e,0x5f,0x62,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6e,0x6f,0x70,0x65,0x72,0x73,
0x70,0x65,0x63,0x74,0x69,0x76,0x65,0x20,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,
0x69,0x73,0x5f,0x70,0x78,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x33,0x29,0x20,0x6f,0x75,0x74,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,
0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x34,0x29,0x20,0x6f,0x75,0x74,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x3b,0x0a,
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
0x3d,0x20,0x35,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,0x6c,0x61,0x79,0x6f,
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x36,0x29,
0x20,0x66,0x6c,0x61,0x74,0x20,0x6f,0x75,0x74,0x20,0x75,0x69,0x6e,0x74,0x20,0x76,
0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,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,0x39,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,0x33,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,
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x34,0x20,0x3d,0x20,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,0x39,0x29,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x33,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20,0x28,
0x28,0x5f,0x34,0x39,0x20,0x7c,0x7c,0x20,0x5f,0x35,0x33,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x34,0x20,0x5f,0x38,0x36,
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,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x39,0x31,0x20,0x3d,0x20,0x76,0x65,
0x63,0x34,0x28,0x5f,0x31,0x37,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,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20,0x5f,0x38,0x36,0x20,
0x2a,0x20,0x5f,0x39,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,
0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x37,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,0x62,0x2e,0x78,0x79,0x7a,0x2c,0x20,
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,
0x31,0x30,0x31,0x20,0x3d,0x20,0x5f,0x38,0x36,0x20,0x2a,0x20,0x5f,0x31,0x30,0x30,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x34,0x20,0x5f,0x31,0x30,0x34,0x20,
0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,
0x30,0x5d,0x2c,0x20,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x31,0x5d,0x2c,
0x20,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x32,0x5d,0x2c,0x20,0x75,0x62,
0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x33,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x62,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x32,0x35,0x20,0x3d,0x20,0x62,0x76,0x65,
0x63,0x34,0x28,0x5f,0x35,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
0x34,0x20,0x5f,0x31,0x32,0x36,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,
0x32,0x35,0x2e,0x78,0x20,0x3f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x78,0x20,0x3a,0x20,
0x5f,0x39,0x32,0x2e,0x78,0x2c,0x20,0x5f,0x31,0x32,0x35,0x2e,0x79,0x20,0x3f,0x20,
0x5f,0x31,0x30,0x31,0x2e,0x79,0x20,0x3a,0x20,0x5f,0x39,0x32,0x2e,0x79,0x2c,0x20,
0x5f,0x31,0x32,0x35,0x2e,0x7a,0x20,0x3f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x7a,0x20,
0x3a,0x20,0x5f,0x39,0x32,0x2e,0x7a,0x2c,0x20,0x5f,0x31,0x32,0x35,0x2e,0x77,0x20,
0x3f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x77,0x20,0x3a,0x20,0x5f,0x39,0x32,0x2e,0x77,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x32,
0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x35,0x34,0x29,0x0a,
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,
0x32,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x30,0x34,0x20,0x2a,0x20,0x5f,0x31,0x30,
0x30,0x29,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x5f,0x31,0x32,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x30,0x34,0x20,
0x2a,0x20,0x5f,0x39,0x31,0x29,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,0x20,0x3d,
0x20,0x28,0x28,0x28,0x5f,0x39,0x32,0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,
0x32,0x28,0x5f,0x39,0x32,0x2e,0x77,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,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,
0x3d,0x20,0x28,0x28,0x28,0x5f,0x31,0x30,0x31,0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,
0x65,0x63,0x32,0x28,0x5f,0x31,0x30,0x31,0x2e,0x77,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x38,
0x31,0x20,0x3d,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x2d,
0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x38,0x34,0x20,0x3d,0x20,0x6c,0x65,
0x6e,0x67,0x74,0x68,0x28,0x5f,0x31,0x38,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x38,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
0x66,0x20,0x28,0x5f,0x31,0x38,0x34,0x20,0x3e,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,
0x39,0x39,0x39,0x37,0x34,0x37,0x35,0x32,0x34,0x32,0x37,0x30,0x37,0x38,0x37,0x38,
0x33,0x35,0x31,0x32,0x31,0x31,0x35,0x34,0x37,0x38,0x35,0x65,0x2d,0x30,0x37,0x29,
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,
0x31,0x38,0x39,0x20,0x3d,0x20,0x5f,0x31,0x38,0x31,0x20,0x2f,0x20,0x76,0x65,0x63,
0x32,0x28,0x5f,0x31,0x38,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x38,0x39,0x20,0x3d,0x20,0x76,0x65,0x63,
0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x6c,
0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x69,0x66,0x20,0x28,0x5f,0x31,0x37,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,0x66,0x6c,0x61,0x67,0x73,0x2e,0x78,0x20,0x3d,0x3d,0x20,0x30,0x75,0x29,0x0a,
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x61,
0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x31,
0x37,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,0x2e,0x77,0x20,0x2a,
0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,
0x20,0x3d,0x20,0x28,0x5f,0x31,0x37,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,0x2e,0x77,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x28,0x28,
0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x31,0x37,0x5d,0x2e,0x79,0x20,0x2a,
0x20,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,0x5b,0x35,0x5d,0x2e,0x79,0x29,0x20,
0x2f,0x20,0x28,0x5f,0x31,0x32,0x39,0x20,0x2a,0x20,0x28,0x2d,0x32,0x2e,0x30,0x29,
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x37,0x20,0x3d,0x20,0x68,0x61,0x6c,0x66,0x5f,
0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x38,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x5f,
0x32,0x33,0x37,0x2c,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,
0x32,0x33,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
0x32,0x34,0x32,0x20,0x3d,0x20,0x5f,0x32,0x33,0x38,0x20,0x2b,0x20,0x31,0x2e,0x35,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x36,0x34,0x20,
0x3d,0x20,0x5f,0x31,0x32,0x36,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,
0x76,0x65,0x63,0x32,0x28,0x2d,0x5f,0x31,0x38,0x39,0x2e,0x79,0x2c,0x20,0x5f,0x31,
0x38,0x39,0x2e,0x78,0x29,0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x20,0x2a,0x20,0x5f,
0x32,0x34,0x32,0x29,0x20,0x2a,0x20,0x28,0x75,0x62,0x5f,0x66,0x72,0x61,0x6d,0x65,
0x5b,0x31,0x37,0x5d,0x2e,0x7a,0x77,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x20,
0x2a,0x20,0x5f,0x31,0x32,0x36,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
0x65,0x63,0x34,0x20,0x5f,0x33,0x30,0x39,0x20,0x3d,0x20,0x5f,0x31,0x32,0x36,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x5f,0x33,0x30,0x39,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x32,
0x36,0x34,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x33,0x30,0x39,0x2e,0x79,
0x20,0x3d,0x20,0x5f,0x32,0x36,0x34,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,
0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x33,0x30,
0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,
0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x36,0x38,
0x20,0x2a,0x20,0x5f,0x32,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x68,
0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,
0x32,0x33,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,
0x7a,0x20,0x3d,0x20,0x2d,0x5f,0x31,0x32,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x37,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,0x20,0x20,0x20,
0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x5f,0x31,
0x37,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,0x66,0x6c,0x61,0x67,0x73,
0x2e,0x79,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
};
/*
#version 430
layout(binding = 0) uniform sampler2D tex_depth_smp_depth;
layout(location = 2) noperspective in float v_dist_from_axis_px;
layout(location = 3) in float v_half_width_px;
layout(location = 4) in float v_view_z;
layout(location = 5) flat in vec4 v_color;
layout(location = 6) flat in uint v_occ_mode;
layout(location = 1) in vec2 v_screen_b;
layout(location = 0) in vec2 v_screen_a;
layout(location = 0) out vec4 out_color;
void main()
{
float _15 = fwidth(v_dist_from_axis_px);
float _68 = fwidth(v_view_z);
bool _78 = v_view_z > (textureLod(tex_depth_smp_depth, gl_FragCoord.xy / vec2(textureSize(tex_depth_smp_depth, 0)), 0.0).x + (0.001000000047497451305389404296875 + (2.0 * _68)));
vec4 col = v_color;
if ((v_occ_mode == 0u) && _78)
{
col = vec4(0.0);
}
else
{
if ((v_occ_mode == 1u) && _78)
{
col *= 0.25;
}
else
{
if ((v_occ_mode == 2u) && _78)
{
vec2 _117 = v_screen_b - v_screen_a;
float _136 = dot(gl_FragCoord.xy - v_screen_a, _117 / vec2(max(length(_117), 9.9999999747524270787835121154785e-07)));
float _149 = fwidth(_136);
col *= (1.0 - smoothstep(-_149, _149, abs(mod(_136, 16.0) - 4.0) - 4.0));
}
}
}
out_color = col * (1.0 - smoothstep(v_half_width_px - _15, v_half_width_px + _15, abs(v_dist_from_axis_px)));
}
*/
static const uint8_t overlay_line_fs_source_glsl430[1459] = {
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,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,0x64,0x65,0x70,0x74,0x68,0x5f,0x73,0x6d,
0x70,0x5f,0x64,0x65,0x70,0x74,0x68,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6e,
0x6f,0x70,0x65,0x72,0x73,0x70,0x65,0x63,0x74,0x69,0x76,0x65,0x20,0x69,0x6e,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,
0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x33,0x29,0x20,
0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,
0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x34,0x29,0x20,0x69,
0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,
0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
0x6e,0x20,0x3d,0x20,0x35,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,0x36,
0x29,0x20,0x66,0x6c,0x61,0x74,0x20,0x69,0x6e,0x20,0x75,0x69,0x6e,0x74,0x20,0x76,
0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,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,0x73,0x63,0x72,0x65,0x65,0x6e,
0x5f,0x62,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,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,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,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
0x31,0x35,0x20,0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,0x28,0x76,0x5f,0x64,0x69,
0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x38,0x20,
0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,0x28,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,
0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x38,
0x20,0x3d,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x3e,0x20,0x28,0x74,
0x65,0x78,0x74,0x75,0x72,0x65,0x4c,0x6f,0x64,0x28,0x74,0x65,0x78,0x5f,0x64,0x65,
0x70,0x74,0x68,0x5f,0x73,0x6d,0x70,0x5f,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x67,
0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2f,
0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,
0x65,0x28,0x74,0x65,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x5f,0x73,0x6d,0x70,0x5f,
0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x30,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,
0x2e,0x78,0x20,0x2b,0x20,0x28,0x30,0x2e,0x30,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
0x30,0x30,0x34,0x37,0x34,0x39,0x37,0x34,0x35,0x31,0x33,0x30,0x35,0x33,0x38,0x39,
0x34,0x30,0x34,0x32,0x39,0x36,0x38,0x37,0x35,0x20,0x2b,0x20,0x28,0x32,0x2e,0x30,
0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x20,0x3d,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,
0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x76,0x5f,0x6f,0x63,
0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x30,0x75,0x29,0x20,0x26,0x26,
0x20,0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,
0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,
0x65,0x20,0x3d,0x3d,0x20,0x31,0x75,0x29,0x20,0x26,0x26,0x20,0x5f,0x37,0x38,0x29,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x2a,0x3d,0x20,0x30,0x2e,
0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x69,0x66,0x20,0x28,0x28,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,
0x20,0x3d,0x3d,0x20,0x32,0x75,0x29,0x20,0x26,0x26,0x20,0x5f,0x37,0x38,0x29,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,
0x63,0x32,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,
0x65,0x6e,0x5f,0x62,0x20,0x2d,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x36,0x20,0x3d,0x20,
0x64,0x6f,0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,
0x2e,0x78,0x79,0x20,0x2d,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,
0x2c,0x20,0x5f,0x31,0x31,0x37,0x20,0x2f,0x20,0x76,0x65,0x63,0x32,0x28,0x6d,0x61,
0x78,0x28,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x5f,0x31,0x31,0x37,0x29,0x2c,0x20,
0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x35,0x32,0x34,0x32,
0x37,0x30,0x37,0x38,0x37,0x38,0x33,0x35,0x31,0x32,0x31,0x31,0x35,0x34,0x37,0x38,
0x35,0x65,0x2d,0x30,0x37,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x31,0x34,0x39,0x20,0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,0x28,0x5f,0x31,
0x33,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x2a,0x3d,0x20,0x28,0x31,0x2e,0x30,
0x20,0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x2d,0x5f,
0x31,0x34,0x39,0x2c,0x20,0x5f,0x31,0x34,0x39,0x2c,0x20,0x61,0x62,0x73,0x28,0x6d,
0x6f,0x64,0x28,0x5f,0x31,0x33,0x36,0x2c,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2d,
0x20,0x34,0x2e,0x30,0x29,0x20,0x2d,0x20,0x34,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
0x20,0x6f,0x75,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,
0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,
0x73,0x74,0x65,0x70,0x28,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,
0x68,0x5f,0x70,0x78,0x20,0x2d,0x20,0x5f,0x31,0x35,0x2c,0x20,0x76,0x5f,0x68,0x61,
0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x2b,0x20,0x5f,0x31,
0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,
0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x29,0x29,0x29,0x3b,0x0a,0x7d,
0x0a,0x0a,0x00,
};
/*
struct line_instance
{
float4 a;
float4 b;
float4 color;
uint4 flags;
};
ByteAddressBuffer _17 : register(t0);
cbuffer ub_frame : register(b0)
{
row_major float4x4 _83_view : packoffset(c0);
row_major float4x4 _83_proj : packoffset(c4);
row_major float4x4 _83_view_proj : packoffset(c8);
row_major float4x4 _83_inv_view_proj : packoffset(c12);
float4 _83_camera_pos : packoffset(c16);
float4 _83_viewport : packoffset(c17);
};
static float4 gl_Position;
static int gl_VertexIndex;
static int gl_InstanceIndex;
static float2 v_screen_a;
static float2 v_screen_b;
static float v_dist_from_axis_px;
static float v_half_width_px;
static float v_view_z;
static float4 v_color;
static uint v_occ_mode;
struct SPIRV_Cross_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_InstanceIndex : SV_InstanceID;
};
struct SPIRV_Cross_Output
{
float2 v_screen_a : TEXCOORD0;
float2 v_screen_b : TEXCOORD1;
noperspective float v_dist_from_axis_px : TEXCOORD2;
float v_half_width_px : TEXCOORD3;
float v_view_z : TEXCOORD4;
nointerpolation float4 v_color : TEXCOORD5;
nointerpolation uint v_occ_mode : TEXCOORD6;
float4 gl_Position : SV_Position;
};
void vert_main()
{
line_instance _25;
_25.a = asfloat(_17.Load4(gl_InstanceIndex * 64 + 0));
_25.b = asfloat(_17.Load4(gl_InstanceIndex * 64 + 16));
_25.color = asfloat(_17.Load4(gl_InstanceIndex * 64 + 32));
_25.flags = _17.Load4(gl_InstanceIndex * 64 + 48);
bool _49 = gl_VertexIndex == 2;
bool _53 = gl_VertexIndex == 4;
bool _54 = ((gl_VertexIndex == 1) || _49) || _53;
float _68 = ((_49 || _53) || (gl_VertexIndex == 5)) ? 1.0f : (-1.0f);
float4 _91 = float4(_25.a.xyz, 1.0f);
float4 _92 = mul(_91, _83_view_proj);
float4 _100 = float4(_25.b.xyz, 1.0f);
float4 _101 = mul(_100, _83_view_proj);
bool4 _125 = _54.xxxx;
float4 _126 = float4(_125.x ? _101.x : _92.x, _125.y ? _101.y : _92.y, _125.z ? _101.z : _92.z, _125.w ? _101.w : _92.w);
float _129;
if (_54)
{
_129 = mul(_100, _83_view).z;
}
else
{
_129 = mul(_91, _83_view).z;
}
v_screen_a = (((_92.xy / _92.w.xx) * 0.5f) + 0.5f.xx) * _83_viewport.xy;
v_screen_b = (((_101.xy / _101.w.xx) * 0.5f) + 0.5f.xx) * _83_viewport.xy;
float2 _181 = v_screen_b - v_screen_a;
float _184 = length(_181);
float2 _189;
if (_184 > 9.9999999747524270787835121154785e-07f)
{
_189 = _181 / _184.xx;
}
else
{
_189 = float2(1.0f, 0.0f);
}
float half_width_px;
if (_25.flags.x == 0u)
{
half_width_px = _25.a.w * 0.5f;
}
else
{
half_width_px = (_25.a.w * 0.5f) * ((_83_viewport.y * _83_proj[1].y) / (_129 * (-2.0f)));
}
float _237 = half_width_px;
float _238 = max(_237, 0.5f);
half_width_px = _238;
float _242 = _238 + 1.5f;
float2 _264 = _126.xy + ((((float2(-_189.y, _189.x) * _68) * _242) * (_83_viewport.zw * 2.0f)) * _126.w);
float4 _309 = _126;
_309.x = _264.x;
_309.y = _264.y;
gl_Position = _309;
v_dist_from_axis_px = _68 * _242;
v_half_width_px = _238;
v_view_z = -_129;
v_color = _25.color;
v_occ_mode = _25.flags.y;
}
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_screen_a = v_screen_a;
stage_output.v_screen_b = v_screen_b;
stage_output.v_dist_from_axis_px = v_dist_from_axis_px;
stage_output.v_half_width_px = v_half_width_px;
stage_output.v_view_z = v_view_z;
stage_output.v_color = v_color;
stage_output.v_occ_mode = v_occ_mode;
return stage_output;
}
*/
static const uint8_t overlay_line_vs_source_hlsl5[3858] = {
0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x69,0x6e,0x73,0x74,
0x61,0x6e,0x63,0x65,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x34,0x20,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x34,0x20,0x66,
0x6c,0x61,0x67,0x73,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,0x37,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,0x33,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,0x33,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,0x33,
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,0x33,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,0x33,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,0x33,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,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
0x61,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x3b,0x0a,0x73,0x74,0x61,
0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,
0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x3b,0x0a,0x73,
0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,
0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x73,0x74,0x61,
0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,
0x5f,0x7a,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,0x75,0x69,0x6e,0x74,0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,
0x65,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,0x73,0x63,
0x72,0x65,0x65,0x6e,0x5f,0x61,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,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,
0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x70,0x65,0x72,
0x73,0x70,0x65,0x63,0x74,0x69,0x76,0x65,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,
0x70,0x78,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,
0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,
0x4f,0x4f,0x52,0x44,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,
0x4f,0x4f,0x52,0x44,0x34,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,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x69,0x6e,0x74,
0x65,0x72,0x70,0x6f,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x20,0x75,0x69,0x6e,0x74,0x20,
0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3a,0x20,0x54,0x45,0x58,
0x43,0x4f,0x4f,0x52,0x44,0x36,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,0x6c,0x69,0x6e,0x65,0x5f,0x69,0x6e,
0x73,0x74,0x61,0x6e,0x63,0x65,0x20,0x5f,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x5f,0x32,0x35,0x2e,0x61,0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,
0x5f,0x31,0x37,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,0x35,0x2e,0x62,
0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x31,0x37,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,0x35,0x2e,0x63,0x6f,0x6c,0x6f,0x72,
0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x31,0x37,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,0x35,0x2e,0x66,0x6c,0x61,0x67,0x73,
0x20,0x3d,0x20,0x5f,0x31,0x37,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,
0x6f,0x6c,0x20,0x5f,0x34,0x39,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,0x33,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,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x34,0x20,0x3d,
0x20,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,0x39,0x29,0x20,
0x7c,0x7c,0x20,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20,0x28,0x28,0x5f,0x34,0x39,0x20,0x7c,0x7c,
0x20,0x5f,0x35,0x33,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,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x39,0x31,
0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x32,0x35,0x2e,0x61,0x2e,
0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20,0x6d,0x75,0x6c,
0x28,0x5f,0x39,0x31,0x2c,0x20,0x5f,0x38,0x33,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,
0x72,0x6f,0x6a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
0x20,0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,
0x32,0x35,0x2e,0x62,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x30,0x31,
0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x38,0x33,
0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x62,0x6f,0x6f,0x6c,0x34,0x20,0x5f,0x31,0x32,0x35,0x20,0x3d,0x20,0x5f,0x35,
0x34,0x2e,0x78,0x78,0x78,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x34,0x20,0x5f,0x31,0x32,0x36,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
0x28,0x5f,0x31,0x32,0x35,0x2e,0x78,0x20,0x3f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x78,
0x20,0x3a,0x20,0x5f,0x39,0x32,0x2e,0x78,0x2c,0x20,0x5f,0x31,0x32,0x35,0x2e,0x79,
0x20,0x3f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x79,0x20,0x3a,0x20,0x5f,0x39,0x32,0x2e,
0x79,0x2c,0x20,0x5f,0x31,0x32,0x35,0x2e,0x7a,0x20,0x3f,0x20,0x5f,0x31,0x30,0x31,
0x2e,0x7a,0x20,0x3a,0x20,0x5f,0x39,0x32,0x2e,0x7a,0x2c,0x20,0x5f,0x31,0x32,0x35,
0x2e,0x77,0x20,0x3f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x77,0x20,0x3a,0x20,0x5f,0x39,
0x32,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x31,0x32,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x35,
0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x5f,0x31,0x32,0x39,0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x5f,0x31,0x30,0x30,
0x2c,0x20,0x5f,0x38,0x33,0x5f,0x76,0x69,0x65,0x77,0x29,0x2e,0x7a,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x39,
0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x5f,0x39,0x31,0x2c,0x20,0x5f,0x38,0x33,0x5f,
0x76,0x69,0x65,0x77,0x29,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
0x20,0x20,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,0x20,0x3d,0x20,
0x28,0x28,0x28,0x5f,0x39,0x32,0x2e,0x78,0x79,0x20,0x2f,0x20,0x5f,0x39,0x32,0x2e,
0x77,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,0x33,0x5f,0x76,
0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x3d,0x20,0x28,0x28,0x28,
0x5f,0x31,0x30,0x31,0x2e,0x78,0x79,0x20,0x2f,0x20,0x5f,0x31,0x30,0x31,0x2e,0x77,
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,0x33,0x5f,0x76,0x69,
0x65,0x77,0x70,0x6f,0x72,0x74,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,0x38,0x31,0x20,0x3d,0x20,0x76,0x5f,0x73,
0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x2d,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,
0x65,0x6e,0x5f,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x31,0x38,0x34,0x20,0x3d,0x20,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x5f,0x31,
0x38,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
0x5f,0x31,0x38,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
0x38,0x34,0x20,0x3e,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,
0x37,0x35,0x32,0x34,0x32,0x37,0x30,0x37,0x38,0x37,0x38,0x33,0x35,0x31,0x32,0x31,
0x31,0x35,0x34,0x37,0x38,0x35,0x65,0x2d,0x30,0x37,0x66,0x29,0x0a,0x20,0x20,0x20,
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x38,0x39,0x20,
0x3d,0x20,0x5f,0x31,0x38,0x31,0x20,0x2f,0x20,0x5f,0x31,0x38,0x34,0x2e,0x78,0x78,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,
0x31,0x38,0x39,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,
0x66,0x2c,0x20,0x30,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,
0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
0x28,0x5f,0x32,0x35,0x2e,0x66,0x6c,0x61,0x67,0x73,0x2e,0x78,0x20,0x3d,0x3d,0x20,
0x30,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,
0x3d,0x20,0x5f,0x32,0x35,0x2e,0x61,0x2e,0x77,0x20,0x2a,0x20,0x30,0x2e,0x35,0x66,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,
0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x28,
0x5f,0x32,0x35,0x2e,0x61,0x2e,0x77,0x20,0x2a,0x20,0x30,0x2e,0x35,0x66,0x29,0x20,
0x2a,0x20,0x28,0x28,0x5f,0x38,0x33,0x5f,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,
0x2e,0x79,0x20,0x2a,0x20,0x5f,0x38,0x33,0x5f,0x70,0x72,0x6f,0x6a,0x5b,0x31,0x5d,
0x2e,0x79,0x29,0x20,0x2f,0x20,0x28,0x5f,0x31,0x32,0x39,0x20,0x2a,0x20,0x28,0x2d,
0x32,0x2e,0x30,0x66,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x37,0x20,0x3d,0x20,
0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x38,0x20,0x3d,0x20,
0x6d,0x61,0x78,0x28,0x5f,0x32,0x33,0x37,0x2c,0x20,0x30,0x2e,0x35,0x66,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,
0x70,0x78,0x20,0x3d,0x20,0x5f,0x32,0x33,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x32,0x20,0x3d,0x20,0x5f,0x32,0x33,0x38,
0x20,0x2b,0x20,0x31,0x2e,0x35,0x66,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x32,0x20,0x5f,0x32,0x36,0x34,0x20,0x3d,0x20,0x5f,0x31,0x32,0x36,0x2e,
0x78,0x79,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
0x2d,0x5f,0x31,0x38,0x39,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x38,0x39,0x2e,0x78,0x29,
0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x20,0x2a,0x20,0x5f,0x32,0x34,0x32,0x29,0x20,
0x2a,0x20,0x28,0x5f,0x38,0x33,0x5f,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x2e,
0x7a,0x77,0x20,0x2a,0x20,0x32,0x2e,0x30,0x66,0x29,0x29,0x20,0x2a,0x20,0x5f,0x31,
0x32,0x36,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x34,0x20,0x5f,0x33,0x30,0x39,0x20,0x3d,0x20,0x5f,0x31,0x32,0x36,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x5f,0x33,0x30,0x39,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x32,0x36,0x34,
0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x33,0x30,0x39,0x2e,0x79,0x20,0x3d,
0x20,0x5f,0x32,0x36,0x34,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,
0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x33,0x30,0x39,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,
0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x36,0x38,0x20,0x2a,
0x20,0x5f,0x32,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x68,0x61,0x6c,
0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x32,0x33,
0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,
0x3d,0x20,0x2d,0x5f,0x31,0x32,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x32,0x35,0x2e,0x63,0x6f,0x6c,0x6f,0x72,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,
0x20,0x3d,0x20,0x5f,0x32,0x35,0x2e,0x66,0x6c,0x61,0x67,0x73,0x2e,0x79,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,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,0x20,0x3d,0x20,0x76,0x5f,0x73,0x63,
0x72,0x65,0x65,0x6e,0x5f,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,
0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,
0x6e,0x5f,0x62,0x20,0x3d,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,
0x75,0x74,0x2e,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,
0x78,0x69,0x73,0x5f,0x70,0x78,0x20,0x3d,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,
0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x76,
0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,
0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,
0x75,0x74,0x2e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x3d,0x20,0x76,0x5f,
0x76,0x69,0x65,0x77,0x5f,0x7a,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,
0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x76,0x5f,0x6f,
0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,
0x6d,0x6f,0x64,0x65,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,
};
/*
Texture2D<float4> tex_depth : register(t0);
SamplerState smp_depth : register(s0);
static float4 gl_FragCoord;
static float v_dist_from_axis_px;
static float v_half_width_px;
static float v_view_z;
static float4 v_color;
static uint v_occ_mode;
static float2 v_screen_b;
static float2 v_screen_a;
static float4 out_color;
struct SPIRV_Cross_Input
{
float2 v_screen_a : TEXCOORD0;
float2 v_screen_b : TEXCOORD1;
noperspective float v_dist_from_axis_px : TEXCOORD2;
float v_half_width_px : TEXCOORD3;
float v_view_z : TEXCOORD4;
nointerpolation float4 v_color : TEXCOORD5;
nointerpolation uint v_occ_mode : TEXCOORD6;
float4 gl_FragCoord : SV_Position;
};
struct SPIRV_Cross_Output
{
float4 out_color : SV_Target0;
};
float mod(float x, float y)
{
return x - y * floor(x / y);
}
float2 mod(float2 x, float2 y)
{
return x - y * floor(x / y);
}
float3 mod(float3 x, float3 y)
{
return x - y * floor(x / y);
}
float4 mod(float4 x, float4 y)
{
return x - y * floor(x / y);
}
uint2 spvTextureSize(Texture2D<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
void frag_main()
{
float _15 = fwidth(v_dist_from_axis_px);
uint _50_dummy_parameter;
float _68 = fwidth(v_view_z);
bool _78 = v_view_z > (tex_depth.SampleLevel(smp_depth, gl_FragCoord.xy / float2(int2(spvTextureSize(tex_depth, uint(0), _50_dummy_parameter))), 0.0f).x + (0.001000000047497451305389404296875f + (2.0f * _68)));
float4 col = v_color;
if ((v_occ_mode == 0u) && _78)
{
col = 0.0f.xxxx;
}
else
{
if ((v_occ_mode == 1u) && _78)
{
col *= 0.25f;
}
else
{
if ((v_occ_mode == 2u) && _78)
{
float2 _117 = v_screen_b - v_screen_a;
float _136 = dot(gl_FragCoord.xy - v_screen_a, _117 / max(length(_117), 9.9999999747524270787835121154785e-07f).xx);
float _149 = fwidth(_136);
col *= (1.0f - smoothstep(-_149, _149, abs(mod(_136, 16.0f) - 4.0f) - 4.0f));
}
}
}
out_color = col * (1.0f - smoothstep(v_half_width_px - _15, v_half_width_px + _15, abs(v_dist_from_axis_px)));
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
v_dist_from_axis_px = stage_input.v_dist_from_axis_px;
v_half_width_px = stage_input.v_half_width_px;
v_view_z = stage_input.v_view_z;
v_color = stage_input.v_color;
v_occ_mode = stage_input.v_occ_mode;
v_screen_b = stage_input.v_screen_b;
v_screen_a = stage_input.v_screen_a;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.out_color = out_color;
return stage_output;
}
*/
static const uint8_t overlay_line_fs_source_hlsl5[2854] = {
0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,
0x3e,0x20,0x74,0x65,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,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,0x64,0x65,0x70,
0x74,0x68,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,
0x34,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x3b,0x0a,
0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x64,
0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,
0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,
0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x76,
0x69,0x65,0x77,0x5f,0x7a,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,0x75,0x69,0x6e,0x74,0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,
0x6d,0x6f,0x64,0x65,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x32,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x3b,0x0a,
0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f,
0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,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,0x73,0x63,0x72,0x65,
0x65,0x6e,0x5f,0x61,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,0x73,
0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,
0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x70,0x65,0x72,0x73,0x70,
0x65,0x63,0x74,0x69,0x76,0x65,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x64,
0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,
0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,
0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,
0x52,0x44,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,
0x52,0x44,0x34,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,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x69,0x6e,0x74,0x65,0x72,
0x70,0x6f,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x20,0x75,0x69,0x6e,0x74,0x20,0x76,0x5f,
0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,
0x4f,0x52,0x44,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x20,0x3a,0x20,
0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,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,0x66,0x6c,0x6f,0x61,0x74,0x20,0x6d,0x6f,0x64,0x28,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x78,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x79,0x29,0x0a,
0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x78,0x20,0x2d,
0x20,0x79,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x78,0x20,0x2f,0x20,0x79,
0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x6d,0x6f,0x64,
0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x78,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x32,0x20,0x79,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
0x6e,0x20,0x78,0x20,0x2d,0x20,0x79,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,
0x78,0x20,0x2f,0x20,0x79,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,
0x33,0x20,0x6d,0x6f,0x64,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x78,0x2c,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x79,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x78,0x20,0x2d,0x20,0x79,0x20,0x2a,0x20,0x66,
0x6c,0x6f,0x6f,0x72,0x28,0x78,0x20,0x2f,0x20,0x79,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6d,0x6f,0x64,0x28,0x66,0x6c,0x6f,0x61,0x74,
0x34,0x20,0x78,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x79,0x29,0x0a,0x7b,
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x78,0x20,0x2d,0x20,
0x79,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x78,0x20,0x2f,0x20,0x79,0x29,
0x3b,0x0a,0x7d,0x0a,0x0a,0x75,0x69,0x6e,0x74,0x32,0x20,0x73,0x70,0x76,0x54,0x65,
0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,0x65,0x28,0x54,0x65,0x78,0x74,0x75,0x72,
0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,0x3e,0x20,0x54,0x65,0x78,0x2c,
0x20,0x75,0x69,0x6e,0x74,0x20,0x4c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x6f,0x75,0x74,
0x20,0x75,0x69,0x6e,0x74,0x20,0x50,0x61,0x72,0x61,0x6d,0x29,0x0a,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x32,0x20,0x72,0x65,0x74,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x54,0x65,0x78,0x2e,0x47,0x65,0x74,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,
0x6f,0x6e,0x73,0x28,0x4c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x72,0x65,0x74,0x2e,0x78,
0x2c,0x20,0x72,0x65,0x74,0x2e,0x79,0x2c,0x20,0x50,0x61,0x72,0x61,0x6d,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x74,0x3b,
0x0a,0x7d,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,
0x20,0x5f,0x31,0x35,0x20,0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,0x28,0x76,0x5f,
0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,
0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x35,0x30,
0x5f,0x64,0x75,0x6d,0x6d,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x38,0x20,
0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,0x28,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,
0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x38,
0x20,0x3d,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x3e,0x20,0x28,0x74,
0x65,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x4c,
0x65,0x76,0x65,0x6c,0x28,0x73,0x6d,0x70,0x5f,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,
0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,
0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x73,0x70,
0x76,0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,0x65,0x28,0x74,0x65,0x78,
0x5f,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x75,0x69,0x6e,0x74,0x28,0x30,0x29,0x2c,
0x20,0x5f,0x35,0x30,0x5f,0x64,0x75,0x6d,0x6d,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,
0x65,0x74,0x65,0x72,0x29,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x66,0x29,0x2e,0x78,
0x20,0x2b,0x20,0x28,0x30,0x2e,0x30,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
0x34,0x37,0x34,0x39,0x37,0x34,0x35,0x31,0x33,0x30,0x35,0x33,0x38,0x39,0x34,0x30,
0x34,0x32,0x39,0x36,0x38,0x37,0x35,0x66,0x20,0x2b,0x20,0x28,0x32,0x2e,0x30,0x66,
0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x20,0x3d,0x20,0x76,0x5f,0x63,0x6f,
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x76,0x5f,
0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x30,0x75,0x29,0x20,
0x26,0x26,0x20,0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x3d,0x20,0x30,0x2e,0x30,0x66,
0x2e,0x78,0x78,0x78,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,
0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x31,0x75,0x29,0x20,0x26,0x26,0x20,0x5f,0x37,
0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x2a,0x3d,0x20,
0x30,0x2e,0x32,0x35,0x66,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,
0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x32,0x75,0x29,0x20,0x26,0x26,0x20,0x5f,0x37,
0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20,0x76,
0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x2d,0x20,0x76,0x5f,0x73,0x63,
0x72,0x65,0x65,0x6e,0x5f,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,
0x33,0x36,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,
0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2d,0x20,0x76,0x5f,0x73,0x63,0x72,
0x65,0x65,0x6e,0x5f,0x61,0x2c,0x20,0x5f,0x31,0x31,0x37,0x20,0x2f,0x20,0x6d,0x61,
0x78,0x28,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x5f,0x31,0x31,0x37,0x29,0x2c,0x20,
0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x35,0x32,0x34,0x32,
0x37,0x30,0x37,0x38,0x37,0x38,0x33,0x35,0x31,0x32,0x31,0x31,0x35,0x34,0x37,0x38,
0x35,0x65,0x2d,0x30,0x37,0x66,0x29,0x2e,0x78,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x20,0x5f,0x31,0x34,0x39,0x20,0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,
0x28,0x5f,0x31,0x33,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x2a,0x3d,0x20,0x28,
0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,
0x70,0x28,0x2d,0x5f,0x31,0x34,0x39,0x2c,0x20,0x5f,0x31,0x34,0x39,0x2c,0x20,0x61,
0x62,0x73,0x28,0x6d,0x6f,0x64,0x28,0x5f,0x31,0x33,0x36,0x2c,0x20,0x31,0x36,0x2e,
0x30,0x66,0x29,0x20,0x2d,0x20,0x34,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x34,0x2e,
0x30,0x66,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x5f,0x63,0x6f,0x6c,0x6f,
0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x66,0x20,
0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x76,0x5f,0x68,
0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x2d,0x20,0x5f,
0x31,0x35,0x2c,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,
0x5f,0x70,0x78,0x20,0x2b,0x20,0x5f,0x31,0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x76,
0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,
0x70,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,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,
0x6f,0x72,0x64,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,
0x74,0x2e,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,
0x2e,0x77,0x20,0x3d,0x20,0x31,0x2e,0x30,0x20,0x2f,0x20,0x67,0x6c,0x5f,0x46,0x72,
0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,
0x70,0x78,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,
0x2e,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,
0x73,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,
0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,
0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,
0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x76,
0x69,0x65,0x77,0x5f,0x7a,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
0x70,0x75,0x74,0x2e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,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,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,
0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x76,0x5f,
0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,
0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,
0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
0x61,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,
0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x61,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 <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct line_instance
{
float4 a;
float4 b;
float4 color;
uint4 flags;
};
struct line_instances
{
line_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_screen_a [[user(locn0)]];
float2 v_screen_b [[user(locn1)]];
float v_dist_from_axis_px [[user(locn2)]];
float v_half_width_px [[user(locn3)]];
float v_view_z [[user(locn4)]];
float4 v_color [[user(locn5)]];
uint v_occ_mode [[user(locn6)]];
float4 gl_Position [[position]];
};
vertex main0_out main0(constant ub_frame& _83 [[buffer(0)]], const device line_instances& _17 [[buffer(8)]], uint gl_InstanceIndex [[instance_id]], uint gl_VertexIndex [[vertex_id]])
{
main0_out out = {};
bool _49 = int(gl_VertexIndex) == 2;
bool _53 = int(gl_VertexIndex) == 4;
bool _54 = ((int(gl_VertexIndex) == 1) || _49) || _53;
float _68 = ((_49 || _53) || (int(gl_VertexIndex) == 5)) ? 1.0 : (-1.0);
float4 _91 = float4(_17.instances[int(gl_InstanceIndex)].a.xyz, 1.0);
float4 _92 = _83.view_proj * _91;
float4 _100 = float4(_17.instances[int(gl_InstanceIndex)].b.xyz, 1.0);
float4 _101 = _83.view_proj * _100;
float4 _126 = select(_92, _101, bool4(_54));
float _129;
if (_54)
{
_129 = (_83.view * _100).z;
}
else
{
_129 = (_83.view * _91).z;
}
out.v_screen_a = (((_92.xy / float2(_92.w)) * 0.5) + float2(0.5)) * _83.viewport.xy;
out.v_screen_b = (((_101.xy / float2(_101.w)) * 0.5) + float2(0.5)) * _83.viewport.xy;
float2 _181 = out.v_screen_b - out.v_screen_a;
float _184 = length(_181);
float2 _189;
if (_184 > 9.9999999747524270787835121154785e-07)
{
_189 = _181 / float2(_184);
}
else
{
_189 = float2(1.0, 0.0);
}
float half_width_px;
if (_17.instances[int(gl_InstanceIndex)].flags.x == 0u)
{
half_width_px = _17.instances[int(gl_InstanceIndex)].a.w * 0.5;
}
else
{
half_width_px = (_17.instances[int(gl_InstanceIndex)].a.w * 0.5) * ((_83.viewport.y * _83.proj[1].y) / (_129 * (-2.0)));
}
float _237 = half_width_px;
float _238 = fast::max(_237, 0.5);
half_width_px = _238;
float _242 = _238 + 1.5;
float2 _264 = _126.xy + ((((float2(-_189.y, _189.x) * _68) * _242) * (_83.viewport.zw * 2.0)) * _126.w);
float4 _309 = _126;
_309.x = _264.x;
_309.y = _264.y;
out.gl_Position = _309;
out.v_dist_from_axis_px = _68 * _242;
out.v_half_width_px = _238;
out.v_view_z = -_129;
out.v_color = _17.instances[int(gl_InstanceIndex)].color;
out.v_occ_mode = _17.instances[int(gl_InstanceIndex)].flags.y;
return out;
}
*/
static const uint8_t overlay_line_vs_source_metal_macos[2883] = {
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,0x6c,
0x69,0x6e,0x65,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x0a,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x61,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x75,0x69,0x6e,0x74,0x34,0x20,0x66,0x6c,0x61,0x67,0x73,0x3b,0x0a,0x7d,0x3b,
0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x69,0x6e,
0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6c,0x69,
0x6e,0x65,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,0x73,0x63,0x72,0x65,0x65,0x6e,
0x5f,0x61,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,0x32,0x20,0x76,
0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,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,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,
0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,
0x6c,0x6f,0x63,0x6e,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,
0x5f,0x70,0x78,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x33,
0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
0x6f,0x63,0x6e,0x34,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,0x35,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x75,0x69,0x6e,0x74,0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,
0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x36,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,0x33,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,0x6c,0x69,0x6e,0x65,0x5f,0x69,0x6e,0x73,0x74,0x61,0x6e,
0x63,0x65,0x73,0x26,0x20,0x5f,0x31,0x37,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,0x39,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,
0x33,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,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x34,0x20,0x3d,0x20,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,0x39,0x29,
0x20,0x7c,0x7c,0x20,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20,0x28,0x28,0x5f,0x34,0x39,0x20,0x7c,
0x7c,0x20,0x5f,0x35,0x33,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
0x20,0x5f,0x39,0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x31,
0x37,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,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x39,0x32,0x20,0x3d,
0x20,0x5f,0x38,0x33,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20,0x2a,
0x20,0x5f,0x39,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
0x20,0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,
0x31,0x37,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,0x62,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x30,0x31,
0x20,0x3d,0x20,0x5f,0x38,0x33,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,
0x20,0x2a,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x34,0x20,0x5f,0x31,0x32,0x36,0x20,0x3d,0x20,0x73,0x65,0x6c,0x65,0x63,
0x74,0x28,0x5f,0x39,0x32,0x2c,0x20,0x5f,0x31,0x30,0x31,0x2c,0x20,0x62,0x6f,0x6f,
0x6c,0x34,0x28,0x5f,0x35,0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x31,0x32,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
0x20,0x28,0x5f,0x35,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x39,0x20,0x3d,0x20,0x28,0x5f,0x38,0x33,
0x2e,0x76,0x69,0x65,0x77,0x20,0x2a,0x20,0x5f,0x31,0x30,0x30,0x29,0x2e,0x7a,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,
0x32,0x39,0x20,0x3d,0x20,0x28,0x5f,0x38,0x33,0x2e,0x76,0x69,0x65,0x77,0x20,0x2a,
0x20,0x5f,0x39,0x31,0x29,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
0x61,0x20,0x3d,0x20,0x28,0x28,0x28,0x5f,0x39,0x32,0x2e,0x78,0x79,0x20,0x2f,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x39,0x32,0x2e,0x77,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,0x33,0x2e,0x76,0x69,0x65,0x77,0x70,
0x6f,0x72,0x74,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,0x20,0x3d,0x20,0x28,0x28,0x28,
0x5f,0x31,0x30,0x31,0x2e,0x78,0x79,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
0x28,0x5f,0x31,0x30,0x31,0x2e,0x77,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,0x33,0x2e,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x2e,0x78,
0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,
0x38,0x31,0x20,0x3d,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,
0x6e,0x5f,0x62,0x20,0x2d,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,
0x65,0x6e,0x5f,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x31,0x38,0x34,0x20,0x3d,0x20,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x5f,0x31,
0x38,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
0x5f,0x31,0x38,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
0x38,0x34,0x20,0x3e,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,
0x37,0x35,0x32,0x34,0x32,0x37,0x30,0x37,0x38,0x37,0x38,0x33,0x35,0x31,0x32,0x31,
0x31,0x35,0x34,0x37,0x38,0x35,0x65,0x2d,0x30,0x37,0x29,0x0a,0x20,0x20,0x20,0x20,
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x38,0x39,0x20,0x3d,
0x20,0x5f,0x31,0x38,0x31,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,
0x31,0x38,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x5f,0x31,0x38,0x39,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x6c,0x66,
0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
0x66,0x20,0x28,0x5f,0x31,0x37,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,0x66,0x6c,0x61,0x67,0x73,0x2e,0x78,0x20,
0x3d,0x3d,0x20,0x30,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,
0x70,0x78,0x20,0x3d,0x20,0x5f,0x31,0x37,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,0x2e,0x77,0x20,0x2a,0x20,
0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,
0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,
0x3d,0x20,0x28,0x5f,0x31,0x37,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,0x2e,0x77,0x20,0x2a,0x20,0x30,0x2e,
0x35,0x29,0x20,0x2a,0x20,0x28,0x28,0x5f,0x38,0x33,0x2e,0x76,0x69,0x65,0x77,0x70,
0x6f,0x72,0x74,0x2e,0x79,0x20,0x2a,0x20,0x5f,0x38,0x33,0x2e,0x70,0x72,0x6f,0x6a,
0x5b,0x31,0x5d,0x2e,0x79,0x29,0x20,0x2f,0x20,0x28,0x5f,0x31,0x32,0x39,0x20,0x2a,
0x20,0x28,0x2d,0x32,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x37,0x20,
0x3d,0x20,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x38,0x20,
0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x5f,0x32,0x33,0x37,
0x2c,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x61,0x6c,0x66,
0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x32,0x33,0x38,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x32,
0x20,0x3d,0x20,0x5f,0x32,0x33,0x38,0x20,0x2b,0x20,0x31,0x2e,0x35,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x32,0x36,0x34,0x20,0x3d,
0x20,0x5f,0x31,0x32,0x36,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,0x66,
0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x5f,0x31,0x38,0x39,0x2e,0x79,0x2c,0x20,0x5f,
0x31,0x38,0x39,0x2e,0x78,0x29,0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,0x20,0x2a,0x20,
0x5f,0x32,0x34,0x32,0x29,0x20,0x2a,0x20,0x28,0x5f,0x38,0x33,0x2e,0x76,0x69,0x65,
0x77,0x70,0x6f,0x72,0x74,0x2e,0x7a,0x77,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,
0x20,0x2a,0x20,0x5f,0x31,0x32,0x36,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x33,0x30,0x39,0x20,0x3d,0x20,0x5f,0x31,
0x32,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x33,0x30,0x39,0x2e,0x78,0x20,0x3d,
0x20,0x5f,0x32,0x36,0x34,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x33,0x30,
0x39,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x32,0x36,0x34,0x2e,0x79,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
0x6e,0x20,0x3d,0x20,0x5f,0x33,0x30,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,
0x74,0x2e,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,
0x69,0x73,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x36,0x38,0x20,0x2a,0x20,0x5f,0x32,
0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x68,0x61,
0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x3d,0x20,0x5f,0x32,
0x33,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x76,0x69,
0x65,0x77,0x5f,0x7a,0x20,0x3d,0x20,0x2d,0x5f,0x31,0x32,0x39,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,
0x5f,0x31,0x37,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,
0x6f,0x75,0x74,0x2e,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,
0x20,0x5f,0x31,0x37,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,0x66,0x6c,0x61,0x67,0x73,0x2e,0x79,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
0x0a,0x0a,0x00,
};
/*
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
template<typename Tx, typename Ty>
inline Tx mod(Tx x, Ty y)
{
return x - y * floor(x / y);
}
struct main0_out
{
float4 out_color [[color(0)]];
};
struct main0_in
{
float2 v_screen_a [[user(locn0)]];
float2 v_screen_b [[user(locn1)]];
float v_dist_from_axis_px [[user(locn2), center_no_perspective]];
float v_half_width_px [[user(locn3)]];
float v_view_z [[user(locn4)]];
float4 v_color [[user(locn5), flat]];
uint v_occ_mode [[user(locn6)]];
};
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex_depth [[texture(0)]], sampler smp_depth [[sampler(0)]], float4 gl_FragCoord [[position]])
{
main0_out out = {};
float _15 = fwidth(in.v_dist_from_axis_px);
float _68 = fwidth(in.v_view_z);
bool _78 = in.v_view_z > (tex_depth.sample(smp_depth, (gl_FragCoord.xy / float2(int2(tex_depth.get_width(), tex_depth.get_height()))), level(0.0)).x + (0.001000000047497451305389404296875 + (2.0 * _68)));
float4 col = in.v_color;
if ((in.v_occ_mode == 0u) && _78)
{
col = float4(0.0);
}
else
{
if ((in.v_occ_mode == 1u) && _78)
{
col *= 0.25;
}
else
{
if ((in.v_occ_mode == 2u) && _78)
{
float2 _117 = in.v_screen_b - in.v_screen_a;
float _136 = dot(gl_FragCoord.xy - in.v_screen_a, _117 / float2(fast::max(length(_117), 9.9999999747524270787835121154785e-07)));
float _149 = fwidth(_136);
col *= (1.0 - smoothstep(-_149, _149, abs(mod(_136, 16.0) - 4.0) - 4.0));
}
}
}
out.out_color = col * (1.0 - smoothstep(in.v_half_width_px - _15, in.v_half_width_px + _15, abs(in.v_dist_from_axis_px)));
return out;
}
*/
static const uint8_t overlay_line_fs_source_metal_macos[1996] = {
0x23,0x70,0x72,0x61,0x67,0x6d,0x61,0x20,0x63,0x6c,0x61,0x6e,0x67,0x20,0x64,0x69,
0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x20,0x69,0x67,0x6e,0x6f,0x72,0x65,0x64,
0x20,0x22,0x2d,0x57,0x6d,0x69,0x73,0x73,0x69,0x6e,0x67,0x2d,0x70,0x72,0x6f,0x74,
0x6f,0x74,0x79,0x70,0x65,0x73,0x22,0x0a,0x0a,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,0x2f,0x2f,0x20,0x49,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,
0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x47,0x4c,0x53,0x4c,0x20,0x6d,
0x6f,0x64,0x28,0x29,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x77,
0x68,0x69,0x63,0x68,0x20,0x69,0x73,0x20,0x73,0x6c,0x69,0x67,0x68,0x74,0x6c,0x79,
0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x61,0x6e,0x20,
0x4d,0x65,0x74,0x61,0x6c,0x20,0x66,0x6d,0x6f,0x64,0x28,0x29,0x0a,0x74,0x65,0x6d,
0x70,0x6c,0x61,0x74,0x65,0x3c,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,
0x78,0x2c,0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x79,0x3e,0x0a,
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x54,0x78,0x20,0x6d,0x6f,0x64,0x28,0x54,0x78,
0x20,0x78,0x2c,0x20,0x54,0x79,0x20,0x79,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x78,0x20,0x2d,0x20,0x79,0x20,0x2a,0x20,0x66,
0x6c,0x6f,0x6f,0x72,0x28,0x78,0x20,0x2f,0x20,0x79,0x29,0x3b,0x0a,0x7d,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,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
0x61,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,0x32,0x20,0x76,0x5f,
0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x62,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,0x20,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,
0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
0x6f,0x63,0x6e,0x32,0x29,0x2c,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x5f,0x6e,0x6f,
0x5f,0x70,0x65,0x72,0x73,0x70,0x65,0x63,0x74,0x69,0x76,0x65,0x5d,0x5d,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x68,0x61,0x6c,0x66,
0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,
0x28,0x6c,0x6f,0x63,0x6e,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x5b,0x5b,
0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x34,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,0x35,0x29,0x2c,
0x20,0x66,0x6c,0x61,0x74,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,
0x74,0x20,0x76,0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x5b,0x5b,0x75,
0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x36,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,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,
0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,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,0x64,0x65,0x70,0x74,
0x68,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,
0x43,0x6f,0x6f,0x72,0x64,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,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,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x35,0x20,0x3d,0x20,0x66,0x77,
0x69,0x64,0x74,0x68,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,
0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,0x5f,0x70,0x78,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x38,0x20,0x3d,0x20,0x66,0x77,
0x69,0x64,0x74,0x68,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x38,0x20,
0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x7a,0x20,0x3e,0x20,
0x28,0x74,0x65,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x2e,0x73,0x61,0x6d,0x70,0x6c,
0x65,0x28,0x73,0x6d,0x70,0x5f,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x28,0x67,0x6c,
0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2f,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x74,0x65,0x78,0x5f,
0x64,0x65,0x70,0x74,0x68,0x2e,0x67,0x65,0x74,0x5f,0x77,0x69,0x64,0x74,0x68,0x28,
0x29,0x2c,0x20,0x74,0x65,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x2e,0x67,0x65,0x74,
0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,0x29,0x29,0x29,0x29,0x2c,0x20,0x6c,0x65,
0x76,0x65,0x6c,0x28,0x30,0x2e,0x30,0x29,0x29,0x2e,0x78,0x20,0x2b,0x20,0x28,0x30,
0x2e,0x30,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x34,0x39,0x37,
0x34,0x35,0x31,0x33,0x30,0x35,0x33,0x38,0x39,0x34,0x30,0x34,0x32,0x39,0x36,0x38,
0x37,0x35,0x20,0x2b,0x20,0x28,0x32,0x2e,0x30,0x20,0x2a,0x20,0x5f,0x36,0x38,0x29,
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,
0x6f,0x6c,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x6f,
0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x30,0x75,0x29,0x20,0x26,
0x26,0x20,0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x6f,
0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x31,0x75,0x29,0x20,0x26,
0x26,0x20,0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,
0x20,0x2a,0x3d,0x20,0x30,0x2e,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x69,0x6e,0x2e,0x76,
0x5f,0x6f,0x63,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x32,0x75,0x29,
0x20,0x26,0x26,0x20,0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,
0x31,0x37,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,
0x5f,0x62,0x20,0x2d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,0x65,0x6e,
0x5f,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x36,0x20,0x3d,
0x20,0x64,0x6f,0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,
0x64,0x2e,0x78,0x79,0x20,0x2d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x63,0x72,0x65,
0x65,0x6e,0x5f,0x61,0x2c,0x20,0x5f,0x31,0x31,0x37,0x20,0x2f,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x32,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x6c,0x65,
0x6e,0x67,0x74,0x68,0x28,0x5f,0x31,0x31,0x37,0x29,0x2c,0x20,0x39,0x2e,0x39,0x39,
0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x35,0x32,0x34,0x32,0x37,0x30,0x37,0x38,
0x37,0x38,0x33,0x35,0x31,0x32,0x31,0x31,0x35,0x34,0x37,0x38,0x35,0x65,0x2d,0x30,
0x37,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x34,0x39,
0x20,0x3d,0x20,0x66,0x77,0x69,0x64,0x74,0x68,0x28,0x5f,0x31,0x33,0x36,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x63,0x6f,0x6c,0x20,0x2a,0x3d,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x73,
0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x2d,0x5f,0x31,0x34,0x39,0x2c,
0x20,0x5f,0x31,0x34,0x39,0x2c,0x20,0x61,0x62,0x73,0x28,0x6d,0x6f,0x64,0x28,0x5f,
0x31,0x33,0x36,0x2c,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2d,0x20,0x34,0x2e,0x30,
0x29,0x20,0x2d,0x20,0x34,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,
0x2e,0x6f,0x75,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,
0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,
0x73,0x74,0x65,0x70,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,
0x69,0x64,0x74,0x68,0x5f,0x70,0x78,0x20,0x2d,0x20,0x5f,0x31,0x35,0x2c,0x20,0x69,
0x6e,0x2e,0x76,0x5f,0x68,0x61,0x6c,0x66,0x5f,0x77,0x69,0x64,0x74,0x68,0x5f,0x70,
0x78,0x20,0x2b,0x20,0x5f,0x31,0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x69,0x6e,0x2e,
0x76,0x5f,0x64,0x69,0x73,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x61,0x78,0x69,0x73,
0x5f,0x70,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,
};
static inline const sg_shader_desc* overlay_line_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*)overlay_line_vs_source_glsl430;
desc.vertex_func.entry = "main";
desc.fragment_func.source = (const char*)overlay_line_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.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_depth_smp_depth";
desc.label = "overlay_line_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*)overlay_line_vs_source_hlsl5;
desc.vertex_func.d3d11_target = "vs_5_0";
desc.vertex_func.entry = "main";
desc.fragment_func.source = (const char*)overlay_line_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.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 = "overlay_line_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*)overlay_line_vs_source_metal_macos;
desc.vertex_func.entry = "main0";
desc.fragment_func.source = (const char*)overlay_line_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.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 = "overlay_line_prog_shader";
}
return &desc;
}
return 0;
}