14400 lines
867 KiB
Plaintext
14400 lines
867 KiB
Plaintext
/*
|
|
#version:1# (machine generated, don't edit!)
|
|
|
|
Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
|
|
|
|
Cmdline:
|
|
sokol-shdc -i src/renderer_sokol/shaders/shaders.glsl -o src/renderer_sokol/shaders/jai/shaders.jai -l glsl430:glsl300es:metal_macos -f sokol_jai
|
|
|
|
Overview:
|
|
=========
|
|
Shader program: 'bloom_down':
|
|
Get shader desc: bloom_down_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_fullscreen
|
|
Fragment Shader: fs_bloom_down
|
|
Attributes:
|
|
Shader program: 'bloom_glow':
|
|
Get shader desc: bloom_glow_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_fullscreen
|
|
Fragment Shader: fs_bloom_glow
|
|
Attributes:
|
|
Shader program: 'bloom_up':
|
|
Get shader desc: bloom_up_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_fullscreen
|
|
Fragment Shader: fs_bloom_up
|
|
Attributes:
|
|
Shader program: 'line':
|
|
Get shader desc: line_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_line
|
|
Fragment Shader: fs_line
|
|
Attributes:
|
|
ATTR_line_a => 0
|
|
ATTR_line_b => 1
|
|
ATTR_line_color => 2
|
|
ATTR_line_width => 3
|
|
Shader program: 'particle':
|
|
Get shader desc: particle_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_sprite
|
|
Fragment Shader: fs_particle
|
|
Attributes:
|
|
ATTR_particle_center => 0
|
|
ATTR_particle_size => 1
|
|
ATTR_particle_uv_rect => 2
|
|
ATTR_particle_face => 3
|
|
ATTR_particle_color => 4
|
|
ATTR_particle_glow => 5
|
|
Shader program: 'post':
|
|
Get shader desc: post_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_fullscreen
|
|
Fragment Shader: fs_post
|
|
Attributes:
|
|
Shader program: 'shafts':
|
|
Get shader desc: shafts_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_shafts
|
|
Fragment Shader: fs_shafts
|
|
Attributes:
|
|
Shader program: 'sky':
|
|
Get shader desc: sky_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_sky
|
|
Fragment Shader: fs_sky
|
|
Attributes:
|
|
Shader program: 'sprite':
|
|
Get shader desc: sprite_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_sprite
|
|
Fragment Shader: fs_sprite
|
|
Attributes:
|
|
ATTR_sprite_center => 0
|
|
ATTR_sprite_size => 1
|
|
ATTR_sprite_uv_rect => 2
|
|
ATTR_sprite_face => 3
|
|
ATTR_sprite_color => 4
|
|
ATTR_sprite_glow => 5
|
|
Shader program: 'sprite_shadow':
|
|
Get shader desc: sprite_shadow_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_sprite
|
|
Fragment Shader: fs_sprite_shadow
|
|
Attributes:
|
|
ATTR_sprite_shadow_center => 0
|
|
ATTR_sprite_shadow_size => 1
|
|
ATTR_sprite_shadow_uv_rect => 2
|
|
ATTR_sprite_shadow_face => 3
|
|
ATTR_sprite_shadow_color => 4
|
|
ATTR_sprite_shadow_glow => 5
|
|
Shader program: 'trile':
|
|
Get shader desc: trile_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_trile
|
|
Fragment Shader: fs_trile
|
|
Attributes:
|
|
ATTR_trile_position => 0
|
|
ATTR_trile_data_n => 1
|
|
ATTR_trile_instance => 2
|
|
ATTR_trile_tint => 3
|
|
ATTR_trile_cut => 4
|
|
Shader program: 'trile_glass_shadow':
|
|
Get shader desc: trile_glass_shadow_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_trile
|
|
Fragment Shader: fs_trile_glass_shadow
|
|
Attributes:
|
|
ATTR_trile_glass_shadow_position => 0
|
|
ATTR_trile_glass_shadow_data_n => 1
|
|
ATTR_trile_glass_shadow_instance => 2
|
|
ATTR_trile_glass_shadow_tint => 3
|
|
ATTR_trile_glass_shadow_cut => 4
|
|
Shader program: 'trile_shadow':
|
|
Get shader desc: trile_shadow_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_trile
|
|
Fragment Shader: fs_trile_shadow
|
|
Attributes:
|
|
ATTR_trile_shadow_position => 0
|
|
ATTR_trile_shadow_data_n => 1
|
|
ATTR_trile_shadow_instance => 2
|
|
ATTR_trile_shadow_tint => 3
|
|
ATTR_trile_shadow_cut => 4
|
|
Shader program: 'ui':
|
|
Get shader desc: ui_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_ui
|
|
Fragment Shader: fs_ui
|
|
Attributes:
|
|
ATTR_ui_position => 0
|
|
ATTR_ui_uv => 1
|
|
ATTR_ui_color0 => 2
|
|
Shader program: 'water':
|
|
Get shader desc: water_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_water
|
|
Fragment Shader: fs_water
|
|
Attributes:
|
|
Shader program: 'water_floor':
|
|
Get shader desc: water_floor_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_water
|
|
Fragment Shader: fs_water_floor
|
|
Attributes:
|
|
Bindings:
|
|
Uniform block 'view_params':
|
|
Jai struct: View_Params
|
|
Bind slot: UB_view_params => 0
|
|
Uniform block 'line_params':
|
|
Jai struct: Line_Params
|
|
Bind slot: UB_line_params => 1
|
|
Uniform block 'sprite_params':
|
|
Jai struct: Sprite_Params
|
|
Bind slot: UB_sprite_params => 1
|
|
Uniform block 'post_params':
|
|
Jai struct: Post_Params
|
|
Bind slot: UB_post_params => 0
|
|
Uniform block 'shaft_params':
|
|
Jai struct: Shaft_Params
|
|
Bind slot: UB_shaft_params => 1
|
|
Uniform block 'shadow_params':
|
|
Jai struct: Shadow_Params
|
|
Bind slot: UB_shadow_params => 3
|
|
Uniform block 'sky_params':
|
|
Jai struct: Sky_Params
|
|
Bind slot: UB_sky_params => 1
|
|
Uniform block 'trile_params':
|
|
Jai struct: Trile_Params
|
|
Bind slot: UB_trile_params => 1
|
|
Uniform block 'trile_fs_params':
|
|
Jai struct: Trile_Fs_Params
|
|
Bind slot: UB_trile_fs_params => 2
|
|
Uniform block 'ui_vs_params':
|
|
Jai struct: Ui_Vs_Params
|
|
Bind slot: UB_ui_vs_params => 0
|
|
Uniform block 'water_vs_params':
|
|
Jai struct: Water_Vs_Params
|
|
Bind slot: UB_water_vs_params => 1
|
|
Uniform block 'water_fs_params':
|
|
Jai struct: Water_Fs_Params
|
|
Bind slot: UB_water_fs_params => 2
|
|
Uniform block 'water_floor_params':
|
|
Jai struct: Water_Floor_Params
|
|
Bind slot: UB_water_floor_params => 2
|
|
Image 'bloom_source':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_bloom_source => 0
|
|
Image 'bloom_glow':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_bloom_glow => 1
|
|
Image 'sprite':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_sprite => 0
|
|
Image 'view_color':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_view_color => 0
|
|
Image 'bloom':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_bloom => 1
|
|
Image 'shafts':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_shafts => 2
|
|
Image 'shaft_scene':
|
|
Image type: ._2D
|
|
Sample type: .UNFILTERABLE_FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_shaft_scene => 0
|
|
Image 'shadow_tint':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_shadow_tint => 8
|
|
Image 'shadow_map':
|
|
Image type: ._2D
|
|
Sample type: .DEPTH
|
|
Multisampled: false
|
|
Bind slot: IMG_shadow_map => 7
|
|
Image 'probe_index':
|
|
Image type: ._3D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_probe_index => 3
|
|
Image 'probe_atlas':
|
|
Image type: ._3D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_probe_atlas => 4
|
|
Image 'palette':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_palette => 0
|
|
Image 'trile_reflection':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_trile_reflection => 1
|
|
Image 'trile_reflection_glow':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_trile_reflection_glow => 2
|
|
Image 'tex':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_tex => 0
|
|
Image 'normals':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_normals => 1
|
|
Image 'reflection':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_reflection => 0
|
|
Image 'reflection_glow':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_reflection_glow => 2
|
|
Sampler 'bloom_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_bloom_smp => 0
|
|
Sampler 'sprite_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_sprite_smp => 0
|
|
Sampler 'view_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_view_smp => 0
|
|
Sampler 'bloom_view_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_bloom_view_smp => 1
|
|
Sampler 'shaft_scene_smp':
|
|
Type: .NONFILTERING
|
|
Bind slot: SMP_shaft_scene_smp => 0
|
|
Sampler 'shadow_tint_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_shadow_tint_smp => 8
|
|
Sampler 'shadow_smp':
|
|
Type: .COMPARISON
|
|
Bind slot: SMP_shadow_smp => 7
|
|
Sampler 'probe_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_probe_smp => 2
|
|
Sampler 'palette_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_palette_smp => 0
|
|
Sampler 'trile_reflection_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_trile_reflection_smp => 1
|
|
Sampler 'smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_smp => 0
|
|
Sampler 'normals_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_normals_smp => 1
|
|
Sampler 'reflection_smp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_reflection_smp => 0
|
|
*/
|
|
ATTR_line_a :: 0;
|
|
ATTR_line_b :: 1;
|
|
ATTR_line_color :: 2;
|
|
ATTR_line_width :: 3;
|
|
ATTR_particle_center :: 0;
|
|
ATTR_particle_size :: 1;
|
|
ATTR_particle_uv_rect :: 2;
|
|
ATTR_particle_face :: 3;
|
|
ATTR_particle_color :: 4;
|
|
ATTR_particle_glow :: 5;
|
|
ATTR_sprite_center :: 0;
|
|
ATTR_sprite_size :: 1;
|
|
ATTR_sprite_uv_rect :: 2;
|
|
ATTR_sprite_face :: 3;
|
|
ATTR_sprite_color :: 4;
|
|
ATTR_sprite_glow :: 5;
|
|
ATTR_sprite_shadow_center :: 0;
|
|
ATTR_sprite_shadow_size :: 1;
|
|
ATTR_sprite_shadow_uv_rect :: 2;
|
|
ATTR_sprite_shadow_face :: 3;
|
|
ATTR_sprite_shadow_color :: 4;
|
|
ATTR_sprite_shadow_glow :: 5;
|
|
ATTR_trile_position :: 0;
|
|
ATTR_trile_data_n :: 1;
|
|
ATTR_trile_instance :: 2;
|
|
ATTR_trile_tint :: 3;
|
|
ATTR_trile_cut :: 4;
|
|
ATTR_trile_glass_shadow_position :: 0;
|
|
ATTR_trile_glass_shadow_data_n :: 1;
|
|
ATTR_trile_glass_shadow_instance :: 2;
|
|
ATTR_trile_glass_shadow_tint :: 3;
|
|
ATTR_trile_glass_shadow_cut :: 4;
|
|
ATTR_trile_shadow_position :: 0;
|
|
ATTR_trile_shadow_data_n :: 1;
|
|
ATTR_trile_shadow_instance :: 2;
|
|
ATTR_trile_shadow_tint :: 3;
|
|
ATTR_trile_shadow_cut :: 4;
|
|
ATTR_ui_position :: 0;
|
|
ATTR_ui_uv :: 1;
|
|
ATTR_ui_color0 :: 2;
|
|
UB_view_params :: 0;
|
|
UB_line_params :: 1;
|
|
UB_sprite_params :: 1;
|
|
UB_post_params :: 0;
|
|
UB_shaft_params :: 1;
|
|
UB_shadow_params :: 3;
|
|
UB_sky_params :: 1;
|
|
UB_trile_params :: 1;
|
|
UB_trile_fs_params :: 2;
|
|
UB_ui_vs_params :: 0;
|
|
UB_water_vs_params :: 1;
|
|
UB_water_fs_params :: 2;
|
|
UB_water_floor_params :: 2;
|
|
IMG_bloom_source :: 0;
|
|
IMG_bloom_glow :: 1;
|
|
IMG_sprite :: 0;
|
|
IMG_view_color :: 0;
|
|
IMG_bloom :: 1;
|
|
IMG_shafts :: 2;
|
|
IMG_shaft_scene :: 0;
|
|
IMG_shadow_tint :: 8;
|
|
IMG_shadow_map :: 7;
|
|
IMG_probe_index :: 3;
|
|
IMG_probe_atlas :: 4;
|
|
IMG_palette :: 0;
|
|
IMG_trile_reflection :: 1;
|
|
IMG_trile_reflection_glow :: 2;
|
|
IMG_tex :: 0;
|
|
IMG_normals :: 1;
|
|
IMG_reflection :: 0;
|
|
IMG_reflection_glow :: 2;
|
|
SMP_bloom_smp :: 0;
|
|
SMP_sprite_smp :: 0;
|
|
SMP_view_smp :: 0;
|
|
SMP_bloom_view_smp :: 1;
|
|
SMP_shaft_scene_smp :: 0;
|
|
SMP_shadow_tint_smp :: 8;
|
|
SMP_shadow_smp :: 7;
|
|
SMP_probe_smp :: 2;
|
|
SMP_palette_smp :: 0;
|
|
SMP_trile_reflection_smp :: 1;
|
|
SMP_smp :: 0;
|
|
SMP_normals_smp :: 1;
|
|
SMP_reflection_smp :: 0;
|
|
View_Params :: struct {
|
|
view_proj: [16]float;
|
|
inv_view_proj: [16]float;
|
|
camera: [4]float;
|
|
clip: [4]float;
|
|
sun_direction: [4]float;
|
|
sun_color: [4]float;
|
|
shade_color: [4]float;
|
|
};
|
|
Line_Params :: struct {
|
|
viewport: [2]float;
|
|
_: [8]u8;
|
|
};
|
|
Sprite_Params :: struct {
|
|
lit: float;
|
|
_: [12]u8;
|
|
};
|
|
Post_Params :: struct {
|
|
exposure: float;
|
|
contrast: float;
|
|
saturation: float;
|
|
bloom_amount: float;
|
|
};
|
|
Shaft_Params :: struct {
|
|
density: float;
|
|
amount: float;
|
|
max_distance: float;
|
|
steps: float;
|
|
};
|
|
Shadow_Params :: struct {
|
|
shadow_uv: [16]float;
|
|
};
|
|
Sky_Params :: struct {
|
|
sky_base: [4]float;
|
|
sky_top: [4]float;
|
|
sun_disk: [4]float;
|
|
sun_halo: [4]float;
|
|
horizon_halo: [4]float;
|
|
sun: [4]float;
|
|
};
|
|
Trile_Params :: struct {
|
|
orientations: [72][4]float;
|
|
show_hidden: float;
|
|
_: [12]u8;
|
|
};
|
|
Trile_Fs_Params :: struct {
|
|
sun_dir: [4]float;
|
|
probe_min: [4]float;
|
|
probe_size: [4]float;
|
|
use_reflection: float;
|
|
reflection_height: float;
|
|
_: [8]u8;
|
|
};
|
|
Ui_Vs_Params :: struct {
|
|
screen_size: [2]float;
|
|
_: [8]u8;
|
|
};
|
|
Water_Vs_Params :: struct {
|
|
height: float;
|
|
half_size: float;
|
|
_: [8]u8;
|
|
};
|
|
Water_Fs_Params :: struct {
|
|
water_color: [3]float;
|
|
_: [4]u8;
|
|
sun_direction: [3]float;
|
|
shininess: float;
|
|
sun_color: [3]float;
|
|
time: float;
|
|
reflectivity: float;
|
|
distortion: float;
|
|
_: [8]u8;
|
|
};
|
|
Water_Floor_Params :: struct {
|
|
floor_color: [3]float;
|
|
_: [4]u8;
|
|
};
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 ui_vs_params[1];
|
|
layout(location = 0) in vec2 position;
|
|
layout(location = 0) out vec2 v_uv;
|
|
layout(location = 1) in vec2 uv;
|
|
layout(location = 1) out vec4 v_color;
|
|
layout(location = 2) in vec4 color0;
|
|
|
|
void main()
|
|
{
|
|
vec2 _26 = ((position / ui_vs_params[0].xy) * 2.0) - vec2(1.0);
|
|
gl_Position = vec4(_26.x, -_26.y, 0.0, 1.0);
|
|
v_uv = uv;
|
|
v_color = color0;
|
|
}
|
|
|
|
*/
|
|
vs_ui_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x75,0x69,0x5f,0x76,0x73,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,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,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x76,0x5f,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
|
|
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,
|
|
0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
|
|
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,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,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x30,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x36,0x20,
|
|
0x3d,0x20,0x28,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2f,0x20,0x75,
|
|
0x69,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,
|
|
0x79,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,
|
|
0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x32,
|
|
0x36,0x2e,0x78,0x2c,0x20,0x2d,0x5f,0x32,0x36,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x75,0x76,
|
|
0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D tex_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 0) in vec2 v_uv;
|
|
layout(location = 1) in vec4 v_color;
|
|
|
|
void main()
|
|
{
|
|
frag_color = texture(tex_smp, v_uv) * v_color;
|
|
}
|
|
|
|
*/
|
|
fs_ui_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
vec2 fullscreen_position(int vertex_index)
|
|
{
|
|
return (vec2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - vec2(1.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
gl_Position = vec4(fullscreen_position(param), 0.0, 1.0);
|
|
}
|
|
|
|
*/
|
|
vs_fullscreen_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x76,0x65,
|
|
0x63,0x32,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,
|
|
0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x28,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,
|
|
0x3c,0x3c,0x20,0x31,0x29,0x20,0x26,0x20,0x32,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x26,
|
|
0x20,0x32,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,
|
|
0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,
|
|
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,
|
|
0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x66,0x75,
|
|
0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D bloom_source_bloom_smp;
|
|
layout(binding = 17) uniform sampler2D bloom_glow_bloom_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
vec3 glowing(ivec2 p)
|
|
{
|
|
return texelFetch(bloom_source_bloom_smp, p, 0).xyz * texelFetch(bloom_glow_bloom_smp, p, 0).x;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
ivec2 _53 = ivec2(gl_FragCoord.xy) * ivec2(2);
|
|
ivec2 param = _53;
|
|
ivec2 param_1 = _53 + ivec2(1, 0);
|
|
ivec2 param_2 = _53 + ivec2(0, 1);
|
|
ivec2 param_3 = _53 + ivec2(1);
|
|
frag_color = vec4((((glowing(param) + glowing(param_1)) + glowing(param_2)) + glowing(param_3)) * 0.25, 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_bloom_glow_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,
|
|
0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x37,
|
|
0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,
|
|
0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x33,0x20,0x67,0x6c,0x6f,0x77,0x69,
|
|
0x6e,0x67,0x28,0x69,0x76,0x65,0x63,0x32,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,
|
|
0x74,0x63,0x68,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,
|
|
0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x70,0x2c,0x20,0x30,
|
|
0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,
|
|
0x63,0x68,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x62,0x6c,
|
|
0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x70,0x2c,0x20,0x30,0x29,0x2e,0x78,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,0x33,
|
|
0x20,0x3d,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,
|
|
0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x69,0x76,0x65,0x63,
|
|
0x32,0x28,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,
|
|
0x20,0x5f,0x35,0x33,0x20,0x2b,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x31,0x2c,0x20,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x33,0x20,0x2b,0x20,0x69,0x76,
|
|
0x65,0x63,0x32,0x28,0x30,0x2c,0x20,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,
|
|
0x35,0x33,0x20,0x2b,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x31,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x28,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2b,0x20,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x20,0x2b,0x20,0x67,0x6c,0x6f,
|
|
0x77,0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x29,0x20,0x2b,
|
|
0x20,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,
|
|
0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D bloom_source_bloom_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
vec3 tap(vec2 uv)
|
|
{
|
|
return texture(bloom_source_bloom_smp, uv).xyz;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec2 _40 = vec2(textureSize(bloom_source_bloom_smp, 0));
|
|
vec2 _42 = vec2(1.0) / _40;
|
|
vec2 _51 = (gl_FragCoord.xy * 2.0) * _42;
|
|
vec2 param = _51 + (vec2(-1.0) / _40);
|
|
vec2 param_1 = _51 + (vec2(1.0, -1.0) / _40);
|
|
vec2 param_2 = _51 + (vec2(-1.0, 1.0) / _40);
|
|
vec2 param_3 = _51 + _42;
|
|
frag_color = vec4((((tap(param) + tap(param_1)) + tap(param_2)) + tap(param_3)) * 0.25, 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_bloom_down_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,
|
|
0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x33,0x20,0x74,0x61,
|
|
0x70,0x28,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,0x78,0x79,0x7a,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x30,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,
|
|
0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x32,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x28,0x67,
|
|
0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2a,
|
|
0x20,0x32,0x2e,0x30,0x29,0x20,0x2a,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,0x20,
|
|
0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,
|
|
0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,
|
|
0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x31,
|
|
0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,
|
|
0x35,0x31,0x20,0x2b,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,
|
|
0x28,0x28,0x28,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2b,0x20,
|
|
0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x20,0x2b,0x20,
|
|
0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x29,0x20,0x2b,0x20,
|
|
0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x29,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D bloom_source_bloom_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
vec3 tap(vec2 uv)
|
|
{
|
|
return texture(bloom_source_bloom_smp, uv).xyz;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec2 _40 = vec2(textureSize(bloom_source_bloom_smp, 0));
|
|
vec2 _42 = vec2(1.0) / _40;
|
|
vec2 _51 = (gl_FragCoord.xy * 0.5) * _42;
|
|
vec2 param = _51;
|
|
vec2 param_1 = _51 + (vec2(-1.0, 0.0) / _40);
|
|
vec2 param_2 = _51 + (vec2(1.0, 0.0) / _40);
|
|
vec2 param_3 = _51 + (vec2(0.0, -1.0) / _40);
|
|
vec2 param_4 = _51 + (vec2(0.0, 1.0) / _40);
|
|
vec2 param_5 = _51 + (vec2(-1.0) / _40);
|
|
vec2 param_6 = _51 + (vec2(1.0, -1.0) / _40);
|
|
vec2 param_7 = _51 + (vec2(-1.0, 1.0) / _40);
|
|
vec2 param_8 = _51 + _42;
|
|
frag_color = vec4((((tap(param) * 4.0) + ((((tap(param_1) + tap(param_2)) + tap(param_3)) + tap(param_4)) * 2.0)) + (((tap(param_5) + tap(param_6)) + tap(param_7)) + tap(param_8))) * vec3(0.0625), 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_bloom_up_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,
|
|
0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x33,0x20,0x74,0x61,
|
|
0x70,0x28,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,0x78,0x79,0x7a,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x30,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,
|
|
0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x32,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x28,0x67,
|
|
0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,
|
|
0x32,0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,
|
|
0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,
|
|
0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x20,0x2f,0x20,
|
|
0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,
|
|
0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,0x20,
|
|
0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,
|
|
0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,
|
|
0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,
|
|
0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,
|
|
0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,0x20,
|
|
0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,
|
|
0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x5f,0x35,0x31,
|
|
0x20,0x2b,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,
|
|
0x28,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2a,0x20,0x34,0x2e,
|
|
0x30,0x29,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,0x74,0x61,0x70,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x32,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x33,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x34,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,
|
|
0x28,0x28,0x28,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x20,
|
|
0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x29,0x29,0x20,
|
|
0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x29,0x20,
|
|
0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x29,0x29,0x29,
|
|
0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 view_params[13];
|
|
layout(location = 0) out vec4 v_point;
|
|
layout(location = 1) out vec3 v_camera;
|
|
layout(location = 2) out vec3 v_sun;
|
|
layout(location = 3) out float v_time;
|
|
|
|
vec2 fullscreen_position(int vertex_index)
|
|
{
|
|
return (vec2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - vec2(1.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = fullscreen_position(param);
|
|
float _48 = _37.x;
|
|
gl_Position = vec4(_48, _37.y, 0.0, 1.0);
|
|
v_point = mat4(view_params[4], view_params[5], view_params[6], view_params[7]) * vec4(_48, _37.y, 0.5, 1.0);
|
|
v_camera = view_params[8].xyz;
|
|
v_sun = view_params[11].xyz;
|
|
v_time = view_params[8].w;
|
|
}
|
|
|
|
*/
|
|
vs_shafts_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x33,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,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,
|
|
0x74,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,0x33,
|
|
0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,
|
|
0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,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,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x32,0x20,0x66,0x75,0x6c,
|
|
0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
|
0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x28,0x76,0x65,0x63,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x76,0x65,0x72,
|
|
0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3c,0x3c,0x20,0x31,0x29,0x20,
|
|
0x26,0x20,0x32,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x76,0x65,0x72,0x74,
|
|
0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x26,0x20,0x32,0x29,0x29,0x20,0x2a,
|
|
0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,
|
|
0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x38,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,
|
|
0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,
|
|
0x33,0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x20,0x3d,0x20,0x6d,
|
|
0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x34,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x35,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x36,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x37,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,
|
|
0x5f,0x33,0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x3d,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x31,0x5d,
|
|
0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,
|
|
0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,
|
|
0x5d,0x2e,0x77,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 shaft_params[1];
|
|
uniform vec4 shadow_params[4];
|
|
layout(binding = 16) uniform sampler2D shaft_scene_shaft_scene_smp;
|
|
layout(binding = 17) uniform sampler2D shadow_tint_shadow_tint_smp;
|
|
layout(binding = 18) uniform sampler2DShadow shadow_map_shadow_smp;
|
|
|
|
layout(location = 3) in float v_time;
|
|
layout(location = 0) in vec4 v_point;
|
|
layout(location = 1) in vec3 v_camera;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 2) in vec3 v_sun;
|
|
|
|
float brightest(vec3 c)
|
|
{
|
|
return max(c.x, max(c.y, c.z));
|
|
}
|
|
|
|
float hash(inout vec3 p)
|
|
{
|
|
p = fract((p * 0.31830990314483642578125) + vec3(0.100000001490116119384765625));
|
|
p *= 17.0;
|
|
return fract(((p.x * p.y) * p.z) * ((p.x + p.y) + p.z));
|
|
}
|
|
|
|
float value_noise(vec3 p)
|
|
{
|
|
vec3 _69 = floor(p);
|
|
vec3 _72 = fract(p);
|
|
vec3 _82 = (_72 * _72) * (vec3(3.0) - (_72 * 2.0));
|
|
vec3 param = _69;
|
|
float _85 = hash(param);
|
|
vec3 param_1 = _69 + vec3(1.0, 0.0, 0.0);
|
|
float _92 = hash(param_1);
|
|
float _94 = _82.x;
|
|
vec3 param_2 = _69 + vec3(0.0, 1.0, 0.0);
|
|
float _100 = hash(param_2);
|
|
vec3 param_3 = _69 + vec3(1.0, 1.0, 0.0);
|
|
float _105 = hash(param_3);
|
|
float _110 = _82.y;
|
|
vec3 param_4 = _69 + vec3(0.0, 0.0, 1.0);
|
|
float _116 = hash(param_4);
|
|
vec3 param_5 = _69 + vec3(1.0, 0.0, 1.0);
|
|
float _121 = hash(param_5);
|
|
vec3 param_6 = _69 + vec3(0.0, 1.0, 1.0);
|
|
float _129 = hash(param_6);
|
|
vec3 param_7 = _69 + vec3(1.0);
|
|
float _134 = hash(param_7);
|
|
return mix(mix(mix(_85, _92, _94), mix(_100, _105, _94), _110), mix(mix(_116, _121, _94), mix(_129, _134, _94), _110), _82.z);
|
|
}
|
|
|
|
float dust(vec3 p)
|
|
{
|
|
vec3 _149 = p * 0.800000011920928955078125;
|
|
vec3 param = _149 + ((vec3(0.4000000059604644775390625, 0.1500000059604644775390625, 0.300000011920928955078125) * v_time) * 0.800000011920928955078125);
|
|
vec3 param_1 = (_149 * 2.2999999523162841796875) - (((vec3(0.300000011920928955078125, 0.4000000059604644775390625, 0.1500000059604644775390625) * v_time) * 0.800000011920928955078125) * 1.7000000476837158203125);
|
|
return mix(0.0, 2.0, smoothstep(0.25, 0.75, (value_noise(param) * 0.64999997615814208984375) + (value_noise(param_1) * 0.3499999940395355224609375)));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec3 _204 = normalize((v_point.xyz / vec3(v_point.w)) - v_camera);
|
|
float _242 = min(texelFetch(shaft_scene_shaft_scene_smp, ivec2(gl_FragCoord.xy) * ivec2(2), 0).x, shaft_params[0].z) / shaft_params[0].w;
|
|
float _253 = fract(52.98291778564453125 * fract(dot(gl_FragCoord.xy, vec2(0.067110560834407806396484375, 0.005837149918079376220703125))));
|
|
vec3 light = vec3(0.0);
|
|
for (float i = 0.0; i < shaft_params[0].w; i += 1.0)
|
|
{
|
|
float _272 = (i + _253) * _242;
|
|
vec3 _286 = (floor((v_camera + (_204 * _272)) * 16.0) + vec3(0.5)) * vec3(0.0625);
|
|
vec4 _301 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4(_286, 1.0);
|
|
float _303 = _301.x;
|
|
bool _304 = _303 < 0.0;
|
|
bool _311;
|
|
if (!_304)
|
|
{
|
|
_311 = _303 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_311 = _304;
|
|
}
|
|
bool _318;
|
|
if (!_311)
|
|
{
|
|
_318 = _301.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_318 = _311;
|
|
}
|
|
bool _325;
|
|
if (!_318)
|
|
{
|
|
_325 = _301.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_325 = _318;
|
|
}
|
|
bool _332;
|
|
if (!_325)
|
|
{
|
|
_332 = _301.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_332 = _325;
|
|
}
|
|
if (_332)
|
|
{
|
|
continue;
|
|
}
|
|
vec4 _344 = texture(shadow_tint_shadow_tint_smp, _301.xy);
|
|
float _346 = _301.z;
|
|
if (_346 < (_344.w + 0.001000000047497451305389404296875))
|
|
{
|
|
continue;
|
|
}
|
|
float _368 = _346 - 0.0005000000237487256526947021484375;
|
|
vec3 _377 = _344.xyz;
|
|
vec3 param = _377;
|
|
vec3 param_1 = _286;
|
|
light += (((mix(vec3(brightest(param)), _377, vec3(0.60000002384185791015625)) * texture(shadow_map_shadow_smp, vec3(vec3(_303, _301.y, _368).xy, _368))) * exp((-shaft_params[0].x) * _272)) * dust(param_1));
|
|
}
|
|
frag_color = vec4((((light * v_sun) * shaft_params[0].x) * _242) * shaft_params[0].y, 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_shafts_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x68,0x61,0x66,0x74,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,
|
|
0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x36,0x29,0x20,
|
|
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,
|
|
0x44,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x68,
|
|
0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,
|
|
0x31,0x37,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,
|
|
0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,
|
|
0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,
|
|
0x67,0x20,0x3d,0x20,0x31,0x38,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,
|
|
0x6e,0x74,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,0x33,
|
|
0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,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,0x66,0x72,0x61,0x67,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,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x76,0x65,0x63,0x33,0x20,0x63,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,
|
|
0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,0x79,0x2c,
|
|
0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x68,0x61,0x73,0x68,0x28,0x69,0x6e,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x20,0x3d,0x20,0x66,0x72,
|
|
0x61,0x63,0x74,0x28,0x28,0x70,0x20,0x2a,0x20,0x30,0x2e,0x33,0x31,0x38,0x33,0x30,
|
|
0x39,0x39,0x30,0x33,0x31,0x34,0x34,0x38,0x33,0x36,0x34,0x32,0x35,0x37,0x38,0x31,
|
|
0x32,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x31,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,
|
|
0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x70,0x20,0x2a,0x3d,0x20,0x31,0x37,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x28,0x28,0x70,0x2e,
|
|
0x78,0x20,0x2a,0x20,0x70,0x2e,0x79,0x29,0x20,0x2a,0x20,0x70,0x2e,0x7a,0x29,0x20,
|
|
0x2a,0x20,0x28,0x28,0x70,0x2e,0x78,0x20,0x2b,0x20,0x70,0x2e,0x79,0x29,0x20,0x2b,
|
|
0x20,0x70,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x76,0x65,0x63,
|
|
0x33,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x5f,0x36,0x39,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x66,
|
|
0x72,0x61,0x63,0x74,0x28,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x38,0x32,0x20,0x3d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x5f,
|
|
0x37,0x32,0x29,0x20,0x2a,0x20,0x28,0x76,0x65,0x63,0x33,0x28,0x33,0x2e,0x30,0x29,
|
|
0x20,0x2d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,
|
|
0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x5f,0x38,0x35,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x32,0x20,
|
|
0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x34,0x20,0x3d,
|
|
0x20,0x5f,0x38,0x32,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,
|
|
0x30,0x35,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x33,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,
|
|
0x31,0x30,0x20,0x3d,0x20,0x5f,0x38,0x32,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x5f,
|
|
0x36,0x39,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x31,0x31,0x36,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x36,0x39,
|
|
0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x31,0x32,0x31,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x31,0x32,0x39,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x34,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,
|
|
0x28,0x5f,0x38,0x35,0x2c,0x20,0x5f,0x39,0x32,0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,
|
|
0x20,0x6d,0x69,0x78,0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x31,0x30,0x35,0x2c,
|
|
0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x5f,0x31,0x31,0x30,0x29,0x2c,0x20,0x6d,0x69,
|
|
0x78,0x28,0x6d,0x69,0x78,0x28,0x5f,0x31,0x31,0x36,0x2c,0x20,0x5f,0x31,0x32,0x31,
|
|
0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x5f,0x31,0x32,0x39,
|
|
0x2c,0x20,0x5f,0x31,0x33,0x34,0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x5f,0x31,
|
|
0x31,0x30,0x29,0x2c,0x20,0x5f,0x38,0x32,0x2e,0x7a,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x75,0x73,0x74,0x28,0x76,0x65,0x63,0x33,0x20,
|
|
0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,
|
|
0x34,0x39,0x20,0x3d,0x20,0x70,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,
|
|
0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x34,0x39,0x20,0x2b,0x20,0x28,0x28,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,
|
|
0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,
|
|
0x20,0x30,0x2e,0x31,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,
|
|
0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,
|
|
0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,
|
|
0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,0x76,0x5f,0x74,0x69,
|
|
0x6d,0x65,0x29,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,
|
|
0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x28,0x5f,0x31,0x34,0x39,0x20,0x2a,0x20,0x32,0x2e,
|
|
0x32,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x32,0x33,0x31,0x36,0x32,0x38,0x34,0x31,
|
|
0x37,0x39,0x36,0x38,0x37,0x35,0x29,0x20,0x2d,0x20,0x28,0x28,0x28,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,
|
|
0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,
|
|
0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,
|
|
0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x31,0x35,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,
|
|
0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x20,0x2a,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,
|
|
0x29,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,
|
|
0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x20,
|
|
0x2a,0x20,0x31,0x2e,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,
|
|
0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x32,0x2e,0x30,0x2c,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,
|
|
0x28,0x30,0x2e,0x32,0x35,0x2c,0x20,0x30,0x2e,0x37,0x35,0x2c,0x20,0x28,0x76,0x61,
|
|
0x6c,0x75,0x65,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x36,0x34,0x39,0x39,0x39,0x39,0x39,0x37,0x36,0x31,0x35,
|
|
0x38,0x31,0x34,0x32,0x30,0x38,0x39,0x38,0x34,0x33,0x37,0x35,0x29,0x20,0x2b,0x20,
|
|
0x28,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x34,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x34,0x30,0x33,0x39,0x35,0x33,0x35,0x35,0x32,0x32,0x34,0x36,0x30,0x39,
|
|
0x33,0x37,0x35,0x29,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x32,0x30,0x34,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x28,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x78,0x79,0x7a,0x20,
|
|
0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x77,
|
|
0x29,0x29,0x20,0x2d,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x32,0x20,0x3d,
|
|
0x20,0x6d,0x69,0x6e,0x28,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,
|
|
0x73,0x68,0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x68,0x61,0x66,
|
|
0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,
|
|
0x63,0x32,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,
|
|
0x78,0x79,0x29,0x20,0x2a,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x32,0x29,0x2c,0x20,
|
|
0x30,0x29,0x2e,0x78,0x2c,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x7a,0x29,0x20,0x2f,0x20,0x73,0x68,0x61,0x66,0x74,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x35,0x33,0x20,0x3d,0x20,0x66,
|
|
0x72,0x61,0x63,0x74,0x28,0x35,0x32,0x2e,0x39,0x38,0x32,0x39,0x31,0x37,0x37,0x38,
|
|
0x35,0x36,0x34,0x34,0x35,0x33,0x31,0x32,0x35,0x20,0x2a,0x20,0x66,0x72,0x61,0x63,
|
|
0x74,0x28,0x64,0x6f,0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,
|
|
0x72,0x64,0x2e,0x78,0x79,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x36,
|
|
0x37,0x31,0x31,0x30,0x35,0x36,0x30,0x38,0x33,0x34,0x34,0x30,0x37,0x38,0x30,0x36,
|
|
0x33,0x39,0x36,0x34,0x38,0x34,0x33,0x37,0x35,0x2c,0x20,0x30,0x2e,0x30,0x30,0x35,
|
|
0x38,0x33,0x37,0x31,0x34,0x39,0x39,0x31,0x38,0x30,0x37,0x39,0x33,0x37,0x36,0x32,
|
|
0x32,0x30,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,
|
|
0x72,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x69,0x20,0x3d,0x20,0x30,0x2e,0x30,
|
|
0x3b,0x20,0x69,0x20,0x3c,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x3b,0x20,0x69,0x20,0x2b,0x3d,0x20,0x31,0x2e,
|
|
0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,0x32,0x20,0x3d,0x20,0x28,0x69,
|
|
0x20,0x2b,0x20,0x5f,0x32,0x35,0x33,0x29,0x20,0x2a,0x20,0x5f,0x32,0x34,0x32,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,
|
|
0x38,0x36,0x20,0x3d,0x20,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x76,0x5f,0x63,
|
|
0x61,0x6d,0x65,0x72,0x61,0x20,0x2b,0x20,0x28,0x5f,0x32,0x30,0x34,0x20,0x2a,0x20,
|
|
0x5f,0x32,0x37,0x32,0x29,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x33,0x30,0x31,0x20,0x3d,0x20,
|
|
0x6d,0x61,0x74,0x34,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x5f,0x32,0x38,0x36,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,
|
|
0x30,0x33,0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x30,0x34,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x30,0x33,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x31,0x31,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x30,
|
|
0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x31,0x31,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x30,0x33,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x31,0x31,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x31,
|
|
0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x33,0x31,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x31,0x38,
|
|
0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x5f,0x33,
|
|
0x31,0x38,0x20,0x3d,0x20,0x5f,0x33,0x31,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x33,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x31,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,0x5f,0x33,0x32,0x35,0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x20,0x3e,
|
|
0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x32,0x35,0x20,0x3d,0x20,0x5f,0x33,0x31,0x38,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x32,0x35,0x29,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x33,0x32,0x20,0x3d,0x20,0x5f,0x33,0x30,
|
|
0x31,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x33,0x32,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x33,0x32,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x33,0x34,0x34,0x20,0x3d,0x20,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x5f,0x33,0x30,0x31,0x2e,0x78,0x79,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x34,0x36,
|
|
0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x34,0x36,0x20,0x3c,0x20,0x28,0x5f,
|
|
0x33,0x34,0x34,0x2e,0x77,0x20,0x2b,0x20,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,0x29,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x36,0x38,0x20,0x3d,0x20,0x5f,0x33,0x34,
|
|
0x36,0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x32,0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,
|
|
0x32,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x37,0x37,0x20,0x3d,0x20,0x5f,0x33,
|
|
0x34,0x34,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x33,0x37,
|
|
0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x32,0x38,0x36,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,0x2b,0x3d,
|
|
0x20,0x28,0x28,0x28,0x6d,0x69,0x78,0x28,0x76,0x65,0x63,0x33,0x28,0x62,0x72,0x69,
|
|
0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,0x2c,0x20,
|
|
0x5f,0x33,0x37,0x37,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x36,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x32,0x33,0x38,0x34,0x31,0x38,0x35,0x37,0x39,0x31,0x30,0x31,
|
|
0x35,0x36,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x65,0x63,
|
|
0x33,0x28,0x5f,0x33,0x30,0x33,0x2c,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x2c,0x20,
|
|
0x5f,0x33,0x36,0x38,0x29,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x33,0x36,0x38,0x29,0x29,
|
|
0x29,0x20,0x2a,0x20,0x65,0x78,0x70,0x28,0x28,0x2d,0x73,0x68,0x61,0x66,0x74,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x29,0x20,0x2a,0x20,0x5f,
|
|
0x32,0x37,0x32,0x29,0x29,0x20,0x2a,0x20,0x64,0x75,0x73,0x74,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x28,0x28,0x28,0x6c,0x69,0x67,0x68,0x74,0x20,0x2a,0x20,0x76,
|
|
0x5f,0x73,0x75,0x6e,0x29,0x20,0x2a,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x29,0x20,0x2a,0x20,0x5f,0x32,0x34,
|
|
0x32,0x29,0x20,0x2a,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2e,0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 post_params[1];
|
|
layout(binding = 16) uniform sampler2D view_color_view_smp;
|
|
layout(binding = 17) uniform sampler2D bloom_bloom_view_smp;
|
|
layout(binding = 18) uniform sampler2D shafts_bloom_view_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
void main()
|
|
{
|
|
vec2 _31 = gl_FragCoord.xy / vec2(textureSize(view_color_view_smp, 0));
|
|
vec2 _67 = vec2(textureSize(shafts_bloom_view_smp, 0));
|
|
vec3 _142 = (((((texture(view_color_view_smp, _31).xyz + (texture(bloom_bloom_view_smp, _31).xyz * post_params[0].w)) + ((((((texture(shafts_bloom_view_smp, _31).xyz * 2.0) + texture(shafts_bloom_view_smp, _31 + (vec2(1.0) / _67)).xyz) + texture(shafts_bloom_view_smp, _31 + (vec2(-1.0, 1.0) / _67)).xyz) + texture(shafts_bloom_view_smp, _31 + (vec2(1.0, -1.0) / _67)).xyz) + texture(shafts_bloom_view_smp, _31 + (vec2(-1.0) / _67)).xyz) * vec3(0.16666667163372039794921875))) * exp2(post_params[0].x)) - vec3(0.5)) * post_params[0].y) + vec3(0.5);
|
|
frag_color = vec4(clamp(mix(vec3(dot(_142, vec3(0.2125999927520751953125, 0.715200006961822509765625, 0.072200000286102294921875))), _142, vec3(post_params[0].z)), vec3(0.0), vec3(1.0)), 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_post_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x74,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x36,0x29,0x20,
|
|
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,
|
|
0x44,0x20,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x76,0x69,0x65,
|
|
0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,
|
|
0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x37,0x29,0x20,0x75,0x6e,0x69,0x66,
|
|
0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6c,
|
|
0x6f,0x6f,0x6d,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,
|
|
0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,
|
|
0x6e,0x67,0x20,0x3d,0x20,0x31,0x38,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
|
0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x66,0x74,
|
|
0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,
|
|
0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,
|
|
0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x31,0x20,0x3d,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,0x76,0x69,
|
|
0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x53,0x69,0x7a,0x65,0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x34,
|
|
0x32,0x20,0x3d,0x20,0x28,0x28,0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x76,0x69,0x65,0x77,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,
|
|
0x20,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x70,0x6f,0x73,0x74,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20,
|
|
0x28,0x28,0x28,0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,
|
|
0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,
|
|
0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,
|
|
0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,
|
|
0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,
|
|
0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,
|
|
0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,
|
|
0x37,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x20,0x2b,0x20,
|
|
0x28,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,
|
|
0x33,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x31,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x31,
|
|
0x36,0x33,0x33,0x37,0x32,0x30,0x33,0x39,0x37,0x39,0x34,0x39,0x32,0x31,0x38,0x37,
|
|
0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x65,0x78,0x70,0x32,0x28,0x70,0x6f,0x73,0x74,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x29,0x29,0x20,0x2d,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x70,0x6f,
|
|
0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x79,0x29,0x20,
|
|
0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x6d,0x69,0x78,0x28,0x76,0x65,0x63,
|
|
0x33,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x34,0x32,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x30,0x2e,0x32,0x31,0x32,0x35,0x39,0x39,0x39,0x39,0x32,0x37,0x35,0x32,0x30,
|
|
0x37,0x35,0x31,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x37,0x31,0x35,
|
|
0x32,0x30,0x30,0x30,0x30,0x36,0x39,0x36,0x31,0x38,0x32,0x32,0x35,0x30,0x39,0x37,
|
|
0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,0x37,0x32,0x32,0x30,0x30,0x30,
|
|
0x30,0x30,0x32,0x38,0x36,0x31,0x30,0x32,0x32,0x39,0x34,0x39,0x32,0x31,0x38,0x37,
|
|
0x35,0x29,0x29,0x29,0x2c,0x20,0x5f,0x31,0x34,0x32,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x70,0x6f,0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,
|
|
0x7a,0x29,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 trile_params[73];
|
|
uniform vec4 view_params[13];
|
|
layout(location = 1) in vec4 data_n;
|
|
layout(location = 2) in vec4 instance;
|
|
layout(location = 0) in vec3 position;
|
|
layout(location = 3) out vec3 v_normal;
|
|
layout(location = 5) out float v_facing;
|
|
layout(location = 6) out float v_ao;
|
|
layout(location = 7) out vec3 v_shade;
|
|
layout(location = 8) out vec3 v_sun;
|
|
layout(location = 10) out float v_cut;
|
|
layout(location = 4) in float cut;
|
|
layout(location = 1) out vec3 v_to_camera;
|
|
layout(location = 2) out vec3 v_world;
|
|
layout(location = 0) out float v_clip;
|
|
layout(location = 4) out float v_swatch;
|
|
layout(location = 9) out float v_tint;
|
|
layout(location = 3) in float tint;
|
|
|
|
void main()
|
|
{
|
|
vec4 _14 = data_n * 255.0;
|
|
int _28 = int(instance.w + 0.5) * 3;
|
|
mat3 _71 = transpose(mat3(vec3(trile_params[_28 * 1 + 0].xyz), vec3(trile_params[(_28 + 1) * 1 + 0].xyz), vec3(trile_params[(_28 + 2) * 1 + 0].xyz)));
|
|
vec3 _85 = ((_71 * (position - vec3(0.5))) + vec3(0.5)) + instance.xyz;
|
|
int _92 = int(_14.z + 0.5);
|
|
vec3 normal = vec3(0.0);
|
|
normal[_92 / 2] = ((_92 % 2) == 0) ? 1.0 : (-1.0);
|
|
v_normal = _71 * normal;
|
|
v_facing = smoothstep(0.0, 0.300000011920928955078125, dot(v_normal, view_params[10].xyz));
|
|
v_ao = _14.y * 0.3333333432674407958984375;
|
|
v_shade = view_params[12].xyz;
|
|
v_sun = view_params[11].xyz;
|
|
vec4 _150 = vec4(_85, 1.0);
|
|
gl_Position = mat4(view_params[0], view_params[1], view_params[2], view_params[3]) * _150;
|
|
v_cut = (trile_params[72].x > 0.5) ? 0.0 : cut;
|
|
if (v_cut > 0.999000012874603271484375)
|
|
{
|
|
gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
|
|
}
|
|
v_to_camera = view_params[8].xyz - _85;
|
|
v_world = _85;
|
|
v_clip = dot(_150, view_params[9]);
|
|
v_swatch = _14.x;
|
|
v_tint = tint;
|
|
}
|
|
|
|
*/
|
|
vs_trile_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x72,0x69,0x6c,0x65,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x37,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,
|
|
0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x33,0x5d,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,0x34,0x20,0x64,0x61,0x74,0x61,0x5f,0x6e,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x69,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x63,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
|
|
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,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,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,0x29,0x20,0x6f,0x75,0x74,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x36,0x29,0x20,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x61,0x6f,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x38,0x29,0x20,
|
|
0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x31,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x5f,0x63,0x75,0x74,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,0x63,0x75,0x74,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,
|
|
0x65,0x72,0x61,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,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,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,
|
|
0x70,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,0x73,0x77,0x61,0x74,0x63,0x68,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x39,0x29,
|
|
0x20,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,0x69,0x6e,
|
|
0x74,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,0x74,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,
|
|
0x31,0x34,0x20,0x3d,0x20,0x64,0x61,0x74,0x61,0x5f,0x6e,0x20,0x2a,0x20,0x32,0x35,
|
|
0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x32,0x38,
|
|
0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,
|
|
0x77,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x33,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x6d,0x61,0x74,0x33,0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,0x74,0x72,0x61,
|
|
0x6e,0x73,0x70,0x6f,0x73,0x65,0x28,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,
|
|
0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x5f,0x32,
|
|
0x38,0x20,0x2a,0x20,0x31,0x20,0x2b,0x20,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x2c,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x28,0x5f,0x32,0x38,0x20,0x2b,0x20,0x31,0x29,0x20,0x2a,0x20,0x31,
|
|
0x20,0x2b,0x20,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x28,0x5f,
|
|
0x32,0x38,0x20,0x2b,0x20,0x32,0x29,0x20,0x2a,0x20,0x31,0x20,0x2b,0x20,0x30,0x5d,
|
|
0x2e,0x78,0x79,0x7a,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x38,0x35,0x20,0x3d,0x20,0x28,0x28,0x5f,0x37,0x31,0x20,0x2a,0x20,
|
|
0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x30,0x2e,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,
|
|
0x2e,0x35,0x29,0x29,0x20,0x2b,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x39,0x32,
|
|
0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x5f,0x31,0x34,0x2e,0x7a,0x20,0x2b,0x20,0x30,
|
|
0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5b,0x5f,0x39,0x32,
|
|
0x20,0x2f,0x20,0x32,0x5d,0x20,0x3d,0x20,0x28,0x28,0x5f,0x39,0x32,0x20,0x25,0x20,
|
|
0x32,0x29,0x20,0x3d,0x3d,0x20,0x30,0x29,0x20,0x3f,0x20,0x31,0x2e,0x30,0x20,0x3a,
|
|
0x20,0x28,0x2d,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x5f,0x37,0x31,0x20,0x2a,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,
|
|
0x6e,0x67,0x20,0x3d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,
|
|
0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,
|
|
0x20,0x64,0x6f,0x74,0x28,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,0x20,0x76,
|
|
0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x30,0x5d,0x2e,0x78,
|
|
0x79,0x7a,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x61,0x6f,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x34,0x2e,0x79,0x20,0x2a,0x20,0x30,0x2e,0x33,0x33,0x33,0x33,0x33,
|
|
0x33,0x33,0x34,0x33,0x32,0x36,0x37,0x34,0x34,0x30,0x37,0x39,0x35,0x38,0x39,0x38,
|
|
0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,
|
|
0x65,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,
|
|
0x75,0x6e,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x31,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x5f,0x31,0x35,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,
|
|
0x38,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,
|
|
0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,
|
|
0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,
|
|
0x20,0x2a,0x20,0x5f,0x31,0x35,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,
|
|
0x75,0x74,0x20,0x3d,0x20,0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x37,0x32,0x5d,0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x20,
|
|
0x3f,0x20,0x30,0x2e,0x30,0x20,0x3a,0x20,0x63,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x75,0x74,0x20,0x3e,0x20,0x30,0x2e,0x39,
|
|
0x39,0x39,0x30,0x30,0x30,0x30,0x31,0x32,0x38,0x37,0x34,0x36,0x30,0x33,0x32,0x37,
|
|
0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x38,0x35,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x20,0x3d,0x20,0x5f,
|
|
0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3d,
|
|
0x20,0x64,0x6f,0x74,0x28,0x5f,0x31,0x35,0x30,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x39,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x3d,0x20,0x5f,0x31,0x34,0x2e,0x78,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3d,0x20,0x74,
|
|
0x69,0x6e,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
const float _499[16] = float[](0.0, 8.0, 2.0, 10.0, 12.0, 4.0, 14.0, 6.0, 3.0, 11.0, 1.0, 9.0, 15.0, 7.0, 13.0, 5.0);
|
|
|
|
uniform vec4 shadow_params[4];
|
|
uniform vec4 trile_fs_params[4];
|
|
layout(binding = 16) uniform sampler2D palette_palette_smp;
|
|
layout(binding = 17) uniform sampler2DShadow shadow_map_shadow_smp;
|
|
layout(binding = 18) uniform sampler2D shadow_tint_shadow_tint_smp;
|
|
layout(binding = 19) uniform sampler3D probe_index_probe_smp;
|
|
layout(binding = 20) uniform sampler3D probe_atlas_probe_smp;
|
|
layout(binding = 21) uniform sampler2D trile_reflection_trile_reflection_smp;
|
|
layout(binding = 22) uniform sampler2D trile_reflection_glow_trile_reflection_smp;
|
|
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 2) out vec4 frag_scene;
|
|
layout(location = 0) in float v_clip;
|
|
layout(location = 10) in float v_cut;
|
|
layout(location = 4) in float v_swatch;
|
|
layout(location = 9) in float v_tint;
|
|
layout(location = 5) in float v_facing;
|
|
layout(location = 2) in vec3 v_world;
|
|
layout(location = 3) in vec3 v_normal;
|
|
layout(location = 7) in vec3 v_shade;
|
|
layout(location = 6) in float v_ao;
|
|
layout(location = 8) in vec3 v_sun;
|
|
layout(location = 1) in vec3 v_to_camera;
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
float dither(vec2 pixel)
|
|
{
|
|
ivec2 _482 = ivec2(pixel) % ivec2(4);
|
|
return (_499[(_482.y * 4) + _482.x] + 0.5) * 0.0625;
|
|
}
|
|
|
|
vec3 sun_shadow(vec3 world, vec3 normal)
|
|
{
|
|
vec3 _73 = normal * 0.03125;
|
|
vec4 _107 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4((((floor((world - _73) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _73) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
float _109 = _107.x;
|
|
bool _111 = _109 < 0.0;
|
|
bool _118;
|
|
if (!_111)
|
|
{
|
|
_118 = _109 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_118 = _111;
|
|
}
|
|
bool _125;
|
|
if (!_118)
|
|
{
|
|
_125 = _107.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_125 = _118;
|
|
}
|
|
bool _132;
|
|
if (!_125)
|
|
{
|
|
_132 = _107.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_132 = _125;
|
|
}
|
|
bool _139;
|
|
if (!_132)
|
|
{
|
|
_139 = _107.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_139 = _132;
|
|
}
|
|
if (_139)
|
|
{
|
|
return vec3(1.0);
|
|
}
|
|
float _161 = _107.z - 0.0005000000237487256526947021484375;
|
|
return texture(shadow_tint_shadow_tint_smp, _107.xy).xyz * texture(shadow_map_shadow_smp, vec3(vec3(_109, _107.y, _161).xy, _161));
|
|
}
|
|
|
|
bool probe_at(ivec3 cell, inout vec4 r, inout vec4 g, inout vec4 b)
|
|
{
|
|
ivec3 _188 = ivec3(floor(vec3(cell) * vec3(0.03125)));
|
|
ivec3 _200 = _188 - ivec3(trile_fs_params[1].xyz);
|
|
bool _205 = any(lessThan(_200, ivec3(0)));
|
|
bool _217;
|
|
if (!_205)
|
|
{
|
|
_217 = any(greaterThanEqual(_200, ivec3(trile_fs_params[2].xyz)));
|
|
}
|
|
else
|
|
{
|
|
_217 = _205;
|
|
}
|
|
if (_217)
|
|
{
|
|
return false;
|
|
}
|
|
vec2 _238 = (texelFetch(probe_index_probe_smp, _200, 0).xy * 255.0) + vec2(0.5);
|
|
int _250 = (int(_238.x) + (int(_238.y) * 256)) - 1;
|
|
if (_250 < 0)
|
|
{
|
|
return false;
|
|
}
|
|
ivec3 _262 = cell - (_188 * ivec3(32));
|
|
ivec3 _281 = ivec3(_262.x * 3, ((_250 % 16) * 32) + _262.y, ((_250 / 16) * 32) + _262.z);
|
|
r = texelFetch(probe_atlas_probe_smp, _281, 0);
|
|
g = texelFetch(probe_atlas_probe_smp, _281 + ivec3(1, 0, 0), 0);
|
|
b = texelFetch(probe_atlas_probe_smp, _281 + ivec3(2, 0, 0), 0);
|
|
return r.x >= 0.0;
|
|
}
|
|
|
|
vec4 probe_light(vec3 world, vec3 normal)
|
|
{
|
|
vec3 _312 = normal * 0.03125;
|
|
vec3 _324 = ((floor((world - _312) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _312;
|
|
vec3 _331 = (_324 + (normal * 0.5)) - vec3(0.5);
|
|
ivec3 _335 = ivec3(floor(_331));
|
|
vec3 _340 = _331 - vec3(_335);
|
|
vec4 sum_r = vec4(0.0);
|
|
vec4 sum_g = vec4(0.0);
|
|
vec4 sum_b = vec4(0.0);
|
|
float total = 0.0;
|
|
vec4 param_1;
|
|
vec4 param_2;
|
|
vec4 param_3;
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
ivec3 _363 = ivec3(i & 1, (i >> 1) & 1, i >> 2);
|
|
ivec3 _367 = _335 + _363;
|
|
if (dot((vec3(_367) + vec3(0.5)) - _324, normal) < 0.00999999977648258209228515625)
|
|
{
|
|
continue;
|
|
}
|
|
ivec3 param = _367;
|
|
bool _389 = probe_at(param, param_1, param_2, param_3);
|
|
if (!_389)
|
|
{
|
|
continue;
|
|
}
|
|
vec3 _404 = mix(vec3(1.0) - _340, _340, vec3(_363));
|
|
float _415 = max((_404.x * _404.y) * _404.z, 9.9999997473787516355514526367188e-05);
|
|
sum_r += (param_1 * _415);
|
|
sum_g += (param_2 * _415);
|
|
sum_b += (param_3 * _415);
|
|
total += _415;
|
|
}
|
|
if (total == 0.0)
|
|
{
|
|
return vec4(0.0);
|
|
}
|
|
vec4 _453 = vec4(0.2820949852466583251953125, 0.3257350027561187744140625 * normal.y, 0.3257350027561187744140625 * normal.z, 0.3257350027561187744140625 * normal.x);
|
|
return vec4(max(vec3(dot(sum_r, _453), dot(sum_g, _453), dot(sum_b, _453)) / vec3(total), vec3(0.0)), 1.0);
|
|
}
|
|
|
|
float brightest(vec3 c)
|
|
{
|
|
return max(c.x, max(c.y, c.z));
|
|
}
|
|
|
|
void write_scene(vec3 to_camera, float glow)
|
|
{
|
|
frag_glow = vec4(glow);
|
|
frag_scene = vec4(length(to_camera));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
bool _517 = v_clip < 0.0;
|
|
bool _530;
|
|
if (!_517)
|
|
{
|
|
vec2 param = gl_FragCoord.xy;
|
|
_530 = v_cut > dither(param);
|
|
}
|
|
else
|
|
{
|
|
_530 = _517;
|
|
}
|
|
if (_530)
|
|
{
|
|
discard;
|
|
}
|
|
int _538 = int(v_swatch + 0.5);
|
|
vec4 _548 = texelFetch(palette_palette_smp, ivec2(_538, 0), 0);
|
|
vec4 _556 = texelFetch(palette_palette_smp, ivec2(_538, 1), 0);
|
|
vec3 albedo = _548.xyz;
|
|
if (v_tint > 1.5)
|
|
{
|
|
albedo = mix(albedo, vec3(1.0, 0.20000000298023223876953125, 0.20000000298023223876953125), vec3(0.5));
|
|
}
|
|
else
|
|
{
|
|
if (v_tint > 0.5)
|
|
{
|
|
albedo = mix(albedo, vec3(0.20000000298023223876953125, 1.0, 0.20000000298023223876953125), vec3(0.5));
|
|
}
|
|
}
|
|
vec3 param_1 = v_world;
|
|
vec3 param_2 = v_normal;
|
|
vec3 _590 = sun_shadow(param_1, param_2);
|
|
vec3 _591 = _590 * v_facing;
|
|
vec4 _598;
|
|
if (trile_fs_params[1].w > 0.5)
|
|
{
|
|
vec3 param_3 = v_world;
|
|
vec3 param_4 = v_normal;
|
|
_598 = probe_light(param_3, param_4);
|
|
}
|
|
else
|
|
{
|
|
_598 = vec4(0.0);
|
|
}
|
|
vec3 _623 = v_sun * _591;
|
|
vec3 _627 = _623 * mix(0.25, 1.0, v_ao);
|
|
vec3 color = albedo * (((v_shade + _598.xyz) * mix(0.60000002384185791015625, 1.0, v_ao)) + _627);
|
|
vec3 param_5 = _591;
|
|
float _637 = brightest(param_5);
|
|
if (_637 > 0.001000000047497451305389404296875)
|
|
{
|
|
color += ((_627 * (vec3(1.0) - albedo)) * ((_637 - min(_591.x, min(_591.y, _591.z))) / _637));
|
|
}
|
|
float _667 = _548.w;
|
|
vec3 param_6 = _627;
|
|
float glow = (_667 * 8.0) + (brightest(param_6) * 1.5);
|
|
float _675 = _556.z;
|
|
if (_675 > 0.0)
|
|
{
|
|
float _700 = pow(max(dot(v_normal, normalize(normalize(v_to_camera) + trile_fs_params[0].xyz)), 0.0), mix(4.0, 96.0, _675)) * _675;
|
|
color += (_623 * _700);
|
|
vec3 param_7 = _591;
|
|
glow += ((_700 * brightest(param_7)) * 4.0);
|
|
}
|
|
bool _718 = trile_fs_params[3].x > 0.5;
|
|
bool _724;
|
|
if (_718)
|
|
{
|
|
_724 = _556.y > 0.0;
|
|
}
|
|
else
|
|
{
|
|
_724 = _718;
|
|
}
|
|
bool _730;
|
|
if (_724)
|
|
{
|
|
_730 = v_normal.y > 0.5;
|
|
}
|
|
else
|
|
{
|
|
_730 = _724;
|
|
}
|
|
bool _740;
|
|
if (_730)
|
|
{
|
|
_740 = abs(v_world.y - trile_fs_params[3].y) < 0.0199999995529651641845703125;
|
|
}
|
|
else
|
|
{
|
|
_740 = _730;
|
|
}
|
|
if (_740)
|
|
{
|
|
vec2 _754 = gl_FragCoord.xy / vec2(textureSize(trile_reflection_trile_reflection_smp, 0));
|
|
vec2 _761 = vec2(_754.x, 1.0 - _754.y);
|
|
float _770 = _556.y;
|
|
color = mix(color, texture(trile_reflection_trile_reflection_smp, _761).xyz, vec3(_770));
|
|
glow = max(glow, texture(trile_reflection_glow_trile_reflection_smp, _761).x * pow(_770, 0.4000000059604644775390625));
|
|
}
|
|
frag_color = vec4(mix(color, albedo, vec3(_667)), 1.0);
|
|
vec3 param_8 = v_to_camera;
|
|
float param_9 = glow;
|
|
write_scene(param_8, param_9);
|
|
}
|
|
|
|
*/
|
|
fs_trile_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x39,0x39,0x5b,0x31,
|
|
0x36,0x5d,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x5b,0x5d,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x38,0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,0x31,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x32,0x2e,0x30,0x2c,0x20,0x34,0x2e,0x30,0x2c,0x20,0x31,0x34,0x2e,
|
|
0x30,0x2c,0x20,0x36,0x2e,0x30,0x2c,0x20,0x33,0x2e,0x30,0x2c,0x20,0x31,0x31,0x2e,
|
|
0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x39,0x2e,0x30,0x2c,0x20,0x31,0x35,0x2e,
|
|
0x30,0x2c,0x20,0x37,0x2e,0x30,0x2c,0x20,0x31,0x33,0x2e,0x30,0x2c,0x20,0x35,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,
|
|
0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x70,0x61,0x6c,0x65,
|
|
0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,
|
|
0x3d,0x20,0x31,0x37,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,
|
|
0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x38,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x39,0x29,0x20,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x33,0x44,0x20,
|
|
0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,0x78,0x5f,0x70,0x72,0x6f,0x62,
|
|
0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,
|
|
0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x32,0x30,0x29,0x20,0x75,0x6e,0x69,0x66,
|
|
0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x33,0x44,0x20,0x70,0x72,
|
|
0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,0x70,0x72,0x6f,0x62,0x65,0x5f,
|
|
0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,
|
|
0x69,0x6e,0x67,0x20,0x3d,0x20,0x32,0x31,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x72,0x69,0x6c,
|
|
0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x74,0x72,0x69,
|
|
0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,
|
|
0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,
|
|
0x67,0x20,0x3d,0x20,0x32,0x32,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,
|
|
0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x5f,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,
|
|
0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x31,0x30,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x63,0x75,0x74,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,0x73,0x77,0x61,0x74,0x63,0x68,0x3b,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x39,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,
|
|
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,0x76,0x65,0x63,0x33,0x20,0x76,
|
|
0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,0x20,0x69,0x6e,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x36,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x61,
|
|
0x6f,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x38,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x76,0x5f,0x73,0x75,0x6e,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,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,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x64,0x69,0x74,0x68,0x65,0x72,0x28,0x76,0x65,0x63,0x32,0x20,0x70,0x69,
|
|
0x78,0x65,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,
|
|
0x20,0x5f,0x34,0x38,0x32,0x20,0x3d,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x70,0x69,
|
|
0x78,0x65,0x6c,0x29,0x20,0x25,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x34,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x5f,0x34,0x39,
|
|
0x39,0x5b,0x28,0x5f,0x34,0x38,0x32,0x2e,0x79,0x20,0x2a,0x20,0x34,0x29,0x20,0x2b,
|
|
0x20,0x5f,0x34,0x38,0x32,0x2e,0x78,0x5d,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x65,0x63,
|
|
0x33,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x76,0x65,0x63,
|
|
0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x37,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x5f,0x31,0x30,0x37,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x28,
|
|
0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,0x20,0x5f,
|
|
0x37,0x33,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,0x37,0x33,0x29,0x20,
|
|
0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,
|
|
0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,
|
|
0x39,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x31,0x20,0x3d,0x20,0x5f,0x31,0x30,0x39,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x31,0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x31,0x31,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x30,0x39,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,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,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x31,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,
|
|
0x5f,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,
|
|
0x31,0x31,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x31,0x32,0x35,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x79,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x35,0x20,0x3d,0x20,0x5f,0x31,0x31,0x38,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x31,0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x31,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x32,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,
|
|
0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x33,0x32,0x20,0x3d,0x20,0x5f,0x31,0x32,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x31,0x33,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x21,0x5f,0x31,0x33,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,
|
|
0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,
|
|
0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x5f,0x31,0x33,0x39,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x36,0x31,0x20,0x3d,0x20,0x5f,
|
|
0x31,0x30,0x37,0x2e,0x7a,0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x32,0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,
|
|
0x39,0x34,0x37,0x30,0x32,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x31,
|
|
0x30,0x37,0x2e,0x78,0x79,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x31,0x30,0x39,0x2c,0x20,0x5f,0x31,0x30,0x37,
|
|
0x2e,0x79,0x2c,0x20,0x5f,0x31,0x36,0x31,0x29,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31,
|
|
0x36,0x31,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x62,0x6f,0x6f,0x6c,0x20,0x70,0x72,
|
|
0x6f,0x62,0x65,0x5f,0x61,0x74,0x28,0x69,0x76,0x65,0x63,0x33,0x20,0x63,0x65,0x6c,
|
|
0x6c,0x2c,0x20,0x69,0x6e,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x72,0x2c,
|
|
0x20,0x69,0x6e,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x67,0x2c,0x20,0x69,
|
|
0x6e,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x62,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x38,0x38,0x20,0x3d,0x20,
|
|
0x69,0x76,0x65,0x63,0x33,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x76,0x65,0x63,0x33,
|
|
0x28,0x63,0x65,0x6c,0x6c,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
|
0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,
|
|
0x65,0x63,0x33,0x20,0x5f,0x32,0x30,0x30,0x20,0x3d,0x20,0x5f,0x31,0x38,0x38,0x20,
|
|
0x2d,0x20,0x69,0x76,0x65,0x63,0x33,0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x32,0x30,0x35,0x20,0x3d,
|
|
0x20,0x61,0x6e,0x79,0x28,0x6c,0x65,0x73,0x73,0x54,0x68,0x61,0x6e,0x28,0x5f,0x32,
|
|
0x30,0x30,0x2c,0x20,0x69,0x76,0x65,0x63,0x33,0x28,0x30,0x29,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x32,0x31,0x37,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x32,0x30,0x35,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x32,0x31,0x37,
|
|
0x20,0x3d,0x20,0x61,0x6e,0x79,0x28,0x67,0x72,0x65,0x61,0x74,0x65,0x72,0x54,0x68,
|
|
0x61,0x6e,0x45,0x71,0x75,0x61,0x6c,0x28,0x5f,0x32,0x30,0x30,0x2c,0x20,0x69,0x76,
|
|
0x65,0x63,0x33,0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,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,0x32,0x31,0x37,
|
|
0x20,0x3d,0x20,0x5f,0x32,0x30,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x31,0x37,0x29,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x38,0x20,0x3d,0x20,0x28,
|
|
0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x69,0x6e,0x64,0x65,0x78,0x5f,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x5f,0x32,0x30,0x30,0x2c,0x20,0x30,0x29,0x2e,0x78,0x79,0x20,0x2a,0x20,
|
|
0x32,0x35,0x35,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,
|
|
0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x32,0x35,0x30,
|
|
0x20,0x3d,0x20,0x28,0x69,0x6e,0x74,0x28,0x5f,0x32,0x33,0x38,0x2e,0x78,0x29,0x20,
|
|
0x2b,0x20,0x28,0x69,0x6e,0x74,0x28,0x5f,0x32,0x33,0x38,0x2e,0x79,0x29,0x20,0x2a,
|
|
0x20,0x32,0x35,0x36,0x29,0x29,0x20,0x2d,0x20,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x5f,0x32,0x35,0x30,0x20,0x3c,0x20,0x30,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x36,0x32,0x20,0x3d,
|
|
0x20,0x63,0x65,0x6c,0x6c,0x20,0x2d,0x20,0x28,0x5f,0x31,0x38,0x38,0x20,0x2a,0x20,
|
|
0x69,0x76,0x65,0x63,0x33,0x28,0x33,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x38,0x31,0x20,0x3d,0x20,0x69,0x76,0x65,
|
|
0x63,0x33,0x28,0x5f,0x32,0x36,0x32,0x2e,0x78,0x20,0x2a,0x20,0x33,0x2c,0x20,0x28,
|
|
0x28,0x5f,0x32,0x35,0x30,0x20,0x25,0x20,0x31,0x36,0x29,0x20,0x2a,0x20,0x33,0x32,
|
|
0x29,0x20,0x2b,0x20,0x5f,0x32,0x36,0x32,0x2e,0x79,0x2c,0x20,0x28,0x28,0x5f,0x32,
|
|
0x35,0x30,0x20,0x2f,0x20,0x31,0x36,0x29,0x20,0x2a,0x20,0x33,0x32,0x29,0x20,0x2b,
|
|
0x20,0x5f,0x32,0x36,0x32,0x2e,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x20,
|
|
0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x72,0x6f,
|
|
0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x5f,0x32,0x38,0x31,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x67,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,
|
|
0x28,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,0x70,0x72,0x6f,
|
|
0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x38,0x31,0x20,0x2b,0x20,0x69,
|
|
0x76,0x65,0x63,0x33,0x28,0x31,0x2c,0x20,0x30,0x2c,0x20,0x30,0x29,0x2c,0x20,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,
|
|
0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,
|
|
0x73,0x5f,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x38,
|
|
0x31,0x20,0x2b,0x20,0x69,0x76,0x65,0x63,0x33,0x28,0x32,0x2c,0x20,0x30,0x2c,0x20,
|
|
0x30,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x72,0x2e,0x78,0x20,0x3e,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x76,0x65,0x63,0x34,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x6c,0x69,0x67,
|
|
0x68,0x74,0x28,0x76,0x65,0x63,0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x31,0x32,0x20,0x3d,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x32,0x34,0x20,0x3d,0x20,
|
|
0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,
|
|
0x20,0x5f,0x33,0x31,0x32,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,0x33,
|
|
0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x33,
|
|
0x31,0x20,0x3d,0x20,0x28,0x5f,0x33,0x32,0x34,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x29,0x20,0x2d,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,
|
|
0x63,0x33,0x20,0x5f,0x33,0x33,0x35,0x20,0x3d,0x20,0x69,0x76,0x65,0x63,0x33,0x28,
|
|
0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x33,0x33,0x31,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x34,0x30,0x20,0x3d,0x20,0x5f,0x33,
|
|
0x33,0x31,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x33,0x35,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x75,0x6d,0x5f,0x72,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x75,0x6d,0x5f,0x67,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x75,0x6d,0x5f,0x62,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,
|
|
0x6f,0x74,0x61,0x6c,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x28,0x69,0x6e,0x74,0x20,0x69,
|
|
0x20,0x3d,0x20,0x30,0x3b,0x20,0x69,0x20,0x3c,0x20,0x38,0x3b,0x20,0x69,0x2b,0x2b,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x36,0x33,0x20,0x3d,0x20,0x69,0x76,0x65,
|
|
0x63,0x33,0x28,0x69,0x20,0x26,0x20,0x31,0x2c,0x20,0x28,0x69,0x20,0x3e,0x3e,0x20,
|
|
0x31,0x29,0x20,0x26,0x20,0x31,0x2c,0x20,0x69,0x20,0x3e,0x3e,0x20,0x32,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x33,0x36,0x37,0x20,0x3d,0x20,0x5f,0x33,0x33,0x35,0x20,0x2b,0x20,0x5f,0x33,0x36,
|
|
0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x64,
|
|
0x6f,0x74,0x28,0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x36,0x37,0x29,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2d,0x20,0x5f,0x33,
|
|
0x32,0x34,0x2c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x20,0x3c,0x20,0x30,0x2e,
|
|
0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,
|
|
0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x36,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x33,0x38,0x39,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,
|
|
0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x33,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x21,0x5f,0x33,0x38,0x39,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,
|
|
0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x34,0x30,0x34,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x76,0x65,0x63,0x33,0x28,0x31,
|
|
0x2e,0x30,0x29,0x20,0x2d,0x20,0x5f,0x33,0x34,0x30,0x2c,0x20,0x5f,0x33,0x34,0x30,
|
|
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x36,0x33,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x31,
|
|
0x35,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x28,0x5f,0x34,0x30,0x34,0x2e,0x78,0x20,
|
|
0x2a,0x20,0x5f,0x34,0x30,0x34,0x2e,0x79,0x29,0x20,0x2a,0x20,0x5f,0x34,0x30,0x34,
|
|
0x2e,0x7a,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,
|
|
0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,
|
|
0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x20,0x2a,0x20,0x5f,0x34,0x31,0x35,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x67,0x20,0x2b,0x3d,0x20,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x2a,0x20,0x5f,0x34,0x31,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x62,0x20,
|
|
0x2b,0x3d,0x20,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x2a,0x20,0x5f,0x34,
|
|
0x31,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x74,
|
|
0x61,0x6c,0x20,0x2b,0x3d,0x20,0x5f,0x34,0x31,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x6f,0x74,0x61,0x6c,0x20,
|
|
0x3d,0x3d,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,
|
|
0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x34,0x35,0x33,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x30,0x2e,0x32,0x38,0x32,0x30,0x39,0x34,0x39,0x38,0x35,0x32,0x34,
|
|
0x36,0x36,0x35,0x38,0x33,0x32,0x35,0x31,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,
|
|
0x30,0x2e,0x33,0x32,0x35,0x37,0x33,0x35,0x30,0x30,0x32,0x37,0x35,0x36,0x31,0x31,
|
|
0x38,0x37,0x37,0x34,0x34,0x31,0x34,0x30,0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x33,0x32,0x35,0x37,0x33,0x35,
|
|
0x30,0x30,0x32,0x37,0x35,0x36,0x31,0x31,0x38,0x37,0x37,0x34,0x34,0x31,0x34,0x30,
|
|
0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x7a,0x2c,0x20,
|
|
0x30,0x2e,0x33,0x32,0x35,0x37,0x33,0x35,0x30,0x30,0x32,0x37,0x35,0x36,0x31,0x31,
|
|
0x38,0x37,0x37,0x34,0x34,0x31,0x34,0x30,0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x2e,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x61,0x78,0x28,0x76,0x65,0x63,
|
|
0x33,0x28,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,0x72,0x2c,0x20,0x5f,0x34,0x35,
|
|
0x33,0x29,0x2c,0x20,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,0x67,0x2c,0x20,0x5f,
|
|
0x34,0x35,0x33,0x29,0x2c,0x20,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,0x62,0x2c,
|
|
0x20,0x5f,0x34,0x35,0x33,0x29,0x29,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x74,
|
|
0x6f,0x74,0x61,0x6c,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,
|
|
0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x76,0x65,0x63,0x33,
|
|
0x20,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,
|
|
0x79,0x2c,0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x76,0x65,
|
|
0x63,0x33,0x20,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,
|
|
0x28,0x67,0x6c,0x6f,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6c,0x65,
|
|
0x6e,0x67,0x74,0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x29,
|
|
0x3b,0x0a,0x7d,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,0x35,0x31,0x37,
|
|
0x20,0x3d,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x33,0x30,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x35,0x31,0x37,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,
|
|
0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x35,0x33,0x30,0x20,0x3d,0x20,0x76,0x5f,0x63,0x75,0x74,0x20,
|
|
0x3e,0x20,0x64,0x69,0x74,0x68,0x65,0x72,0x28,0x70,0x61,0x72,0x61,0x6d,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,0x35,
|
|
0x33,0x30,0x20,0x3d,0x20,0x5f,0x35,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x35,0x33,0x30,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,
|
|
0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x6e,0x74,0x20,0x5f,0x35,0x33,0x38,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x76,
|
|
0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x34,0x38,0x20,0x3d,0x20,
|
|
0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x61,0x6c,0x65,0x74,
|
|
0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x35,0x33,0x38,0x2c,0x20,0x30,0x29,0x2c,0x20,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x35,
|
|
0x36,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,
|
|
0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x35,0x33,0x38,0x2c,0x20,
|
|
0x31,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x3d,0x20,0x5f,0x35,0x34,0x38,0x2e,0x78,
|
|
0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x20,0x3e,0x20,0x31,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x3d,
|
|
0x20,0x6d,0x69,0x78,0x28,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,
|
|
0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,
|
|
0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,
|
|
0x35,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,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,0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x3d,0x20,0x6d,0x69,
|
|
0x78,0x28,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,
|
|
0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,
|
|
0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,
|
|
0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x29,0x2c,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,
|
|
0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x35,0x39,0x30,0x20,0x3d,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x35,0x39,
|
|
0x31,0x20,0x3d,0x20,0x5f,0x35,0x39,0x30,0x20,0x2a,0x20,0x76,0x5f,0x66,0x61,0x63,
|
|
0x69,0x6e,0x67,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,
|
|
0x39,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x72,0x69,0x6c,
|
|
0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x77,
|
|
0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x33,0x20,0x3d,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x34,0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x35,0x39,0x38,0x20,0x3d,0x20,0x70,0x72,
|
|
0x6f,0x62,0x65,0x5f,0x6c,0x69,0x67,0x68,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,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,0x35,0x39,0x38,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x32,0x33,0x20,
|
|
0x3d,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x2a,0x20,0x5f,0x35,0x39,0x31,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x32,0x37,0x20,0x3d,0x20,
|
|
0x5f,0x36,0x32,0x33,0x20,0x2a,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x32,0x35,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x2c,0x20,0x76,0x5f,0x61,0x6f,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x61,0x6c,
|
|
0x62,0x65,0x64,0x6f,0x20,0x2a,0x20,0x28,0x28,0x28,0x76,0x5f,0x73,0x68,0x61,0x64,
|
|
0x65,0x20,0x2b,0x20,0x5f,0x35,0x39,0x38,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,
|
|
0x6d,0x69,0x78,0x28,0x30,0x2e,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x38,
|
|
0x34,0x31,0x38,0x35,0x37,0x39,0x31,0x30,0x31,0x35,0x36,0x32,0x35,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x2c,0x20,0x76,0x5f,0x61,0x6f,0x29,0x29,0x20,0x2b,0x20,0x5f,0x36,0x32,
|
|
0x37,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x35,0x39,0x31,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x33,0x37,0x20,0x3d,0x20,0x62,0x72,
|
|
0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,0x33,0x37,0x20,0x3e,
|
|
0x20,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,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x28,0x5f,
|
|
0x36,0x32,0x37,0x20,0x2a,0x20,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2d,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x29,0x29,0x20,0x2a,0x20,0x28,0x28,
|
|
0x5f,0x36,0x33,0x37,0x20,0x2d,0x20,0x6d,0x69,0x6e,0x28,0x5f,0x35,0x39,0x31,0x2e,
|
|
0x78,0x2c,0x20,0x6d,0x69,0x6e,0x28,0x5f,0x35,0x39,0x31,0x2e,0x79,0x2c,0x20,0x5f,
|
|
0x35,0x39,0x31,0x2e,0x7a,0x29,0x29,0x29,0x20,0x2f,0x20,0x5f,0x36,0x33,0x37,0x29,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x36,0x36,0x37,0x20,0x3d,0x20,0x5f,0x35,0x34,0x38,0x2e,0x77,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x36,0x20,0x3d,0x20,0x5f,0x36,0x32,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x28,0x5f,0x36,0x36,
|
|
0x37,0x20,0x2a,0x20,0x38,0x2e,0x30,0x29,0x20,0x2b,0x20,0x28,0x62,0x72,0x69,0x67,
|
|
0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x29,0x20,0x2a,
|
|
0x20,0x31,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x5f,0x36,0x37,0x35,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x7a,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,0x37,0x35,0x20,0x3e,0x20,0x30,
|
|
0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x30,0x30,0x20,0x3d,0x20,0x70,
|
|
0x6f,0x77,0x28,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x76,0x5f,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x2c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x29,0x20,0x2b,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x34,0x2e,0x30,0x2c,
|
|
0x20,0x39,0x36,0x2e,0x30,0x2c,0x20,0x5f,0x36,0x37,0x35,0x29,0x29,0x20,0x2a,0x20,
|
|
0x5f,0x36,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x5f,0x36,0x32,0x33,0x20,0x2a,0x20,0x5f,
|
|
0x37,0x30,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x35,0x39,
|
|
0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x2b,0x3d,0x20,0x28,0x28,0x5f,0x37,0x30,0x30,0x20,0x2a,0x20,0x62,0x72,0x69,0x67,
|
|
0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x29,0x20,
|
|
0x2a,0x20,0x34,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x31,0x38,0x20,0x3d,0x20,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,
|
|
0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,
|
|
0x6f,0x6c,0x20,0x5f,0x37,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x37,0x31,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x34,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,
|
|
0x2e,0x79,0x20,0x3e,0x20,0x30,0x2e,0x30,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,0x37,0x32,0x34,0x20,0x3d,0x20,0x5f,0x37,
|
|
0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,
|
|
0x6f,0x6c,0x20,0x5f,0x37,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x37,0x32,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x33,0x30,0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x2e,0x79,0x20,0x3e,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,0x5f,0x37,0x33,0x30,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x33,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x34,0x30,0x20,0x3d,0x20,
|
|
0x61,0x62,0x73,0x28,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x2e,0x79,0x20,0x2d,0x20,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x33,0x5d,0x2e,0x79,0x29,0x20,0x3c,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,
|
|
0x37,0x30,0x33,0x31,0x32,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,0x5f,0x37,0x34,0x30,0x20,0x3d,0x20,0x5f,0x37,0x33,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x5f,0x37,0x34,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x37,0x35,0x34,0x20,0x3d,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,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,
|
|
0x69,0x6f,0x6e,0x5f,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x37,0x36,0x31,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x37,0x35,0x34,0x2e,0x78,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x37,0x35,0x34,0x2e,0x79,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x37,
|
|
0x30,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,
|
|
0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x36,0x31,0x29,0x2e,0x78,0x79,0x7a,0x2c,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x37,0x37,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x6d,0x61,0x78,
|
|
0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,
|
|
0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x67,0x6c,0x6f,0x77,0x5f,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,
|
|
0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x36,0x31,0x29,
|
|
0x2e,0x78,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x5f,0x37,0x37,0x30,0x2c,0x20,0x30,
|
|
0x2e,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,
|
|
0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x69,0x78,0x28,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x2c,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x5f,0x36,0x36,0x37,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,
|
|
0x20,0x3d,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x39,0x20,0x3d,0x20,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,
|
|
0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x38,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D palette_palette_smp;
|
|
|
|
layout(location = 4) in float v_swatch;
|
|
layout(location = 0) in float v_clip;
|
|
layout(location = 1) in vec3 v_to_camera;
|
|
layout(location = 2) in vec3 v_world;
|
|
layout(location = 3) in vec3 v_normal;
|
|
layout(location = 5) in float v_facing;
|
|
layout(location = 6) in float v_ao;
|
|
layout(location = 7) in vec3 v_shade;
|
|
layout(location = 8) in vec3 v_sun;
|
|
layout(location = 9) in float v_tint;
|
|
layout(location = 10) in float v_cut;
|
|
|
|
void main()
|
|
{
|
|
if (texelFetch(palette_palette_smp, ivec2(int(v_swatch + 0.5), 1), 0).x > 0.5)
|
|
{
|
|
discard;
|
|
}
|
|
}
|
|
|
|
*/
|
|
fs_trile_shadow_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,
|
|
0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x73,0x77,0x61,0x74,0x63,
|
|
0x68,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,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,
|
|
0x61,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,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,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x35,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
|
|
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x36,0x29,0x20,0x69,0x6e,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x61,0x6f,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,
|
|
0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x38,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
|
|
0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x39,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,0x69,0x6e,0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x30,
|
|
0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x75,0x74,
|
|
0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,
|
|
0x74,0x63,0x68,0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,
|
|
0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x69,
|
|
0x6e,0x74,0x28,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,
|
|
0x35,0x29,0x2c,0x20,0x31,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x20,0x3e,0x20,0x30,
|
|
0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D palette_palette_smp;
|
|
|
|
layout(location = 4) in float v_swatch;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 0) in float v_clip;
|
|
layout(location = 1) in vec3 v_to_camera;
|
|
layout(location = 2) in vec3 v_world;
|
|
layout(location = 3) in vec3 v_normal;
|
|
layout(location = 5) in float v_facing;
|
|
layout(location = 6) in float v_ao;
|
|
layout(location = 7) in vec3 v_shade;
|
|
layout(location = 8) in vec3 v_sun;
|
|
layout(location = 9) in float v_tint;
|
|
layout(location = 10) in float v_cut;
|
|
|
|
void main()
|
|
{
|
|
int _15 = int(v_swatch + 0.5);
|
|
if (texelFetch(palette_palette_smp, ivec2(_15, 1), 0).x < 0.5)
|
|
{
|
|
discard;
|
|
}
|
|
vec4 _51 = texelFetch(palette_palette_smp, ivec2(_15, 0), 0);
|
|
frag_color = vec4(_51.xyz / vec3(max(max(_51.x, max(_51.y, _51.z)), 0.001000000047497451305389404296875)), gl_FragCoord.z);
|
|
}
|
|
|
|
*/
|
|
fs_trile_glass_shadow_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,
|
|
0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x73,0x77,0x61,0x74,0x63,
|
|
0x68,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,
|
|
0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,
|
|
0x70,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,0x33,0x20,
|
|
0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,
|
|
0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,
|
|
0x64,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,0x76,0x65,0x63,0x33,0x20,
|
|
0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,0x29,0x20,0x69,
|
|
0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,
|
|
0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x36,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x5f,0x61,0x6f,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x38,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x39,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x74,0x69,0x6e,0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x30,0x29,0x20,0x69,0x6e,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x75,0x74,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x6e,0x74,0x20,0x5f,0x31,0x35,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x76,0x5f,0x73,
|
|
0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,
|
|
0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x31,0x35,0x2c,
|
|
0x20,0x31,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x20,0x3c,0x20,0x30,0x2e,0x35,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,
|
|
0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x74,0x65,0x78,
|
|
0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,
|
|
0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,
|
|
0x63,0x32,0x28,0x5f,0x31,0x35,0x2c,0x20,0x30,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x35,0x31,0x2e,0x78,0x79,0x7a,0x20,0x2f,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x6d,0x61,0x78,0x28,0x6d,0x61,0x78,0x28,0x5f,0x35,0x31,
|
|
0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,0x5f,0x35,0x31,0x2e,0x79,0x2c,0x20,0x5f,
|
|
0x35,0x31,0x2e,0x7a,0x29,0x29,0x2c,0x20,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,0x29,0x29,0x2c,0x20,0x67,
|
|
0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x7a,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
const vec2 _23[6] = vec2[](vec2(0.0), vec2(1.0, 0.0), vec2(1.0), vec2(0.0), vec2(1.0), vec2(0.0, 1.0));
|
|
|
|
uniform vec4 view_params[13];
|
|
uniform vec4 water_vs_params[1];
|
|
layout(location = 2) out vec2 v_xz;
|
|
layout(location = 0) out vec3 v_to_camera;
|
|
layout(location = 1) out vec3 v_world;
|
|
|
|
vec2 quad_corner(int vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
v_xz = view_params[8].xz + (((quad_corner(param) * 2.0) - vec2(1.0)) * water_vs_params[0].y);
|
|
vec3 _75 = vec3(v_xz.x, water_vs_params[0].x, v_xz.y);
|
|
gl_Position = mat4(view_params[0], view_params[1], view_params[2], view_params[3]) * vec4(v_xz.x, water_vs_params[0].x, v_xz.y, 1.0);
|
|
v_to_camera = view_params[8].xyz - _75;
|
|
v_world = _75;
|
|
}
|
|
|
|
*/
|
|
vs_water_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x5b,0x36,0x5d,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x32,0x5b,0x5d,0x28,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,
|
|
0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,
|
|
0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,
|
|
0x65,0x63,0x32,0x20,0x76,0x5f,0x78,0x7a,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,
|
|
0x65,0x72,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,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x0a,0x76,0x65,0x63,
|
|
0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x69,0x6e,
|
|
0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x32,0x33,
|
|
0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x5d,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x5f,0x78,0x7a,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x7a,0x20,0x2b,0x20,0x28,0x28,0x28,
|
|
0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,
|
|
0x28,0x31,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x76,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x79,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x37,0x35,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x76,0x5f,0x78,0x7a,0x2e,0x78,0x2c,0x20,0x77,0x61,0x74,0x65,
|
|
0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,
|
|
0x2c,0x20,0x76,0x5f,0x78,0x7a,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,
|
|
0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,
|
|
0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,
|
|
0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,
|
|
0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,
|
|
0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x76,0x5f,0x78,0x7a,0x2e,0x78,0x2c,
|
|
0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x30,0x5d,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x78,0x7a,0x2e,0x79,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x37,0x35,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x20,0x3d,0x20,0x5f,
|
|
0x37,0x35,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 water_floor_params[1];
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 2) out vec4 frag_scene;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 0) in vec3 v_to_camera;
|
|
layout(location = 1) in vec3 v_world;
|
|
layout(location = 2) in vec2 v_xz;
|
|
|
|
void write_scene(vec3 to_camera, float glow)
|
|
{
|
|
frag_glow = vec4(glow);
|
|
frag_scene = vec4(length(to_camera));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
frag_color = vec4(water_floor_params[0].xyz, 1.0);
|
|
vec3 param = v_to_camera;
|
|
float param_1 = 0.0;
|
|
write_scene(param, param_1);
|
|
}
|
|
|
|
*/
|
|
fs_water_floor_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x77,0x61,0x74,0x65,0x72,
|
|
0x5f,0x66,0x6c,0x6f,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
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,0x34,0x20,
|
|
0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,
|
|
0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,
|
|
0x65,0x6e,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,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,0x33,0x20,0x76,0x5f,0x74,0x6f,
|
|
0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,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,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x78,0x7a,
|
|
0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,
|
|
0x65,0x6e,0x65,0x28,0x76,0x65,0x63,0x33,0x20,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x67,0x6c,0x6f,0x77,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x77,
|
|
0x61,0x74,0x65,0x72,0x5f,0x66,0x6c,0x6f,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,
|
|
0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,
|
|
0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 shadow_params[4];
|
|
uniform vec4 water_fs_params[4];
|
|
layout(binding = 16) uniform sampler2D normals_normals_smp;
|
|
layout(binding = 17) uniform sampler2D reflection_reflection_smp;
|
|
layout(binding = 18) uniform sampler2DShadow shadow_map_shadow_smp;
|
|
layout(binding = 19) uniform sampler2D shadow_tint_shadow_tint_smp;
|
|
layout(binding = 20) uniform sampler2D reflection_glow_reflection_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 2) in vec2 v_xz;
|
|
layout(location = 0) in vec3 v_to_camera;
|
|
layout(location = 1) in vec3 v_world;
|
|
|
|
vec3 sun_shadow(vec3 world, vec3 normal)
|
|
{
|
|
vec3 _43 = normal * 0.03125;
|
|
vec4 _78 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4((((floor((world - _43) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _43) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
float _81 = _78.x;
|
|
bool _83 = _81 < 0.0;
|
|
bool _90;
|
|
if (!_83)
|
|
{
|
|
_90 = _81 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_90 = _83;
|
|
}
|
|
bool _97;
|
|
if (!_90)
|
|
{
|
|
_97 = _78.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_97 = _90;
|
|
}
|
|
bool _104;
|
|
if (!_97)
|
|
{
|
|
_104 = _78.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_104 = _97;
|
|
}
|
|
bool _111;
|
|
if (!_104)
|
|
{
|
|
_111 = _78.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_111 = _104;
|
|
}
|
|
if (_111)
|
|
{
|
|
return vec3(1.0);
|
|
}
|
|
float _134 = _78.z - 0.0005000000237487256526947021484375;
|
|
return texture(shadow_tint_shadow_tint_smp, _78.xy).xyz * texture(shadow_map_shadow_smp, vec3(vec3(_81, _78.y, _134).xy, _134));
|
|
}
|
|
|
|
float brightest(vec3 c)
|
|
{
|
|
return max(c.x, max(c.y, c.z));
|
|
}
|
|
|
|
void write_transparent(vec4 color, float glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = vec4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec2 _175 = vec2(-0.004999999888241291046142578125, -0.01200000010430812835693359375) * water_fs_params[2].w;
|
|
vec3 _217 = normalize(((texture(normals_normals_smp, (v_xz * 0.4000000059604644775390625) + (_175 * 1.5)).xzy * 2.0) - vec3(1.0)) + ((texture(normals_normals_smp, (v_xz * 0.100000001490116119384765625) + (_175 * 1.7000000476837158203125)).xzy * 2.0) - vec3(1.0)));
|
|
vec3 _222 = normalize(v_to_camera);
|
|
float _238 = min(1.0, (0.980000019073486328125 * pow(1.0 - max(dot(_222, _217), 0.0), 5.0)) + 0.4699999988079071044921875);
|
|
vec2 _253 = gl_FragCoord.xy / vec2(textureSize(reflection_reflection_smp, 0));
|
|
vec2 _267 = vec2(_253.x, 1.0 - _253.y) + (_217.xz * water_fs_params[3].y);
|
|
float _280 = mix(_238, 1.0, water_fs_params[3].x);
|
|
vec3 param = v_world;
|
|
vec3 param_1 = vec3(0.0, 1.0, 0.0);
|
|
vec3 param_2 = sun_shadow(param, param_1);
|
|
float _324 = smoothstep(0.5, 0.550000011920928955078125, pow(max(dot(_217, normalize(_222 + water_fs_params[1].xyz)), 0.0), water_fs_params[1].w)) * brightest(param_2);
|
|
vec3 _341 = mix(mix(water_fs_params[0].xyz, texture(reflection_reflection_smp, _267).xyz, vec3(_280)), water_fs_params[2].xyz, vec3(_324));
|
|
vec4 param_3 = vec4(_341, max(mix(mix(0.300000011920928955078125, 0.5, _238), 1.0, water_fs_params[3].x), _324));
|
|
float param_4 = max(_324, texture(reflection_glow_reflection_smp, _267).x * _280);
|
|
write_transparent(param_3, param_4);
|
|
}
|
|
|
|
*/
|
|
fs_water_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,
|
|
0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,
|
|
0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x37,0x29,0x20,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,
|
|
0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x72,0x65,0x66,0x6c,
|
|
0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x38,0x29,
|
|
0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,
|
|
0x20,0x31,0x39,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,
|
|
0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,
|
|
0x6e,0x67,0x20,0x3d,0x20,0x32,0x30,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
|
0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x72,0x65,0x66,0x6c,0x65,
|
|
0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x72,0x65,0x66,0x6c,0x65,
|
|
0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
|
|
0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,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,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x78,0x7a,
|
|
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,0x33,0x20,0x76,
|
|
0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,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,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,
|
|
0x3b,0x0a,0x0a,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x28,0x76,0x65,0x63,0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x34,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x37,0x38,0x20,0x3d,0x20,0x6d,0x61,
|
|
0x74,0x34,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x30,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,
|
|
0x34,0x28,0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,
|
|
0x64,0x20,0x2d,0x20,0x5f,0x34,0x33,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,
|
|
0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,
|
|
0x5f,0x34,0x33,0x29,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,
|
|
0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x38,0x31,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x78,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x38,0x33,0x20,0x3d,0x20,0x5f,0x38,
|
|
0x31,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x38,0x33,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x38,0x31,0x20,0x3e,0x20,0x31,
|
|
0x2e,0x30,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,0x39,0x30,0x20,0x3d,0x20,0x5f,0x38,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x37,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x30,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x39,0x37,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x38,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x39,0x37,0x20,
|
|
0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x37,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,
|
|
0x37,0x38,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x30,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x39,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,
|
|
0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x21,0x5f,0x31,0x30,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x31,0x20,0x3d,0x20,0x5f,0x37,
|
|
0x38,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x31,0x31,0x20,0x3d,0x20,0x5f,
|
|
0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x31,0x31,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x37,0x38,0x2e,0x7a,0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x32,0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,
|
|
0x39,0x34,0x37,0x30,0x32,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,
|
|
0x38,0x2e,0x78,0x79,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x76,0x65,0x63,0x33,0x28,0x5f,0x38,0x31,0x2c,0x20,0x5f,0x37,0x38,0x2e,0x79,0x2c,
|
|
0x20,0x5f,0x31,0x33,0x34,0x29,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31,0x33,0x34,0x29,
|
|
0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,
|
|
0x68,0x74,0x65,0x73,0x74,0x28,0x76,0x65,0x63,0x33,0x20,0x63,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x78,0x28,0x63,
|
|
0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,0x79,0x2c,0x20,0x63,0x2e,0x7a,
|
|
0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,
|
|
0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x76,0x65,
|
|
0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x29,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x37,0x35,0x20,0x3d,0x20,
|
|
0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x30,0x30,0x34,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x38,0x38,0x38,0x32,0x34,0x31,0x32,0x39,0x31,0x30,0x34,0x36,0x31,0x34,0x32,
|
|
0x35,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x30,0x31,0x32,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x31,0x30,0x34,0x33,0x30,0x38,0x31,0x32,0x38,0x33,0x35,0x36,
|
|
0x39,0x33,0x33,0x35,0x39,0x33,0x37,0x35,0x29,0x20,0x2a,0x20,0x77,0x61,0x74,0x65,
|
|
0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x77,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x31,0x37,0x20,
|
|
0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x28,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x76,0x5f,0x78,0x7a,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,
|
|
0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x20,
|
|
0x2b,0x20,0x28,0x5f,0x31,0x37,0x35,0x20,0x2a,0x20,0x31,0x2e,0x35,0x29,0x29,0x2e,
|
|
0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x76,0x5f,0x78,0x7a,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,
|
|
0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x20,
|
|
0x2b,0x20,0x28,0x5f,0x31,0x37,0x35,0x20,0x2a,0x20,0x31,0x2e,0x37,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,
|
|
0x32,0x35,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,
|
|
0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x32,0x32,0x20,0x3d,0x20,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x5f,0x32,0x33,0x38,0x20,0x3d,0x20,0x6d,0x69,0x6e,0x28,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x28,0x30,0x2e,0x39,0x38,0x30,0x30,0x30,0x30,0x30,0x31,0x39,0x30,0x37,0x33,
|
|
0x34,0x38,0x36,0x33,0x32,0x38,0x31,0x32,0x35,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,
|
|
0x31,0x2e,0x30,0x20,0x2d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x32,
|
|
0x32,0x32,0x2c,0x20,0x5f,0x32,0x31,0x37,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,
|
|
0x20,0x35,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x30,0x2e,0x34,0x36,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,
|
|
0x31,0x38,0x37,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x5f,0x32,0x35,0x33,0x20,0x3d,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,0x72,0x65,0x66,0x6c,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x5f,0x32,0x36,0x37,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,
|
|
0x32,0x35,0x33,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x32,0x35,
|
|
0x33,0x2e,0x79,0x29,0x20,0x2b,0x20,0x28,0x5f,0x32,0x31,0x37,0x2e,0x78,0x7a,0x20,
|
|
0x2a,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x33,0x5d,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x32,0x38,0x30,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,0x32,
|
|
0x33,0x38,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x2e,0x78,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x32,0x20,0x3d,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x32,0x34,0x20,
|
|
0x3d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x35,
|
|
0x2c,0x20,0x30,0x2e,0x35,0x35,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,
|
|
0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x70,0x6f,
|
|
0x77,0x28,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x32,0x31,0x37,0x2c,0x20,
|
|
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x32,0x32,0x32,0x20,0x2b,
|
|
0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,
|
|
0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x31,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2a,0x20,0x62,0x72,0x69,0x67,0x68,0x74,
|
|
0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x34,0x31,0x20,0x3d,0x20,0x6d,0x69,
|
|
0x78,0x28,0x6d,0x69,0x78,0x28,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x28,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x5f,0x32,0x36,0x37,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x5f,0x32,0x38,0x30,0x29,0x29,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x2c,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x32,0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x33,0x34,0x31,0x2c,0x20,0x6d,0x61,0x78,0x28,
|
|
0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,
|
|
0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x5f,0x32,0x33,0x38,0x29,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x2e,0x78,0x29,0x2c,0x20,0x5f,0x33,0x32,0x34,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x5f,0x33,0x32,0x34,
|
|
0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x72,0x65,0x66,0x6c,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x36,0x37,0x29,0x2e,
|
|
0x78,0x20,0x2a,0x20,0x5f,0x32,0x38,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,
|
|
0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x34,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
const vec2 _23[6] = vec2[](vec2(0.0), vec2(1.0, 0.0), vec2(1.0), vec2(0.0), vec2(1.0), vec2(0.0, 1.0));
|
|
|
|
uniform vec4 view_params[13];
|
|
uniform vec4 sprite_params[1];
|
|
layout(location = 3) in vec3 face;
|
|
layout(location = 0) in vec3 center;
|
|
layout(location = 1) in vec2 size;
|
|
layout(location = 0) out float v_clip;
|
|
layout(location = 1) out vec3 v_to_camera;
|
|
layout(location = 2) out vec2 v_uv;
|
|
layout(location = 2) in vec4 uv_rect;
|
|
layout(location = 3) out vec4 v_color;
|
|
layout(location = 4) in vec4 color;
|
|
layout(location = 7) out float v_glow;
|
|
layout(location = 5) in float glow;
|
|
layout(location = 4) out vec3 v_sun;
|
|
layout(location = 5) out vec3 v_shade;
|
|
layout(location = 6) out vec3 v_anchor;
|
|
|
|
vec2 quad_corner(int vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = quad_corner(param);
|
|
vec3 look = face;
|
|
if (face.x < (-10.0))
|
|
{
|
|
look = vec3(center.x - view_params[8].x, 0.0, center.z - view_params[8].z);
|
|
}
|
|
if (dot(look.xz, look.xz) < 9.9999997473787516355514526367188e-05)
|
|
{
|
|
look = vec3(0.0, 0.0, 1.0);
|
|
}
|
|
float _93 = _37.x;
|
|
float _105 = _37.y;
|
|
vec3 _110 = (center + (normalize(cross(vec3(0.0, 1.0, 0.0), look)) * ((_93 - 0.5) * size.x))) + vec3(0.0, _105 * size.y, 0.0);
|
|
vec4 _123 = vec4(_110, 1.0);
|
|
gl_Position = mat4(view_params[0], view_params[1], view_params[2], view_params[3]) * _123;
|
|
v_clip = dot(_123, view_params[9]);
|
|
v_to_camera = view_params[8].xyz - _110;
|
|
v_uv = vec2(uv_rect.x + (_93 * uv_rect.z), uv_rect.y + ((1.0 - _105) * uv_rect.w));
|
|
v_color = color;
|
|
v_glow = glow;
|
|
bool _181 = sprite_params[0].x > 0.5;
|
|
vec3 _182;
|
|
if (_181)
|
|
{
|
|
_182 = view_params[11].xyz;
|
|
}
|
|
else
|
|
{
|
|
_182 = vec3(1.0);
|
|
}
|
|
v_sun = _182;
|
|
vec3 _196;
|
|
if (_181)
|
|
{
|
|
_196 = view_params[12].xyz;
|
|
}
|
|
else
|
|
{
|
|
_196 = vec3(1.0);
|
|
}
|
|
v_shade = _196;
|
|
v_anchor = (center + vec3(0.0, size.y * 0.5, 0.0)) + (view_params[10].xyz * 0.300000011920928955078125);
|
|
}
|
|
|
|
*/
|
|
vs_sprite_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x5b,0x36,0x5d,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x32,0x5b,0x5d,0x28,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,
|
|
0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,
|
|
0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x5d,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,0x76,0x65,0x63,0x33,
|
|
0x20,0x66,0x61,0x63,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
|
|
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,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,0x73,0x69,0x7a,0x65,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,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x63,0x6c,0x69,0x70,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x76,
|
|
0x5f,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,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,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,0x34,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,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,0x37,0x29,0x20,0x6f,0x75,0x74,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,
|
|
0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,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,0x76,0x65,0x63,0x33,0x20,0x76,
|
|
0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x36,
|
|
0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,
|
|
0x68,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,
|
|
0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,
|
|
0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x32,0x33,0x5b,0x76,0x65,0x72,0x74,0x65,0x78,
|
|
0x5f,0x69,0x6e,0x64,0x65,0x78,0x5d,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,
|
|
0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,
|
|
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,
|
|
0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x5f,0x33,0x37,0x20,0x3d,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,
|
|
0x72,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x66,0x61,0x63,0x65,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x66,0x61,0x63,0x65,0x2e,0x78,0x20,0x3c,
|
|
0x20,0x28,0x2d,0x31,0x30,0x2e,0x30,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x63,0x65,0x6e,0x74,0x65,0x72,0x2e,0x78,0x20,0x2d,0x20,0x76,
|
|
0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x2e,0x7a,0x20,0x2d,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,
|
|
0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x64,0x6f,0x74,0x28,0x6c,0x6f,0x6f,0x6b,0x2e,0x78,0x7a,0x2c,0x20,0x6c,
|
|
0x6f,0x6f,0x6b,0x2e,0x78,0x7a,0x29,0x20,0x3c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,
|
|
0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
|
|
0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x33,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x31,0x30,0x35,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,0x79,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x31,0x30,0x20,0x3d,0x20,
|
|
0x28,0x63,0x65,0x6e,0x74,0x65,0x72,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x69,0x7a,0x65,0x28,0x63,0x72,0x6f,0x73,0x73,0x28,0x76,0x65,0x63,0x33,0x28,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,
|
|
0x6c,0x6f,0x6f,0x6b,0x29,0x29,0x20,0x2a,0x20,0x28,0x28,0x5f,0x39,0x33,0x20,0x2d,
|
|
0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x73,0x69,0x7a,0x65,0x2e,0x78,0x29,0x29,
|
|
0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x31,
|
|
0x30,0x35,0x20,0x2a,0x20,0x73,0x69,0x7a,0x65,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x32,0x33,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x31,0x30,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x5f,0x31,0x32,
|
|
0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3d,0x20,
|
|
0x64,0x6f,0x74,0x28,0x5f,0x31,0x32,0x33,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x39,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x76,0x69,0x65,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x20,
|
|
0x2d,0x20,0x5f,0x31,0x31,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x75,0x76,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,
|
|
0x78,0x20,0x2b,0x20,0x28,0x5f,0x39,0x33,0x20,0x2a,0x20,0x75,0x76,0x5f,0x72,0x65,
|
|
0x63,0x74,0x2e,0x7a,0x29,0x2c,0x20,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,0x79,
|
|
0x20,0x2b,0x20,0x28,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x31,0x30,0x35,0x29,
|
|
0x20,0x2a,0x20,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,0x77,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x3d,0x20,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x31,0x38,0x31,0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x38,0x32,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x38,0x31,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x38,
|
|
0x32,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x31,0x5d,0x2e,0x78,0x79,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,0x38,0x32,0x20,0x3d,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x38,0x32,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x39,0x36,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x38,0x31,0x29,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x39,0x36,0x20,
|
|
0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x32,
|
|
0x5d,0x2e,0x78,0x79,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,0x39,0x36,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x3d,0x20,0x5f,0x31,0x39,0x36,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x20,0x3d,0x20,0x28,
|
|
0x63,0x65,0x6e,0x74,0x65,0x72,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x73,0x69,0x7a,0x65,0x2e,0x79,0x20,0x2a,0x20,0x30,0x2e,0x35,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,
|
|
0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 shadow_params[4];
|
|
layout(binding = 16) uniform sampler2DShadow shadow_map_shadow_smp;
|
|
layout(binding = 17) uniform sampler2D shadow_tint_shadow_tint_smp;
|
|
layout(binding = 18) uniform sampler2D sprite_sprite_smp;
|
|
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 2) out vec4 frag_scene;
|
|
layout(location = 0) in float v_clip;
|
|
layout(location = 2) in vec2 v_uv;
|
|
layout(location = 3) in vec4 v_color;
|
|
layout(location = 5) in vec3 v_shade;
|
|
layout(location = 4) in vec3 v_sun;
|
|
layout(location = 6) in vec3 v_anchor;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) in vec3 v_to_camera;
|
|
layout(location = 7) in float v_glow;
|
|
|
|
vec3 sun_shadow(vec3 world, vec3 normal)
|
|
{
|
|
vec3 _35 = normal * 0.03125;
|
|
vec4 _71 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4((((floor((world - _35) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _35) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
float _76 = _71.x;
|
|
bool _78 = _76 < 0.0;
|
|
bool _85;
|
|
if (!_78)
|
|
{
|
|
_85 = _76 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_85 = _78;
|
|
}
|
|
bool _93;
|
|
if (!_85)
|
|
{
|
|
_93 = _71.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_93 = _85;
|
|
}
|
|
bool _100;
|
|
if (!_93)
|
|
{
|
|
_100 = _71.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_100 = _93;
|
|
}
|
|
bool _108;
|
|
if (!_100)
|
|
{
|
|
_108 = _71.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_108 = _100;
|
|
}
|
|
if (_108)
|
|
{
|
|
return vec3(1.0);
|
|
}
|
|
float _131 = _71.z - 0.0005000000237487256526947021484375;
|
|
return texture(shadow_tint_shadow_tint_smp, _71.xy).xyz * texture(shadow_map_shadow_smp, vec3(vec3(_76, _71.y, _131).xy, _131));
|
|
}
|
|
|
|
vec4 sprite_color()
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard;
|
|
}
|
|
vec4 _167 = texture(sprite_sprite_smp, v_uv);
|
|
if (_167.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard;
|
|
}
|
|
return _167 * v_color;
|
|
}
|
|
|
|
void write_scene(vec3 to_camera, float glow)
|
|
{
|
|
frag_glow = vec4(glow);
|
|
frag_scene = vec4(length(to_camera));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec3 param = v_anchor;
|
|
vec3 param_1 = vec3(0.0, 1.0, 0.0);
|
|
vec4 _197 = sprite_color();
|
|
frag_color = _197 * vec4(mix(v_shade, v_sun, sun_shadow(param, param_1)), 1.0);
|
|
vec3 param_2 = v_to_camera;
|
|
float param_3 = 0.0;
|
|
write_scene(param_2, param_3);
|
|
}
|
|
|
|
*/
|
|
fs_sprite_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x36,
|
|
0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x3b,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,
|
|
0x3d,0x20,0x31,0x37,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,
|
|
0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,
|
|
0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x38,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x70,0x72,0x69,
|
|
0x74,0x65,0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,
|
|
0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,
|
|
0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x33,0x29,
|
|
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,0x35,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
|
|
0x5f,0x73,0x68,0x61,0x64,0x65,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,
|
|
0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x36,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,
|
|
0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,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,0x31,
|
|
0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,
|
|
0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
|
|
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,0x20,0x69,0x6e,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x0a,0x76,0x65,
|
|
0x63,0x33,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x76,0x65,
|
|
0x63,0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x33,0x35,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x28,
|
|
0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,0x20,0x5f,
|
|
0x33,0x35,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,0x33,0x35,0x29,0x20,
|
|
0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,
|
|
0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x36,
|
|
0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,
|
|
0x6f,0x6c,0x20,0x5f,0x37,0x38,0x20,0x3d,0x20,0x5f,0x37,0x36,0x20,0x3c,0x20,0x30,
|
|
0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x38,0x35,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x37,0x38,0x29,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x38,
|
|
0x35,0x20,0x3d,0x20,0x5f,0x37,0x36,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x38,0x35,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x21,0x5f,0x38,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x39,0x33,0x20,0x3d,0x20,0x5f,0x37,0x31,
|
|
0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x39,0x33,0x20,0x3d,0x20,0x5f,0x38,0x35,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x39,0x33,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x79,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,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,0x30,0x30,0x20,0x3d,0x20,0x5f,0x39,0x33,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,
|
|
0x31,0x30,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,
|
|
0x30,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x5f,0x31,0x30,0x38,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x7a,0x20,0x3e,
|
|
0x20,0x31,0x2e,0x30,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,0x30,0x38,0x20,0x3d,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
|
|
0x30,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x31,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x7a,
|
|
0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x32,
|
|
0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,0x32,
|
|
0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x31,0x2e,0x78,0x79,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x65,0x63,0x33,0x28,
|
|
0x5f,0x37,0x36,0x2c,0x20,0x5f,0x37,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x33,0x31,
|
|
0x29,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31,0x33,0x31,0x29,0x29,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x76,0x65,0x63,0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,
|
|
0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,
|
|
0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x5f,0x31,0x36,0x37,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x28,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x37,0x2e,0x77,0x20,0x3c,0x20,0x30,0x2e,0x30,
|
|
0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,
|
|
0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,
|
|
0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x31,0x36,0x37,0x20,0x2a,0x20,0x76,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,
|
|
0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x76,0x65,0x63,0x33,0x20,0x74,
|
|
0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x67,0x6c,0x6f,
|
|
0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,
|
|
0x6e,0x65,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6c,0x65,0x6e,0x67,0x74,0x68,
|
|
0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x29,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,
|
|
0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x39,0x37,0x20,
|
|
0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x3d,0x20,0x5f,0x31,0x39,0x37,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,
|
|
0x69,0x78,0x28,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x2c,0x20,0x76,0x5f,0x73,0x75,
|
|
0x6e,0x2c,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D sprite_sprite_smp;
|
|
|
|
layout(location = 0) in float v_clip;
|
|
layout(location = 2) in vec2 v_uv;
|
|
layout(location = 3) in vec4 v_color;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 7) in float v_glow;
|
|
layout(location = 1) in vec3 v_to_camera;
|
|
layout(location = 4) in vec3 v_sun;
|
|
layout(location = 5) in vec3 v_shade;
|
|
layout(location = 6) in vec3 v_anchor;
|
|
|
|
vec4 sprite_color()
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard;
|
|
}
|
|
vec4 _42 = texture(sprite_sprite_smp, v_uv);
|
|
if (_42.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard;
|
|
}
|
|
return _42 * v_color;
|
|
}
|
|
|
|
void write_transparent(vec4 color, float glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = vec4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec4 _67 = sprite_color();
|
|
vec4 param = _67;
|
|
float param_1 = v_glow * 8.0;
|
|
write_transparent(param, param_1);
|
|
}
|
|
|
|
*/
|
|
fs_particle_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,0x72,0x69,
|
|
0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x75,0x76,
|
|
0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x33,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x76,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
|
|
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,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,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,
|
|
0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,0x20,
|
|
0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,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,0x33,0x20,0x76,0x5f,
|
|
0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,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,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x35,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,
|
|
0x61,0x64,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x36,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,
|
|
0x70,0x20,0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,
|
|
0x34,0x32,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,
|
|
0x34,0x32,0x2e,0x77,0x20,0x3c,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,
|
|
0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x5f,0x34,0x32,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,
|
|
0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,
|
|
0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x36,0x37,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x31,0x20,0x3d,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x2a,0x20,0x38,0x2e,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,
|
|
0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(binding = 16) uniform sampler2D sprite_sprite_smp;
|
|
|
|
layout(location = 0) in float v_clip;
|
|
layout(location = 2) in vec2 v_uv;
|
|
layout(location = 3) in vec4 v_color;
|
|
layout(location = 1) in vec3 v_to_camera;
|
|
layout(location = 4) in vec3 v_sun;
|
|
layout(location = 5) in vec3 v_shade;
|
|
layout(location = 6) in vec3 v_anchor;
|
|
layout(location = 7) in float v_glow;
|
|
|
|
vec4 sprite_color()
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard;
|
|
}
|
|
vec4 _36 = texture(sprite_sprite_smp, v_uv);
|
|
if (_36.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard;
|
|
}
|
|
return _36 * v_color;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec4 _54 = sprite_color();
|
|
}
|
|
|
|
*/
|
|
fs_sprite_shadow_source_glsl430 := u8.[
|
|
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,0x31,
|
|
0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,0x72,0x69,
|
|
0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x75,0x76,
|
|
0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x33,0x29,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,0x31,0x29,0x20,0x69,0x6e,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,
|
|
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,0x76,0x65,0x63,0x33,0x20,0x76,
|
|
0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x36,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,
|
|
0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x37,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x34,0x20,0x73,
|
|
0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x33,0x36,0x20,
|
|
0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x70,0x72,0x69,0x74,0x65,
|
|
0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x5f,0x75,
|
|
0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x36,0x2e,
|
|
0x77,0x20,0x3c,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,
|
|
0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,
|
|
0x36,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x33,0x36,
|
|
0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,
|
|
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x34,0x20,0x3d,0x20,0x73,0x70,0x72,0x69,
|
|
0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 view_params[13];
|
|
layout(location = 0) out vec4 v_point;
|
|
layout(location = 1) out vec3 v_camera;
|
|
|
|
vec2 fullscreen_position(int vertex_index)
|
|
{
|
|
return (vec2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - vec2(1.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = fullscreen_position(param);
|
|
float _48 = _37.x;
|
|
gl_Position = vec4(_48, _37.y, 0.0, 1.0);
|
|
v_point = mat4(view_params[4], view_params[5], view_params[6], view_params[7]) * vec4(_48, _37.y, 0.5, 1.0);
|
|
v_camera = view_params[8].xyz;
|
|
}
|
|
|
|
*/
|
|
vs_sky_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x33,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,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,
|
|
0x74,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,0x33,
|
|
0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x32,
|
|
0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,
|
|
0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3c,0x3c,
|
|
0x20,0x31,0x29,0x20,0x26,0x20,0x32,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x26,0x20,0x32,
|
|
0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,
|
|
0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,
|
|
0x78,0x49,0x44,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,
|
|
0x37,0x20,0x3d,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,
|
|
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x38,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,
|
|
0x38,0x2c,0x20,0x5f,0x33,0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,
|
|
0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x36,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x37,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,
|
|
0x34,0x38,0x2c,0x20,0x5f,0x33,0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 sky_params[6];
|
|
layout(location = 0) in vec4 v_point;
|
|
layout(location = 1) in vec3 v_camera;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 2) out vec4 frag_scene;
|
|
|
|
void main()
|
|
{
|
|
vec3 _26 = normalize((v_point.xyz / vec3(v_point.w)) - v_camera);
|
|
float _44 = _26.y;
|
|
vec3 _62 = normalize(cross(sky_params[5].xyz, vec3(0.0, 1.0, 0.0)));
|
|
float _72 = dot(_26, sky_params[5].xyz);
|
|
vec3 _74 = _26 - (sky_params[5].xyz * _72);
|
|
float _84 = max(abs(dot(_74, _62)), abs(dot(_74, cross(_62, sky_params[5].xyz))));
|
|
float _91 = clamp((0.25 - _84) * 6.0, 0.0, 1.0);
|
|
vec3 color = mix(sky_params[0].xyz, sky_params[1].xyz, vec3(clamp(_44 * 2.0, 0.0, 0.699999988079071044921875))) + ((sky_params[3].xyz * _91) * _91);
|
|
bool _107 = _84 < 0.0320000015199184417724609375;
|
|
bool _114;
|
|
if (_107)
|
|
{
|
|
_114 = _72 > 0.0;
|
|
}
|
|
else
|
|
{
|
|
_114 = _107;
|
|
}
|
|
if (_114)
|
|
{
|
|
color = sky_params[2].xyz * 3.0;
|
|
}
|
|
vec3 _138 = color;
|
|
vec3 _139 = _138 + ((sky_params[4].xyz * (1.0 - clamp(abs(_44) * 20.0, 0.0, 1.0))) * 0.800000011920928955078125);
|
|
color = _139;
|
|
frag_color = vec4(_139 * sky_params[5].w, 1.0);
|
|
frag_glow = vec4(float(_114));
|
|
frag_scene = vec4(10000.0);
|
|
}
|
|
|
|
*/
|
|
fs_sky_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x6b,0x79,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x36,0x5d,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,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,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,0x33,0x20,0x76,0x5f,0x63,
|
|
0x61,0x6d,0x65,0x72,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,0x66,0x72,0x61,0x67,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,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,
|
|
0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,
|
|
0x6e,0x65,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x36,0x20,
|
|
0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x76,0x5f,0x70,
|
|
0x6f,0x69,0x6e,0x74,0x2e,0x78,0x79,0x7a,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x77,0x29,0x29,0x20,0x2d,0x20,0x76,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x34,0x34,0x20,0x3d,0x20,0x5f,0x32,0x36,0x2e,0x79,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x32,0x20,0x3d,0x20,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x63,0x72,0x6f,0x73,0x73,0x28,0x73,
|
|
0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2e,0x78,0x79,0x7a,
|
|
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,0x5f,0x32,0x36,
|
|
0x2c,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x37,0x34,0x20,0x3d,0x20,0x5f,0x32,0x36,0x20,0x2d,0x20,0x28,0x73,0x6b,0x79,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,
|
|
0x5f,0x37,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x38,0x34,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x61,0x62,0x73,0x28,0x64,0x6f,
|
|
0x74,0x28,0x5f,0x37,0x34,0x2c,0x20,0x5f,0x36,0x32,0x29,0x29,0x2c,0x20,0x61,0x62,
|
|
0x73,0x28,0x64,0x6f,0x74,0x28,0x5f,0x37,0x34,0x2c,0x20,0x63,0x72,0x6f,0x73,0x73,
|
|
0x28,0x5f,0x36,0x32,0x2c,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x35,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x31,0x20,0x3d,0x20,0x63,0x6c,0x61,
|
|
0x6d,0x70,0x28,0x28,0x30,0x2e,0x32,0x35,0x20,0x2d,0x20,0x5f,0x38,0x34,0x29,0x20,
|
|
0x2a,0x20,0x36,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x5f,0x34,0x34,0x20,0x2a,0x20,0x32,0x2e,
|
|
0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x36,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,
|
|
0x37,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x39,
|
|
0x31,0x29,0x20,0x2a,0x20,0x5f,0x39,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,
|
|
0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x37,0x20,0x3d,0x20,0x5f,0x38,0x34,0x20,0x3c,
|
|
0x20,0x30,0x2e,0x30,0x33,0x32,0x30,0x30,0x30,0x30,0x30,0x31,0x35,0x31,0x39,0x39,
|
|
0x31,0x38,0x34,0x34,0x31,0x37,0x37,0x32,0x34,0x36,0x30,0x39,0x33,0x37,0x35,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x34,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,0x37,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x34,
|
|
0x20,0x3d,0x20,0x5f,0x37,0x32,0x20,0x3e,0x20,0x30,0x2e,0x30,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,0x31,0x34,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x30,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x31,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x3d,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x20,0x2a,0x20,0x33,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x33,0x38,0x20,0x3d,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x31,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,0x33,0x38,0x20,0x2b,0x20,0x28,
|
|
0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2e,0x78,
|
|
0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x63,0x6c,0x61,0x6d,
|
|
0x70,0x28,0x61,0x62,0x73,0x28,0x5f,0x34,0x34,0x29,0x20,0x2a,0x20,0x32,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,
|
|
0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x33,0x39,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x33,0x39,0x20,0x2a,0x20,0x73,0x6b,0x79,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2e,0x77,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,
|
|
0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,
|
|
0x31,0x31,0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
|
|
0x73,0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x31,0x30,0x30,
|
|
0x30,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
const vec2 _23[6] = vec2[](vec2(0.0), vec2(1.0, 0.0), vec2(1.0), vec2(0.0), vec2(1.0), vec2(0.0, 1.0));
|
|
|
|
uniform vec4 view_params[13];
|
|
uniform vec4 line_params[1];
|
|
layout(location = 0) in vec3 a;
|
|
layout(location = 1) in vec3 b;
|
|
layout(location = 3) in float width;
|
|
layout(location = 0) out vec4 v_color;
|
|
layout(location = 2) in vec4 color;
|
|
|
|
vec2 quad_corner(int vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = quad_corner(param);
|
|
mat4 _48 = mat4(view_params[0], view_params[1], view_params[2], view_params[3]);
|
|
vec4 _57 = _48 * vec4(a, 1.0);
|
|
vec4 _67 = _48 * vec4(b, 1.0);
|
|
vec2 _100 = ((_67.xy / vec2(max(_67.w, 9.9999997473787516355514526367188e-05))) * line_params[0].xy) - ((_57.xy / vec2(max(_57.w, 9.9999997473787516355514526367188e-05))) * line_params[0].xy);
|
|
vec2 dir = _100;
|
|
vec2 _106;
|
|
if (dot(_100, _100) > 9.9999997473787516355514526367188e-05)
|
|
{
|
|
_106 = normalize(dir);
|
|
}
|
|
else
|
|
{
|
|
_106 = vec2(1.0, 0.0);
|
|
}
|
|
dir = _106;
|
|
vec4 _120 = mix(_57, _67, vec4(_37.x));
|
|
vec2 _145 = _120.xy + ((((vec2(-_106.y, _106.x) * (_37.y - 0.5)) * width) / line_params[0].xy) * _120.w);
|
|
vec4 _169 = _120;
|
|
_169.x = _145.x;
|
|
_169.y = _145.y;
|
|
gl_Position = _169;
|
|
v_color = color;
|
|
}
|
|
|
|
*/
|
|
vs_line_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x5b,0x36,0x5d,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x32,0x5b,0x5d,0x28,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,
|
|
0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,
|
|
0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
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,0x33,0x20,0x61,
|
|
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,0x33,0x20,0x62,
|
|
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,
|
|
0x77,0x69,0x64,0x74,0x68,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,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,
|
|
0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x0a,0x76,0x65,0x63,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,
|
|
0x6e,0x65,0x72,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,
|
|
0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x5f,0x32,0x33,0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,
|
|
0x64,0x65,0x78,0x5d,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,
|
|
0x49,0x44,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x37,
|
|
0x20,0x3d,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x34,0x20,
|
|
0x5f,0x34,0x38,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x37,0x20,0x3d,0x20,0x5f,0x34,0x38,0x20,0x2a,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x61,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x5f,0x34,
|
|
0x38,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x62,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x30,0x30,0x20,
|
|
0x3d,0x20,0x28,0x28,0x5f,0x36,0x37,0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,
|
|
0x32,0x28,0x6d,0x61,0x78,0x28,0x5f,0x36,0x37,0x2e,0x77,0x2c,0x20,0x39,0x2e,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,
|
|
0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,
|
|
0x30,0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2d,0x20,0x28,0x28,0x5f,
|
|
0x35,0x37,0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,0x32,0x28,0x6d,0x61,0x78,
|
|
0x28,0x5f,0x35,0x37,0x2e,0x77,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,
|
|
0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x29,0x29,
|
|
0x20,0x2a,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,
|
|
0x5d,0x2e,0x78,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x64,0x69,0x72,0x20,0x3d,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x30,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x31,0x30,
|
|
0x30,0x29,0x20,0x3e,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,
|
|
0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,
|
|
0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x36,0x20,0x3d,
|
|
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x64,0x69,0x72,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,
|
|
0x30,0x36,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,0x64,
|
|
0x69,0x72,0x20,0x3d,0x20,0x5f,0x31,0x30,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x5f,0x31,0x32,0x30,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,
|
|
0x35,0x37,0x2c,0x20,0x5f,0x36,0x37,0x2c,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x33,
|
|
0x37,0x2e,0x78,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x5f,0x31,0x34,0x35,0x20,0x3d,0x20,0x5f,0x31,0x32,0x30,0x2e,0x78,0x79,0x20,0x2b,
|
|
0x20,0x28,0x28,0x28,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x5f,0x31,0x30,0x36,0x2e,
|
|
0x79,0x2c,0x20,0x5f,0x31,0x30,0x36,0x2e,0x78,0x29,0x20,0x2a,0x20,0x28,0x5f,0x33,
|
|
0x37,0x2e,0x79,0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x77,0x69,
|
|
0x64,0x74,0x68,0x29,0x20,0x2f,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x5f,0x31,0x32,0x30,
|
|
0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,
|
|
0x36,0x39,0x20,0x3d,0x20,0x5f,0x31,0x32,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,
|
|
0x31,0x36,0x39,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x31,0x34,0x35,0x2e,0x78,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x36,0x39,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x31,0x34,
|
|
0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) out vec4 frag_glow;
|
|
layout(location = 0) in vec4 v_color;
|
|
|
|
void write_transparent(vec4 color, float glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = vec4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec4 param = v_color;
|
|
float param_1 = 0.0;
|
|
write_transparent(param, param_1);
|
|
}
|
|
|
|
*/
|
|
fs_line_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
|
|
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,0x31,0x29,0x20,0x6f,0x75,0x74,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,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,0x34,0x20,0x76,0x5f,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,
|
|
0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x76,
|
|
0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,
|
|
0x3d,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x30,
|
|
0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,
|
|
0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
uniform vec4 ui_vs_params[1];
|
|
layout(location = 0) in vec2 position;
|
|
out vec2 v_uv;
|
|
layout(location = 1) in vec2 uv;
|
|
out vec4 v_color;
|
|
layout(location = 2) in vec4 color0;
|
|
|
|
void main()
|
|
{
|
|
vec2 _26 = ((position / ui_vs_params[0].xy) * 2.0) - vec2(1.0);
|
|
gl_Position = vec4(_26.x, -_26.y, 0.0, 1.0);
|
|
v_uv = uv;
|
|
v_color = color0;
|
|
}
|
|
|
|
*/
|
|
vs_ui_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x75,0x69,
|
|
0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,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,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x76,
|
|
0x5f,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x75,0x76,0x3b,0x0a,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,0x32,0x29,0x20,0x69,0x6e,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x0a,0x76,0x6f,
|
|
0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x36,0x20,0x3d,0x20,0x28,0x28,0x70,0x6f,0x73,
|
|
0x69,0x74,0x69,0x6f,0x6e,0x20,0x2f,0x20,0x75,0x69,0x5f,0x76,0x73,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x32,0x2e,
|
|
0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x32,0x36,0x2e,0x78,0x2c,0x20,0x2d,0x5f,
|
|
0x32,0x36,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D tex_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
in highp vec2 v_uv;
|
|
in highp vec4 v_color;
|
|
|
|
void main()
|
|
{
|
|
frag_color = texture(tex_smp, v_uv) * v_color;
|
|
}
|
|
|
|
*/
|
|
fs_ui_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x76,
|
|
0x5f,0x75,0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x5f,0x75,
|
|
0x76,0x29,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
vec2 fullscreen_position(int vertex_index)
|
|
{
|
|
return (vec2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - vec2(1.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
gl_Position = vec4(fullscreen_position(param), 0.0, 1.0);
|
|
}
|
|
|
|
*/
|
|
vs_fullscreen_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x76,0x65,0x63,0x32,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,
|
|
0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,
|
|
0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x28,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,
|
|
0x65,0x78,0x20,0x3c,0x3c,0x20,0x31,0x29,0x20,0x26,0x20,0x32,0x29,0x2c,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x20,0x26,0x20,0x32,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,
|
|
0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,
|
|
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,
|
|
0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,
|
|
0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,
|
|
0x28,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D bloom_source_bloom_smp;
|
|
uniform highp sampler2D bloom_glow_bloom_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
highp vec3 glowing(ivec2 p)
|
|
{
|
|
return texelFetch(bloom_source_bloom_smp, p, 0).xyz * texelFetch(bloom_glow_bloom_smp, p, 0).x;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
ivec2 _53 = ivec2(gl_FragCoord.xy) * ivec2(2);
|
|
ivec2 param = _53;
|
|
ivec2 param_1 = _53 + ivec2(1, 0);
|
|
ivec2 param_2 = _53 + ivec2(0, 1);
|
|
ivec2 param_3 = _53 + ivec2(1);
|
|
frag_color = vec4((((glowing(param) + glowing(param_1)) + glowing(param_2)) + glowing(param_3)) * 0.25, 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_bloom_glow_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,
|
|
0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,
|
|
0x77,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x67,0x6c,0x6f,0x77,0x69,0x6e,
|
|
0x67,0x28,0x69,0x76,0x65,0x63,0x32,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,
|
|
0x63,0x68,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x70,0x2c,0x20,0x30,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,
|
|
0x68,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x70,0x2c,0x20,0x30,0x29,0x2e,0x78,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,0x33,0x20,
|
|
0x3d,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,
|
|
0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x69,0x76,0x65,0x63,0x32,
|
|
0x28,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,
|
|
0x5f,0x35,0x33,0x20,0x2b,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x31,0x2c,0x20,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x33,0x20,0x2b,0x20,0x69,0x76,0x65,
|
|
0x63,0x32,0x28,0x30,0x2c,0x20,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,
|
|
0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x33,0x20,0x2b,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x31,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x28,0x28,0x28,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x29,0x20,0x2b,0x20,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x20,0x2b,0x20,0x67,0x6c,0x6f,0x77,
|
|
0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x29,0x20,0x2b,0x20,
|
|
0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,
|
|
0x29,0x20,0x2a,0x20,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D bloom_source_bloom_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
highp vec3 tap(highp vec2 uv)
|
|
{
|
|
return texture(bloom_source_bloom_smp, uv).xyz;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec2 _40 = vec2(textureSize(bloom_source_bloom_smp, 0));
|
|
highp vec2 _42 = vec2(1.0) / _40;
|
|
highp vec2 _51 = (gl_FragCoord.xy * 2.0) * _42;
|
|
highp vec2 param = _51 + (vec2(-1.0) / _40);
|
|
highp vec2 param_1 = _51 + (vec2(1.0, -1.0) / _40);
|
|
highp vec2 param_2 = _51 + (vec2(-1.0, 1.0) / _40);
|
|
highp vec2 param_3 = _51 + _42;
|
|
frag_color = vec4((((tap(param) + tap(param_1)) + tap(param_2)) + tap(param_3)) * 0.25, 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_bloom_down_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,
|
|
0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x74,0x61,0x70,0x28,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,
|
|
0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,0x65,0x28,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x32,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,
|
|
0x31,0x20,0x3d,0x20,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,
|
|
0x64,0x2e,0x78,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2a,0x20,0x5f,0x34,
|
|
0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,
|
|
0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x31,
|
|
0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,
|
|
0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,
|
|
0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x35,0x31,
|
|
0x20,0x2b,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,
|
|
0x28,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D bloom_source_bloom_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
highp vec3 tap(highp vec2 uv)
|
|
{
|
|
return texture(bloom_source_bloom_smp, uv).xyz;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec2 _40 = vec2(textureSize(bloom_source_bloom_smp, 0));
|
|
highp vec2 _42 = vec2(1.0) / _40;
|
|
highp vec2 _51 = (gl_FragCoord.xy * 0.5) * _42;
|
|
highp vec2 param = _51;
|
|
highp vec2 param_1 = _51 + (vec2(-1.0, 0.0) / _40);
|
|
highp vec2 param_2 = _51 + (vec2(1.0, 0.0) / _40);
|
|
highp vec2 param_3 = _51 + (vec2(0.0, -1.0) / _40);
|
|
highp vec2 param_4 = _51 + (vec2(0.0, 1.0) / _40);
|
|
highp vec2 param_5 = _51 + (vec2(-1.0) / _40);
|
|
highp vec2 param_6 = _51 + (vec2(1.0, -1.0) / _40);
|
|
highp vec2 param_7 = _51 + (vec2(-1.0, 1.0) / _40);
|
|
highp vec2 param_8 = _51 + _42;
|
|
frag_color = vec4((((tap(param) * 4.0) + ((((tap(param_1) + tap(param_2)) + tap(param_3)) + tap(param_4)) * 2.0)) + (((tap(param_5) + tap(param_6)) + tap(param_7)) + tap(param_8))) * vec3(0.0625), 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_bloom_up_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,
|
|
0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x74,0x61,0x70,0x28,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,
|
|
0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x69,0x7a,0x65,0x28,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x32,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,
|
|
0x31,0x20,0x3d,0x20,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,
|
|
0x64,0x2e,0x78,0x79,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,0x34,
|
|
0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,
|
|
0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x20,0x2f,
|
|
0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,
|
|
0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,
|
|
0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,
|
|
0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x5f,
|
|
0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,
|
|
0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,
|
|
0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,0x20,
|
|
0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,
|
|
0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,
|
|
0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x5f,
|
|
0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x28,0x74,0x61,0x70,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2a,0x20,0x34,0x2e,0x30,0x29,0x20,0x2b,
|
|
0x20,0x28,0x28,0x28,0x28,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,
|
|
0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,
|
|
0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,
|
|
0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x28,0x74,
|
|
0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x29,0x29,0x29,0x20,0x2a,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
uniform vec4 view_params[13];
|
|
out vec4 v_point;
|
|
out vec3 v_camera;
|
|
out vec3 v_sun;
|
|
out float v_time;
|
|
|
|
vec2 fullscreen_position(int vertex_index)
|
|
{
|
|
return (vec2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - vec2(1.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = fullscreen_position(param);
|
|
float _48 = _37.x;
|
|
gl_Position = vec4(_48, _37.y, 0.0, 1.0);
|
|
v_point = mat4(view_params[4], view_params[5], view_params[6], view_params[7]) * vec4(_48, _37.y, 0.5, 1.0);
|
|
v_camera = view_params[8].xyz;
|
|
v_sun = view_params[11].xyz;
|
|
v_time = view_params[8].w;
|
|
}
|
|
|
|
*/
|
|
vs_shafts_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,
|
|
0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x33,0x5d,0x3b,0x0a,0x6f,
|
|
0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x3b,
|
|
0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,
|
|
0x75,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x74,0x69,0x6d,0x65,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x32,0x20,0x66,0x75,0x6c,0x6c,
|
|
0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,
|
|
0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,
|
|
0x76,0x65,0x63,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x76,0x65,0x72,0x74,
|
|
0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3c,0x3c,0x20,0x31,0x29,0x20,0x26,
|
|
0x20,0x32,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x76,0x65,0x72,0x74,0x65,
|
|
0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x26,0x20,0x32,0x29,0x29,0x20,0x2a,0x20,
|
|
0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x66,
|
|
0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x38,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,0x78,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,
|
|
0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x20,0x3d,0x20,0x6d,0x61,
|
|
0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,
|
|
0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,
|
|
0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x36,
|
|
0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x37,
|
|
0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,
|
|
0x33,0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,
|
|
0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,
|
|
0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x3d,0x20,
|
|
0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x31,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,0x20,
|
|
0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,
|
|
0x2e,0x77,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp vec4 shaft_params[1];
|
|
uniform highp vec4 shadow_params[4];
|
|
uniform highp sampler2D shaft_scene_shaft_scene_smp;
|
|
uniform highp sampler2D shadow_tint_shadow_tint_smp;
|
|
uniform highp sampler2DShadow shadow_map_shadow_smp;
|
|
|
|
in highp float v_time;
|
|
in highp vec4 v_point;
|
|
in highp vec3 v_camera;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
in highp vec3 v_sun;
|
|
|
|
highp float brightest(highp vec3 c)
|
|
{
|
|
return max(c.x, max(c.y, c.z));
|
|
}
|
|
|
|
highp float hash(inout highp vec3 p)
|
|
{
|
|
p = fract((p * 0.31830990314483642578125) + vec3(0.100000001490116119384765625));
|
|
p *= 17.0;
|
|
return fract(((p.x * p.y) * p.z) * ((p.x + p.y) + p.z));
|
|
}
|
|
|
|
highp float value_noise(highp vec3 p)
|
|
{
|
|
highp vec3 _69 = floor(p);
|
|
highp vec3 _72 = fract(p);
|
|
highp vec3 _82 = (_72 * _72) * (vec3(3.0) - (_72 * 2.0));
|
|
highp vec3 param = _69;
|
|
highp float _85 = hash(param);
|
|
highp vec3 param_1 = _69 + vec3(1.0, 0.0, 0.0);
|
|
highp float _92 = hash(param_1);
|
|
highp float _94 = _82.x;
|
|
highp vec3 param_2 = _69 + vec3(0.0, 1.0, 0.0);
|
|
highp float _100 = hash(param_2);
|
|
highp vec3 param_3 = _69 + vec3(1.0, 1.0, 0.0);
|
|
highp float _105 = hash(param_3);
|
|
highp float _110 = _82.y;
|
|
highp vec3 param_4 = _69 + vec3(0.0, 0.0, 1.0);
|
|
highp float _116 = hash(param_4);
|
|
highp vec3 param_5 = _69 + vec3(1.0, 0.0, 1.0);
|
|
highp float _121 = hash(param_5);
|
|
highp vec3 param_6 = _69 + vec3(0.0, 1.0, 1.0);
|
|
highp float _129 = hash(param_6);
|
|
highp vec3 param_7 = _69 + vec3(1.0);
|
|
highp float _134 = hash(param_7);
|
|
return mix(mix(mix(_85, _92, _94), mix(_100, _105, _94), _110), mix(mix(_116, _121, _94), mix(_129, _134, _94), _110), _82.z);
|
|
}
|
|
|
|
highp float dust(highp vec3 p)
|
|
{
|
|
highp vec3 _149 = p * 0.800000011920928955078125;
|
|
highp vec3 param = _149 + ((vec3(0.4000000059604644775390625, 0.1500000059604644775390625, 0.300000011920928955078125) * v_time) * 0.800000011920928955078125);
|
|
highp vec3 param_1 = (_149 * 2.2999999523162841796875) - (((vec3(0.300000011920928955078125, 0.4000000059604644775390625, 0.1500000059604644775390625) * v_time) * 0.800000011920928955078125) * 1.7000000476837158203125);
|
|
return mix(0.0, 2.0, smoothstep(0.25, 0.75, (value_noise(param) * 0.64999997615814208984375) + (value_noise(param_1) * 0.3499999940395355224609375)));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec3 _204 = normalize((v_point.xyz / vec3(v_point.w)) - v_camera);
|
|
highp float _242 = min(texelFetch(shaft_scene_shaft_scene_smp, ivec2(gl_FragCoord.xy) * ivec2(2), 0).x, shaft_params[0].z) / shaft_params[0].w;
|
|
highp float _253 = fract(52.98291778564453125 * fract(dot(gl_FragCoord.xy, vec2(0.067110560834407806396484375, 0.005837149918079376220703125))));
|
|
highp vec3 light = vec3(0.0);
|
|
for (highp float i = 0.0; i < shaft_params[0].w; i += 1.0)
|
|
{
|
|
highp float _272 = (i + _253) * _242;
|
|
highp vec3 _286 = (floor((v_camera + (_204 * _272)) * 16.0) + vec3(0.5)) * vec3(0.0625);
|
|
highp vec4 _301 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4(_286, 1.0);
|
|
highp float _303 = _301.x;
|
|
bool _304 = _303 < 0.0;
|
|
bool _311;
|
|
if (!_304)
|
|
{
|
|
_311 = _303 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_311 = _304;
|
|
}
|
|
bool _318;
|
|
if (!_311)
|
|
{
|
|
_318 = _301.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_318 = _311;
|
|
}
|
|
bool _325;
|
|
if (!_318)
|
|
{
|
|
_325 = _301.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_325 = _318;
|
|
}
|
|
bool _332;
|
|
if (!_325)
|
|
{
|
|
_332 = _301.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_332 = _325;
|
|
}
|
|
if (_332)
|
|
{
|
|
continue;
|
|
}
|
|
highp vec4 _344 = texture(shadow_tint_shadow_tint_smp, _301.xy);
|
|
highp float _346 = _301.z;
|
|
if (_346 < (_344.w + 0.001000000047497451305389404296875))
|
|
{
|
|
continue;
|
|
}
|
|
highp float _368 = _346 - 0.0005000000237487256526947021484375;
|
|
highp vec3 _377 = _344.xyz;
|
|
highp vec3 param = _377;
|
|
highp vec3 param_1 = _286;
|
|
light += (((mix(vec3(brightest(param)), _377, vec3(0.60000002384185791015625)) * texture(shadow_map_shadow_smp, vec3(vec3(_303, _301.y, _368).xy, _368))) * exp((-shaft_params[0].x) * _272)) * dust(param_1));
|
|
}
|
|
frag_color = vec4((((light * v_sun) * shaft_params[0].x) * _242) * shaft_params[0].y, 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_shafts_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,
|
|
0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
|
|
0x73,0x68,0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x68,0x61,0x66,
|
|
0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,
|
|
0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,
|
|
0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,
|
|
0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x69,
|
|
0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x70,
|
|
0x6f,0x69,0x6e,0x74,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,
|
|
0x6e,0x3b,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,0x6d,0x61,
|
|
0x78,0x28,0x63,0x2e,0x79,0x2c,0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x73,
|
|
0x68,0x28,0x69,0x6e,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x20,0x3d,0x20,
|
|
0x66,0x72,0x61,0x63,0x74,0x28,0x28,0x70,0x20,0x2a,0x20,0x30,0x2e,0x33,0x31,0x38,
|
|
0x33,0x30,0x39,0x39,0x30,0x33,0x31,0x34,0x34,0x38,0x33,0x36,0x34,0x32,0x35,0x37,
|
|
0x38,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x31,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,
|
|
0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x70,0x20,0x2a,0x3d,0x20,0x31,0x37,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x28,0x28,
|
|
0x70,0x2e,0x78,0x20,0x2a,0x20,0x70,0x2e,0x79,0x29,0x20,0x2a,0x20,0x70,0x2e,0x7a,
|
|
0x29,0x20,0x2a,0x20,0x28,0x28,0x70,0x2e,0x78,0x20,0x2b,0x20,0x70,0x2e,0x79,0x29,
|
|
0x20,0x2b,0x20,0x70,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6e,
|
|
0x6f,0x69,0x73,0x65,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x5f,0x36,0x39,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,
|
|
0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x70,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x38,0x32,0x20,0x3d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x5f,
|
|
0x37,0x32,0x29,0x20,0x2a,0x20,0x28,0x76,0x65,0x63,0x33,0x28,0x33,0x2e,0x30,0x29,
|
|
0x20,0x2d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x35,
|
|
0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x34,0x20,0x3d,0x20,0x5f,
|
|
0x38,0x32,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,
|
|
0x36,0x39,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,0x30,0x20,0x3d,
|
|
0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,0x35,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x31,0x30,0x20,0x3d,
|
|
0x20,0x5f,0x38,0x32,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,
|
|
0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x31,0x36,
|
|
0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x32,0x31,0x20,0x3d,0x20,0x68,0x61,0x73,
|
|
0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x36,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x31,0x32,0x39,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,
|
|
0x36,0x39,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x31,0x33,0x34,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x37,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x5f,0x38,0x35,
|
|
0x2c,0x20,0x5f,0x39,0x32,0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,
|
|
0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x31,0x30,0x35,0x2c,0x20,0x5f,0x39,0x34,
|
|
0x29,0x2c,0x20,0x5f,0x31,0x31,0x30,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,
|
|
0x78,0x28,0x5f,0x31,0x31,0x36,0x2c,0x20,0x5f,0x31,0x32,0x31,0x2c,0x20,0x5f,0x39,
|
|
0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x5f,0x31,0x32,0x39,0x2c,0x20,0x5f,0x31,
|
|
0x33,0x34,0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x5f,0x31,0x31,0x30,0x29,0x2c,
|
|
0x20,0x5f,0x38,0x32,0x2e,0x7a,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x75,0x73,0x74,0x28,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x34,0x39,
|
|
0x20,0x3d,0x20,0x70,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x34,0x39,0x20,0x2b,
|
|
0x20,0x28,0x28,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,
|
|
0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x31,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x35,
|
|
0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,
|
|
0x2c,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,
|
|
0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,
|
|
0x76,0x5f,0x74,0x69,0x6d,0x65,0x29,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,
|
|
0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,
|
|
0x28,0x5f,0x31,0x34,0x39,0x20,0x2a,0x20,0x32,0x2e,0x32,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x32,0x33,0x31,0x36,0x32,0x38,0x34,0x31,0x37,0x39,0x36,0x38,0x37,0x35,
|
|
0x29,0x20,0x2d,0x20,0x28,0x28,0x28,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x33,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,
|
|
0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,
|
|
0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x31,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x35,
|
|
0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,
|
|
0x29,0x20,0x2a,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,0x29,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,
|
|
0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,0x31,0x2e,0x37,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,
|
|
0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x32,0x35,0x2c,
|
|
0x20,0x30,0x2e,0x37,0x35,0x2c,0x20,0x28,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6e,0x6f,
|
|
0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2a,0x20,0x30,0x2e,0x36,
|
|
0x34,0x39,0x39,0x39,0x39,0x39,0x37,0x36,0x31,0x35,0x38,0x31,0x34,0x32,0x30,0x38,
|
|
0x39,0x38,0x34,0x33,0x37,0x35,0x29,0x20,0x2b,0x20,0x28,0x76,0x61,0x6c,0x75,0x65,
|
|
0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x33,0x34,0x39,0x39,0x39,0x39,0x39,0x39,0x34,0x30,0x33,0x39,
|
|
0x35,0x33,0x35,0x35,0x32,0x32,0x34,0x36,0x30,0x39,0x33,0x37,0x35,0x29,0x29,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x32,0x30,0x34,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x28,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x78,0x79,0x7a,0x20,
|
|
0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x77,
|
|
0x29,0x29,0x20,0x2d,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x32,0x34,0x32,0x20,0x3d,0x20,0x6d,0x69,0x6e,0x28,0x74,0x65,0x78,0x65,0x6c,
|
|
0x46,0x65,0x74,0x63,0x68,0x28,0x73,0x68,0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,
|
|
0x65,0x5f,0x73,0x68,0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,
|
|
0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x69,0x76,0x65,0x63,
|
|
0x32,0x28,0x32,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x2c,0x20,0x73,0x68,0x61,0x66,
|
|
0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x7a,0x29,0x20,0x2f,
|
|
0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,
|
|
0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x32,0x35,0x33,0x20,0x3d,0x20,0x66,0x72,0x61,0x63,0x74,
|
|
0x28,0x35,0x32,0x2e,0x39,0x38,0x32,0x39,0x31,0x37,0x37,0x38,0x35,0x36,0x34,0x34,
|
|
0x35,0x33,0x31,0x32,0x35,0x20,0x2a,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x64,0x6f,
|
|
0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,
|
|
0x79,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x36,0x37,0x31,0x31,0x30,
|
|
0x35,0x36,0x30,0x38,0x33,0x34,0x34,0x30,0x37,0x38,0x30,0x36,0x33,0x39,0x36,0x34,
|
|
0x38,0x34,0x33,0x37,0x35,0x2c,0x20,0x30,0x2e,0x30,0x30,0x35,0x38,0x33,0x37,0x31,
|
|
0x34,0x39,0x39,0x31,0x38,0x30,0x37,0x39,0x33,0x37,0x36,0x32,0x32,0x30,0x37,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6f,0x72,0x20,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x69,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x20,0x69,0x20,0x3c,0x20,0x73,0x68,
|
|
0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x3b,
|
|
0x20,0x69,0x20,0x2b,0x3d,0x20,0x31,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,0x32,0x20,0x3d,0x20,0x28,0x69,0x20,0x2b,
|
|
0x20,0x5f,0x32,0x35,0x33,0x29,0x20,0x2a,0x20,0x5f,0x32,0x34,0x32,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x32,0x38,0x36,0x20,0x3d,0x20,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,
|
|
0x28,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x2b,0x20,0x28,0x5f,0x32,0x30,
|
|
0x34,0x20,0x2a,0x20,0x5f,0x32,0x37,0x32,0x29,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,
|
|
0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,
|
|
0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x5f,0x33,0x30,0x31,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,
|
|
0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,
|
|
0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x32,
|
|
0x38,0x36,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,
|
|
0x30,0x33,0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x30,0x34,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x30,0x33,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x31,0x31,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x30,
|
|
0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x31,0x31,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x30,0x33,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x31,0x31,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x31,
|
|
0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x33,0x31,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x31,0x38,
|
|
0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x5f,0x33,
|
|
0x31,0x38,0x20,0x3d,0x20,0x5f,0x33,0x31,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x33,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x31,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,0x5f,0x33,0x32,0x35,0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x20,0x3e,
|
|
0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x32,0x35,0x20,0x3d,0x20,0x5f,0x33,0x31,0x38,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x32,0x35,0x29,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x33,0x32,0x20,0x3d,0x20,0x5f,0x33,0x30,
|
|
0x31,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x33,0x32,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x33,0x32,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x33,
|
|
0x34,0x34,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x30,0x31,0x2e,0x78,
|
|
0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x34,0x36,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x30,0x31,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x33,0x34,0x36,0x20,0x3c,0x20,0x28,0x5f,0x33,0x34,0x34,0x2e,
|
|
0x77,0x20,0x2b,0x20,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,0x29,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x36,0x38,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x34,0x36,0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x32,0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,
|
|
0x37,0x30,0x32,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x33,0x37,0x37,0x20,0x3d,0x20,0x5f,0x33,0x34,0x34,0x2e,0x78,0x79,0x7a,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x33,0x37,0x37,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x32,
|
|
0x38,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x67,0x68,
|
|
0x74,0x20,0x2b,0x3d,0x20,0x28,0x28,0x28,0x6d,0x69,0x78,0x28,0x76,0x65,0x63,0x33,
|
|
0x28,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x29,0x29,0x2c,0x20,0x5f,0x33,0x37,0x37,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,
|
|
0x2e,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x38,0x34,0x31,0x38,0x35,0x37,
|
|
0x39,0x31,0x30,0x31,0x35,0x36,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x30,0x33,0x2c,0x20,0x5f,0x33,0x30,0x31,
|
|
0x2e,0x79,0x2c,0x20,0x5f,0x33,0x36,0x38,0x29,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x33,
|
|
0x36,0x38,0x29,0x29,0x29,0x20,0x2a,0x20,0x65,0x78,0x70,0x28,0x28,0x2d,0x73,0x68,
|
|
0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x29,
|
|
0x20,0x2a,0x20,0x5f,0x32,0x37,0x32,0x29,0x29,0x20,0x2a,0x20,0x64,0x75,0x73,0x74,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x28,0x6c,0x69,0x67,0x68,0x74,
|
|
0x20,0x2a,0x20,0x76,0x5f,0x73,0x75,0x6e,0x29,0x20,0x2a,0x20,0x73,0x68,0x61,0x66,
|
|
0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x29,0x20,0x2a,
|
|
0x20,0x5f,0x32,0x34,0x32,0x29,0x20,0x2a,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp vec4 post_params[1];
|
|
uniform highp sampler2D view_color_view_smp;
|
|
uniform highp sampler2D bloom_bloom_view_smp;
|
|
uniform highp sampler2D shafts_bloom_view_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
void main()
|
|
{
|
|
highp vec2 _31 = gl_FragCoord.xy / vec2(textureSize(view_color_view_smp, 0));
|
|
highp vec2 _67 = vec2(textureSize(shafts_bloom_view_smp, 0));
|
|
highp vec3 _142 = (((((texture(view_color_view_smp, _31).xyz + (texture(bloom_bloom_view_smp, _31).xyz * post_params[0].w)) + ((((((texture(shafts_bloom_view_smp, _31).xyz * 2.0) + texture(shafts_bloom_view_smp, _31 + (vec2(1.0) / _67)).xyz) + texture(shafts_bloom_view_smp, _31 + (vec2(-1.0, 1.0) / _67)).xyz) + texture(shafts_bloom_view_smp, _31 + (vec2(1.0, -1.0) / _67)).xyz) + texture(shafts_bloom_view_smp, _31 + (vec2(-1.0) / _67)).xyz) * vec3(0.16666667163372039794921875))) * exp2(post_params[0].x)) - vec3(0.5)) * post_params[0].y) + vec3(0.5);
|
|
frag_color = vec4(clamp(mix(vec3(dot(_142, vec3(0.2125999927520751953125, 0.715200006961822509765625, 0.072200000286102294921875))), _142, vec3(post_params[0].z)), vec3(0.0), vec3(1.0)), 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_post_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x76,0x69,0x65,0x77,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,
|
|
0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,
|
|
0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,
|
|
0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x31,0x20,0x3d,
|
|
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,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x76,
|
|
0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x36,0x37,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,
|
|
0x69,0x7a,0x65,0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,
|
|
0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x31,0x34,0x32,0x20,0x3d,0x20,0x28,0x28,0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x76,0x69,
|
|
0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,
|
|
0x20,0x2b,0x20,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x70,0x6f,0x73,
|
|
0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29,0x20,
|
|
0x2b,0x20,0x28,0x28,0x28,0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,
|
|
0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,0x20,
|
|
0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,
|
|
0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x76,
|
|
0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,
|
|
0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,
|
|
0x63,0x32,0x28,0x2d,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,
|
|
0x5f,0x36,0x37,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x5f,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x20,
|
|
0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,
|
|
0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,
|
|
0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x66,0x74,0x73,
|
|
0x5f,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x31,0x2e,
|
|
0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,
|
|
0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x31,0x36,0x36,0x36,0x36,0x36,0x36,
|
|
0x37,0x31,0x36,0x33,0x33,0x37,0x32,0x30,0x33,0x39,0x37,0x39,0x34,0x39,0x32,0x31,
|
|
0x38,0x37,0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x65,0x78,0x70,0x32,0x28,0x70,0x6f,
|
|
0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x29,0x29,
|
|
0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,
|
|
0x70,0x6f,0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x79,
|
|
0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x6d,0x69,0x78,0x28,0x76,
|
|
0x65,0x63,0x33,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x34,0x32,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x32,0x31,0x32,0x35,0x39,0x39,0x39,0x39,0x32,0x37,0x35,
|
|
0x32,0x30,0x37,0x35,0x31,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x37,
|
|
0x31,0x35,0x32,0x30,0x30,0x30,0x30,0x36,0x39,0x36,0x31,0x38,0x32,0x32,0x35,0x30,
|
|
0x39,0x37,0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,0x37,0x32,0x32,0x30,
|
|
0x30,0x30,0x30,0x30,0x32,0x38,0x36,0x31,0x30,0x32,0x32,0x39,0x34,0x39,0x32,0x31,
|
|
0x38,0x37,0x35,0x29,0x29,0x29,0x2c,0x20,0x5f,0x31,0x34,0x32,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x70,0x6f,0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,
|
|
0x5d,0x2e,0x7a,0x29,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
uniform vec4 trile_params[73];
|
|
uniform vec4 view_params[13];
|
|
layout(location = 1) in vec4 data_n;
|
|
layout(location = 2) in vec4 instance;
|
|
layout(location = 0) in vec3 position;
|
|
out vec3 v_normal;
|
|
out float v_facing;
|
|
out float v_ao;
|
|
out vec3 v_shade;
|
|
out vec3 v_sun;
|
|
out float v_cut;
|
|
layout(location = 4) in float cut;
|
|
out vec3 v_to_camera;
|
|
out vec3 v_world;
|
|
out float v_clip;
|
|
out float v_swatch;
|
|
out float v_tint;
|
|
layout(location = 3) in float tint;
|
|
|
|
void main()
|
|
{
|
|
vec4 _14 = data_n * 255.0;
|
|
int _28 = int(instance.w + 0.5) * 3;
|
|
mat3 _71 = transpose(mat3(vec3(trile_params[_28 * 1 + 0].xyz), vec3(trile_params[(_28 + 1) * 1 + 0].xyz), vec3(trile_params[(_28 + 2) * 1 + 0].xyz)));
|
|
vec3 _85 = ((_71 * (position - vec3(0.5))) + vec3(0.5)) + instance.xyz;
|
|
int _92 = int(_14.z + 0.5);
|
|
vec3 normal = vec3(0.0);
|
|
normal[_92 / 2] = ((_92 % 2) == 0) ? 1.0 : (-1.0);
|
|
v_normal = _71 * normal;
|
|
v_facing = smoothstep(0.0, 0.300000011920928955078125, dot(v_normal, view_params[10].xyz));
|
|
v_ao = _14.y * 0.3333333432674407958984375;
|
|
v_shade = view_params[12].xyz;
|
|
v_sun = view_params[11].xyz;
|
|
vec4 _150 = vec4(_85, 1.0);
|
|
gl_Position = mat4(view_params[0], view_params[1], view_params[2], view_params[3]) * _150;
|
|
v_cut = (trile_params[72].x > 0.5) ? 0.0 : cut;
|
|
if (v_cut > 0.999000012874603271484375)
|
|
{
|
|
gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
|
|
}
|
|
v_to_camera = view_params[8].xyz - _85;
|
|
v_world = _85;
|
|
v_clip = dot(_150, view_params[9]);
|
|
v_swatch = _14.x;
|
|
v_tint = tint;
|
|
}
|
|
|
|
*/
|
|
vs_trile_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x37,0x33,0x5d,0x3b,0x0a,
|
|
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x33,0x5d,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,0x34,0x20,0x64,0x61,0x74,0x61,0x5f,
|
|
0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,
|
|
0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,
|
|
0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,
|
|
0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x76,0x5f,0x61,0x6f,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x75,0x74,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,0x63,0x75,0x74,0x3b,0x0a,0x6f,0x75,
|
|
0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,
|
|
0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x3b,0x0a,0x6f,0x75,0x74,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,0x69,0x6e,0x74,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,0x74,0x69,0x6e,0x74,
|
|
0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x34,0x20,0x3d,0x20,
|
|
0x64,0x61,0x74,0x61,0x5f,0x6e,0x20,0x2a,0x20,0x32,0x35,0x35,0x2e,0x30,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x69,0x6e,
|
|
0x74,0x28,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,0x77,0x20,0x2b,0x20,0x30,
|
|
0x2e,0x35,0x29,0x20,0x2a,0x20,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,
|
|
0x33,0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x73,
|
|
0x65,0x28,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x74,0x72,0x69,0x6c,
|
|
0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x5f,0x32,0x38,0x20,0x2a,0x20,0x31,
|
|
0x20,0x2b,0x20,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x28,0x5f,
|
|
0x32,0x38,0x20,0x2b,0x20,0x31,0x29,0x20,0x2a,0x20,0x31,0x20,0x2b,0x20,0x30,0x5d,
|
|
0x2e,0x78,0x79,0x7a,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x74,0x72,0x69,0x6c,
|
|
0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x28,0x5f,0x32,0x38,0x20,0x2b,0x20,
|
|
0x32,0x29,0x20,0x2a,0x20,0x31,0x20,0x2b,0x20,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x38,0x35,
|
|
0x20,0x3d,0x20,0x28,0x28,0x5f,0x37,0x31,0x20,0x2a,0x20,0x28,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,
|
|
0x29,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,
|
|
0x2b,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,0x78,0x79,0x7a,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20,0x69,0x6e,
|
|
0x74,0x28,0x5f,0x31,0x34,0x2e,0x7a,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5b,0x5f,0x39,0x32,0x20,0x2f,0x20,0x32,0x5d,
|
|
0x20,0x3d,0x20,0x28,0x28,0x5f,0x39,0x32,0x20,0x25,0x20,0x32,0x29,0x20,0x3d,0x3d,
|
|
0x20,0x30,0x29,0x20,0x3f,0x20,0x31,0x2e,0x30,0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
|
0x20,0x3d,0x20,0x5f,0x37,0x31,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x20,0x3d,0x20,
|
|
0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,
|
|
0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x64,0x6f,0x74,0x28,
|
|
0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x61,0x6f,0x20,0x3d,0x20,0x5f,0x31,0x34,0x2e,
|
|
0x79,0x20,0x2a,0x20,0x30,0x2e,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x34,0x33,0x32,
|
|
0x36,0x37,0x34,0x34,0x30,0x37,0x39,0x35,0x38,0x39,0x38,0x34,0x33,0x37,0x35,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x3d,0x20,0x76,
|
|
0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x32,0x5d,0x2e,0x78,
|
|
0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x3d,0x20,
|
|
0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x31,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,
|
|
0x35,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x38,0x35,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x5f,0x31,
|
|
0x35,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x63,0x75,0x74,0x20,0x3d,0x20,
|
|
0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x37,0x32,
|
|
0x5d,0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x20,0x3f,0x20,0x30,0x2e,0x30,
|
|
0x20,0x3a,0x20,0x63,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x76,0x5f,0x63,0x75,0x74,0x20,0x3e,0x20,0x30,0x2e,0x39,0x39,0x39,0x30,0x30,0x30,
|
|
0x30,0x31,0x32,0x38,0x37,0x34,0x36,0x30,0x33,0x32,0x37,0x31,0x34,0x38,0x34,0x33,
|
|
0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x32,
|
|
0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,
|
|
0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,
|
|
0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x20,0x3d,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,
|
|
0x5f,0x31,0x35,0x30,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x39,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x77,0x61,
|
|
0x74,0x63,0x68,0x20,0x3d,0x20,0x5f,0x31,0x34,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3d,0x20,0x74,0x69,0x6e,0x74,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
const float _499[16] = float[](0.0, 8.0, 2.0, 10.0, 12.0, 4.0, 14.0, 6.0, 3.0, 11.0, 1.0, 9.0, 15.0, 7.0, 13.0, 5.0);
|
|
|
|
uniform highp vec4 shadow_params[4];
|
|
uniform highp vec4 trile_fs_params[4];
|
|
uniform highp sampler2D palette_palette_smp;
|
|
uniform highp sampler2DShadow shadow_map_shadow_smp;
|
|
uniform highp sampler2D shadow_tint_shadow_tint_smp;
|
|
uniform highp sampler3D probe_index_probe_smp;
|
|
uniform highp sampler3D probe_atlas_probe_smp;
|
|
uniform highp sampler2D trile_reflection_trile_reflection_smp;
|
|
uniform highp sampler2D trile_reflection_glow_trile_reflection_smp;
|
|
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
layout(location = 2) out highp vec4 frag_scene;
|
|
in highp float v_clip;
|
|
in highp float v_cut;
|
|
in highp float v_swatch;
|
|
in highp float v_tint;
|
|
in highp float v_facing;
|
|
in highp vec3 v_world;
|
|
in highp vec3 v_normal;
|
|
in highp vec3 v_shade;
|
|
in highp float v_ao;
|
|
in highp vec3 v_sun;
|
|
in highp vec3 v_to_camera;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
highp float dither(highp vec2 pixel)
|
|
{
|
|
ivec2 _482 = ivec2(pixel) % ivec2(4);
|
|
return (_499[(_482.y * 4) + _482.x] + 0.5) * 0.0625;
|
|
}
|
|
|
|
highp vec3 sun_shadow(highp vec3 world, highp vec3 normal)
|
|
{
|
|
highp vec3 _73 = normal * 0.03125;
|
|
highp vec4 _107 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4((((floor((world - _73) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _73) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
highp float _109 = _107.x;
|
|
bool _111 = _109 < 0.0;
|
|
bool _118;
|
|
if (!_111)
|
|
{
|
|
_118 = _109 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_118 = _111;
|
|
}
|
|
bool _125;
|
|
if (!_118)
|
|
{
|
|
_125 = _107.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_125 = _118;
|
|
}
|
|
bool _132;
|
|
if (!_125)
|
|
{
|
|
_132 = _107.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_132 = _125;
|
|
}
|
|
bool _139;
|
|
if (!_132)
|
|
{
|
|
_139 = _107.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_139 = _132;
|
|
}
|
|
if (_139)
|
|
{
|
|
return vec3(1.0);
|
|
}
|
|
highp float _161 = _107.z - 0.0005000000237487256526947021484375;
|
|
return texture(shadow_tint_shadow_tint_smp, _107.xy).xyz * texture(shadow_map_shadow_smp, vec3(vec3(_109, _107.y, _161).xy, _161));
|
|
}
|
|
|
|
bool probe_at(ivec3 cell, inout highp vec4 r, inout highp vec4 g, inout highp vec4 b)
|
|
{
|
|
ivec3 _188 = ivec3(floor(vec3(cell) * vec3(0.03125)));
|
|
ivec3 _200 = _188 - ivec3(trile_fs_params[1].xyz);
|
|
bool _205 = any(lessThan(_200, ivec3(0)));
|
|
bool _217;
|
|
if (!_205)
|
|
{
|
|
_217 = any(greaterThanEqual(_200, ivec3(trile_fs_params[2].xyz)));
|
|
}
|
|
else
|
|
{
|
|
_217 = _205;
|
|
}
|
|
if (_217)
|
|
{
|
|
return false;
|
|
}
|
|
highp vec2 _238 = (texelFetch(probe_index_probe_smp, _200, 0).xy * 255.0) + vec2(0.5);
|
|
int _250 = (int(_238.x) + (int(_238.y) * 256)) - 1;
|
|
if (_250 < 0)
|
|
{
|
|
return false;
|
|
}
|
|
ivec3 _262 = cell - (_188 * ivec3(32));
|
|
ivec3 _281 = ivec3(_262.x * 3, ((_250 % 16) * 32) + _262.y, ((_250 / 16) * 32) + _262.z);
|
|
r = texelFetch(probe_atlas_probe_smp, _281, 0);
|
|
g = texelFetch(probe_atlas_probe_smp, _281 + ivec3(1, 0, 0), 0);
|
|
b = texelFetch(probe_atlas_probe_smp, _281 + ivec3(2, 0, 0), 0);
|
|
return r.x >= 0.0;
|
|
}
|
|
|
|
highp vec4 probe_light(highp vec3 world, highp vec3 normal)
|
|
{
|
|
highp vec3 _312 = normal * 0.03125;
|
|
highp vec3 _324 = ((floor((world - _312) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _312;
|
|
highp vec3 _331 = (_324 + (normal * 0.5)) - vec3(0.5);
|
|
ivec3 _335 = ivec3(floor(_331));
|
|
highp vec3 _340 = _331 - vec3(_335);
|
|
highp vec4 sum_r = vec4(0.0);
|
|
highp vec4 sum_g = vec4(0.0);
|
|
highp vec4 sum_b = vec4(0.0);
|
|
highp float total = 0.0;
|
|
highp vec4 param_1;
|
|
highp vec4 param_2;
|
|
highp vec4 param_3;
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
ivec3 _363 = ivec3(i & 1, (i >> 1) & 1, i >> 2);
|
|
ivec3 _367 = _335 + _363;
|
|
if (dot((vec3(_367) + vec3(0.5)) - _324, normal) < 0.00999999977648258209228515625)
|
|
{
|
|
continue;
|
|
}
|
|
ivec3 param = _367;
|
|
bool _389 = probe_at(param, param_1, param_2, param_3);
|
|
if (!_389)
|
|
{
|
|
continue;
|
|
}
|
|
highp vec3 _404 = mix(vec3(1.0) - _340, _340, vec3(_363));
|
|
highp float _415 = max((_404.x * _404.y) * _404.z, 9.9999997473787516355514526367188e-05);
|
|
sum_r += (param_1 * _415);
|
|
sum_g += (param_2 * _415);
|
|
sum_b += (param_3 * _415);
|
|
total += _415;
|
|
}
|
|
if (total == 0.0)
|
|
{
|
|
return vec4(0.0);
|
|
}
|
|
highp vec4 _453 = vec4(0.2820949852466583251953125, 0.3257350027561187744140625 * normal.y, 0.3257350027561187744140625 * normal.z, 0.3257350027561187744140625 * normal.x);
|
|
return vec4(max(vec3(dot(sum_r, _453), dot(sum_g, _453), dot(sum_b, _453)) / vec3(total), vec3(0.0)), 1.0);
|
|
}
|
|
|
|
highp float brightest(highp vec3 c)
|
|
{
|
|
return max(c.x, max(c.y, c.z));
|
|
}
|
|
|
|
void write_scene(highp vec3 to_camera, highp float glow)
|
|
{
|
|
frag_glow = vec4(glow);
|
|
frag_scene = vec4(length(to_camera));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
bool _517 = v_clip < 0.0;
|
|
bool _530;
|
|
if (!_517)
|
|
{
|
|
highp vec2 param = gl_FragCoord.xy;
|
|
_530 = v_cut > dither(param);
|
|
}
|
|
else
|
|
{
|
|
_530 = _517;
|
|
}
|
|
if (_530)
|
|
{
|
|
discard;
|
|
}
|
|
int _538 = int(v_swatch + 0.5);
|
|
highp vec4 _548 = texelFetch(palette_palette_smp, ivec2(_538, 0), 0);
|
|
highp vec4 _556 = texelFetch(palette_palette_smp, ivec2(_538, 1), 0);
|
|
highp vec3 albedo = _548.xyz;
|
|
if (v_tint > 1.5)
|
|
{
|
|
albedo = mix(albedo, vec3(1.0, 0.20000000298023223876953125, 0.20000000298023223876953125), vec3(0.5));
|
|
}
|
|
else
|
|
{
|
|
if (v_tint > 0.5)
|
|
{
|
|
albedo = mix(albedo, vec3(0.20000000298023223876953125, 1.0, 0.20000000298023223876953125), vec3(0.5));
|
|
}
|
|
}
|
|
highp vec3 param_1 = v_world;
|
|
highp vec3 param_2 = v_normal;
|
|
highp vec3 _590 = sun_shadow(param_1, param_2);
|
|
highp vec3 _591 = _590 * v_facing;
|
|
highp vec4 _598;
|
|
if (trile_fs_params[1].w > 0.5)
|
|
{
|
|
highp vec3 param_3 = v_world;
|
|
highp vec3 param_4 = v_normal;
|
|
_598 = probe_light(param_3, param_4);
|
|
}
|
|
else
|
|
{
|
|
_598 = vec4(0.0);
|
|
}
|
|
highp vec3 _623 = v_sun * _591;
|
|
highp vec3 _627 = _623 * mix(0.25, 1.0, v_ao);
|
|
highp vec3 color = albedo * (((v_shade + _598.xyz) * mix(0.60000002384185791015625, 1.0, v_ao)) + _627);
|
|
highp vec3 param_5 = _591;
|
|
highp float _637 = brightest(param_5);
|
|
if (_637 > 0.001000000047497451305389404296875)
|
|
{
|
|
color += ((_627 * (vec3(1.0) - albedo)) * ((_637 - min(_591.x, min(_591.y, _591.z))) / _637));
|
|
}
|
|
highp float _667 = _548.w;
|
|
highp vec3 param_6 = _627;
|
|
highp float glow = (_667 * 8.0) + (brightest(param_6) * 1.5);
|
|
highp float _675 = _556.z;
|
|
if (_675 > 0.0)
|
|
{
|
|
highp float _700 = pow(max(dot(v_normal, normalize(normalize(v_to_camera) + trile_fs_params[0].xyz)), 0.0), mix(4.0, 96.0, _675)) * _675;
|
|
color += (_623 * _700);
|
|
highp vec3 param_7 = _591;
|
|
glow += ((_700 * brightest(param_7)) * 4.0);
|
|
}
|
|
bool _718 = trile_fs_params[3].x > 0.5;
|
|
bool _724;
|
|
if (_718)
|
|
{
|
|
_724 = _556.y > 0.0;
|
|
}
|
|
else
|
|
{
|
|
_724 = _718;
|
|
}
|
|
bool _730;
|
|
if (_724)
|
|
{
|
|
_730 = v_normal.y > 0.5;
|
|
}
|
|
else
|
|
{
|
|
_730 = _724;
|
|
}
|
|
bool _740;
|
|
if (_730)
|
|
{
|
|
_740 = abs(v_world.y - trile_fs_params[3].y) < 0.0199999995529651641845703125;
|
|
}
|
|
else
|
|
{
|
|
_740 = _730;
|
|
}
|
|
if (_740)
|
|
{
|
|
highp vec2 _754 = gl_FragCoord.xy / vec2(textureSize(trile_reflection_trile_reflection_smp, 0));
|
|
highp vec2 _761 = vec2(_754.x, 1.0 - _754.y);
|
|
highp float _770 = _556.y;
|
|
color = mix(color, texture(trile_reflection_trile_reflection_smp, _761).xyz, vec3(_770));
|
|
glow = max(glow, texture(trile_reflection_glow_trile_reflection_smp, _761).x * pow(_770, 0.4000000059604644775390625));
|
|
}
|
|
frag_color = vec4(mix(color, albedo, vec3(_667)), 1.0);
|
|
highp vec3 param_8 = v_to_camera;
|
|
highp float param_9 = glow;
|
|
write_scene(param_8, param_9);
|
|
}
|
|
|
|
*/
|
|
fs_trile_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x39,0x39,0x5b,
|
|
0x31,0x36,0x5d,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x5b,0x5d,0x28,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x38,0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,0x31,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x31,0x32,0x2e,0x30,0x2c,0x20,0x34,0x2e,0x30,0x2c,0x20,0x31,0x34,
|
|
0x2e,0x30,0x2c,0x20,0x36,0x2e,0x30,0x2c,0x20,0x33,0x2e,0x30,0x2c,0x20,0x31,0x31,
|
|
0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x39,0x2e,0x30,0x2c,0x20,0x31,0x35,
|
|
0x2e,0x30,0x2c,0x20,0x37,0x2e,0x30,0x2c,0x20,0x31,0x33,0x2e,0x30,0x2c,0x20,0x35,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,
|
|
0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,
|
|
0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,
|
|
0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,
|
|
0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x33,0x44,
|
|
0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,0x78,0x5f,0x70,0x72,0x6f,
|
|
0x62,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x33,0x44,0x20,
|
|
0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,0x70,0x72,0x6f,0x62,
|
|
0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,
|
|
0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,
|
|
0x6c,0x6f,0x77,0x5f,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,
|
|
0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x5f,0x63,0x75,0x74,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x3b,0x0a,
|
|
0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x74,0x69,0x6e,0x74,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,
|
|
0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,
|
|
0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69,
|
|
0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,
|
|
0x68,0x61,0x64,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x61,0x6f,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,
|
|
0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,
|
|
0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x74,0x68,0x65,0x72,0x28,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x69,0x78,0x65,0x6c,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x32,0x20,0x5f,0x34,0x38,
|
|
0x32,0x20,0x3d,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x70,0x69,0x78,0x65,0x6c,0x29,
|
|
0x20,0x25,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x5f,0x34,0x39,0x39,0x5b,0x28,0x5f,
|
|
0x34,0x38,0x32,0x2e,0x79,0x20,0x2a,0x20,0x34,0x29,0x20,0x2b,0x20,0x5f,0x34,0x38,
|
|
0x32,0x2e,0x78,0x5d,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x30,0x36,0x32,0x35,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x5f,0x37,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x30,0x37,
|
|
0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,
|
|
0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,
|
|
0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,0x20,0x5f,0x37,0x33,0x29,0x20,0x2a,0x20,
|
|
0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,
|
|
0x29,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,
|
|
0x29,0x29,0x20,0x2b,0x20,0x5f,0x37,0x33,0x29,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,
|
|
0x39,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x31,0x20,0x3d,0x20,0x5f,0x31,0x30,0x39,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x31,0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x31,0x31,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x30,0x39,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,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,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x31,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,
|
|
0x5f,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,
|
|
0x31,0x31,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x31,0x32,0x35,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x79,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x35,0x20,0x3d,0x20,0x5f,0x31,0x31,0x38,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x31,0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x31,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x32,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,
|
|
0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x33,0x32,0x20,0x3d,0x20,0x5f,0x31,0x32,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x31,0x33,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x21,0x5f,0x31,0x33,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,
|
|
0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,
|
|
0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x5f,0x31,0x33,0x39,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,
|
|
0x36,0x31,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x7a,0x20,0x2d,0x20,0x30,0x2e,
|
|
0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x37,0x34,0x38,0x37,
|
|
0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,0x32,0x31,0x34,0x38,0x34,0x33,
|
|
0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x5f,0x31,0x30,0x37,0x2e,0x78,0x79,0x29,0x2e,0x78,0x79,0x7a,
|
|
0x20,0x2a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x31,0x30,0x39,
|
|
0x2c,0x20,0x5f,0x31,0x30,0x37,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x36,0x31,0x29,0x2e,
|
|
0x78,0x79,0x2c,0x20,0x5f,0x31,0x36,0x31,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x62,
|
|
0x6f,0x6f,0x6c,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x28,0x69,0x76,0x65,
|
|
0x63,0x33,0x20,0x63,0x65,0x6c,0x6c,0x2c,0x20,0x69,0x6e,0x6f,0x75,0x74,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x72,0x2c,0x20,0x69,0x6e,0x6f,
|
|
0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x67,0x2c,
|
|
0x20,0x69,0x6e,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x62,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x31,0x38,0x38,0x20,0x3d,0x20,0x69,0x76,0x65,0x63,0x33,0x28,0x66,0x6c,
|
|
0x6f,0x6f,0x72,0x28,0x76,0x65,0x63,0x33,0x28,0x63,0x65,0x6c,0x6c,0x29,0x20,0x2a,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x30,0x30,
|
|
0x20,0x3d,0x20,0x5f,0x31,0x38,0x38,0x20,0x2d,0x20,0x69,0x76,0x65,0x63,0x33,0x28,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x32,0x30,0x35,0x20,0x3d,0x20,0x61,0x6e,0x79,0x28,0x6c,0x65,0x73,
|
|
0x73,0x54,0x68,0x61,0x6e,0x28,0x5f,0x32,0x30,0x30,0x2c,0x20,0x69,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x32,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x32,0x30,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x32,0x31,0x37,0x20,0x3d,0x20,0x61,0x6e,0x79,0x28,0x67,
|
|
0x72,0x65,0x61,0x74,0x65,0x72,0x54,0x68,0x61,0x6e,0x45,0x71,0x75,0x61,0x6c,0x28,
|
|
0x5f,0x32,0x30,0x30,0x2c,0x20,0x69,0x76,0x65,0x63,0x33,0x28,0x74,0x72,0x69,0x6c,
|
|
0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x78,
|
|
0x79,0x7a,0x29,0x29,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,0x32,0x31,0x37,0x20,0x3d,0x20,0x5f,0x32,0x30,0x35,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,
|
|
0x32,0x31,0x37,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x38,0x20,0x3d,0x20,0x28,0x74,0x65,
|
|
0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,
|
|
0x6e,0x64,0x65,0x78,0x5f,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x5f,0x32,0x30,0x30,0x2c,0x20,0x30,0x29,0x2e,0x78,0x79,0x20,0x2a,0x20,0x32,0x35,
|
|
0x35,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x32,0x35,0x30,0x20,0x3d,
|
|
0x20,0x28,0x69,0x6e,0x74,0x28,0x5f,0x32,0x33,0x38,0x2e,0x78,0x29,0x20,0x2b,0x20,
|
|
0x28,0x69,0x6e,0x74,0x28,0x5f,0x32,0x33,0x38,0x2e,0x79,0x29,0x20,0x2a,0x20,0x32,
|
|
0x35,0x36,0x29,0x29,0x20,0x2d,0x20,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x5f,0x32,0x35,0x30,0x20,0x3c,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x66,0x61,0x6c,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x36,0x32,0x20,0x3d,0x20,0x63,
|
|
0x65,0x6c,0x6c,0x20,0x2d,0x20,0x28,0x5f,0x31,0x38,0x38,0x20,0x2a,0x20,0x69,0x76,
|
|
0x65,0x63,0x33,0x28,0x33,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x76,
|
|
0x65,0x63,0x33,0x20,0x5f,0x32,0x38,0x31,0x20,0x3d,0x20,0x69,0x76,0x65,0x63,0x33,
|
|
0x28,0x5f,0x32,0x36,0x32,0x2e,0x78,0x20,0x2a,0x20,0x33,0x2c,0x20,0x28,0x28,0x5f,
|
|
0x32,0x35,0x30,0x20,0x25,0x20,0x31,0x36,0x29,0x20,0x2a,0x20,0x33,0x32,0x29,0x20,
|
|
0x2b,0x20,0x5f,0x32,0x36,0x32,0x2e,0x79,0x2c,0x20,0x28,0x28,0x5f,0x32,0x35,0x30,
|
|
0x20,0x2f,0x20,0x31,0x36,0x29,0x20,0x2a,0x20,0x33,0x32,0x29,0x20,0x2b,0x20,0x5f,
|
|
0x32,0x36,0x32,0x2e,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x20,0x3d,0x20,
|
|
0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x5f,0x32,0x38,0x31,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x67,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,
|
|
0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x38,0x31,0x20,0x2b,0x20,0x69,0x76,0x65,
|
|
0x63,0x33,0x28,0x31,0x2c,0x20,0x30,0x2c,0x20,0x30,0x29,0x2c,0x20,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x62,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,
|
|
0x74,0x63,0x68,0x28,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x5f,
|
|
0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x38,0x31,0x20,
|
|
0x2b,0x20,0x69,0x76,0x65,0x63,0x33,0x28,0x32,0x2c,0x20,0x30,0x2c,0x20,0x30,0x29,
|
|
0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x72,0x2e,0x78,0x20,0x3e,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x6c,0x69,0x67,0x68,0x74,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x31,
|
|
0x32,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,
|
|
0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x32,0x34,0x20,0x3d,0x20,0x28,0x28,0x66,0x6c,
|
|
0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,0x20,0x5f,0x33,0x31,
|
|
0x32,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,
|
|
0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,0x33,0x31,0x32,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x33,0x33,0x31,0x20,0x3d,0x20,0x28,0x5f,0x33,0x32,0x34,0x20,0x2b,0x20,0x28,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x29,0x20,0x2d,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x33,0x35,0x20,0x3d,0x20,0x69,0x76,0x65,0x63,
|
|
0x33,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x33,0x33,0x31,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x33,0x34,0x30,0x20,0x3d,0x20,0x5f,0x33,0x33,0x31,0x20,0x2d,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x5f,0x33,0x33,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x75,0x6d,0x5f,0x72,0x20,0x3d,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x75,0x6d,0x5f,0x67,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x75,0x6d,0x5f,
|
|
0x62,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,
|
|
0x6f,0x74,0x61,0x6c,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x28,0x69,0x6e,0x74,
|
|
0x20,0x69,0x20,0x3d,0x20,0x30,0x3b,0x20,0x69,0x20,0x3c,0x20,0x38,0x3b,0x20,0x69,
|
|
0x2b,0x2b,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x36,0x33,0x20,0x3d,0x20,0x69,
|
|
0x76,0x65,0x63,0x33,0x28,0x69,0x20,0x26,0x20,0x31,0x2c,0x20,0x28,0x69,0x20,0x3e,
|
|
0x3e,0x20,0x31,0x29,0x20,0x26,0x20,0x31,0x2c,0x20,0x69,0x20,0x3e,0x3e,0x20,0x32,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x33,0x36,0x37,0x20,0x3d,0x20,0x5f,0x33,0x33,0x35,0x20,0x2b,0x20,0x5f,
|
|
0x33,0x36,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x64,0x6f,0x74,0x28,0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x36,0x37,0x29,
|
|
0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2d,0x20,
|
|
0x5f,0x33,0x32,0x34,0x2c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x20,0x3c,0x20,
|
|
0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,
|
|
0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x69,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x36,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
|
|
0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x38,0x39,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x61,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x31,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x33,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x21,0x5f,0x33,0x38,0x39,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x34,0x30,0x34,0x20,0x3d,0x20,0x6d,0x69,
|
|
0x78,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,0x20,0x5f,0x33,
|
|
0x34,0x30,0x2c,0x20,0x5f,0x33,0x34,0x30,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,
|
|
0x33,0x36,0x33,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x31,0x35,0x20,
|
|
0x3d,0x20,0x6d,0x61,0x78,0x28,0x28,0x5f,0x34,0x30,0x34,0x2e,0x78,0x20,0x2a,0x20,
|
|
0x5f,0x34,0x30,0x34,0x2e,0x79,0x29,0x20,0x2a,0x20,0x5f,0x34,0x30,0x34,0x2e,0x7a,
|
|
0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,
|
|
0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,
|
|
0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x73,0x75,0x6d,0x5f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x2a,0x20,0x5f,0x34,0x31,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x67,0x20,0x2b,0x3d,0x20,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x2a,0x20,0x5f,0x34,0x31,0x35,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x62,0x20,0x2b,0x3d,
|
|
0x20,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x2a,0x20,0x5f,0x34,0x31,0x35,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x74,0x61,0x6c,
|
|
0x20,0x2b,0x3d,0x20,0x5f,0x34,0x31,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x6f,0x74,0x61,0x6c,0x20,0x3d,0x3d,
|
|
0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x34,0x28,
|
|
0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x34,0x35,0x33,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x32,0x38,0x32,0x30,0x39,0x34,0x39,
|
|
0x38,0x35,0x32,0x34,0x36,0x36,0x35,0x38,0x33,0x32,0x35,0x31,0x39,0x35,0x33,0x31,
|
|
0x32,0x35,0x2c,0x20,0x30,0x2e,0x33,0x32,0x35,0x37,0x33,0x35,0x30,0x30,0x32,0x37,
|
|
0x35,0x36,0x31,0x31,0x38,0x37,0x37,0x34,0x34,0x31,0x34,0x30,0x36,0x32,0x35,0x20,
|
|
0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x33,0x32,
|
|
0x35,0x37,0x33,0x35,0x30,0x30,0x32,0x37,0x35,0x36,0x31,0x31,0x38,0x37,0x37,0x34,
|
|
0x34,0x31,0x34,0x30,0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
|
0x2e,0x7a,0x2c,0x20,0x30,0x2e,0x33,0x32,0x35,0x37,0x33,0x35,0x30,0x30,0x32,0x37,
|
|
0x35,0x36,0x31,0x31,0x38,0x37,0x37,0x34,0x34,0x31,0x34,0x30,0x36,0x32,0x35,0x20,
|
|
0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x61,0x78,
|
|
0x28,0x76,0x65,0x63,0x33,0x28,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,0x72,0x2c,
|
|
0x20,0x5f,0x34,0x35,0x33,0x29,0x2c,0x20,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,
|
|
0x67,0x2c,0x20,0x5f,0x34,0x35,0x33,0x29,0x2c,0x20,0x64,0x6f,0x74,0x28,0x73,0x75,
|
|
0x6d,0x5f,0x62,0x2c,0x20,0x5f,0x34,0x35,0x33,0x29,0x29,0x20,0x2f,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x74,0x6f,0x74,0x61,0x6c,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x30,0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,
|
|
0x68,0x74,0x65,0x73,0x74,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,
|
|
0x79,0x2c,0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x67,0x6c,0x6f,
|
|
0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,
|
|
0x6e,0x65,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6c,0x65,0x6e,0x67,0x74,0x68,
|
|
0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x29,0x3b,0x0a,0x7d,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,0x35,0x31,0x37,0x20,0x3d,0x20,0x76,
|
|
0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x35,0x31,0x37,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x46,
|
|
0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x35,0x33,0x30,0x20,0x3d,0x20,0x76,0x5f,0x63,0x75,
|
|
0x74,0x20,0x3e,0x20,0x64,0x69,0x74,0x68,0x65,0x72,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
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,0x35,0x33,0x30,0x20,0x3d,0x20,0x5f,0x35,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x35,0x33,0x30,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,
|
|
0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x35,0x33,0x38,0x20,0x3d,0x20,0x69,0x6e,0x74,
|
|
0x28,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x5f,0x35,0x34,0x38,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,
|
|
0x63,0x68,0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,
|
|
0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x35,
|
|
0x33,0x38,0x2c,0x20,0x30,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x35,0x36,0x20,
|
|
0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x70,0x61,0x6c,
|
|
0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x35,0x33,0x38,0x2c,0x20,0x31,0x29,
|
|
0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x34,0x38,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3e,0x20,0x31,0x2e,0x35,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6c,0x62,0x65,
|
|
0x64,0x6f,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,
|
|
0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,
|
|
0x35,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,
|
|
0x29,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,0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3e,0x20,0x30,0x2e,
|
|
0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,
|
|
0x3d,0x20,0x6d,0x69,0x78,0x28,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,
|
|
0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,
|
|
0x32,0x35,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,
|
|
0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x5f,0x35,0x39,0x30,0x20,0x3d,0x20,0x73,0x75,0x6e,0x5f,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x35,0x39,0x31,0x20,0x3d,0x20,
|
|
0x5f,0x35,0x39,0x30,0x20,0x2a,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,
|
|
0x5f,0x35,0x39,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
|
|
0x2e,0x77,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x76,0x5f,0x77,
|
|
0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,
|
|
0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x35,0x39,0x38,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,
|
|
0x65,0x5f,0x6c,0x69,0x67,0x68,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,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,0x35,0x39,0x38,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
|
|
0x36,0x32,0x33,0x20,0x3d,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x2a,0x20,0x5f,0x35,
|
|
0x39,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x5f,0x36,0x32,0x37,0x20,0x3d,0x20,0x5f,0x36,0x32,0x33,0x20,0x2a,
|
|
0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,
|
|
0x76,0x5f,0x61,0x6f,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x61,0x6c,
|
|
0x62,0x65,0x64,0x6f,0x20,0x2a,0x20,0x28,0x28,0x28,0x76,0x5f,0x73,0x68,0x61,0x64,
|
|
0x65,0x20,0x2b,0x20,0x5f,0x35,0x39,0x38,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,
|
|
0x6d,0x69,0x78,0x28,0x30,0x2e,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x38,
|
|
0x34,0x31,0x38,0x35,0x37,0x39,0x31,0x30,0x31,0x35,0x36,0x32,0x35,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x2c,0x20,0x76,0x5f,0x61,0x6f,0x29,0x29,0x20,0x2b,0x20,0x5f,0x36,0x32,
|
|
0x37,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x35,0x39,
|
|
0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x36,0x33,0x37,0x20,0x3d,0x20,0x62,0x72,0x69,0x67,0x68,0x74,
|
|
0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,0x33,0x37,0x20,0x3e,0x20,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,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x28,0x5f,0x36,0x32,0x37,0x20,
|
|
0x2a,0x20,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,0x20,0x61,
|
|
0x6c,0x62,0x65,0x64,0x6f,0x29,0x29,0x20,0x2a,0x20,0x28,0x28,0x5f,0x36,0x33,0x37,
|
|
0x20,0x2d,0x20,0x6d,0x69,0x6e,0x28,0x5f,0x35,0x39,0x31,0x2e,0x78,0x2c,0x20,0x6d,
|
|
0x69,0x6e,0x28,0x5f,0x35,0x39,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x35,0x39,0x31,0x2e,
|
|
0x7a,0x29,0x29,0x29,0x20,0x2f,0x20,0x5f,0x36,0x33,0x37,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x36,0x37,0x20,0x3d,0x20,0x5f,0x35,0x34,0x38,
|
|
0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x36,0x32,
|
|
0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x28,0x5f,0x36,0x36,0x37,0x20,
|
|
0x2a,0x20,0x38,0x2e,0x30,0x29,0x20,0x2b,0x20,0x28,0x62,0x72,0x69,0x67,0x68,0x74,
|
|
0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x29,0x20,0x2a,0x20,0x31,
|
|
0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x35,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,
|
|
0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,0x37,0x35,
|
|
0x20,0x3e,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x37,0x30,0x30,0x20,0x3d,0x20,0x70,0x6f,0x77,0x28,0x6d,0x61,0x78,
|
|
0x28,0x64,0x6f,0x74,0x28,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,0x20,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x20,
|
|
0x2b,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x6d,0x69,0x78,0x28,0x34,0x2e,0x30,0x2c,0x20,0x39,0x36,0x2e,0x30,0x2c,
|
|
0x20,0x5f,0x36,0x37,0x35,0x29,0x29,0x20,0x2a,0x20,0x5f,0x36,0x37,0x35,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,
|
|
0x20,0x28,0x5f,0x36,0x32,0x33,0x20,0x2a,0x20,0x5f,0x37,0x30,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x35,0x39,
|
|
0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x2b,0x3d,0x20,0x28,0x28,0x5f,0x37,0x30,0x30,0x20,0x2a,0x20,0x62,0x72,0x69,0x67,
|
|
0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x29,0x20,
|
|
0x2a,0x20,0x34,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x31,0x38,0x20,0x3d,0x20,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,
|
|
0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,
|
|
0x6f,0x6c,0x20,0x5f,0x37,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x37,0x31,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x34,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,
|
|
0x2e,0x79,0x20,0x3e,0x20,0x30,0x2e,0x30,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,0x37,0x32,0x34,0x20,0x3d,0x20,0x5f,0x37,
|
|
0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,
|
|
0x6f,0x6c,0x20,0x5f,0x37,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x37,0x32,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x33,0x30,0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x2e,0x79,0x20,0x3e,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,0x5f,0x37,0x33,0x30,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x33,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x34,0x30,0x20,0x3d,0x20,
|
|
0x61,0x62,0x73,0x28,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x2e,0x79,0x20,0x2d,0x20,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x33,0x5d,0x2e,0x79,0x29,0x20,0x3c,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,
|
|
0x37,0x30,0x33,0x31,0x32,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,0x5f,0x37,0x34,0x30,0x20,0x3d,0x20,0x5f,0x37,0x33,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x5f,0x37,0x34,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,
|
|
0x37,0x35,0x34,0x20,0x3d,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,0x72,0x69,0x6c,0x65,0x5f,0x72,
|
|
0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x74,0x72,0x69,0x6c,0x65,0x5f,
|
|
0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x37,0x36,0x31,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x32,0x28,0x5f,0x37,0x35,0x34,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20,
|
|
0x2d,0x20,0x5f,0x37,0x35,0x34,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
|
|
0x37,0x37,0x30,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x6d,0x69,
|
|
0x78,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,
|
|
0x6e,0x5f,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x36,0x31,0x29,0x2e,0x78,0x79,
|
|
0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x37,0x37,0x30,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x6d,
|
|
0x61,0x78,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,
|
|
0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,
|
|
0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x36,
|
|
0x31,0x29,0x2e,0x78,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x5f,0x37,0x37,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,
|
|
0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x69,0x78,0x28,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x5f,0x36,0x36,0x37,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x76,0x5f,0x74,0x6f,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x20,
|
|
0x3d,0x20,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,
|
|
0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x2c,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D palette_palette_smp;
|
|
|
|
in highp float v_swatch;
|
|
in highp float v_clip;
|
|
in highp vec3 v_to_camera;
|
|
in highp vec3 v_world;
|
|
in highp vec3 v_normal;
|
|
in highp float v_facing;
|
|
in highp float v_ao;
|
|
in highp vec3 v_shade;
|
|
in highp vec3 v_sun;
|
|
in highp float v_tint;
|
|
in highp float v_cut;
|
|
|
|
void main()
|
|
{
|
|
if (texelFetch(palette_palette_smp, ivec2(int(v_swatch + 0.5), 1), 0).x > 0.5)
|
|
{
|
|
discard;
|
|
}
|
|
}
|
|
|
|
*/
|
|
fs_trile_shadow_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,
|
|
0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x73,0x77,
|
|
0x61,0x74,0x63,0x68,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x69,
|
|
0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,
|
|
0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x61,0x6f,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x5f,0x74,0x69,0x6e,0x74,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x75,0x74,0x3b,0x0a,0x0a,0x76,
|
|
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,
|
|
0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x69,0x6e,0x74,0x28,0x76,
|
|
0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x2c,0x20,
|
|
0x31,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,
|
|
0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,
|
|
0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D palette_palette_smp;
|
|
|
|
in highp float v_swatch;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
in highp float v_clip;
|
|
in highp vec3 v_to_camera;
|
|
in highp vec3 v_world;
|
|
in highp vec3 v_normal;
|
|
in highp float v_facing;
|
|
in highp float v_ao;
|
|
in highp vec3 v_shade;
|
|
in highp vec3 v_sun;
|
|
in highp float v_tint;
|
|
in highp float v_cut;
|
|
|
|
void main()
|
|
{
|
|
int _15 = int(v_swatch + 0.5);
|
|
if (texelFetch(palette_palette_smp, ivec2(_15, 1), 0).x < 0.5)
|
|
{
|
|
discard;
|
|
}
|
|
highp vec4 _51 = texelFetch(palette_palette_smp, ivec2(_15, 0), 0);
|
|
frag_color = vec4(_51.xyz / vec3(max(max(_51.x, max(_51.y, _51.z)), 0.001000000047497451305389404296875)), gl_FragCoord.z);
|
|
}
|
|
|
|
*/
|
|
fs_trile_glass_shadow_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,
|
|
0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x73,0x77,
|
|
0x61,0x74,0x63,0x68,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x69,
|
|
0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,
|
|
0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x61,0x6f,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x5f,0x74,0x69,0x6e,0x74,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x75,0x74,0x3b,0x0a,0x0a,0x76,
|
|
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x6e,0x74,0x20,0x5f,0x31,0x35,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x76,
|
|
0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,
|
|
0x63,0x68,0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,
|
|
0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x31,
|
|
0x35,0x2c,0x20,0x31,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x20,0x3c,0x20,0x30,0x2e,
|
|
0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,
|
|
0x35,0x31,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,
|
|
0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x5f,0x31,0x35,0x2c,0x20,
|
|
0x30,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x35,
|
|
0x31,0x2e,0x78,0x79,0x7a,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x6d,0x61,0x78,
|
|
0x28,0x6d,0x61,0x78,0x28,0x5f,0x35,0x31,0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,
|
|
0x5f,0x35,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x35,0x31,0x2e,0x7a,0x29,0x29,0x2c,0x20,
|
|
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,0x29,0x29,0x2c,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,
|
|
0x6f,0x72,0x64,0x2e,0x7a,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
const vec2 _23[6] = vec2[](vec2(0.0), vec2(1.0, 0.0), vec2(1.0), vec2(0.0), vec2(1.0), vec2(0.0, 1.0));
|
|
|
|
uniform vec4 view_params[13];
|
|
uniform vec4 water_vs_params[1];
|
|
out vec2 v_xz;
|
|
out vec3 v_to_camera;
|
|
out vec3 v_world;
|
|
|
|
vec2 quad_corner(int vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
v_xz = view_params[8].xz + (((quad_corner(param) * 2.0) - vec2(1.0)) * water_vs_params[0].y);
|
|
vec3 _75 = vec3(v_xz.x, water_vs_params[0].x, v_xz.y);
|
|
gl_Position = mat4(view_params[0], view_params[1], view_params[2], view_params[3]) * vec4(v_xz.x, water_vs_params[0].x, v_xz.y, 1.0);
|
|
v_to_camera = view_params[8].xyz - _75;
|
|
v_world = _75;
|
|
}
|
|
|
|
*/
|
|
vs_water_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x63,0x6f,0x6e,0x73,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x5b,
|
|
0x36,0x5d,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x5b,0x5d,0x28,0x76,0x65,0x63,0x32,
|
|
0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,
|
|
0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x31,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x76,0x5f,0x78,0x7a,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x6f,0x75,
|
|
0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,
|
|
0x0a,0x76,0x65,0x63,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,
|
|
0x72,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,
|
|
0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x5f,0x32,0x33,0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x5d,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x78,0x7a,0x20,0x3d,0x20,0x76,0x69,0x65,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x7a,0x20,0x2b,
|
|
0x20,0x28,0x28,0x28,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,
|
|
0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x77,0x61,0x74,
|
|
0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,
|
|
0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x37,0x35,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x5f,0x78,0x7a,0x2e,0x78,0x2c,0x20,
|
|
0x77,0x61,0x74,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x30,0x5d,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x78,0x7a,0x2e,0x79,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x76,0x5f,0x78,
|
|
0x7a,0x2e,0x78,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x78,0x7a,0x2e,
|
|
0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,
|
|
0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,
|
|
0x5f,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,
|
|
0x20,0x3d,0x20,0x5f,0x37,0x35,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp vec4 water_floor_params[1];
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
layout(location = 2) out highp vec4 frag_scene;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
in highp vec3 v_to_camera;
|
|
in highp vec3 v_world;
|
|
in highp vec2 v_xz;
|
|
|
|
void write_scene(highp vec3 to_camera, highp float glow)
|
|
{
|
|
frag_glow = vec4(glow);
|
|
frag_scene = vec4(length(to_camera));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
frag_color = vec4(water_floor_params[0].xyz, 1.0);
|
|
highp vec3 param = v_to_camera;
|
|
highp float param_1 = 0.0;
|
|
write_scene(param, param_1);
|
|
}
|
|
|
|
*/
|
|
fs_water_floor_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x6c,0x6f,0x6f,0x72,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
|
|
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x73,0x63,0x65,0x6e,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
|
|
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,
|
|
0x61,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x78,0x7a,0x3b,0x0a,0x0a,0x76,
|
|
0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x67,
|
|
0x6c,0x6f,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,
|
|
0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6c,0x65,0x6e,0x67,
|
|
0x74,0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x6c,0x6f,
|
|
0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x76,
|
|
0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,
|
|
0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp vec4 shadow_params[4];
|
|
uniform highp vec4 water_fs_params[4];
|
|
uniform highp sampler2D normals_normals_smp;
|
|
uniform highp sampler2D reflection_reflection_smp;
|
|
uniform highp sampler2DShadow shadow_map_shadow_smp;
|
|
uniform highp sampler2D shadow_tint_shadow_tint_smp;
|
|
uniform highp sampler2D reflection_glow_reflection_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
in highp vec2 v_xz;
|
|
in highp vec3 v_to_camera;
|
|
in highp vec3 v_world;
|
|
|
|
highp vec3 sun_shadow(highp vec3 world, highp vec3 normal)
|
|
{
|
|
highp vec3 _43 = normal * 0.03125;
|
|
highp vec4 _78 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4((((floor((world - _43) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _43) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
highp float _81 = _78.x;
|
|
bool _83 = _81 < 0.0;
|
|
bool _90;
|
|
if (!_83)
|
|
{
|
|
_90 = _81 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_90 = _83;
|
|
}
|
|
bool _97;
|
|
if (!_90)
|
|
{
|
|
_97 = _78.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_97 = _90;
|
|
}
|
|
bool _104;
|
|
if (!_97)
|
|
{
|
|
_104 = _78.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_104 = _97;
|
|
}
|
|
bool _111;
|
|
if (!_104)
|
|
{
|
|
_111 = _78.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_111 = _104;
|
|
}
|
|
if (_111)
|
|
{
|
|
return vec3(1.0);
|
|
}
|
|
highp float _134 = _78.z - 0.0005000000237487256526947021484375;
|
|
return texture(shadow_tint_shadow_tint_smp, _78.xy).xyz * texture(shadow_map_shadow_smp, vec3(vec3(_81, _78.y, _134).xy, _134));
|
|
}
|
|
|
|
highp float brightest(highp vec3 c)
|
|
{
|
|
return max(c.x, max(c.y, c.z));
|
|
}
|
|
|
|
void write_transparent(highp vec4 color, highp float glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = vec4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec2 _175 = vec2(-0.004999999888241291046142578125, -0.01200000010430812835693359375) * water_fs_params[2].w;
|
|
highp vec3 _217 = normalize(((texture(normals_normals_smp, (v_xz * 0.4000000059604644775390625) + (_175 * 1.5)).xzy * 2.0) - vec3(1.0)) + ((texture(normals_normals_smp, (v_xz * 0.100000001490116119384765625) + (_175 * 1.7000000476837158203125)).xzy * 2.0) - vec3(1.0)));
|
|
highp vec3 _222 = normalize(v_to_camera);
|
|
highp float _238 = min(1.0, (0.980000019073486328125 * pow(1.0 - max(dot(_222, _217), 0.0), 5.0)) + 0.4699999988079071044921875);
|
|
highp vec2 _253 = gl_FragCoord.xy / vec2(textureSize(reflection_reflection_smp, 0));
|
|
highp vec2 _267 = vec2(_253.x, 1.0 - _253.y) + (_217.xz * water_fs_params[3].y);
|
|
highp float _280 = mix(_238, 1.0, water_fs_params[3].x);
|
|
highp vec3 param = v_world;
|
|
highp vec3 param_1 = vec3(0.0, 1.0, 0.0);
|
|
highp vec3 param_2 = sun_shadow(param, param_1);
|
|
highp float _324 = smoothstep(0.5, 0.550000011920928955078125, pow(max(dot(_217, normalize(_222 + water_fs_params[1].xyz)), 0.0), water_fs_params[1].w)) * brightest(param_2);
|
|
highp vec3 _341 = mix(mix(water_fs_params[0].xyz, texture(reflection_reflection_smp, _267).xyz, vec3(_280)), water_fs_params[2].xyz, vec3(_324));
|
|
highp vec4 param_3 = vec4(_341, max(mix(mix(0.300000011920928955078125, 0.5, _238), 1.0, water_fs_params[3].x), _324));
|
|
highp float param_4 = max(_324, texture(reflection_glow_reflection_smp, _267).x * _280);
|
|
write_transparent(param_3, param_4);
|
|
}
|
|
|
|
*/
|
|
fs_water_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,
|
|
0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x32,0x44,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x73,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
|
|
0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x72,0x65,0x66,0x6c,0x65,
|
|
0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,
|
|
0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
|
|
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,
|
|
0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x72,0x65,0x66,
|
|
0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x5f,0x72,0x65,0x66,
|
|
0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x66,0x72,0x61,0x67,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,
|
|
0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x78,0x7a,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
|
|
0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x69,0x6e,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,
|
|
0x64,0x3b,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,
|
|
0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x5f,0x34,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x37,0x38,0x20,0x3d,0x20,0x6d,0x61,0x74,
|
|
0x34,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x30,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x31,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,
|
|
0x28,0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,
|
|
0x20,0x2d,0x20,0x5f,0x34,0x33,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,
|
|
0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,
|
|
0x34,0x33,0x29,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,
|
|
0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x31,0x20,0x3d,0x20,0x5f,0x37,0x38,
|
|
0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x38,0x33,
|
|
0x20,0x3d,0x20,0x5f,0x38,0x31,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x38,0x33,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x38,
|
|
0x31,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x39,0x30,0x20,0x3d,0x20,0x5f,0x38,0x33,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,
|
|
0x5f,0x39,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,
|
|
0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x5f,0x39,0x37,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x79,0x20,0x3c,0x20,0x30,
|
|
0x2e,0x30,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,0x39,0x37,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x34,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x37,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,
|
|
0x34,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,
|
|
0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x31,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x30,0x34,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x31,
|
|
0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x31,
|
|
0x31,0x20,0x3d,0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x31,0x31,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x34,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x7a,
|
|
0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x32,
|
|
0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,0x32,
|
|
0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x38,0x2e,0x78,0x79,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x65,0x63,0x33,0x28,
|
|
0x5f,0x38,0x31,0x2c,0x20,0x5f,0x37,0x38,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x33,0x34,
|
|
0x29,0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31,0x33,0x34,0x29,0x29,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,
|
|
0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x6d,0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,0x6d,0x61,0x78,0x28,0x63,
|
|
0x2e,0x79,0x2c,0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,
|
|
0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,
|
|
0x72,0x65,0x6e,0x74,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x5f,0x31,0x37,0x35,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,
|
|
0x2e,0x30,0x30,0x34,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x38,0x32,0x34,0x31,
|
|
0x32,0x39,0x31,0x30,0x34,0x36,0x31,0x34,0x32,0x35,0x37,0x38,0x31,0x32,0x35,0x2c,
|
|
0x20,0x2d,0x30,0x2e,0x30,0x31,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x30,0x34,
|
|
0x33,0x30,0x38,0x31,0x32,0x38,0x33,0x35,0x36,0x39,0x33,0x33,0x35,0x39,0x33,0x37,
|
|
0x35,0x29,0x20,0x2a,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x31,0x37,0x20,0x3d,
|
|
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x28,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x76,0x5f,0x78,0x7a,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,
|
|
0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x20,0x2b,
|
|
0x20,0x28,0x5f,0x31,0x37,0x35,0x20,0x2a,0x20,0x31,0x2e,0x35,0x29,0x29,0x2e,0x78,
|
|
0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x31,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x73,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x76,0x5f,0x78,0x7a,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,
|
|
0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x20,0x2b,
|
|
0x20,0x28,0x5f,0x31,0x37,0x35,0x20,0x2a,0x20,0x31,0x2e,0x37,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,
|
|
0x35,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x32,
|
|
0x32,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x5f,
|
|
0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x38,
|
|
0x20,0x3d,0x20,0x6d,0x69,0x6e,0x28,0x31,0x2e,0x30,0x2c,0x20,0x28,0x30,0x2e,0x39,
|
|
0x38,0x30,0x30,0x30,0x30,0x30,0x31,0x39,0x30,0x37,0x33,0x34,0x38,0x36,0x33,0x32,
|
|
0x38,0x31,0x32,0x35,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x31,0x2e,0x30,0x20,0x2d,
|
|
0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x32,0x32,0x32,0x2c,0x20,0x5f,
|
|
0x32,0x31,0x37,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x35,0x2e,0x30,0x29,
|
|
0x29,0x20,0x2b,0x20,0x30,0x2e,0x34,0x36,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,
|
|
0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x5f,0x32,0x35,0x33,0x20,0x3d,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,0x72,0x65,0x66,0x6c,0x65,
|
|
0x63,0x74,0x69,0x6f,0x6e,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x36,0x37,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x32,0x35,0x33,0x2e,0x78,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x20,0x2d,0x20,0x5f,0x32,0x35,0x33,0x2e,0x79,0x29,0x20,0x2b,0x20,0x28,0x5f,
|
|
0x32,0x31,0x37,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x2e,0x79,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x32,0x38,0x30,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,0x32,0x33,0x38,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x2e,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x20,0x3d,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x32,0x20,0x3d,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x33,0x32,0x34,0x20,0x3d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,
|
|
0x70,0x28,0x30,0x2e,0x35,0x2c,0x20,0x30,0x2e,0x35,0x35,0x30,0x30,0x30,0x30,0x30,
|
|
0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,
|
|
0x35,0x2c,0x20,0x70,0x6f,0x77,0x28,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,
|
|
0x32,0x31,0x37,0x2c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,
|
|
0x32,0x32,0x32,0x20,0x2b,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x29,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2a,0x20,0x62,
|
|
0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x5f,0x33,0x34,0x31,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,
|
|
0x28,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x72,0x65,0x66,0x6c,
|
|
0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x36,0x37,
|
|
0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x32,0x38,0x30,
|
|
0x29,0x29,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x5f,0x33,0x32,0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x33,0x34,0x31,0x2c,0x20,0x6d,0x61,0x78,
|
|
0x28,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,
|
|
0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x5f,0x32,0x33,0x38,0x29,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x2c,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x2e,0x78,0x29,0x2c,0x20,0x5f,0x33,0x32,
|
|
0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x6d,
|
|
0x61,0x78,0x28,0x5f,0x33,0x32,0x34,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,
|
|
0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x5f,0x32,0x36,0x37,0x29,0x2e,0x78,0x20,0x2a,0x20,0x5f,0x32,0x38,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,
|
|
0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
const vec2 _23[6] = vec2[](vec2(0.0), vec2(1.0, 0.0), vec2(1.0), vec2(0.0), vec2(1.0), vec2(0.0, 1.0));
|
|
|
|
uniform vec4 view_params[13];
|
|
uniform vec4 sprite_params[1];
|
|
layout(location = 3) in vec3 face;
|
|
layout(location = 0) in vec3 center;
|
|
layout(location = 1) in vec2 size;
|
|
out float v_clip;
|
|
out vec3 v_to_camera;
|
|
out vec2 v_uv;
|
|
layout(location = 2) in vec4 uv_rect;
|
|
out vec4 v_color;
|
|
layout(location = 4) in vec4 color;
|
|
out float v_glow;
|
|
layout(location = 5) in float glow;
|
|
out vec3 v_sun;
|
|
out vec3 v_shade;
|
|
out vec3 v_anchor;
|
|
|
|
vec2 quad_corner(int vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = quad_corner(param);
|
|
vec3 look = face;
|
|
if (face.x < (-10.0))
|
|
{
|
|
look = vec3(center.x - view_params[8].x, 0.0, center.z - view_params[8].z);
|
|
}
|
|
if (dot(look.xz, look.xz) < 9.9999997473787516355514526367188e-05)
|
|
{
|
|
look = vec3(0.0, 0.0, 1.0);
|
|
}
|
|
float _93 = _37.x;
|
|
float _105 = _37.y;
|
|
vec3 _110 = (center + (normalize(cross(vec3(0.0, 1.0, 0.0), look)) * ((_93 - 0.5) * size.x))) + vec3(0.0, _105 * size.y, 0.0);
|
|
vec4 _123 = vec4(_110, 1.0);
|
|
gl_Position = mat4(view_params[0], view_params[1], view_params[2], view_params[3]) * _123;
|
|
v_clip = dot(_123, view_params[9]);
|
|
v_to_camera = view_params[8].xyz - _110;
|
|
v_uv = vec2(uv_rect.x + (_93 * uv_rect.z), uv_rect.y + ((1.0 - _105) * uv_rect.w));
|
|
v_color = color;
|
|
v_glow = glow;
|
|
bool _181 = sprite_params[0].x > 0.5;
|
|
vec3 _182;
|
|
if (_181)
|
|
{
|
|
_182 = view_params[11].xyz;
|
|
}
|
|
else
|
|
{
|
|
_182 = vec3(1.0);
|
|
}
|
|
v_sun = _182;
|
|
vec3 _196;
|
|
if (_181)
|
|
{
|
|
_196 = view_params[12].xyz;
|
|
}
|
|
else
|
|
{
|
|
_196 = vec3(1.0);
|
|
}
|
|
v_shade = _196;
|
|
v_anchor = (center + vec3(0.0, size.y * 0.5, 0.0)) + (view_params[10].xyz * 0.300000011920928955078125);
|
|
}
|
|
|
|
*/
|
|
vs_sprite_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x63,0x6f,0x6e,0x73,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x5b,
|
|
0x36,0x5d,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x5b,0x5d,0x28,0x76,0x65,0x63,0x32,
|
|
0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,
|
|
0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x31,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x31,0x5d,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,0x76,
|
|
0x65,0x63,0x33,0x20,0x66,0x61,0x63,0x65,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,
|
|
0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,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,0x73,0x69,0x7a,0x65,
|
|
0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,
|
|
0x69,0x70,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,
|
|
0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x76,0x5f,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x3b,0x0a,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,0x34,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
|
|
0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x35,0x29,0x20,0x69,0x6e,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x6f,0x75,0x74,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,
|
|
0x0a,0x76,0x65,0x63,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,
|
|
0x72,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,
|
|
0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x5f,0x32,0x33,0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x5d,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,
|
|
0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x6c,0x6f,
|
|
0x6f,0x6b,0x20,0x3d,0x20,0x66,0x61,0x63,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x66,0x61,0x63,0x65,0x2e,0x78,0x20,0x3c,0x20,0x28,0x2d,0x31,0x30,
|
|
0x2e,0x30,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x63,
|
|
0x65,0x6e,0x74,0x65,0x72,0x2e,0x78,0x20,0x2d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x2c,0x20,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x2e,0x7a,0x20,0x2d,0x20,0x76,0x69,0x65,0x77,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x7a,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x64,0x6f,0x74,
|
|
0x28,0x6c,0x6f,0x6f,0x6b,0x2e,0x78,0x7a,0x2c,0x20,0x6c,0x6f,0x6f,0x6b,0x2e,0x78,
|
|
0x7a,0x29,0x20,0x3c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,
|
|
0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,
|
|
0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x33,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,
|
|
0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,
|
|
0x35,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x5f,0x31,0x31,0x30,0x20,0x3d,0x20,0x28,0x63,0x65,0x6e,0x74,
|
|
0x65,0x72,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,
|
|
0x63,0x72,0x6f,0x73,0x73,0x28,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x6c,0x6f,0x6f,0x6b,0x29,
|
|
0x29,0x20,0x2a,0x20,0x28,0x28,0x5f,0x39,0x33,0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,
|
|
0x20,0x2a,0x20,0x73,0x69,0x7a,0x65,0x2e,0x78,0x29,0x29,0x29,0x20,0x2b,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x31,0x30,0x35,0x20,0x2a,0x20,
|
|
0x73,0x69,0x7a,0x65,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x5f,0x31,0x31,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,0x5f,
|
|
0x31,0x32,0x33,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x39,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,
|
|
0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x31,0x31,
|
|
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,0x78,0x20,0x2b,0x20,0x28,
|
|
0x5f,0x39,0x33,0x20,0x2a,0x20,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,0x7a,0x29,
|
|
0x2c,0x20,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,0x79,0x20,0x2b,0x20,0x28,0x28,
|
|
0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x31,0x30,0x35,0x29,0x20,0x2a,0x20,0x75,0x76,
|
|
0x5f,0x72,0x65,0x63,0x74,0x2e,0x77,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x67,0x6c,0x6f,
|
|
0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x38,0x31,
|
|
0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x30,0x5d,0x2e,0x78,0x20,0x3e,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x38,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x5f,0x31,0x38,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x38,0x32,0x20,0x3d,0x20,0x76,
|
|
0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x31,0x5d,0x2e,0x78,
|
|
0x79,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,0x38,0x32,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,
|
|
0x75,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x38,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x5f,0x31,0x39,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x5f,0x31,0x38,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x39,0x36,0x20,0x3d,0x20,0x76,0x69,0x65,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x32,0x5d,0x2e,0x78,0x79,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,0x39,0x36,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x5f,0x73,0x68,0x61,
|
|
0x64,0x65,0x20,0x3d,0x20,0x5f,0x31,0x39,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x20,0x3d,0x20,0x28,0x63,0x65,0x6e,0x74,0x65,
|
|
0x72,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x73,0x69,
|
|
0x7a,0x65,0x2e,0x79,0x20,0x2a,0x20,0x30,0x2e,0x35,0x2c,0x20,0x30,0x2e,0x30,0x29,
|
|
0x29,0x20,0x2b,0x20,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x31,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,
|
|
0x37,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp vec4 shadow_params[4];
|
|
uniform highp sampler2DShadow shadow_map_shadow_smp;
|
|
uniform highp sampler2D shadow_tint_shadow_tint_smp;
|
|
uniform highp sampler2D sprite_sprite_smp;
|
|
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
layout(location = 2) out highp vec4 frag_scene;
|
|
in highp float v_clip;
|
|
in highp vec2 v_uv;
|
|
in highp vec4 v_color;
|
|
in highp vec3 v_shade;
|
|
in highp vec3 v_sun;
|
|
in highp vec3 v_anchor;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
in highp vec3 v_to_camera;
|
|
in highp float v_glow;
|
|
|
|
highp vec3 sun_shadow(highp vec3 world, highp vec3 normal)
|
|
{
|
|
highp vec3 _35 = normal * 0.03125;
|
|
highp vec4 _71 = mat4(shadow_params[0], shadow_params[1], shadow_params[2], shadow_params[3]) * vec4((((floor((world - _35) * 16.0) + vec3(0.5)) * vec3(0.0625)) + _35) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
highp float _76 = _71.x;
|
|
bool _78 = _76 < 0.0;
|
|
bool _85;
|
|
if (!_78)
|
|
{
|
|
_85 = _76 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_85 = _78;
|
|
}
|
|
bool _93;
|
|
if (!_85)
|
|
{
|
|
_93 = _71.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_93 = _85;
|
|
}
|
|
bool _100;
|
|
if (!_93)
|
|
{
|
|
_100 = _71.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_100 = _93;
|
|
}
|
|
bool _108;
|
|
if (!_100)
|
|
{
|
|
_108 = _71.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_108 = _100;
|
|
}
|
|
if (_108)
|
|
{
|
|
return vec3(1.0);
|
|
}
|
|
highp float _131 = _71.z - 0.0005000000237487256526947021484375;
|
|
return texture(shadow_tint_shadow_tint_smp, _71.xy).xyz * texture(shadow_map_shadow_smp, vec3(vec3(_76, _71.y, _131).xy, _131));
|
|
}
|
|
|
|
highp vec4 sprite_color()
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard;
|
|
}
|
|
highp vec4 _167 = texture(sprite_sprite_smp, v_uv);
|
|
if (_167.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard;
|
|
}
|
|
return _167 * v_color;
|
|
}
|
|
|
|
void write_scene(highp vec3 to_camera, highp float glow)
|
|
{
|
|
frag_glow = vec4(glow);
|
|
frag_scene = vec4(length(to_camera));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec3 param = v_anchor;
|
|
highp vec3 param_1 = vec3(0.0, 1.0, 0.0);
|
|
highp vec4 _197 = sprite_color();
|
|
frag_color = _197 * vec4(mix(v_shade, v_sun, sun_shadow(param, param_1)), 1.0);
|
|
highp vec3 param_2 = v_to_camera;
|
|
highp float param_3 = 0.0;
|
|
write_scene(param_2, param_3);
|
|
}
|
|
|
|
*/
|
|
fs_sprite_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x34,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,
|
|
0x77,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,
|
|
0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,
|
|
0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x3b,0x0a,
|
|
0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x76,0x5f,
|
|
0x75,0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,
|
|
0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,
|
|
0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,
|
|
0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x3b,
|
|
0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,
|
|
0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,
|
|
0x35,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,
|
|
0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,
|
|
0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x32,0x5d,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x28,
|
|
0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,
|
|
0x20,0x5f,0x33,0x35,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,0x33,0x35,
|
|
0x29,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,
|
|
0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x36,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x78,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x38,0x20,0x3d,
|
|
0x20,0x5f,0x37,0x36,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x21,0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x38,0x35,0x20,0x3d,0x20,0x5f,0x37,0x36,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,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,0x38,0x35,0x20,0x3d,0x20,0x5f,0x37,0x38,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,
|
|
0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x38,0x35,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,
|
|
0x39,0x33,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,
|
|
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,
|
|
0x39,0x33,0x20,0x3d,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x33,0x29,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x30,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x31,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x30,0x30,
|
|
0x20,0x3d,0x20,0x5f,0x39,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x38,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x30,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x38,0x20,0x3d,
|
|
0x20,0x5f,0x37,0x31,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x30,0x38,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x31,0x33,0x31,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x7a,0x20,0x2d,
|
|
0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x37,
|
|
0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,0x32,0x31,0x34,
|
|
0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,
|
|
0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x31,0x2e,0x78,0x79,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x20,0x2a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x37,
|
|
0x36,0x2c,0x20,0x5f,0x37,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x33,0x31,0x29,0x2e,
|
|
0x78,0x79,0x2c,0x20,0x5f,0x31,0x33,0x31,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,0x30,0x2e,0x30,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,
|
|
0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x36,
|
|
0x37,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x70,0x72,0x69,
|
|
0x74,0x65,0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,
|
|
0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
|
|
0x36,0x37,0x2e,0x77,0x20,0x3c,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,
|
|
0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x5f,0x31,0x36,0x37,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,
|
|
0x65,0x6e,0x65,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x74,
|
|
0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x67,0x6c,0x6f,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,
|
|
0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,
|
|
0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x76,0x5f,0x61,0x6e,
|
|
0x63,0x68,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x5f,0x31,0x39,0x37,0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x39,0x37,0x20,
|
|
0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x69,0x78,0x28,0x76,0x5f,0x73,0x68,0x61,
|
|
0x64,0x65,0x2c,0x20,0x76,0x5f,0x73,0x75,0x6e,0x2c,0x20,0x73,0x75,0x6e,0x5f,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x30,0x2e,
|
|
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,
|
|
0x6e,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x33,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D sprite_sprite_smp;
|
|
|
|
in highp float v_clip;
|
|
in highp vec2 v_uv;
|
|
in highp vec4 v_color;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
in highp float v_glow;
|
|
in highp vec3 v_to_camera;
|
|
in highp vec3 v_sun;
|
|
in highp vec3 v_shade;
|
|
in highp vec3 v_anchor;
|
|
|
|
highp vec4 sprite_color()
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard;
|
|
}
|
|
highp vec4 _42 = texture(sprite_sprite_smp, v_uv);
|
|
if (_42.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard;
|
|
}
|
|
return _42 * v_color;
|
|
}
|
|
|
|
void write_transparent(highp vec4 color, highp float glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = vec4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec4 _67 = sprite_color();
|
|
highp vec4 param = _67;
|
|
highp float param_1 = v_glow * 8.0;
|
|
write_transparent(param, param_1);
|
|
}
|
|
|
|
*/
|
|
fs_particle_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,
|
|
0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x76,0x5f,0x75,0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,
|
|
0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,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,0x31,
|
|
0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x69,0x6e,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x67,0x6c,0x6f,
|
|
0x77,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x69,0x6e,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,
|
|
0x6e,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,
|
|
0x3b,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,
|
|
0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x5f,0x34,0x32,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,
|
|
0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x34,0x32,0x2e,0x77,0x20,0x3c,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,
|
|
0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x5f,0x34,0x32,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,
|
|
0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x67,0x6c,
|
|
0x6f,0x77,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x2e,0x77,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x5f,0x36,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x31,0x20,0x3d,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x2a,0x20,0x38,0x2e,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,
|
|
0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D sprite_sprite_smp;
|
|
|
|
in highp float v_clip;
|
|
in highp vec2 v_uv;
|
|
in highp vec4 v_color;
|
|
in highp vec3 v_to_camera;
|
|
in highp vec3 v_sun;
|
|
in highp vec3 v_shade;
|
|
in highp vec3 v_anchor;
|
|
in highp float v_glow;
|
|
|
|
highp vec4 sprite_color()
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard;
|
|
}
|
|
highp vec4 _36 = texture(sprite_sprite_smp, v_uv);
|
|
if (_36.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard;
|
|
}
|
|
return _36 * v_color;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec4 _54 = sprite_color();
|
|
}
|
|
|
|
*/
|
|
fs_sprite_shadow_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,
|
|
0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x76,0x5f,0x75,0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x3b,0x0a,0x69,0x6e,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,
|
|
0x64,0x65,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x67,0x6c,0x6f,
|
|
0x77,0x3b,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x73,
|
|
0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x5f,0x33,0x36,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x5f,0x33,0x36,0x2e,0x77,0x20,0x3c,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,
|
|
0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x5f,0x33,0x36,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x5f,0x35,0x34,0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x28,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
uniform vec4 view_params[13];
|
|
out vec4 v_point;
|
|
out vec3 v_camera;
|
|
|
|
vec2 fullscreen_position(int vertex_index)
|
|
{
|
|
return (vec2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - vec2(1.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = fullscreen_position(param);
|
|
float _48 = _37.x;
|
|
gl_Position = vec4(_48, _37.y, 0.0, 1.0);
|
|
v_point = mat4(view_params[4], view_params[5], view_params[6], view_params[7]) * vec4(_48, _37.y, 0.5, 1.0);
|
|
v_camera = view_params[8].xyz;
|
|
}
|
|
|
|
*/
|
|
vs_sky_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,
|
|
0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x33,0x5d,0x3b,0x0a,0x6f,
|
|
0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x3b,
|
|
0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x32,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,
|
|
0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x69,0x6e,
|
|
0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x76,0x65,
|
|
0x63,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x76,0x65,0x72,0x74,0x65,0x78,
|
|
0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3c,0x3c,0x20,0x31,0x29,0x20,0x26,0x20,0x32,
|
|
0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,
|
|
0x69,0x6e,0x64,0x65,0x78,0x20,0x26,0x20,0x32,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,
|
|
0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x66,0x75,0x6c,
|
|
0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x34,0x38,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,0x78,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,0x37,0x2e,
|
|
0x79,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,
|
|
0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2c,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2c,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x36,0x5d,0x2c,
|
|
0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x37,0x5d,0x29,
|
|
0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,0x37,
|
|
0x2e,0x79,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x76,0x69,
|
|
0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x2e,0x78,0x79,0x7a,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp vec4 sky_params[6];
|
|
in highp vec4 v_point;
|
|
in highp vec3 v_camera;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
layout(location = 2) out highp vec4 frag_scene;
|
|
|
|
void main()
|
|
{
|
|
highp vec3 _26 = normalize((v_point.xyz / vec3(v_point.w)) - v_camera);
|
|
highp float _44 = _26.y;
|
|
highp vec3 _62 = normalize(cross(sky_params[5].xyz, vec3(0.0, 1.0, 0.0)));
|
|
highp float _72 = dot(_26, sky_params[5].xyz);
|
|
highp vec3 _74 = _26 - (sky_params[5].xyz * _72);
|
|
highp float _84 = max(abs(dot(_74, _62)), abs(dot(_74, cross(_62, sky_params[5].xyz))));
|
|
highp float _91 = clamp((0.25 - _84) * 6.0, 0.0, 1.0);
|
|
highp vec3 color = mix(sky_params[0].xyz, sky_params[1].xyz, vec3(clamp(_44 * 2.0, 0.0, 0.699999988079071044921875))) + ((sky_params[3].xyz * _91) * _91);
|
|
bool _107 = _84 < 0.0320000015199184417724609375;
|
|
bool _114;
|
|
if (_107)
|
|
{
|
|
_114 = _72 > 0.0;
|
|
}
|
|
else
|
|
{
|
|
_114 = _107;
|
|
}
|
|
if (_114)
|
|
{
|
|
color = sky_params[2].xyz * 3.0;
|
|
}
|
|
highp vec3 _138 = color;
|
|
highp vec3 _139 = _138 + ((sky_params[4].xyz * (1.0 - clamp(abs(_44) * 20.0, 0.0, 1.0))) * 0.800000011920928955078125);
|
|
color = _139;
|
|
frag_color = vec4(_139 * sky_params[5].w, 1.0);
|
|
frag_glow = vec4(float(_114));
|
|
frag_scene = vec4(10000.0);
|
|
}
|
|
|
|
*/
|
|
fs_sky_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x36,0x5d,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x76,
|
|
0x5f,0x70,0x6f,0x69,0x6e,0x74,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,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,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x3b,0x0a,0x0a,
|
|
0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x36,
|
|
0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x76,0x5f,
|
|
0x70,0x6f,0x69,0x6e,0x74,0x2e,0x78,0x79,0x7a,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x77,0x29,0x29,0x20,0x2d,0x20,0x76,
|
|
0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x32,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x32,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x69,0x7a,0x65,0x28,0x63,0x72,0x6f,0x73,0x73,0x28,0x73,0x6b,0x79,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,
|
|
0x5f,0x32,0x36,0x2c,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x35,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x37,0x34,0x20,0x3d,0x20,0x5f,0x32,
|
|
0x36,0x20,0x2d,0x20,0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x35,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x37,0x32,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
|
|
0x38,0x34,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x61,0x62,0x73,0x28,0x64,0x6f,0x74,
|
|
0x28,0x5f,0x37,0x34,0x2c,0x20,0x5f,0x36,0x32,0x29,0x29,0x2c,0x20,0x61,0x62,0x73,
|
|
0x28,0x64,0x6f,0x74,0x28,0x5f,0x37,0x34,0x2c,0x20,0x63,0x72,0x6f,0x73,0x73,0x28,
|
|
0x5f,0x36,0x32,0x2c,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x35,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x31,0x20,
|
|
0x3d,0x20,0x63,0x6c,0x61,0x6d,0x70,0x28,0x28,0x30,0x2e,0x32,0x35,0x20,0x2d,0x20,
|
|
0x5f,0x38,0x34,0x29,0x20,0x2a,0x20,0x36,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x6d,0x69,
|
|
0x78,0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x2c,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x63,0x6c,0x61,
|
|
0x6d,0x70,0x28,0x5f,0x34,0x34,0x20,0x2a,0x20,0x32,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x30,0x2e,0x36,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,
|
|
0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x29,0x29,0x29,
|
|
0x20,0x2b,0x20,0x28,0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x33,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x39,0x31,0x29,0x20,0x2a,0x20,
|
|
0x5f,0x39,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,
|
|
0x31,0x30,0x37,0x20,0x3d,0x20,0x5f,0x38,0x34,0x20,0x3c,0x20,0x30,0x2e,0x30,0x33,
|
|
0x32,0x30,0x30,0x30,0x30,0x30,0x31,0x35,0x31,0x39,0x39,0x31,0x38,0x34,0x34,0x31,
|
|
0x37,0x37,0x32,0x34,0x36,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x31,0x30,0x37,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x34,0x20,0x3d,0x20,0x5f,0x37,
|
|
0x32,0x20,0x3e,0x20,0x30,0x2e,0x30,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,0x31,0x34,0x20,0x3d,0x20,0x5f,0x31,0x30,
|
|
0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x31,0x31,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x73,0x6b,0x79,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,
|
|
0x20,0x33,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x33,0x38,0x20,
|
|
0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x33,0x39,0x20,0x3d,0x20,0x5f,
|
|
0x31,0x33,0x38,0x20,0x2b,0x20,0x28,0x28,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x34,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,
|
|
0x20,0x2d,0x20,0x63,0x6c,0x61,0x6d,0x70,0x28,0x61,0x62,0x73,0x28,0x5f,0x34,0x34,
|
|
0x29,0x20,0x2a,0x20,0x32,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,
|
|
0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x33,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x33,
|
|
0x39,0x20,0x2a,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,
|
|
0x5d,0x2e,0x77,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x31,0x31,0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x31,0x30,0x30,0x30,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
const vec2 _23[6] = vec2[](vec2(0.0), vec2(1.0, 0.0), vec2(1.0), vec2(0.0), vec2(1.0), vec2(0.0, 1.0));
|
|
|
|
uniform vec4 view_params[13];
|
|
uniform vec4 line_params[1];
|
|
layout(location = 0) in vec3 a;
|
|
layout(location = 1) in vec3 b;
|
|
layout(location = 3) in float width;
|
|
out vec4 v_color;
|
|
layout(location = 2) in vec4 color;
|
|
|
|
vec2 quad_corner(int vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = gl_VertexID;
|
|
vec2 _37 = quad_corner(param);
|
|
mat4 _48 = mat4(view_params[0], view_params[1], view_params[2], view_params[3]);
|
|
vec4 _57 = _48 * vec4(a, 1.0);
|
|
vec4 _67 = _48 * vec4(b, 1.0);
|
|
vec2 _100 = ((_67.xy / vec2(max(_67.w, 9.9999997473787516355514526367188e-05))) * line_params[0].xy) - ((_57.xy / vec2(max(_57.w, 9.9999997473787516355514526367188e-05))) * line_params[0].xy);
|
|
vec2 dir = _100;
|
|
vec2 _106;
|
|
if (dot(_100, _100) > 9.9999997473787516355514526367188e-05)
|
|
{
|
|
_106 = normalize(dir);
|
|
}
|
|
else
|
|
{
|
|
_106 = vec2(1.0, 0.0);
|
|
}
|
|
dir = _106;
|
|
vec4 _120 = mix(_57, _67, vec4(_37.x));
|
|
vec2 _145 = _120.xy + ((((vec2(-_106.y, _106.x) * (_37.y - 0.5)) * width) / line_params[0].xy) * _120.w);
|
|
vec4 _169 = _120;
|
|
_169.x = _145.x;
|
|
_169.y = _145.y;
|
|
gl_Position = _169;
|
|
v_color = color;
|
|
}
|
|
|
|
*/
|
|
vs_line_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x63,0x6f,0x6e,0x73,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x5b,
|
|
0x36,0x5d,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x5b,0x5d,0x28,0x76,0x65,0x63,0x32,
|
|
0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,
|
|
0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x31,0x33,0x5d,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x31,0x5d,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,
|
|
0x33,0x20,0x61,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,
|
|
0x33,0x20,0x62,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,0x77,0x69,0x64,0x74,0x68,0x3b,0x0a,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,0x32,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x0a,0x76,0x65,0x63,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,
|
|
0x72,0x28,0x69,0x6e,0x74,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,
|
|
0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x5f,0x32,0x33,0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x5d,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x44,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,
|
|
0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x34,0x20,0x5f,0x34,
|
|
0x38,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x5f,0x35,0x37,0x20,0x3d,0x20,0x5f,0x34,0x38,0x20,0x2a,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x61,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x5f,0x34,0x38,0x20,
|
|
0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x62,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,
|
|
0x28,0x28,0x5f,0x36,0x37,0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x6d,0x61,0x78,0x28,0x5f,0x36,0x37,0x2e,0x77,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,
|
|
0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,
|
|
0x29,0x29,0x29,0x20,0x2a,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2d,0x20,0x28,0x28,0x5f,0x35,0x37,
|
|
0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,0x32,0x28,0x6d,0x61,0x78,0x28,0x5f,
|
|
0x35,0x37,0x2e,0x77,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,
|
|
0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,
|
|
0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x29,0x29,0x20,0x2a,
|
|
0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,
|
|
0x78,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x64,0x69,
|
|
0x72,0x20,0x3d,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x5f,0x31,0x30,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x31,0x30,0x30,0x29,
|
|
0x20,0x3e,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,
|
|
0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,
|
|
0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x36,0x20,0x3d,0x20,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x64,0x69,0x72,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,0x30,0x36,
|
|
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,0x64,0x69,0x72,
|
|
0x20,0x3d,0x20,0x5f,0x31,0x30,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x5f,0x31,0x32,0x30,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,0x35,0x37,
|
|
0x2c,0x20,0x5f,0x36,0x37,0x2c,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x33,0x37,0x2e,
|
|
0x78,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,
|
|
0x34,0x35,0x20,0x3d,0x20,0x5f,0x31,0x32,0x30,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,
|
|
0x28,0x28,0x28,0x76,0x65,0x63,0x32,0x28,0x2d,0x5f,0x31,0x30,0x36,0x2e,0x79,0x2c,
|
|
0x20,0x5f,0x31,0x30,0x36,0x2e,0x78,0x29,0x20,0x2a,0x20,0x28,0x5f,0x33,0x37,0x2e,
|
|
0x79,0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x77,0x69,0x64,0x74,
|
|
0x68,0x29,0x20,0x2f,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x5f,0x31,0x32,0x30,0x2e,0x77,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x36,0x39,
|
|
0x20,0x3d,0x20,0x5f,0x31,0x32,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x36,
|
|
0x39,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x31,0x34,0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x5f,0x31,0x36,0x39,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x31,0x34,0x35,0x2e,
|
|
0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
layout(location = 1) out highp vec4 frag_glow;
|
|
in highp vec4 v_color;
|
|
|
|
void write_transparent(highp vec4 color, highp float glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = vec4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec4 param = v_color;
|
|
highp float param_1 = 0.0;
|
|
write_transparent(param, param_1);
|
|
}
|
|
|
|
*/
|
|
fs_line_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x69,0x6e,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,
|
|
0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,
|
|
0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,
|
|
0x3d,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x31,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,
|
|
0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct ui_vs_params
|
|
{
|
|
float2 screen_size;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float2 v_uv [[user(locn0)]];
|
|
float4 v_color [[user(locn1)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 position [[attribute(0)]];
|
|
float2 uv [[attribute(1)]];
|
|
float4 color0 [[attribute(2)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant ui_vs_params& _15 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
float2 _26 = ((in.position / _15.screen_size) * 2.0) - float2(1.0);
|
|
out.gl_Position = float4(_26.x, -_26.y, 0.0, 1.0);
|
|
out.v_uv = in.uv;
|
|
out.v_color = in.color0;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_ui_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x75,
|
|
0x69,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
|
|
0x73,0x69,0x7a,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
|
|
0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x5f,0x75,0x76,0x20,0x5b,0x5b,0x75,
|
|
0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,0x29,0x5d,0x5d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,
|
|
0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,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,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,
|
|
0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,
|
|
0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,
|
|
0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,
|
|
0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x74,0x20,0x75,0x69,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x26,0x20,0x5f,0x31,0x35,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,
|
|
0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x32,0x36,0x20,0x3d,
|
|
0x20,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2f,
|
|
0x20,0x5f,0x31,0x35,0x2e,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x73,0x69,0x7a,0x65,
|
|
0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x5f,0x32,0x36,0x2e,0x78,0x2c,0x20,0x2d,0x5f,0x32,0x36,
|
|
0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,
|
|
0x2e,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 v_uv [[user(locn0)]];
|
|
float4 v_color [[user(locn1)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.frag_color = tex.sample(smp, in.v_uv) * in.v_color;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_ui_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
|
|
0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
|
0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
|
|
0x76,0x5f,0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
|
|
0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,
|
|
0x6c,0x6f,0x63,0x6e,0x31,0x29,0x5d,0x5d,0x3b,0x0a,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,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,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
|
0x20,0x74,0x65,0x78,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x69,0x6e,0x2e,0x76,0x5f,0x75,0x76,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x76,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float2 fullscreen_position(thread const int& vertex_index)
|
|
{
|
|
return (float2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - float2(1.0);
|
|
}
|
|
|
|
vertex main0_out main0(uint gl_VertexIndex [[vertex_id]])
|
|
{
|
|
main0_out out = {};
|
|
int param = int(gl_VertexIndex);
|
|
out.gl_Position = float4(fullscreen_position(param), 0.0, 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_fullscreen_source_metal_macos := u8.[
|
|
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,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,0x67,
|
|
0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,
|
|
0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,
|
|
0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,
|
|
0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,
|
|
0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x69,0x6e,0x74,0x26,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,
|
|
0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3c,0x3c,
|
|
0x20,0x31,0x29,0x20,0x26,0x20,0x32,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x26,0x20,0x32,
|
|
0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,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,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,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,
|
|
0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,
|
|
0x65,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,
|
|
0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x28,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,
|
|
0x69,0x74,0x69,0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 glowing(thread const int2& p, texture2d<float> bloom_source, sampler bloom_smp, texture2d<float> bloom_glow)
|
|
{
|
|
return bloom_source.read(uint2(p), 0).xyz * bloom_glow.read(uint2(p), 0).x;
|
|
}
|
|
|
|
fragment main0_out main0(texture2d<float> bloom_source [[texture(0)]], texture2d<float> bloom_glow [[texture(1)]], sampler bloom_smp [[sampler(0)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
int2 _53 = int2(gl_FragCoord.xy) * int2(2);
|
|
int2 param = _53;
|
|
int2 param_1 = _53 + int2(1, 0);
|
|
int2 param_2 = _53 + int2(0, 1);
|
|
int2 param_3 = _53 + int2(1);
|
|
out.frag_color = float4((((glowing(param, bloom_source, bloom_smp, bloom_glow) + glowing(param_1, bloom_source, bloom_smp, bloom_glow)) + glowing(param_2, bloom_source, bloom_smp, bloom_glow)) + glowing(param_3, bloom_source, bloom_smp, bloom_glow)) * 0.25, 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_bloom_glow_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,
|
|
0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,
|
|
0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,
|
|
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
|
|
0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x69,0x6e,0x74,0x32,0x26,0x20,0x70,0x2c,0x20,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,
|
|
0x32,0x28,0x70,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,
|
|
0x69,0x6e,0x74,0x32,0x28,0x70,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x3b,0x0a,0x7d,
|
|
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,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x31,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x73,0x6d,0x70,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,0x69,0x6e,0x74,0x32,0x20,0x5f,0x35,0x33,0x20,
|
|
0x3d,0x20,0x69,0x6e,0x74,0x32,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,
|
|
0x6f,0x72,0x64,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x69,0x6e,0x74,0x32,0x28,0x32,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x32,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x20,0x3d,0x20,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x33,0x20,
|
|
0x2b,0x20,0x69,0x6e,0x74,0x32,0x28,0x31,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x6e,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,
|
|
0x20,0x5f,0x35,0x33,0x20,0x2b,0x20,0x69,0x6e,0x74,0x32,0x28,0x30,0x2c,0x20,0x31,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x32,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x35,0x33,0x20,0x2b,0x20,0x69,0x6e,0x74,0x32,
|
|
0x28,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,
|
|
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x28,0x28,0x28,0x28,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x20,0x2b,0x20,0x67,0x6c,0x6f,0x77,0x69,0x6e,
|
|
0x67,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,
|
|
0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x29,
|
|
0x20,0x2b,0x20,0x67,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x32,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,
|
|
0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x29,0x20,0x2b,0x20,0x67,0x6c,0x6f,0x77,
|
|
0x69,0x6e,0x67,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,
|
|
0x5f,0x73,0x6d,0x70,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x67,0x6c,0x6f,0x77,
|
|
0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 tap(thread const float2& uv, texture2d<float> bloom_source, sampler bloom_smp)
|
|
{
|
|
return bloom_source.sample(bloom_smp, uv).xyz;
|
|
}
|
|
|
|
fragment main0_out main0(texture2d<float> bloom_source [[texture(0)]], sampler bloom_smp [[sampler(0)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float2 _40 = float2(int2(bloom_source.get_width(), bloom_source.get_height()));
|
|
float2 _42 = float2(1.0) / _40;
|
|
float2 _51 = (gl_FragCoord.xy * 2.0) * _42;
|
|
float2 param = _51 + (float2(-1.0) / _40);
|
|
float2 param_1 = _51 + (float2(1.0, -1.0) / _40);
|
|
float2 param_2 = _51 + (float2(-1.0, 1.0) / _40);
|
|
float2 param_3 = _51 + _42;
|
|
out.frag_color = float4((((tap(param, bloom_source, bloom_smp) + tap(param_1, bloom_source, bloom_smp)) + tap(param_2, bloom_source, bloom_smp)) + tap(param_3, bloom_source, bloom_smp)) * 0.25, 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_bloom_down_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,
|
|
0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,
|
|
0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,
|
|
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
|
|
0x74,0x61,0x70,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,0x20,0x75,0x76,0x2c,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x62,0x6c,
|
|
0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x3b,0x0a,0x7d,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,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x5b,0x5b,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,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,0x32,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6f,0x75,0x72,0x63,0x65,0x2e,0x67,0x65,0x74,0x5f,0x77,0x69,0x64,0x74,0x68,0x28,
|
|
0x29,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,
|
|
0x67,0x65,0x74,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,0x29,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x34,0x32,0x20,0x3d,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,
|
|
0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,
|
|
0x35,0x31,0x20,0x3d,0x20,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,
|
|
0x72,0x64,0x2e,0x78,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2a,0x20,0x5f,
|
|
0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x31,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x33,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,0x28,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,
|
|
0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,
|
|
0x70,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x33,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x29,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 tap(thread const float2& uv, texture2d<float> bloom_source, sampler bloom_smp)
|
|
{
|
|
return bloom_source.sample(bloom_smp, uv).xyz;
|
|
}
|
|
|
|
fragment main0_out main0(texture2d<float> bloom_source [[texture(0)]], sampler bloom_smp [[sampler(0)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float2 _40 = float2(int2(bloom_source.get_width(), bloom_source.get_height()));
|
|
float2 _42 = float2(1.0) / _40;
|
|
float2 _51 = (gl_FragCoord.xy * 0.5) * _42;
|
|
float2 param = _51;
|
|
float2 param_1 = _51 + (float2(-1.0, 0.0) / _40);
|
|
float2 param_2 = _51 + (float2(1.0, 0.0) / _40);
|
|
float2 param_3 = _51 + (float2(0.0, -1.0) / _40);
|
|
float2 param_4 = _51 + (float2(0.0, 1.0) / _40);
|
|
float2 param_5 = _51 + (float2(-1.0) / _40);
|
|
float2 param_6 = _51 + (float2(1.0, -1.0) / _40);
|
|
float2 param_7 = _51 + (float2(-1.0, 1.0) / _40);
|
|
float2 param_8 = _51 + _42;
|
|
out.frag_color = float4((((tap(param, bloom_source, bloom_smp) * 4.0) + ((((tap(param_1, bloom_source, bloom_smp) + tap(param_2, bloom_source, bloom_smp)) + tap(param_3, bloom_source, bloom_smp)) + tap(param_4, bloom_source, bloom_smp)) * 2.0)) + (((tap(param_5, bloom_source, bloom_smp) + tap(param_6, bloom_source, bloom_smp)) + tap(param_7, bloom_source, bloom_smp)) + tap(param_8, bloom_source, bloom_smp))) * float3(0.0625), 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_bloom_up_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,
|
|
0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,
|
|
0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,
|
|
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
|
|
0x74,0x61,0x70,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,0x20,0x75,0x76,0x2c,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x62,0x6c,
|
|
0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x3b,0x0a,0x7d,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,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x5b,0x5b,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,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,0x32,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6f,0x75,0x72,0x63,0x65,0x2e,0x67,0x65,0x74,0x5f,0x77,0x69,0x64,0x74,0x68,0x28,
|
|
0x29,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,
|
|
0x67,0x65,0x74,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,0x29,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x34,0x32,0x20,0x3d,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,
|
|
0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,
|
|
0x35,0x31,0x20,0x3d,0x20,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,
|
|
0x72,0x64,0x2e,0x78,0x79,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,
|
|
0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,
|
|
0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,
|
|
0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x20,0x2f,
|
|
0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,
|
|
0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x2d,
|
|
0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,
|
|
0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x2d,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x28,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x31,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x34,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x38,0x20,0x3d,0x20,0x5f,0x35,0x31,0x20,0x2b,0x20,0x5f,0x34,0x32,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,0x28,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,
|
|
0x29,0x20,0x2a,0x20,0x34,0x2e,0x30,0x29,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,0x74,
|
|
0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x73,0x6d,0x70,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x32,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,
|
|
0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x29,0x20,0x2b,0x20,
|
|
0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,
|
|
0x5f,0x73,0x6d,0x70,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x34,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,
|
|
0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x29,0x20,
|
|
0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x28,0x74,0x61,0x70,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,
|
|
0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,
|
|
0x70,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,
|
|
0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,
|
|
0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,
|
|
0x70,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,
|
|
0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,
|
|
0x6d,0x70,0x29,0x29,0x20,0x2b,0x20,0x74,0x61,0x70,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x38,0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,
|
|
0x2c,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x73,0x6d,0x70,0x29,0x29,0x29,0x20,0x2a,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct view_params
|
|
{
|
|
float4x4 view_proj;
|
|
float4x4 inv_view_proj;
|
|
float4 camera;
|
|
float4 clip;
|
|
float4 sun_direction;
|
|
float4 sun_color;
|
|
float4 shade_color;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 v_point [[user(locn0)]];
|
|
float3 v_camera [[user(locn1)]];
|
|
float3 v_sun [[user(locn2)]];
|
|
float v_time [[user(locn3)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float2 fullscreen_position(thread const int& vertex_index)
|
|
{
|
|
return (float2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - float2(1.0);
|
|
}
|
|
|
|
vertex main0_out main0(constant view_params& _57 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]])
|
|
{
|
|
main0_out out = {};
|
|
int param = int(gl_VertexIndex);
|
|
float2 _37 = fullscreen_position(param);
|
|
float _48 = _37.x;
|
|
out.gl_Position = float4(_48, _37.y, 0.0, 1.0);
|
|
out.v_point = _57.inv_view_proj * float4(_48, _37.y, 0.5, 1.0);
|
|
out.v_camera = _57.camera.xyz;
|
|
out.v_sun = _57.sun_color.xyz;
|
|
out.v_time = _57.camera.w;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_shafts_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x0a,0x7b,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,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,
|
|
0x65,0x63,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
|
|
0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,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,0x33,0x20,0x76,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,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,0x33,
|
|
0x20,0x76,0x5f,0x73,0x75,0x6e,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,0x74,0x69,0x6d,0x65,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,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,
|
|
0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,
|
|
0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,
|
|
0x6e,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x69,0x6e,0x74,0x26,0x20,0x76,0x65,0x72,
|
|
0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,
|
|
0x64,0x65,0x78,0x20,0x3c,0x3c,0x20,0x31,0x29,0x20,0x26,0x20,0x32,0x29,0x2c,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,
|
|
0x65,0x78,0x20,0x26,0x20,0x32,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,
|
|
0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,
|
|
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,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,
|
|
0x35,0x37,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,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,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,
|
|
0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,
|
|
0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,
|
|
0x33,0x37,0x20,0x3d,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
|
|
0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x38,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,0x37,0x2e,0x79,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x6f,0x75,0x74,0x2e,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x20,0x3d,0x20,0x5f,0x35,
|
|
0x37,0x2e,0x69,0x6e,0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20,
|
|
0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,
|
|
0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,
|
|
0x20,0x3d,0x20,0x5f,0x35,0x37,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,0x78,0x79,
|
|
0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x75,0x6e,
|
|
0x20,0x3d,0x20,0x5f,0x35,0x37,0x2e,0x73,0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,
|
|
0x74,0x69,0x6d,0x65,0x20,0x3d,0x20,0x5f,0x35,0x37,0x2e,0x63,0x61,0x6d,0x65,0x72,
|
|
0x61,0x2e,0x77,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;
|
|
|
|
struct shaft_params
|
|
{
|
|
float density;
|
|
float amount;
|
|
float max_distance;
|
|
float steps;
|
|
};
|
|
|
|
struct shadow_params
|
|
{
|
|
float4x4 shadow_uv;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 v_point [[user(locn0)]];
|
|
float3 v_camera [[user(locn1)]];
|
|
float3 v_sun [[user(locn2)]];
|
|
float v_time [[user(locn3)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float brightest(thread const float3& c)
|
|
{
|
|
return fast::max(c.x, fast::max(c.y, c.z));
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float hash(thread float3& p)
|
|
{
|
|
p = fract((p * 0.31830990314483642578125) + float3(0.100000001490116119384765625));
|
|
p *= 17.0;
|
|
return fract(((p.x * p.y) * p.z) * ((p.x + p.y) + p.z));
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float value_noise(thread const float3& p)
|
|
{
|
|
float3 _69 = floor(p);
|
|
float3 _72 = fract(p);
|
|
float3 _82 = (_72 * _72) * (float3(3.0) - (_72 * 2.0));
|
|
float3 param = _69;
|
|
float _85 = hash(param);
|
|
float3 param_1 = _69 + float3(1.0, 0.0, 0.0);
|
|
float _92 = hash(param_1);
|
|
float _94 = _82.x;
|
|
float3 param_2 = _69 + float3(0.0, 1.0, 0.0);
|
|
float _100 = hash(param_2);
|
|
float3 param_3 = _69 + float3(1.0, 1.0, 0.0);
|
|
float _105 = hash(param_3);
|
|
float _110 = _82.y;
|
|
float3 param_4 = _69 + float3(0.0, 0.0, 1.0);
|
|
float _116 = hash(param_4);
|
|
float3 param_5 = _69 + float3(1.0, 0.0, 1.0);
|
|
float _121 = hash(param_5);
|
|
float3 param_6 = _69 + float3(0.0, 1.0, 1.0);
|
|
float _129 = hash(param_6);
|
|
float3 param_7 = _69 + float3(1.0);
|
|
float _134 = hash(param_7);
|
|
return mix(mix(mix(_85, _92, _94), mix(_100, _105, _94), _110), mix(mix(_116, _121, _94), mix(_129, _134, _94), _110), _82.z);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float dust(thread const float3& p, thread float& v_time)
|
|
{
|
|
float3 _149 = p * 0.800000011920928955078125;
|
|
float3 param = _149 + ((float3(0.4000000059604644775390625, 0.1500000059604644775390625, 0.300000011920928955078125) * v_time) * 0.800000011920928955078125);
|
|
float3 param_1 = (_149 * 2.2999999523162841796875) - (((float3(0.300000011920928955078125, 0.4000000059604644775390625, 0.1500000059604644775390625) * v_time) * 0.800000011920928955078125) * 1.7000000476837158203125);
|
|
return mix(0.0, 2.0, smoothstep(0.25, 0.75, (value_noise(param) * 0.64999997615814208984375) + (value_noise(param_1) * 0.3499999940395355224609375)));
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant shaft_params& _232 [[buffer(0)]], constant shadow_params& _292 [[buffer(1)]], texture2d<float> shaft_scene [[texture(0)]], texture2d<float> shadow_tint [[texture(1)]], depth2d<float> shadow_map [[texture(2)]], sampler shaft_scene_smp [[sampler(0)]], sampler shadow_tint_smp [[sampler(1)]], sampler shadow_smp [[sampler(2)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float3 _204 = fast::normalize((in.v_point.xyz / float3(in.v_point.w)) - in.v_camera);
|
|
float _242 = fast::min(shaft_scene.read(uint2((int2(gl_FragCoord.xy) * int2(2))), 0).x, _232.max_distance) / _232.steps;
|
|
float _253 = fract(52.98291778564453125 * fract(dot(gl_FragCoord.xy, float2(0.067110560834407806396484375, 0.005837149918079376220703125))));
|
|
float3 light = float3(0.0);
|
|
for (float i = 0.0; i < _232.steps; i += 1.0)
|
|
{
|
|
float _272 = (i + _253) * _242;
|
|
float3 _286 = (floor((in.v_camera + (_204 * _272)) * 16.0) + float3(0.5)) * float3(0.0625);
|
|
float4 _301 = _292.shadow_uv * float4(_286, 1.0);
|
|
float _303 = _301.x;
|
|
bool _304 = _303 < 0.0;
|
|
bool _311;
|
|
if (!_304)
|
|
{
|
|
_311 = _303 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_311 = _304;
|
|
}
|
|
bool _318;
|
|
if (!_311)
|
|
{
|
|
_318 = _301.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_318 = _311;
|
|
}
|
|
bool _325;
|
|
if (!_318)
|
|
{
|
|
_325 = _301.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_325 = _318;
|
|
}
|
|
bool _332;
|
|
if (!_325)
|
|
{
|
|
_332 = _301.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_332 = _325;
|
|
}
|
|
if (_332)
|
|
{
|
|
continue;
|
|
}
|
|
float4 _344 = shadow_tint.sample(shadow_tint_smp, _301.xy);
|
|
float _346 = _301.z;
|
|
if (_346 < (_344.w + 0.001000000047497451305389404296875))
|
|
{
|
|
continue;
|
|
}
|
|
float _368 = _346 - 0.0005000000237487256526947021484375;
|
|
float3 _377 = _344.xyz;
|
|
float3 param = _377;
|
|
float3 param_1 = _286;
|
|
light += (((mix(float3(brightest(param)), _377, float3(0.60000002384185791015625)) * shadow_map.sample_compare(shadow_smp, float3(_303, _301.y, _368).xy, _368)) * exp((-_232.density) * _272)) * dust(param_1, in.v_time));
|
|
}
|
|
out.frag_color = float4((((light * in.v_sun) * _232.density) * _242) * _232.amount, 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_shafts_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x64,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x61,0x6d,0x6f,0x75,0x6e,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x6d,0x61,0x78,0x5f,0x64,0x69,0x73,0x74,0x61,0x6e,
|
|
0x63,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x74,
|
|
0x65,0x70,0x73,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x75,0x76,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,
|
|
0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,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,0x33,0x20,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,
|
|
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,0x33,0x20,0x76,0x5f,0x73,
|
|
0x75,0x6e,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,
|
|
0x74,0x69,0x6d,0x65,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
|
|
0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
|
|
0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,
|
|
0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,
|
|
0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,
|
|
0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x63,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x73,0x74,
|
|
0x3a,0x3a,0x6d,0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,0x66,0x61,0x73,0x74,0x3a,
|
|
0x3a,0x6d,0x61,0x78,0x28,0x63,0x2e,0x79,0x2c,0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,
|
|
0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,
|
|
0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,
|
|
0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x73,0x68,0x28,0x74,0x68,0x72,0x65,
|
|
0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x70,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x70,0x20,0x3d,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x28,0x70,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x33,0x31,0x38,0x33,0x30,0x39,0x39,0x30,0x33,0x31,0x34,
|
|
0x34,0x38,0x33,0x36,0x34,0x32,0x35,0x37,0x38,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,
|
|
0x35,0x36,0x32,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,0x20,0x2a,0x3d,
|
|
0x20,0x31,0x37,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x28,0x28,0x70,0x2e,0x78,0x20,0x2a,0x20,
|
|
0x70,0x2e,0x79,0x29,0x20,0x2a,0x20,0x70,0x2e,0x7a,0x29,0x20,0x2a,0x20,0x28,0x28,
|
|
0x70,0x2e,0x78,0x20,0x2b,0x20,0x70,0x2e,0x79,0x29,0x20,0x2b,0x20,0x70,0x2e,0x7a,
|
|
0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,
|
|
0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,
|
|
0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,
|
|
0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x5f,
|
|
0x6e,0x6f,0x69,0x73,0x65,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x70,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x36,0x39,0x20,0x3d,
|
|
0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x66,0x72,0x61,0x63,
|
|
0x74,0x28,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x5f,0x38,0x32,0x20,0x3d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x5f,0x37,
|
|
0x32,0x29,0x20,0x2a,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x33,0x2e,0x30,
|
|
0x29,0x20,0x2d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x38,0x35,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,
|
|
0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x39,0x32,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x39,0x34,0x20,0x3d,0x20,0x5f,0x38,0x32,0x2e,0x78,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x32,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,0x30,0x20,
|
|
0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,
|
|
0x35,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x31,
|
|
0x30,0x20,0x3d,0x20,0x5f,0x38,0x32,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x36,0x39,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x31,0x36,0x20,0x3d,0x20,0x68,0x61,
|
|
0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,
|
|
0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,
|
|
0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x32,0x31,0x20,0x3d,0x20,
|
|
0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x36,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x32,0x39,0x20,
|
|
0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x36,0x39,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x31,0x33,0x34,0x20,0x3d,0x20,0x68,0x61,0x73,0x68,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,
|
|
0x5f,0x38,0x35,0x2c,0x20,0x5f,0x39,0x32,0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,
|
|
0x6d,0x69,0x78,0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x31,0x30,0x35,0x2c,0x20,
|
|
0x5f,0x39,0x34,0x29,0x2c,0x20,0x5f,0x31,0x31,0x30,0x29,0x2c,0x20,0x6d,0x69,0x78,
|
|
0x28,0x6d,0x69,0x78,0x28,0x5f,0x31,0x31,0x36,0x2c,0x20,0x5f,0x31,0x32,0x31,0x2c,
|
|
0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x5f,0x31,0x32,0x39,0x2c,
|
|
0x20,0x5f,0x31,0x33,0x34,0x2c,0x20,0x5f,0x39,0x34,0x29,0x2c,0x20,0x5f,0x31,0x31,
|
|
0x30,0x29,0x2c,0x20,0x5f,0x38,0x32,0x2e,0x7a,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,
|
|
0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,
|
|
0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,
|
|
0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x64,0x75,0x73,0x74,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x70,0x2c,0x20,0x74,
|
|
0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x76,0x5f,0x74,
|
|
0x69,0x6d,0x65,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x5f,0x31,0x34,0x39,0x20,0x3d,0x20,0x70,0x20,0x2a,0x20,0x30,0x2e,0x38,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,
|
|
0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x34,0x39,
|
|
0x20,0x2b,0x20,0x28,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x34,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,
|
|
0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x31,0x35,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,
|
|
0x30,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,
|
|
0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,
|
|
0x29,0x20,0x2a,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,0x29,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,
|
|
0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,
|
|
0x28,0x5f,0x31,0x34,0x39,0x20,0x2a,0x20,0x32,0x2e,0x32,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x32,0x33,0x31,0x36,0x32,0x38,0x34,0x31,0x37,0x39,0x36,0x38,0x37,0x35,
|
|
0x29,0x20,0x2d,0x20,0x28,0x28,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,
|
|
0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x34,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,
|
|
0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x31,0x35,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,
|
|
0x32,0x35,0x29,0x20,0x2a,0x20,0x76,0x5f,0x74,0x69,0x6d,0x65,0x29,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,
|
|
0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,0x31,0x2e,
|
|
0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,
|
|
0x32,0x30,0x33,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,
|
|
0x2c,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x32,
|
|
0x35,0x2c,0x20,0x30,0x2e,0x37,0x35,0x2c,0x20,0x28,0x76,0x61,0x6c,0x75,0x65,0x5f,
|
|
0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x36,0x34,0x39,0x39,0x39,0x39,0x39,0x37,0x36,0x31,0x35,0x38,0x31,0x34,0x32,
|
|
0x30,0x38,0x39,0x38,0x34,0x33,0x37,0x35,0x29,0x20,0x2b,0x20,0x28,0x76,0x61,0x6c,
|
|
0x75,0x65,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x34,0x39,0x39,0x39,0x39,0x39,0x39,0x34,0x30,
|
|
0x33,0x39,0x35,0x33,0x35,0x35,0x32,0x32,0x34,0x36,0x30,0x39,0x33,0x37,0x35,0x29,
|
|
0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,
|
|
0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,
|
|
0x6e,0x74,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
|
|
0x20,0x5f,0x32,0x33,0x32,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x32,0x39,
|
|
0x32,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,
|
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x3e,0x20,0x73,0x68,0x61,0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x5b,0x5b,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x20,0x5b,0x5b,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x64,0x65,0x70,0x74,0x68,
|
|
0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x6d,0x61,0x70,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x32,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,
|
|
0x66,0x74,0x5f,0x73,0x63,0x65,0x6e,0x65,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,
|
|
0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x31,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x28,0x32,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,0x33,0x20,0x5f,
|
|
0x32,0x30,0x34,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x70,0x6f,0x69,0x6e,
|
|
0x74,0x2e,0x78,0x79,0x7a,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x69,
|
|
0x6e,0x2e,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x77,0x29,0x29,0x20,0x2d,0x20,
|
|
0x69,0x6e,0x2e,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x32,0x20,0x3d,0x20,0x66,
|
|
0x61,0x73,0x74,0x3a,0x3a,0x6d,0x69,0x6e,0x28,0x73,0x68,0x61,0x66,0x74,0x5f,0x73,
|
|
0x63,0x65,0x6e,0x65,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x32,0x28,
|
|
0x28,0x69,0x6e,0x74,0x32,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,
|
|
0x72,0x64,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x69,0x6e,0x74,0x32,0x28,0x32,0x29,
|
|
0x29,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x2c,0x20,0x5f,0x32,0x33,0x32,0x2e,0x6d,
|
|
0x61,0x78,0x5f,0x64,0x69,0x73,0x74,0x61,0x6e,0x63,0x65,0x29,0x20,0x2f,0x20,0x5f,
|
|
0x32,0x33,0x32,0x2e,0x73,0x74,0x65,0x70,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x35,0x33,0x20,0x3d,0x20,0x66,0x72,0x61,0x63,
|
|
0x74,0x28,0x35,0x32,0x2e,0x39,0x38,0x32,0x39,0x31,0x37,0x37,0x38,0x35,0x36,0x34,
|
|
0x34,0x35,0x33,0x31,0x32,0x35,0x20,0x2a,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x64,
|
|
0x6f,0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,
|
|
0x78,0x79,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x36,0x37,
|
|
0x31,0x31,0x30,0x35,0x36,0x30,0x38,0x33,0x34,0x34,0x30,0x37,0x38,0x30,0x36,0x33,
|
|
0x39,0x36,0x34,0x38,0x34,0x33,0x37,0x35,0x2c,0x20,0x30,0x2e,0x30,0x30,0x35,0x38,
|
|
0x33,0x37,0x31,0x34,0x39,0x39,0x31,0x38,0x30,0x37,0x39,0x33,0x37,0x36,0x32,0x32,
|
|
0x30,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6f,0x72,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x69,0x20,0x3d,0x20,
|
|
0x30,0x2e,0x30,0x3b,0x20,0x69,0x20,0x3c,0x20,0x5f,0x32,0x33,0x32,0x2e,0x73,0x74,
|
|
0x65,0x70,0x73,0x3b,0x20,0x69,0x20,0x2b,0x3d,0x20,0x31,0x2e,0x30,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x32,0x37,0x32,0x20,0x3d,0x20,0x28,0x69,0x20,0x2b,0x20,0x5f,
|
|
0x32,0x35,0x33,0x29,0x20,0x2a,0x20,0x5f,0x32,0x34,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x38,0x36,
|
|
0x20,0x3d,0x20,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x2b,0x20,0x28,0x5f,0x32,0x30,0x34,0x20,0x2a,
|
|
0x20,0x5f,0x32,0x37,0x32,0x29,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,
|
|
0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
|
|
0x5f,0x33,0x30,0x31,0x20,0x3d,0x20,0x5f,0x32,0x39,0x32,0x2e,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x75,0x76,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,
|
|
0x32,0x38,0x36,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x30,0x33,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x30,0x31,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x30,0x34,0x20,0x3d,0x20,0x5f,0x33,0x30,0x33,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x31,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x30,0x34,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x33,0x31,0x31,0x20,0x3d,0x20,0x5f,0x33,0x30,0x33,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x31,0x31,0x20,0x3d,0x20,0x5f,0x33,0x30,0x34,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x31,0x38,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x31,0x31,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x31,0x38,0x20,0x3d,0x20,0x5f,0x33,
|
|
0x30,0x31,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x5f,0x33,0x31,0x38,0x20,0x3d,0x20,
|
|
0x5f,0x33,0x31,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,0x32,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x33,0x31,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,0x5f,0x33,0x32,0x35,
|
|
0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x5f,0x33,
|
|
0x32,0x35,0x20,0x3d,0x20,0x5f,0x33,0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x33,0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x32,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x5f,0x33,0x33,0x32,0x20,0x3d,0x20,0x5f,0x33,0x30,0x31,0x2e,0x7a,0x20,0x3e,
|
|
0x20,0x31,0x2e,0x30,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,0x5f,0x33,0x33,0x32,0x20,0x3d,0x20,0x5f,0x33,0x32,0x35,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x33,0x32,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x5f,0x33,0x34,0x34,0x20,0x3d,0x20,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x5f,0x33,0x30,0x31,0x2e,0x78,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x34,0x36,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x30,0x31,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x33,0x34,0x36,0x20,0x3c,0x20,0x28,0x5f,0x33,0x34,0x34,0x2e,
|
|
0x77,0x20,0x2b,0x20,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,0x29,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x33,0x36,0x38,0x20,0x3d,0x20,0x5f,0x33,0x34,0x36,0x20,0x2d,0x20,
|
|
0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x37,0x34,
|
|
0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,0x32,0x31,0x34,0x38,
|
|
0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x5f,0x33,0x37,0x37,0x20,0x3d,0x20,0x5f,0x33,0x34,0x34,
|
|
0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x33,0x37,
|
|
0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x32,0x38,0x36,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,
|
|
0x2b,0x3d,0x20,0x28,0x28,0x28,0x6d,0x69,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x29,0x29,0x2c,0x20,0x5f,0x33,0x37,0x37,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x30,0x2e,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x38,0x34,0x31,0x38,
|
|
0x35,0x37,0x39,0x31,0x30,0x31,0x35,0x36,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x5f,0x63,0x6f,0x6d,0x70,0x61,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x33,0x30,0x33,
|
|
0x2c,0x20,0x5f,0x33,0x30,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x33,0x36,0x38,0x29,0x2e,
|
|
0x78,0x79,0x2c,0x20,0x5f,0x33,0x36,0x38,0x29,0x29,0x20,0x2a,0x20,0x65,0x78,0x70,
|
|
0x28,0x28,0x2d,0x5f,0x32,0x33,0x32,0x2e,0x64,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,
|
|
0x20,0x2a,0x20,0x5f,0x32,0x37,0x32,0x29,0x29,0x20,0x2a,0x20,0x64,0x75,0x73,0x74,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x74,
|
|
0x69,0x6d,0x65,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,0x28,0x6c,0x69,0x67,0x68,
|
|
0x74,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x75,0x6e,0x29,0x20,0x2a,0x20,
|
|
0x5f,0x32,0x33,0x32,0x2e,0x64,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x20,0x2a,0x20,
|
|
0x5f,0x32,0x34,0x32,0x29,0x20,0x2a,0x20,0x5f,0x32,0x33,0x32,0x2e,0x61,0x6d,0x6f,
|
|
0x75,0x6e,0x74,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct post_params
|
|
{
|
|
float exposure;
|
|
float contrast;
|
|
float saturation;
|
|
float bloom_amount;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
fragment main0_out main0(constant post_params& _51 [[buffer(0)]], texture2d<float> view_color [[texture(0)]], texture2d<float> bloom [[texture(1)]], texture2d<float> shafts [[texture(2)]], sampler view_smp [[sampler(0)]], sampler bloom_view_smp [[sampler(1)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float2 _31 = gl_FragCoord.xy / float2(int2(view_color.get_width(), view_color.get_height()));
|
|
float2 _67 = float2(int2(shafts.get_width(), shafts.get_height()));
|
|
float3 _142 = (((((view_color.sample(view_smp, _31).xyz + (bloom.sample(bloom_view_smp, _31).xyz * _51.bloom_amount)) + ((((((shafts.sample(bloom_view_smp, _31).xyz * 2.0) + shafts.sample(bloom_view_smp, (_31 + (float2(1.0) / _67))).xyz) + shafts.sample(bloom_view_smp, (_31 + (float2(-1.0, 1.0) / _67))).xyz) + shafts.sample(bloom_view_smp, (_31 + (float2(1.0, -1.0) / _67))).xyz) + shafts.sample(bloom_view_smp, (_31 + (float2(-1.0) / _67))).xyz) * float3(0.16666667163372039794921875))) * exp2(_51.exposure)) - float3(0.5)) * _51.contrast) + float3(0.5);
|
|
out.frag_color = float4(fast::clamp(mix(float3(dot(_142, float3(0.2125999927520751953125, 0.715200006961822509765625, 0.072200000286102294921875))), _142, float3(_51.saturation)), float3(0.0), float3(1.0)), 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_post_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,
|
|
0x6f,0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x65,0x78,0x70,0x6f,0x73,0x75,0x72,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x6e,0x74,0x72,
|
|
0x61,0x73,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,
|
|
0x61,0x74,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x61,0x6d,0x6f,0x75,0x6e,
|
|
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,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,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,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x61,0x6e,0x74,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
|
|
0x20,0x5f,0x35,0x31,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,
|
|
0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x3e,0x20,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,
|
|
0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x66,0x74,0x73,0x20,0x5b,
|
|
0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x20,
|
|
0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,
|
|
0x65,0x77,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x28,0x31,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,0x32,0x20,0x5f,0x33,
|
|
0x31,0x20,0x3d,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,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x67,0x65,0x74,
|
|
0x5f,0x77,0x69,0x64,0x74,0x68,0x28,0x29,0x2c,0x20,0x76,0x69,0x65,0x77,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x2e,0x67,0x65,0x74,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,
|
|
0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
|
|
0x5f,0x36,0x37,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x69,0x6e,0x74,
|
|
0x32,0x28,0x73,0x68,0x61,0x66,0x74,0x73,0x2e,0x67,0x65,0x74,0x5f,0x77,0x69,0x64,
|
|
0x74,0x68,0x28,0x29,0x2c,0x20,0x73,0x68,0x61,0x66,0x74,0x73,0x2e,0x67,0x65,0x74,
|
|
0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,0x34,0x32,0x20,0x3d,0x20,0x28,
|
|
0x28,0x28,0x28,0x28,0x76,0x69,0x65,0x77,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,0x20,0x28,0x62,0x6c,0x6f,0x6f,
|
|
0x6d,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,
|
|
0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,0x29,0x2e,0x78,0x79,
|
|
0x7a,0x20,0x2a,0x20,0x5f,0x35,0x31,0x2e,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x61,0x6d,
|
|
0x6f,0x75,0x6e,0x74,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,0x28,0x28,0x73,
|
|
0x68,0x61,0x66,0x74,0x73,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x31,
|
|
0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,0x73,
|
|
0x68,0x61,0x66,0x74,0x73,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x62,0x6c,0x6f,
|
|
0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x5f,0x33,
|
|
0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,
|
|
0x20,0x73,0x68,0x61,0x66,0x74,0x73,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,
|
|
0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x31,
|
|
0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,
|
|
0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,0x73,0x68,0x61,0x66,0x74,0x73,0x2e,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x62,0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,
|
|
0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x2d,0x31,0x2e,0x30,0x29,
|
|
0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,
|
|
0x20,0x73,0x68,0x61,0x66,0x74,0x73,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x62,
|
|
0x6c,0x6f,0x6f,0x6d,0x5f,0x76,0x69,0x65,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,
|
|
0x5f,0x33,0x31,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x31,
|
|
0x2e,0x30,0x29,0x20,0x2f,0x20,0x5f,0x36,0x37,0x29,0x29,0x29,0x2e,0x78,0x79,0x7a,
|
|
0x29,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x31,0x36,0x36,
|
|
0x36,0x36,0x36,0x36,0x37,0x31,0x36,0x33,0x33,0x37,0x32,0x30,0x33,0x39,0x37,0x39,
|
|
0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x65,0x78,0x70,
|
|
0x32,0x28,0x5f,0x35,0x31,0x2e,0x65,0x78,0x70,0x6f,0x73,0x75,0x72,0x65,0x29,0x29,
|
|
0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,
|
|
0x2a,0x20,0x5f,0x35,0x31,0x2e,0x63,0x6f,0x6e,0x74,0x72,0x61,0x73,0x74,0x29,0x20,
|
|
0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x66,0x61,0x73,0x74,0x3a,
|
|
0x3a,0x63,0x6c,0x61,0x6d,0x70,0x28,0x6d,0x69,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x34,0x32,0x2c,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x30,0x2e,0x32,0x31,0x32,0x35,0x39,0x39,0x39,0x39,0x32,0x37,0x35,
|
|
0x32,0x30,0x37,0x35,0x31,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x37,
|
|
0x31,0x35,0x32,0x30,0x30,0x30,0x30,0x36,0x39,0x36,0x31,0x38,0x32,0x32,0x35,0x30,
|
|
0x39,0x37,0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,0x37,0x32,0x32,0x30,
|
|
0x30,0x30,0x30,0x30,0x32,0x38,0x36,0x31,0x30,0x32,0x32,0x39,0x34,0x39,0x32,0x31,
|
|
0x38,0x37,0x35,0x29,0x29,0x29,0x2c,0x20,0x5f,0x31,0x34,0x32,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x5f,0x35,0x31,0x2e,0x73,0x61,0x74,0x75,0x72,0x61,0x74,
|
|
0x69,0x6f,0x6e,0x29,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct trile_params
|
|
{
|
|
float4 orientations[72];
|
|
float show_hidden;
|
|
};
|
|
|
|
struct view_params
|
|
{
|
|
float4x4 view_proj;
|
|
float4x4 inv_view_proj;
|
|
float4 camera;
|
|
float4 clip;
|
|
float4 sun_direction;
|
|
float4 sun_color;
|
|
float4 shade_color;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float v_clip [[user(locn0)]];
|
|
float3 v_to_camera [[user(locn1)]];
|
|
float3 v_world [[user(locn2)]];
|
|
float3 v_normal [[user(locn3)]];
|
|
float v_swatch [[user(locn4)]];
|
|
float v_facing [[user(locn5)]];
|
|
float v_ao [[user(locn6)]];
|
|
float3 v_shade [[user(locn7)]];
|
|
float3 v_sun [[user(locn8)]];
|
|
float v_tint [[user(locn9)]];
|
|
float v_cut [[user(locn10)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 position [[attribute(0)]];
|
|
float4 data_n [[attribute(1)]];
|
|
float4 instance [[attribute(2)]];
|
|
float tint [[attribute(3)]];
|
|
float cut [[attribute(4)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant trile_params& _37 [[buffer(0)]], constant view_params& _116 [[buffer(1)]])
|
|
{
|
|
main0_out out = {};
|
|
float4 _14 = in.data_n * 255.0;
|
|
int _28 = int(in.instance.w + 0.5) * 3;
|
|
float3x3 _71 = transpose(float3x3(float3(_37.orientations[_28].xyz), float3(_37.orientations[_28 + 1].xyz), float3(_37.orientations[_28 + 2].xyz)));
|
|
float3 _85 = ((_71 * (in.position - float3(0.5))) + float3(0.5)) + in.instance.xyz;
|
|
int _92 = int(_14.z + 0.5);
|
|
float3 normal = float3(0.0);
|
|
normal[_92 / 2] = ((_92 % 2) == 0) ? 1.0 : (-1.0);
|
|
out.v_normal = _71 * normal;
|
|
out.v_facing = smoothstep(0.0, 0.300000011920928955078125, dot(out.v_normal, _116.sun_direction.xyz));
|
|
out.v_ao = _14.y * 0.3333333432674407958984375;
|
|
out.v_shade = _116.shade_color.xyz;
|
|
out.v_sun = _116.sun_color.xyz;
|
|
float4 _150 = float4(_85, 1.0);
|
|
out.gl_Position = _116.view_proj * _150;
|
|
out.v_cut = (_37.show_hidden > 0.5) ? 0.0 : in.cut;
|
|
if (out.v_cut > 0.999000012874603271484375)
|
|
{
|
|
out.gl_Position = float4(0.0, 0.0, 2.0, 1.0);
|
|
}
|
|
out.v_to_camera = _116.camera.xyz - _85;
|
|
out.v_world = _85;
|
|
out.v_clip = dot(_150, _116.clip);
|
|
out.v_swatch = _14.x;
|
|
out.v_tint = in.tint;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_trile_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x74,
|
|
0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x73,0x5b,0x37,0x32,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x73,0x68,0x6f,0x77,0x5f,0x68,0x69,0x64,0x64,0x65,0x6e,
|
|
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,0x69,0x65,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,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,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6c,0x69,
|
|
0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,
|
|
0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x68,
|
|
0x61,0x64,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,
|
|
0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x6c,
|
|
0x69,0x70,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,0x33,0x20,0x76,
|
|
0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,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,0x33,0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,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,0x33,0x20,0x76,0x5f,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,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,0x73,0x77,0x61,0x74,0x63,0x68,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,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x20,0x5b,0x5b,0x75,0x73,
|
|
0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x35,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x61,0x6f,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,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,
|
|
0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x37,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x76,0x5f,0x73,0x75,
|
|
0x6e,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x38,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x39,
|
|
0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x63,0x75,0x74,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
|
|
0x31,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,
|
|
0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
|
|
0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x6f,0x73,
|
|
0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,
|
|
0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x64,0x61,0x74,0x61,0x5f,0x6e,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,
|
|
0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x20,
|
|
0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,0x5d,0x5d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,0x6e,0x74,
|
|
0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x33,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x75,0x74,
|
|
0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x34,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,
|
|
0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,
|
|
0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,
|
|
0x33,0x37,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
|
|
0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x31,0x36,0x20,0x5b,0x5b,0x62,
|
|
0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,
|
|
0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x5f,0x31,0x34,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x64,0x61,0x74,0x61,0x5f,0x6e,
|
|
0x20,0x2a,0x20,0x32,0x35,0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,
|
|
0x74,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x69,0x6e,0x2e,0x69,
|
|
0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,0x77,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,
|
|
0x20,0x2a,0x20,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x78,0x33,0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,
|
|
0x73,0x65,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x78,0x33,0x28,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x5f,0x33,0x37,0x2e,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x73,0x5b,0x5f,0x32,0x38,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x2c,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x33,0x37,0x2e,0x6f,0x72,0x69,0x65,0x6e,0x74,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x73,0x5b,0x5f,0x32,0x38,0x20,0x2b,0x20,0x31,0x5d,0x2e,
|
|
0x78,0x79,0x7a,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x33,0x37,
|
|
0x2e,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x73,0x5b,0x5f,0x32,
|
|
0x38,0x20,0x2b,0x20,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x38,0x35,0x20,0x3d,0x20,
|
|
0x28,0x28,0x5f,0x37,0x31,0x20,0x2a,0x20,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x35,0x29,0x29,0x20,0x2b,0x20,0x69,0x6e,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,
|
|
0x65,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,
|
|
0x39,0x32,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x5f,0x31,0x34,0x2e,0x7a,0x20,0x2b,
|
|
0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x5b,0x5f,0x39,0x32,0x20,0x2f,0x20,0x32,0x5d,0x20,0x3d,0x20,0x28,0x28,
|
|
0x5f,0x39,0x32,0x20,0x25,0x20,0x32,0x29,0x20,0x3d,0x3d,0x20,0x30,0x29,0x20,0x3f,
|
|
0x20,0x31,0x2e,0x30,0x20,0x3a,0x20,0x28,0x2d,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x31,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,
|
|
0x20,0x3d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,
|
|
0x30,0x2c,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,
|
|
0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x64,
|
|
0x6f,0x74,0x28,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,
|
|
0x20,0x5f,0x31,0x31,0x36,0x2e,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,
|
|
0x69,0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,
|
|
0x75,0x74,0x2e,0x76,0x5f,0x61,0x6f,0x20,0x3d,0x20,0x5f,0x31,0x34,0x2e,0x79,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x34,0x33,0x32,0x36,0x37,
|
|
0x34,0x34,0x30,0x37,0x39,0x35,0x38,0x39,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x31,0x36,0x2e,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,
|
|
0x5f,0x73,0x75,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x31,0x36,0x2e,0x73,0x75,0x6e,0x5f,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x35,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x28,0x5f,0x38,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x31,0x36,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x72,0x6f,0x6a,0x20,0x2a,0x20,0x5f,0x31,0x35,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,0x75,0x74,0x20,0x3d,0x20,0x28,0x5f,0x33,0x37,
|
|
0x2e,0x73,0x68,0x6f,0x77,0x5f,0x68,0x69,0x64,0x64,0x65,0x6e,0x20,0x3e,0x20,0x30,
|
|
0x2e,0x35,0x29,0x20,0x3f,0x20,0x30,0x2e,0x30,0x20,0x3a,0x20,0x69,0x6e,0x2e,0x63,
|
|
0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x6f,0x75,0x74,0x2e,
|
|
0x76,0x5f,0x63,0x75,0x74,0x20,0x3e,0x20,0x30,0x2e,0x39,0x39,0x39,0x30,0x30,0x30,
|
|
0x30,0x31,0x32,0x38,0x37,0x34,0x36,0x30,0x33,0x32,0x37,0x31,0x34,0x38,0x34,0x33,
|
|
0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,
|
|
0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x5f,0x31,0x31,0x36,
|
|
0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x38,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x77,0x6f,0x72,
|
|
0x6c,0x64,0x20,0x3d,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,
|
|
0x74,0x2e,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,0x5f,
|
|
0x31,0x35,0x30,0x2c,0x20,0x5f,0x31,0x31,0x36,0x2e,0x63,0x6c,0x69,0x70,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,
|
|
0x68,0x20,0x3d,0x20,0x5f,0x31,0x34,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,
|
|
0x75,0x74,0x2e,0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,
|
|
0x69,0x6e,0x74,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"
|
|
#pragma clang diagnostic ignored "-Wmissing-braces"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
template<typename T, size_t Num>
|
|
struct spvUnsafeArray
|
|
{
|
|
T elements[Num ? Num : 1];
|
|
|
|
thread T& operator [] (size_t pos) thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const thread T& operator [] (size_t pos) const thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
device T& operator [] (size_t pos) device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const device T& operator [] (size_t pos) const device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
constexpr const constant T& operator [] (size_t pos) const constant
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
threadgroup T& operator [] (size_t pos) threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const threadgroup T& operator [] (size_t pos) const threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
};
|
|
|
|
struct shadow_params
|
|
{
|
|
float4x4 shadow_uv;
|
|
};
|
|
|
|
struct trile_fs_params
|
|
{
|
|
float4 sun_dir;
|
|
float4 probe_min;
|
|
float4 probe_size;
|
|
float use_reflection;
|
|
float reflection_height;
|
|
};
|
|
|
|
constant spvUnsafeArray<float, 16> _499 = spvUnsafeArray<float, 16>({ 0.0, 8.0, 2.0, 10.0, 12.0, 4.0, 14.0, 6.0, 3.0, 11.0, 1.0, 9.0, 15.0, 7.0, 13.0, 5.0 });
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
float4 frag_scene [[color(2)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float v_clip [[user(locn0)]];
|
|
float3 v_to_camera [[user(locn1)]];
|
|
float3 v_world [[user(locn2)]];
|
|
float3 v_normal [[user(locn3)]];
|
|
float v_swatch [[user(locn4)]];
|
|
float v_facing [[user(locn5)]];
|
|
float v_ao [[user(locn6)]];
|
|
float3 v_shade [[user(locn7)]];
|
|
float3 v_sun [[user(locn8)]];
|
|
float v_tint [[user(locn9)]];
|
|
float v_cut [[user(locn10)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float dither(thread const float2& pixel)
|
|
{
|
|
int2 _482 = int2(pixel) % int2(4);
|
|
return (_499[(_482.y * 4) + _482.x] + 0.5) * 0.0625;
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 sun_shadow(thread const float3& world, thread const float3& normal, constant shadow_params& _92, depth2d<float> shadow_map, sampler shadow_smp, texture2d<float> shadow_tint, sampler shadow_tint_smp)
|
|
{
|
|
float3 _73 = normal * 0.03125;
|
|
float4 _107 = _92.shadow_uv * float4((((floor((world - _73) * 16.0) + float3(0.5)) * float3(0.0625)) + _73) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
float _109 = _107.x;
|
|
bool _111 = _109 < 0.0;
|
|
bool _118;
|
|
if (!_111)
|
|
{
|
|
_118 = _109 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_118 = _111;
|
|
}
|
|
bool _125;
|
|
if (!_118)
|
|
{
|
|
_125 = _107.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_125 = _118;
|
|
}
|
|
bool _132;
|
|
if (!_125)
|
|
{
|
|
_132 = _107.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_132 = _125;
|
|
}
|
|
bool _139;
|
|
if (!_132)
|
|
{
|
|
_139 = _107.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_139 = _132;
|
|
}
|
|
if (_139)
|
|
{
|
|
return float3(1.0);
|
|
}
|
|
float _161 = _107.z - 0.0005000000237487256526947021484375;
|
|
return shadow_tint.sample(shadow_tint_smp, _107.xy).xyz * shadow_map.sample_compare(shadow_smp, float3(_109, _107.y, _161).xy, _161);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
bool probe_at(thread const int3& cell, thread float4& r, thread float4& g, thread float4& b, constant trile_fs_params& _193, texture3d<float> probe_index, sampler probe_smp, texture3d<float> probe_atlas)
|
|
{
|
|
int3 _188 = int3(floor(float3(cell) * float3(0.03125)));
|
|
int3 _200 = _188 - int3(_193.probe_min.xyz);
|
|
bool _205 = any(_200 < int3(0));
|
|
bool _217;
|
|
if (!_205)
|
|
{
|
|
_217 = any(_200 >= int3(_193.probe_size.xyz));
|
|
}
|
|
else
|
|
{
|
|
_217 = _205;
|
|
}
|
|
if (_217)
|
|
{
|
|
return false;
|
|
}
|
|
float2 _238 = (probe_index.read(uint3(_200), 0).xy * 255.0) + float2(0.5);
|
|
int _250 = (int(_238.x) + (int(_238.y) * 256)) - 1;
|
|
if (_250 < 0)
|
|
{
|
|
return false;
|
|
}
|
|
int3 _262 = cell - (_188 * int3(32));
|
|
int3 _281 = int3(_262.x * 3, ((_250 % 16) * 32) + _262.y, ((_250 / 16) * 32) + _262.z);
|
|
r = probe_atlas.read(uint3(_281), 0);
|
|
g = probe_atlas.read(uint3((_281 + int3(1, 0, 0))), 0);
|
|
b = probe_atlas.read(uint3((_281 + int3(2, 0, 0))), 0);
|
|
return r.x >= 0.0;
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float4 probe_light(thread const float3& world, thread const float3& normal, constant trile_fs_params& _193, texture3d<float> probe_index, sampler probe_smp, texture3d<float> probe_atlas)
|
|
{
|
|
float3 _312 = normal * 0.03125;
|
|
float3 _324 = ((floor((world - _312) * 16.0) + float3(0.5)) * float3(0.0625)) + _312;
|
|
float3 _331 = (_324 + (normal * 0.5)) - float3(0.5);
|
|
int3 _335 = int3(floor(_331));
|
|
float3 _340 = _331 - float3(_335);
|
|
float4 sum_r = float4(0.0);
|
|
float4 sum_g = float4(0.0);
|
|
float4 sum_b = float4(0.0);
|
|
float total = 0.0;
|
|
float4 param_1;
|
|
float4 param_2;
|
|
float4 param_3;
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
int3 _363 = int3(i & 1, (i >> 1) & 1, i >> 2);
|
|
int3 _367 = _335 + _363;
|
|
if (dot((float3(_367) + float3(0.5)) - _324, normal) < 0.00999999977648258209228515625)
|
|
{
|
|
continue;
|
|
}
|
|
int3 param = _367;
|
|
bool _389 = probe_at(param, param_1, param_2, param_3, _193, probe_index, probe_smp, probe_atlas);
|
|
if (!_389)
|
|
{
|
|
continue;
|
|
}
|
|
float3 _404 = mix(float3(1.0) - _340, _340, float3(_363));
|
|
float _415 = fast::max((_404.x * _404.y) * _404.z, 9.9999997473787516355514526367188e-05);
|
|
sum_r += (param_1 * _415);
|
|
sum_g += (param_2 * _415);
|
|
sum_b += (param_3 * _415);
|
|
total += _415;
|
|
}
|
|
if (total == 0.0)
|
|
{
|
|
return float4(0.0);
|
|
}
|
|
float4 _453 = float4(0.2820949852466583251953125, 0.3257350027561187744140625 * normal.y, 0.3257350027561187744140625 * normal.z, 0.3257350027561187744140625 * normal.x);
|
|
return float4(fast::max(float3(dot(sum_r, _453), dot(sum_g, _453), dot(sum_b, _453)) / float3(total), float3(0.0)), 1.0);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float brightest(thread const float3& c)
|
|
{
|
|
return fast::max(c.x, fast::max(c.y, c.z));
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
void write_scene(thread const float3& to_camera, thread const float& glow, thread float4& frag_glow, thread float4& frag_scene)
|
|
{
|
|
frag_glow = float4(glow);
|
|
frag_scene = float4(length(to_camera));
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant shadow_params& _92 [[buffer(0)]], constant trile_fs_params& _193 [[buffer(1)]], depth2d<float> shadow_map [[texture(0)]], texture2d<float> shadow_tint [[texture(1)]], texture3d<float> probe_index [[texture(2)]], texture3d<float> probe_atlas [[texture(3)]], texture2d<float> palette [[texture(4)]], texture2d<float> trile_reflection [[texture(5)]], texture2d<float> trile_reflection_glow [[texture(6)]], sampler shadow_smp [[sampler(0)]], sampler shadow_tint_smp [[sampler(1)]], sampler probe_smp [[sampler(2)]], sampler palette_smp [[sampler(3)]], sampler trile_reflection_smp [[sampler(4)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
bool _517 = in.v_clip < 0.0;
|
|
bool _530;
|
|
if (!_517)
|
|
{
|
|
float2 param = gl_FragCoord.xy;
|
|
_530 = in.v_cut > dither(param);
|
|
}
|
|
else
|
|
{
|
|
_530 = _517;
|
|
}
|
|
if (_530)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
int _538 = int(in.v_swatch + 0.5);
|
|
float4 _548 = palette.read(uint2(int2(_538, 0)), 0);
|
|
float4 _556 = palette.read(uint2(int2(_538, 1)), 0);
|
|
float3 albedo = _548.xyz;
|
|
if (in.v_tint > 1.5)
|
|
{
|
|
albedo = mix(albedo, float3(1.0, 0.20000000298023223876953125, 0.20000000298023223876953125), float3(0.5));
|
|
}
|
|
else
|
|
{
|
|
if (in.v_tint > 0.5)
|
|
{
|
|
albedo = mix(albedo, float3(0.20000000298023223876953125, 1.0, 0.20000000298023223876953125), float3(0.5));
|
|
}
|
|
}
|
|
float3 param_1 = in.v_world;
|
|
float3 param_2 = in.v_normal;
|
|
float3 _590 = sun_shadow(param_1, param_2, _92, shadow_map, shadow_smp, shadow_tint, shadow_tint_smp);
|
|
float3 _591 = _590 * in.v_facing;
|
|
float4 _598;
|
|
if (_193.probe_min.w > 0.5)
|
|
{
|
|
float3 param_3 = in.v_world;
|
|
float3 param_4 = in.v_normal;
|
|
_598 = probe_light(param_3, param_4, _193, probe_index, probe_smp, probe_atlas);
|
|
}
|
|
else
|
|
{
|
|
_598 = float4(0.0);
|
|
}
|
|
float3 _623 = in.v_sun * _591;
|
|
float3 _627 = _623 * mix(0.25, 1.0, in.v_ao);
|
|
float3 color = albedo * (((in.v_shade + _598.xyz) * mix(0.60000002384185791015625, 1.0, in.v_ao)) + _627);
|
|
float3 param_5 = _591;
|
|
float _637 = brightest(param_5);
|
|
if (_637 > 0.001000000047497451305389404296875)
|
|
{
|
|
color += ((_627 * (float3(1.0) - albedo)) * ((_637 - fast::min(_591.x, fast::min(_591.y, _591.z))) / _637));
|
|
}
|
|
float _667 = _548.w;
|
|
float3 param_6 = _627;
|
|
float glow = (_667 * 8.0) + (brightest(param_6) * 1.5);
|
|
float _675 = _556.z;
|
|
if (_675 > 0.0)
|
|
{
|
|
float _700 = powr(fast::max(dot(in.v_normal, fast::normalize(fast::normalize(in.v_to_camera) + _193.sun_dir.xyz)), 0.0), mix(4.0, 96.0, _675)) * _675;
|
|
color += (_623 * _700);
|
|
float3 param_7 = _591;
|
|
glow += ((_700 * brightest(param_7)) * 4.0);
|
|
}
|
|
bool _718 = _193.use_reflection > 0.5;
|
|
bool _724;
|
|
if (_718)
|
|
{
|
|
_724 = _556.y > 0.0;
|
|
}
|
|
else
|
|
{
|
|
_724 = _718;
|
|
}
|
|
bool _730;
|
|
if (_724)
|
|
{
|
|
_730 = in.v_normal.y > 0.5;
|
|
}
|
|
else
|
|
{
|
|
_730 = _724;
|
|
}
|
|
bool _740;
|
|
if (_730)
|
|
{
|
|
_740 = abs(in.v_world.y - _193.reflection_height) < 0.0199999995529651641845703125;
|
|
}
|
|
else
|
|
{
|
|
_740 = _730;
|
|
}
|
|
if (_740)
|
|
{
|
|
float2 _754 = gl_FragCoord.xy / float2(int2(trile_reflection.get_width(), trile_reflection.get_height()));
|
|
float2 _761 = float2(_754.x, 1.0 - _754.y);
|
|
float _770 = _556.y;
|
|
color = mix(color, trile_reflection.sample(trile_reflection_smp, _761).xyz, float3(_770));
|
|
glow = fast::max(glow, trile_reflection_glow.sample(trile_reflection_smp, _761).x * powr(_770, 0.4000000059604644775390625));
|
|
}
|
|
out.frag_color = float4(mix(color, albedo, float3(_667)), 1.0);
|
|
float3 param_8 = in.v_to_camera;
|
|
float param_9 = glow;
|
|
write_scene(param_8, param_9, out.frag_glow, out.frag_scene);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_trile_source_metal_macos := u8.[
|
|
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,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,0x62,0x72,0x61,0x63,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,0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,0x3c,0x74,0x79,
|
|
0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x74,
|
|
0x20,0x4e,0x75,0x6d,0x3e,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x70,0x76,
|
|
0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x54,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x4e,0x75,0x6d,
|
|
0x20,0x3f,0x20,0x4e,0x75,0x6d,0x20,0x3a,0x20,0x31,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x0a,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,
|
|
0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,
|
|
0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,
|
|
0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,
|
|
0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,
|
|
0x6f,0x73,0x29,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,
|
|
0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,
|
|
0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,
|
|
0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,
|
|
0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x74,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,
|
|
0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x20,0x54,
|
|
0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,
|
|
0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,
|
|
0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,
|
|
0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,
|
|
0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,
|
|
0x75,0x63,0x74,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,
|
|
0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x75,0x76,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
|
|
0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x6d,0x69,
|
|
0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x72,
|
|
0x6f,0x62,0x65,0x5f,0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x75,0x73,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x65,
|
|
0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x3b,
|
|
0x0a,0x7d,0x3b,0x0a,0x0a,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x70,
|
|
0x76,0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x3c,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x2c,0x20,0x31,0x36,0x3e,0x20,0x5f,0x34,0x39,0x39,0x20,0x3d,0x20,0x73,
|
|
0x70,0x76,0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x3c,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x2c,0x20,0x31,0x36,0x3e,0x28,0x7b,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x38,0x2e,0x30,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,0x31,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x32,0x2e,0x30,0x2c,0x20,0x34,0x2e,0x30,0x2c,0x20,0x31,0x34,0x2e,0x30,0x2c,
|
|
0x20,0x36,0x2e,0x30,0x2c,0x20,0x33,0x2e,0x30,0x2c,0x20,0x31,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x2c,0x20,0x39,0x2e,0x30,0x2c,0x20,0x31,0x35,0x2e,0x30,0x2c,
|
|
0x20,0x37,0x2e,0x30,0x2c,0x20,0x31,0x33,0x2e,0x30,0x2c,0x20,0x35,0x2e,0x30,0x20,
|
|
0x7d,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,
|
|
0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,
|
|
0x63,0x65,0x6e,0x65,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x32,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,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,
|
|
0x61,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,0x33,0x20,0x76,0x5f,
|
|
0x77,0x6f,0x72,0x6c,0x64,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,
|
|
0x33,0x20,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,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,0x73,0x77,0x61,0x74,0x63,0x68,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,0x20,0x76,0x5f,0x66,0x61,0x63,0x69,
|
|
0x6e,0x67,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x35,0x29,
|
|
0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,
|
|
0x61,0x6f,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,0x33,0x20,0x76,
|
|
0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,
|
|
0x63,0x6e,0x37,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,
|
|
0x6c,0x6f,0x63,0x6e,0x38,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x5b,0x5b,0x75,0x73,0x65,
|
|
0x72,0x28,0x6c,0x6f,0x63,0x6e,0x39,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x5f,0x63,0x75,0x74,0x20,0x5b,0x5b,0x75,0x73,
|
|
0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,
|
|
0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,
|
|
0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x74,0x68,0x65,0x72,0x28,0x74,0x68,0x72,0x65,
|
|
0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,
|
|
0x20,0x70,0x69,0x78,0x65,0x6c,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,
|
|
0x74,0x32,0x20,0x5f,0x34,0x38,0x32,0x20,0x3d,0x20,0x69,0x6e,0x74,0x32,0x28,0x70,
|
|
0x69,0x78,0x65,0x6c,0x29,0x20,0x25,0x20,0x69,0x6e,0x74,0x32,0x28,0x34,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x5f,0x34,0x39,
|
|
0x39,0x5b,0x28,0x5f,0x34,0x38,0x32,0x2e,0x79,0x20,0x2a,0x20,0x34,0x29,0x20,0x2b,
|
|
0x20,0x5f,0x34,0x38,0x32,0x2e,0x78,0x5d,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,
|
|
0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,
|
|
0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,
|
|
0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x74,0x68,0x72,0x65,
|
|
0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,
|
|
0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x39,0x32,
|
|
0x2c,0x20,0x64,0x65,0x70,0x74,0x68,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x2c,0x20,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x5f,0x73,0x6d,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x5f,0x37,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x30,0x37,0x20,0x3d,0x20,0x5f,
|
|
0x39,0x32,0x2e,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x75,0x76,0x20,0x2a,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,
|
|
0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,0x20,0x5f,0x37,0x33,0x29,0x20,0x2a,0x20,0x31,
|
|
0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x35,0x29,0x29,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,
|
|
0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,0x5f,0x37,0x33,0x29,0x20,0x2b,0x20,0x28,
|
|
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,
|
|
0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x30,0x39,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x30,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x31,0x31,0x31,0x20,0x3d,0x20,0x5f,0x31,0x30,0x39,0x20,0x3c,0x20,
|
|
0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,
|
|
0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x31,
|
|
0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x5f,0x31,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x30,0x39,0x20,0x3e,0x20,0x31,
|
|
0x2e,0x30,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,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x31,0x31,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x32,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x31,0x38,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x5f,0x31,0x32,0x35,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x79,0x20,0x3c,0x20,
|
|
0x30,0x2e,0x30,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,0x35,0x20,0x3d,0x20,0x5f,0x31,0x31,0x38,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,
|
|
0x33,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x32,
|
|
0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x5f,0x31,0x33,0x32,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x79,0x20,0x3e,
|
|
0x20,0x31,0x2e,0x30,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,0x33,0x32,0x20,0x3d,0x20,0x5f,0x31,0x32,0x35,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,
|
|
0x31,0x33,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,
|
|
0x33,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x5f,0x31,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x2e,0x7a,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,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,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,0x33,0x32,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,
|
|
0x31,0x33,0x39,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x36,0x31,0x20,0x3d,0x20,0x5f,0x31,
|
|
0x30,0x37,0x2e,0x7a,0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x32,0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,
|
|
0x34,0x37,0x30,0x32,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x31,0x30,0x37,
|
|
0x2e,0x78,0x79,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x6d,0x61,0x70,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x5f,0x63,0x6f,0x6d,
|
|
0x70,0x61,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x31,0x30,0x39,0x2c,0x20,0x5f,0x31,
|
|
0x30,0x37,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x36,0x31,0x29,0x2e,0x78,0x79,0x2c,0x20,
|
|
0x5f,0x31,0x36,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
|
|
0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,
|
|
0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,
|
|
0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x62,0x6f,0x6f,0x6c,0x20,0x70,0x72,0x6f,0x62,
|
|
0x65,0x5f,0x61,0x74,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x69,0x6e,0x74,0x33,0x26,0x20,0x63,0x65,0x6c,0x6c,0x2c,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x72,0x2c,0x20,
|
|
0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x67,
|
|
0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,
|
|
0x20,0x62,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x74,0x72,0x69,
|
|
0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,
|
|
0x39,0x33,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x33,0x64,0x3c,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x3e,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,0x78,
|
|
0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x33,0x64,0x3c,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x3e,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,
|
|
0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x33,0x20,0x5f,0x31,
|
|
0x38,0x38,0x20,0x3d,0x20,0x69,0x6e,0x74,0x33,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x63,0x65,0x6c,0x6c,0x29,0x20,0x2a,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x33,0x20,0x5f,0x32,0x30,0x30,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x38,0x38,0x20,0x2d,0x20,0x69,0x6e,0x74,0x33,0x28,0x5f,0x31,
|
|
0x39,0x33,0x2e,0x70,0x72,0x6f,0x62,0x65,0x5f,0x6d,0x69,0x6e,0x2e,0x78,0x79,0x7a,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x32,0x30,0x35,
|
|
0x20,0x3d,0x20,0x61,0x6e,0x79,0x28,0x5f,0x32,0x30,0x30,0x20,0x3c,0x20,0x69,0x6e,
|
|
0x74,0x33,0x28,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
|
|
0x20,0x5f,0x32,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x32,0x30,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x32,0x31,0x37,0x20,0x3d,0x20,0x61,0x6e,0x79,0x28,0x5f,
|
|
0x32,0x30,0x30,0x20,0x3e,0x3d,0x20,0x69,0x6e,0x74,0x33,0x28,0x5f,0x31,0x39,0x33,
|
|
0x2e,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x69,0x7a,0x65,0x2e,0x78,0x79,0x7a,0x29,
|
|
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,0x32,0x31,0x37,0x20,0x3d,0x20,0x5f,0x32,0x30,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x31,0x37,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x32,
|
|
0x33,0x38,0x20,0x3d,0x20,0x28,0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x33,0x28,0x5f,0x32,0x30,
|
|
0x30,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x79,0x20,0x2a,0x20,0x32,0x35,0x35,0x2e,
|
|
0x30,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x32,0x35,0x30,0x20,0x3d,
|
|
0x20,0x28,0x69,0x6e,0x74,0x28,0x5f,0x32,0x33,0x38,0x2e,0x78,0x29,0x20,0x2b,0x20,
|
|
0x28,0x69,0x6e,0x74,0x28,0x5f,0x32,0x33,0x38,0x2e,0x79,0x29,0x20,0x2a,0x20,0x32,
|
|
0x35,0x36,0x29,0x29,0x20,0x2d,0x20,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x5f,0x32,0x35,0x30,0x20,0x3c,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x66,0x61,0x6c,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x6e,0x74,0x33,0x20,0x5f,0x32,0x36,0x32,0x20,0x3d,0x20,0x63,0x65,
|
|
0x6c,0x6c,0x20,0x2d,0x20,0x28,0x5f,0x31,0x38,0x38,0x20,0x2a,0x20,0x69,0x6e,0x74,
|
|
0x33,0x28,0x33,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x33,
|
|
0x20,0x5f,0x32,0x38,0x31,0x20,0x3d,0x20,0x69,0x6e,0x74,0x33,0x28,0x5f,0x32,0x36,
|
|
0x32,0x2e,0x78,0x20,0x2a,0x20,0x33,0x2c,0x20,0x28,0x28,0x5f,0x32,0x35,0x30,0x20,
|
|
0x25,0x20,0x31,0x36,0x29,0x20,0x2a,0x20,0x33,0x32,0x29,0x20,0x2b,0x20,0x5f,0x32,
|
|
0x36,0x32,0x2e,0x79,0x2c,0x20,0x28,0x28,0x5f,0x32,0x35,0x30,0x20,0x2f,0x20,0x31,
|
|
0x36,0x29,0x20,0x2a,0x20,0x33,0x32,0x29,0x20,0x2b,0x20,0x5f,0x32,0x36,0x32,0x2e,
|
|
0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,
|
|
0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,
|
|
0x74,0x33,0x28,0x5f,0x32,0x38,0x31,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x67,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,
|
|
0x73,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x33,0x28,0x28,0x5f,0x32,
|
|
0x38,0x31,0x20,0x2b,0x20,0x69,0x6e,0x74,0x33,0x28,0x31,0x2c,0x20,0x30,0x2c,0x20,
|
|
0x30,0x29,0x29,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x20,
|
|
0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x2e,0x72,0x65,
|
|
0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x33,0x28,0x28,0x5f,0x32,0x38,0x31,0x20,0x2b,
|
|
0x20,0x69,0x6e,0x74,0x33,0x28,0x32,0x2c,0x20,0x30,0x2c,0x20,0x30,0x29,0x29,0x29,
|
|
0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x72,0x2e,0x78,0x20,0x3e,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,
|
|
0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,
|
|
0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,
|
|
0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x6c,0x69,0x67,0x68,0x74,0x28,
|
|
0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x26,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,0x20,0x74,0x68,0x72,0x65,
|
|
0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,
|
|
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,
|
|
0x74,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x26,0x20,0x5f,0x31,0x39,0x33,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x33,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,
|
|
0x69,0x6e,0x64,0x65,0x78,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x70,
|
|
0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x33,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x61,0x74,0x6c,0x61,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x5f,0x33,0x31,0x32,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x33,0x32,0x34,0x20,0x3d,0x20,
|
|
0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,
|
|
0x20,0x5f,0x33,0x31,0x32,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,
|
|
0x2b,0x20,0x5f,0x33,0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x5f,0x33,0x33,0x31,0x20,0x3d,0x20,0x28,0x5f,0x33,0x32,0x34,0x20,
|
|
0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,
|
|
0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x33,0x20,0x5f,0x33,0x33,0x35,0x20,0x3d,
|
|
0x20,0x69,0x6e,0x74,0x33,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x33,0x33,0x31,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,
|
|
0x33,0x34,0x30,0x20,0x3d,0x20,0x5f,0x33,0x33,0x31,0x20,0x2d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x28,0x5f,0x33,0x33,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6d,0x5f,0x72,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6d,0x5f,0x67,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6d,0x5f,0x62,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x74,0x6f,0x74,0x61,0x6c,0x20,0x3d,0x20,0x30,0x2e,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6f,0x72,0x20,0x28,0x69,0x6e,0x74,0x20,0x69,0x20,0x3d,0x20,0x30,
|
|
0x3b,0x20,0x69,0x20,0x3c,0x20,0x38,0x3b,0x20,0x69,0x2b,0x2b,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x33,
|
|
0x20,0x5f,0x33,0x36,0x33,0x20,0x3d,0x20,0x69,0x6e,0x74,0x33,0x28,0x69,0x20,0x26,
|
|
0x20,0x31,0x2c,0x20,0x28,0x69,0x20,0x3e,0x3e,0x20,0x31,0x29,0x20,0x26,0x20,0x31,
|
|
0x2c,0x20,0x69,0x20,0x3e,0x3e,0x20,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x69,0x6e,0x74,0x33,0x20,0x5f,0x33,0x36,0x37,0x20,0x3d,0x20,0x5f,
|
|
0x33,0x33,0x35,0x20,0x2b,0x20,0x5f,0x33,0x36,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x64,0x6f,0x74,0x28,0x28,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x28,0x5f,0x33,0x36,0x37,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2d,0x20,0x5f,0x33,0x32,0x34,0x2c,
|
|
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x20,0x3c,0x20,0x30,0x2e,0x30,0x30,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,
|
|
0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,
|
|
0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x33,0x36,0x37,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x33,
|
|
0x38,0x39,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x61,0x74,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,
|
|
0x5f,0x31,0x39,0x33,0x2c,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x2c,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x70,0x72,
|
|
0x6f,0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x33,0x38,0x39,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,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x34,0x30,0x34,0x20,0x3d,0x20,0x6d,
|
|
0x69,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,
|
|
0x20,0x5f,0x33,0x34,0x30,0x2c,0x20,0x5f,0x33,0x34,0x30,0x2c,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x28,0x5f,0x33,0x36,0x33,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x31,0x35,0x20,0x3d,
|
|
0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x28,0x5f,0x34,0x30,0x34,
|
|
0x2e,0x78,0x20,0x2a,0x20,0x5f,0x34,0x30,0x34,0x2e,0x79,0x29,0x20,0x2a,0x20,0x5f,
|
|
0x34,0x30,0x34,0x2e,0x7a,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,
|
|
0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,
|
|
0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x72,0x20,0x2b,0x3d,0x20,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x2a,0x20,0x5f,0x34,0x31,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,0x5f,0x67,0x20,
|
|
0x2b,0x3d,0x20,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x2a,0x20,0x5f,0x34,
|
|
0x31,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x6d,
|
|
0x5f,0x62,0x20,0x2b,0x3d,0x20,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x2a,
|
|
0x20,0x5f,0x34,0x31,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x74,0x6f,0x74,0x61,0x6c,0x20,0x2b,0x3d,0x20,0x5f,0x34,0x31,0x35,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x6f,0x74,
|
|
0x61,0x6c,0x20,0x3d,0x3d,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x34,
|
|
0x35,0x33,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x32,0x38,
|
|
0x32,0x30,0x39,0x34,0x39,0x38,0x35,0x32,0x34,0x36,0x36,0x35,0x38,0x33,0x32,0x35,
|
|
0x31,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x33,0x32,0x35,0x37,0x33,
|
|
0x35,0x30,0x30,0x32,0x37,0x35,0x36,0x31,0x31,0x38,0x37,0x37,0x34,0x34,0x31,0x34,
|
|
0x30,0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x79,0x2c,
|
|
0x20,0x30,0x2e,0x33,0x32,0x35,0x37,0x33,0x35,0x30,0x30,0x32,0x37,0x35,0x36,0x31,
|
|
0x31,0x38,0x37,0x37,0x34,0x34,0x31,0x34,0x30,0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x7a,0x2c,0x20,0x30,0x2e,0x33,0x32,0x35,0x37,0x33,
|
|
0x35,0x30,0x30,0x32,0x37,0x35,0x36,0x31,0x31,0x38,0x37,0x37,0x34,0x34,0x31,0x34,
|
|
0x30,0x36,0x32,0x35,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,0x72,0x2c,0x20,
|
|
0x5f,0x34,0x35,0x33,0x29,0x2c,0x20,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,0x5f,0x67,
|
|
0x2c,0x20,0x5f,0x34,0x35,0x33,0x29,0x2c,0x20,0x64,0x6f,0x74,0x28,0x73,0x75,0x6d,
|
|
0x5f,0x62,0x2c,0x20,0x5f,0x34,0x35,0x33,0x29,0x29,0x20,0x2f,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x28,0x74,0x6f,0x74,0x61,0x6c,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x30,0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,
|
|
0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,
|
|
0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x26,0x20,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x63,
|
|
0x2e,0x78,0x2c,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x63,0x2e,
|
|
0x79,0x2c,0x20,0x63,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,
|
|
0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,
|
|
0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,
|
|
0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,
|
|
0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,
|
|
0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x67,
|
|
0x6c,0x6f,0x77,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x26,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x74,
|
|
0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x28,0x67,0x6c,0x6f,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x28,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,
|
|
0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,
|
|
0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x74,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x26,0x20,0x5f,0x39,0x32,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,
|
|
0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
|
|
0x20,0x5f,0x31,0x39,0x33,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x64,0x65,0x70,0x74,0x68,0x32,0x64,0x3c,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x20,0x5b,
|
|
0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x20,0x5b,0x5b,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x33,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x70,0x72,0x6f,
|
|
0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x33,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,
|
|
0x61,0x74,0x6c,0x61,0x73,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x33,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x20,0x5b,
|
|
0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x34,0x29,0x5d,0x5d,0x2c,0x20,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x35,0x29,0x5d,0x5d,0x2c,
|
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x3e,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x28,0x36,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,
|
|
0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x31,0x29,0x5d,
|
|
0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x70,0x72,0x6f,0x62,0x65,
|
|
0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x32,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x70,0x61,0x6c,
|
|
0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x28,0x33,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,
|
|
0x6e,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,
|
|
0x34,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,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x31,0x37,0x20,
|
|
0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,0x30,0x2e,
|
|
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x35,0x33,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x35,0x31,0x37,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x67,0x6c,
|
|
0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x35,0x33,0x30,0x20,0x3d,0x20,0x69,0x6e,
|
|
0x2e,0x76,0x5f,0x63,0x75,0x74,0x20,0x3e,0x20,0x64,0x69,0x74,0x68,0x65,0x72,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,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,0x35,0x33,0x30,0x20,0x3d,0x20,0x5f,0x35,0x31,0x37,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x5f,0x35,0x33,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,0x67,
|
|
0x6d,0x65,0x6e,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x35,0x33,0x38,0x20,0x3d,0x20,0x69,0x6e,0x74,
|
|
0x28,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,
|
|
0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
|
|
0x5f,0x35,0x34,0x38,0x20,0x3d,0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x2e,0x72,
|
|
0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x5f,
|
|
0x35,0x33,0x38,0x2c,0x20,0x30,0x29,0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x35,0x36,0x20,0x3d,0x20,
|
|
0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,
|
|
0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x5f,0x35,0x33,0x38,0x2c,0x20,0x31,0x29,
|
|
0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x3d,0x20,0x5f,0x35,0x34,0x38,0x2e,
|
|
0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x69,0x6e,0x2e,
|
|
0x76,0x5f,0x74,0x69,0x6e,0x74,0x20,0x3e,0x20,0x31,0x2e,0x35,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6c,0x62,0x65,
|
|
0x64,0x6f,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x32,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,
|
|
0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x32,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,
|
|
0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x30,0x2e,0x35,0x29,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,0x69,0x6e,0x2e,0x76,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x61,0x6c,0x62,
|
|
0x65,0x64,0x6f,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x32,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,
|
|
0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,
|
|
0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,
|
|
0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,
|
|
0x20,0x69,0x6e,0x2e,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,
|
|
0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x35,0x39,0x30,0x20,0x3d,
|
|
0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x5f,0x39,
|
|
0x32,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2c,0x20,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x74,0x69,0x6e,0x74,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,
|
|
0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x5f,0x35,0x39,0x31,0x20,0x3d,0x20,0x5f,0x35,0x39,0x30,
|
|
0x20,0x2a,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x66,0x61,0x63,0x69,0x6e,0x67,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x39,0x38,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x39,0x33,0x2e,0x70,0x72,
|
|
0x6f,0x62,0x65,0x5f,0x6d,0x69,0x6e,0x2e,0x77,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,
|
|
0x69,0x6e,0x2e,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x34,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x35,0x39,0x38,0x20,0x3d,
|
|
0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x6c,0x69,0x67,0x68,0x74,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x2c,0x20,0x5f,
|
|
0x31,0x39,0x33,0x2c,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x69,0x6e,0x64,0x65,0x78,
|
|
0x2c,0x20,0x70,0x72,0x6f,0x62,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x70,0x72,0x6f,
|
|
0x62,0x65,0x5f,0x61,0x74,0x6c,0x61,0x73,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,0x35,0x39,0x38,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,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x36,0x32,
|
|
0x33,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x75,0x6e,0x20,0x2a,0x20,0x5f,
|
|
0x35,0x39,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
|
|
0x5f,0x36,0x32,0x37,0x20,0x3d,0x20,0x5f,0x36,0x32,0x33,0x20,0x2a,0x20,0x6d,0x69,
|
|
0x78,0x28,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x69,0x6e,0x2e,
|
|
0x76,0x5f,0x61,0x6f,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,
|
|
0x20,0x2a,0x20,0x28,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,
|
|
0x20,0x2b,0x20,0x5f,0x35,0x39,0x38,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,0x6d,
|
|
0x69,0x78,0x28,0x30,0x2e,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x38,0x34,
|
|
0x31,0x38,0x35,0x37,0x39,0x31,0x30,0x31,0x35,0x36,0x32,0x35,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x61,0x6f,0x29,0x29,0x20,0x2b,0x20,0x5f,
|
|
0x36,0x32,0x37,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x35,0x39,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x33,0x37,0x20,
|
|
0x3d,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,
|
|
0x33,0x37,0x20,0x3e,0x20,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,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,
|
|
0x20,0x28,0x28,0x5f,0x36,0x32,0x37,0x20,0x2a,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x29,
|
|
0x29,0x20,0x2a,0x20,0x28,0x28,0x5f,0x36,0x33,0x37,0x20,0x2d,0x20,0x66,0x61,0x73,
|
|
0x74,0x3a,0x3a,0x6d,0x69,0x6e,0x28,0x5f,0x35,0x39,0x31,0x2e,0x78,0x2c,0x20,0x66,
|
|
0x61,0x73,0x74,0x3a,0x3a,0x6d,0x69,0x6e,0x28,0x5f,0x35,0x39,0x31,0x2e,0x79,0x2c,
|
|
0x20,0x5f,0x35,0x39,0x31,0x2e,0x7a,0x29,0x29,0x29,0x20,0x2f,0x20,0x5f,0x36,0x33,
|
|
0x37,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x36,0x37,0x20,0x3d,0x20,0x5f,0x35,0x34,0x38,
|
|
0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x36,0x32,0x37,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,
|
|
0x28,0x5f,0x36,0x36,0x37,0x20,0x2a,0x20,0x38,0x2e,0x30,0x29,0x20,0x2b,0x20,0x28,
|
|
0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x36,0x29,0x20,0x2a,0x20,0x31,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x35,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,
|
|
0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,0x37,0x35,
|
|
0x20,0x3e,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x30,0x30,
|
|
0x20,0x3d,0x20,0x70,0x6f,0x77,0x72,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,
|
|
0x78,0x28,0x64,0x6f,0x74,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x2c,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,
|
|
0x61,0x29,0x20,0x2b,0x20,0x5f,0x31,0x39,0x33,0x2e,0x73,0x75,0x6e,0x5f,0x64,0x69,
|
|
0x72,0x2e,0x78,0x79,0x7a,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x6d,
|
|
0x69,0x78,0x28,0x34,0x2e,0x30,0x2c,0x20,0x39,0x36,0x2e,0x30,0x2c,0x20,0x5f,0x36,
|
|
0x37,0x35,0x29,0x29,0x20,0x2a,0x20,0x5f,0x36,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x5f,
|
|
0x36,0x32,0x33,0x20,0x2a,0x20,0x5f,0x37,0x30,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x35,0x39,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x67,0x6c,0x6f,0x77,0x20,0x2b,0x3d,0x20,0x28,0x28,0x5f,0x37,
|
|
0x30,0x30,0x20,0x2a,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x29,0x20,0x2a,0x20,0x34,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,
|
|
0x5f,0x37,0x31,0x38,0x20,0x3d,0x20,0x5f,0x31,0x39,0x33,0x2e,0x75,0x73,0x65,0x5f,
|
|
0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x3e,0x20,0x30,0x2e,0x35,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x32,0x34,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x31,0x38,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,
|
|
0x34,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x79,0x20,0x3e,0x20,0x30,0x2e,0x30,
|
|
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,
|
|
0x37,0x32,0x34,0x20,0x3d,0x20,0x5f,0x37,0x31,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x33,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x32,0x34,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x33,
|
|
0x30,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,
|
|
0x79,0x20,0x3e,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,0x5f,0x37,0x33,0x30,0x20,0x3d,0x20,0x5f,0x37,0x32,
|
|
0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x37,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x5f,0x37,0x33,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x37,0x34,0x30,0x20,0x3d,0x20,0x61,0x62,0x73,0x28,0x69,
|
|
0x6e,0x2e,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x2e,0x79,0x20,0x2d,0x20,0x5f,0x31,
|
|
0x39,0x33,0x2e,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x68,0x65,
|
|
0x69,0x67,0x68,0x74,0x29,0x20,0x3c,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,
|
|
0x37,0x30,0x33,0x31,0x32,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,0x5f,0x37,0x34,0x30,0x20,0x3d,0x20,0x5f,0x37,0x33,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x5f,0x37,0x34,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x37,0x35,0x34,0x20,
|
|
0x3d,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,
|
|
0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x2e,0x67,0x65,0x74,0x5f,0x77,0x69,0x64,0x74,0x68,0x28,0x29,0x2c,0x20,0x74,0x72,
|
|
0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x67,
|
|
0x65,0x74,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,0x29,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x37,
|
|
0x36,0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x37,0x35,0x34,
|
|
0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x37,0x35,0x34,0x2e,0x79,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x5f,0x37,0x37,0x30,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x79,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,
|
|
0x6d,0x69,0x78,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x72,0x69,0x6c,0x65,
|
|
0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x28,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,
|
|
0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x36,0x31,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x37,0x37,0x30,0x29,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x67,0x6c,0x6f,0x77,
|
|
0x2c,0x20,0x74,0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,
|
|
0x72,0x69,0x6c,0x65,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x5f,0x37,0x36,0x31,0x29,0x2e,0x78,0x20,0x2a,0x20,0x70,
|
|
0x6f,0x77,0x72,0x28,0x5f,0x37,0x37,0x30,0x2c,0x20,0x30,0x2e,0x34,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,
|
|
0x39,0x30,0x36,0x32,0x35,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x6d,0x69,0x78,0x28,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x5f,0x36,0x36,0x37,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x74,0x6f,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x20,0x3d,0x20,0x67,0x6c,0x6f,0x77,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,
|
|
0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x39,0x2c,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,
|
|
0x77,0x2c,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,
|
|
0x65,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,
|
|
0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_in
|
|
{
|
|
float v_swatch [[user(locn4)]];
|
|
};
|
|
|
|
fragment void main0(main0_in in [[stage_in]], texture2d<float> palette [[texture(0)]], sampler palette_smp [[sampler(0)]])
|
|
{
|
|
if (palette.read(uint2(int2(int(in.v_swatch + 0.5), 1)), 0).x > 0.5)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
}
|
|
|
|
*/
|
|
fs_trile_shadow_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x5b,0x5b,0x75,
|
|
0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x34,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x76,0x6f,0x69,0x64,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,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x2e,0x72,
|
|
0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x69,
|
|
0x6e,0x74,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,
|
|
0x20,0x30,0x2e,0x35,0x29,0x2c,0x20,0x31,0x29,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,
|
|
0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,
|
|
0x61,0x67,0x6d,0x65,0x6e,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float v_swatch [[user(locn4)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> palette [[texture(0)]], sampler palette_smp [[sampler(0)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
int _15 = int(in.v_swatch + 0.5);
|
|
if (palette.read(uint2(int2(_15, 1)), 0).x < 0.5)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
float4 _51 = palette.read(uint2(int2(_15, 0)), 0);
|
|
out.frag_color = float4(_51.xyz / float3(fast::max(fast::max(_51.x, fast::max(_51.y, _51.z)), 0.001000000047497451305389404296875)), gl_FragCoord.z);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_trile_glass_shadow_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
|
|
0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
|
0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x5f,0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
|
|
0x6f,0x63,0x6e,0x34,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,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
|
|
0x20,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x5f,0x73,0x6d,0x70,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,0x69,0x6e,0x74,
|
|
0x20,0x5f,0x31,0x35,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x69,0x6e,0x2e,0x76,0x5f,
|
|
0x73,0x77,0x61,0x74,0x63,0x68,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x70,0x61,0x6c,0x65,0x74,0x74,0x65,0x2e,0x72,
|
|
0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x5f,
|
|
0x31,0x35,0x2c,0x20,0x31,0x29,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x20,0x3c,0x20,
|
|
0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,0x67,0x6d,
|
|
0x65,0x6e,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x70,0x61,
|
|
0x6c,0x65,0x74,0x74,0x65,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x32,
|
|
0x28,0x69,0x6e,0x74,0x32,0x28,0x5f,0x31,0x35,0x2c,0x20,0x30,0x29,0x29,0x2c,0x20,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,
|
|
0x5f,0x35,0x31,0x2e,0x78,0x79,0x7a,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x66,0x61,0x73,0x74,0x3a,
|
|
0x3a,0x6d,0x61,0x78,0x28,0x5f,0x35,0x31,0x2e,0x78,0x2c,0x20,0x66,0x61,0x73,0x74,
|
|
0x3a,0x3a,0x6d,0x61,0x78,0x28,0x5f,0x35,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x35,0x31,
|
|
0x2e,0x7a,0x29,0x29,0x2c,0x20,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,0x29,0x29,0x2c,0x20,0x67,0x6c,0x5f,
|
|
0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x7a,0x29,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"
|
|
#pragma clang diagnostic ignored "-Wmissing-braces"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
template<typename T, size_t Num>
|
|
struct spvUnsafeArray
|
|
{
|
|
T elements[Num ? Num : 1];
|
|
|
|
thread T& operator [] (size_t pos) thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const thread T& operator [] (size_t pos) const thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
device T& operator [] (size_t pos) device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const device T& operator [] (size_t pos) const device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
constexpr const constant T& operator [] (size_t pos) const constant
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
threadgroup T& operator [] (size_t pos) threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const threadgroup T& operator [] (size_t pos) const threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
};
|
|
|
|
struct view_params
|
|
{
|
|
float4x4 view_proj;
|
|
float4x4 inv_view_proj;
|
|
float4 camera;
|
|
float4 clip;
|
|
float4 sun_direction;
|
|
float4 sun_color;
|
|
float4 shade_color;
|
|
};
|
|
|
|
struct water_vs_params
|
|
{
|
|
float height;
|
|
float half_size;
|
|
};
|
|
|
|
constant spvUnsafeArray<float2, 6> _23 = spvUnsafeArray<float2, 6>({ float2(0.0), float2(1.0, 0.0), float2(1.0), float2(0.0), float2(1.0), float2(0.0, 1.0) });
|
|
|
|
struct main0_out
|
|
{
|
|
float3 v_to_camera [[user(locn0)]];
|
|
float3 v_world [[user(locn1)]];
|
|
float2 v_xz [[user(locn2)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float2 quad_corner(thread const int& vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
vertex main0_out main0(constant view_params& _38 [[buffer(0)]], constant water_vs_params& _55 [[buffer(1)]], uint gl_VertexIndex [[vertex_id]])
|
|
{
|
|
main0_out out = {};
|
|
int param = int(gl_VertexIndex);
|
|
out.v_xz = _38.camera.xz + (((quad_corner(param) * 2.0) - float2(1.0)) * _55.half_size);
|
|
float3 _75 = float3(out.v_xz.x, _55.height, out.v_xz.y);
|
|
out.gl_Position = _38.view_proj * float4(out.v_xz.x, _55.height, out.v_xz.y, 1.0);
|
|
out.v_to_camera = _38.camera.xyz - _75;
|
|
out.v_world = _75;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_water_source_metal_macos := u8.[
|
|
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,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,0x62,0x72,0x61,0x63,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,0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,0x3c,0x74,0x79,
|
|
0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x74,
|
|
0x20,0x4e,0x75,0x6d,0x3e,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x70,0x76,
|
|
0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x54,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x4e,0x75,0x6d,
|
|
0x20,0x3f,0x20,0x4e,0x75,0x6d,0x20,0x3a,0x20,0x31,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x0a,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,
|
|
0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,
|
|
0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,
|
|
0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,
|
|
0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,
|
|
0x6f,0x73,0x29,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,
|
|
0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,
|
|
0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,
|
|
0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,
|
|
0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x74,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,
|
|
0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x20,0x54,
|
|
0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,
|
|
0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,
|
|
0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,
|
|
0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,
|
|
0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,
|
|
0x75,0x63,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,
|
|
0x7b,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,
|
|
0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x77,0x61,0x74,
|
|
0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x6c,0x66,0x5f,
|
|
0x73,0x69,0x7a,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x63,0x6f,0x6e,0x73,0x74,0x61,
|
|
0x6e,0x74,0x20,0x73,0x70,0x76,0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,
|
|
0x79,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x32,0x2c,0x20,0x36,0x3e,0x20,0x5f,0x32,0x33,
|
|
0x20,0x3d,0x20,0x73,0x70,0x76,0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,
|
|
0x79,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x32,0x2c,0x20,0x36,0x3e,0x28,0x7b,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,
|
|
0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x20,0x7d,0x29,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,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,0x33,
|
|
0x20,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,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,0x32,0x20,0x76,0x5f,0x78,0x7a,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,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,
|
|
0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,
|
|
0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,
|
|
0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,
|
|
0x0a,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,
|
|
0x6e,0x65,0x72,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x20,0x69,0x6e,0x74,0x26,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,
|
|
0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x5f,0x32,0x33,0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,
|
|
0x78,0x5d,0x3b,0x0a,0x7d,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,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x26,0x20,0x5f,0x33,0x38,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,
|
|
0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,
|
|
0x77,0x61,0x74,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
|
|
0x20,0x5f,0x35,0x35,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,
|
|
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,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,
|
|
0x64,0x65,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,
|
|
0x78,0x7a,0x20,0x3d,0x20,0x5f,0x33,0x38,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,
|
|
0x78,0x7a,0x20,0x2b,0x20,0x28,0x28,0x28,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,
|
|
0x6e,0x65,0x72,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,
|
|
0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x29,
|
|
0x20,0x2a,0x20,0x5f,0x35,0x35,0x2e,0x68,0x61,0x6c,0x66,0x5f,0x73,0x69,0x7a,0x65,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x37,
|
|
0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x6f,0x75,0x74,0x2e,0x76,
|
|
0x5f,0x78,0x7a,0x2e,0x78,0x2c,0x20,0x5f,0x35,0x35,0x2e,0x68,0x65,0x69,0x67,0x68,
|
|
0x74,0x2c,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x78,0x7a,0x2e,0x79,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x33,0x38,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,
|
|
0x72,0x6f,0x6a,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x6f,0x75,0x74,
|
|
0x2e,0x76,0x5f,0x78,0x7a,0x2e,0x78,0x2c,0x20,0x5f,0x35,0x35,0x2e,0x68,0x65,0x69,
|
|
0x67,0x68,0x74,0x2c,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x78,0x7a,0x2e,0x79,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,
|
|
0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x5f,0x33,0x38,
|
|
0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x37,
|
|
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x77,0x6f,0x72,
|
|
0x6c,0x64,0x20,0x3d,0x20,0x5f,0x37,0x35,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;
|
|
|
|
struct water_floor_params
|
|
{
|
|
float3 floor_color;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
float4 frag_scene [[color(2)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 v_to_camera [[user(locn0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
void write_scene(thread const float3& to_camera, thread const float& glow, thread float4& frag_glow, thread float4& frag_scene)
|
|
{
|
|
frag_glow = float4(glow);
|
|
frag_scene = float4(length(to_camera));
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant water_floor_params& _27 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.frag_color = float4(_27.floor_color, 1.0);
|
|
float3 param = in.v_to_camera;
|
|
float param_1 = 0.0;
|
|
write_scene(param, param_1, out.frag_glow, out.frag_scene);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_water_floor_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x6c,
|
|
0x6f,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,
|
|
0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x31,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x28,0x32,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,
|
|
0x65,0x72,0x61,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,
|
|
0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
|
|
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,
|
|
0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,
|
|
0x69,0x6e,0x65,0x29,0x29,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,
|
|
0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x74,0x6f,0x5f,0x63,
|
|
0x61,0x6d,0x65,0x72,0x61,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x67,0x6c,0x6f,0x77,0x2c,
|
|
0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,
|
|
0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,
|
|
0x63,0x65,0x6e,0x65,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x67,
|
|
0x6c,0x6f,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,
|
|
0x63,0x65,0x6e,0x65,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x6c,0x65,
|
|
0x6e,0x67,0x74,0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x29,
|
|
0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,
|
|
0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,
|
|
0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x66,0x6c,0x6f,0x6f,0x72,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x26,0x20,0x5f,0x32,0x37,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x32,
|
|
0x37,0x2e,0x66,0x6c,0x6f,0x6f,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x74,0x6f,0x5f,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x2c,0x20,
|
|
0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x29,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;
|
|
|
|
struct shadow_params
|
|
{
|
|
float4x4 shadow_uv;
|
|
};
|
|
|
|
struct water_fs_params
|
|
{
|
|
float3 water_color;
|
|
packed_float3 sun_direction;
|
|
float shininess;
|
|
packed_float3 sun_color;
|
|
float time;
|
|
float reflectivity;
|
|
float distortion;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 v_to_camera [[user(locn0)]];
|
|
float3 v_world [[user(locn1)]];
|
|
float2 v_xz [[user(locn2)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 sun_shadow(thread const float3& world, thread const float3& normal, constant shadow_params& _62, depth2d<float> shadow_map, sampler shadow_smp, texture2d<float> shadow_tint, sampler shadow_tint_smp)
|
|
{
|
|
float3 _43 = normal * 0.03125;
|
|
float4 _78 = _62.shadow_uv * float4((((floor((world - _43) * 16.0) + float3(0.5)) * float3(0.0625)) + _43) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
float _81 = _78.x;
|
|
bool _83 = _81 < 0.0;
|
|
bool _90;
|
|
if (!_83)
|
|
{
|
|
_90 = _81 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_90 = _83;
|
|
}
|
|
bool _97;
|
|
if (!_90)
|
|
{
|
|
_97 = _78.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_97 = _90;
|
|
}
|
|
bool _104;
|
|
if (!_97)
|
|
{
|
|
_104 = _78.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_104 = _97;
|
|
}
|
|
bool _111;
|
|
if (!_104)
|
|
{
|
|
_111 = _78.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_111 = _104;
|
|
}
|
|
if (_111)
|
|
{
|
|
return float3(1.0);
|
|
}
|
|
float _134 = _78.z - 0.0005000000237487256526947021484375;
|
|
return shadow_tint.sample(shadow_tint_smp, _78.xy).xyz * shadow_map.sample_compare(shadow_smp, float3(_81, _78.y, _134).xy, _134);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float brightest(thread const float3& c)
|
|
{
|
|
return fast::max(c.x, fast::max(c.y, c.z));
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
void write_transparent(thread const float4& color, thread const float& glow, thread float4& frag_color, thread float4& frag_glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = float4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant shadow_params& _62 [[buffer(0)]], constant water_fs_params& _167 [[buffer(1)]], depth2d<float> shadow_map [[texture(0)]], texture2d<float> shadow_tint [[texture(1)]], texture2d<float> normals [[texture(2)]], texture2d<float> reflection [[texture(3)]], texture2d<float> reflection_glow [[texture(4)]], sampler shadow_smp [[sampler(0)]], sampler shadow_tint_smp [[sampler(1)]], sampler normals_smp [[sampler(2)]], sampler reflection_smp [[sampler(3)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float2 _175 = float2(-0.004999999888241291046142578125, -0.01200000010430812835693359375) * _167.time;
|
|
float3 _217 = fast::normalize(((normals.sample(normals_smp, ((in.v_xz * 0.4000000059604644775390625) + (_175 * 1.5))).xzy * 2.0) - float3(1.0)) + ((normals.sample(normals_smp, ((in.v_xz * 0.100000001490116119384765625) + (_175 * 1.7000000476837158203125))).xzy * 2.0) - float3(1.0)));
|
|
float3 _222 = fast::normalize(in.v_to_camera);
|
|
float _238 = fast::min(1.0, (0.980000019073486328125 * powr(1.0 - fast::max(dot(_222, _217), 0.0), 5.0)) + 0.4699999988079071044921875);
|
|
float2 _253 = gl_FragCoord.xy / float2(int2(reflection.get_width(), reflection.get_height()));
|
|
float2 _267 = float2(_253.x, 1.0 - _253.y) + (_217.xz * _167.distortion);
|
|
float _280 = mix(_238, 1.0, _167.reflectivity);
|
|
float3 param = in.v_world;
|
|
float3 param_1 = float3(0.0, 1.0, 0.0);
|
|
float3 param_2 = sun_shadow(param, param_1, _62, shadow_map, shadow_smp, shadow_tint, shadow_tint_smp);
|
|
float _324 = smoothstep(0.5, 0.550000011920928955078125, powr(fast::max(dot(_217, fast::normalize(_222 + float3(_167.sun_direction))), 0.0), _167.shininess)) * brightest(param_2);
|
|
float3 _341 = mix(mix(_167.water_color, reflection.sample(reflection_smp, _267).xyz, float3(_280)), float3(_167.sun_color), float3(_324));
|
|
float4 param_3 = float4(_341, fast::max(mix(mix(0.300000011920928955078125, 0.5, _238), 1.0, _167.reflectivity), _324));
|
|
float param_4 = fast::max(_324, reflection_glow.sample(reflection_smp, _267).x * _280);
|
|
write_transparent(param_3, param_4, out.frag_color, out.frag_glow);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_water_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x78,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x75,0x76,0x3b,0x0a,
|
|
0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x77,0x61,0x74,0x65,0x72,
|
|
0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x77,0x61,0x74,0x65,0x72,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x73,0x68,0x69,0x6e,0x69,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,
|
|
0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x75,0x6e,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x76,0x69,0x74,0x79,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x73,0x74,0x6f,0x72,
|
|
0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
|
|
0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x31,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,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,0x33,0x20,0x76,0x5f,0x77,
|
|
0x6f,0x72,0x6c,0x64,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,0x32,
|
|
0x20,0x76,0x5f,0x78,0x7a,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,
|
|
0x6e,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,
|
|
0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,
|
|
0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,
|
|
0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,
|
|
0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x74,0x68,0x72,0x65,0x61,0x64,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x77,
|
|
0x6f,0x72,0x6c,0x64,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x36,0x32,0x2c,0x20,
|
|
0x64,0x65,0x70,0x74,0x68,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,
|
|
0x5f,0x73,0x6d,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x5f,0x34,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x30,0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x37,0x38,0x20,0x3d,0x20,0x5f,0x36,0x32,0x2e,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x75,0x76,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x28,0x28,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,
|
|
0x6c,0x64,0x20,0x2d,0x20,0x5f,0x34,0x33,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,
|
|
0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,
|
|
0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,
|
|
0x29,0x29,0x20,0x2b,0x20,0x5f,0x34,0x33,0x29,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x31,0x20,0x3d,0x20,0x5f,0x37,0x38,
|
|
0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x38,0x33,
|
|
0x20,0x3d,0x20,0x5f,0x38,0x31,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x38,0x33,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x38,
|
|
0x31,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x39,0x30,0x20,0x3d,0x20,0x5f,0x38,0x33,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,
|
|
0x5f,0x39,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,
|
|
0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x5f,0x39,0x37,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x79,0x20,0x3c,0x20,0x30,
|
|
0x2e,0x30,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,0x39,0x37,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x34,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x37,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,
|
|
0x34,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,
|
|
0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x31,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x30,0x34,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x31,
|
|
0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x31,
|
|
0x31,0x20,0x3d,0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x31,0x31,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x31,0x33,0x34,0x20,0x3d,0x20,0x5f,0x37,0x38,0x2e,0x7a,0x20,0x2d,0x20,0x30,
|
|
0x2e,0x30,0x30,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x37,0x34,0x38,
|
|
0x37,0x32,0x35,0x36,0x35,0x32,0x36,0x39,0x34,0x37,0x30,0x32,0x31,0x34,0x38,0x34,
|
|
0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x2e,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x5f,0x37,0x38,0x2e,0x78,0x79,0x29,0x2e,0x78,0x79,0x7a,0x20,
|
|
0x2a,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2e,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x5f,0x63,0x6f,0x6d,0x70,0x61,0x72,0x65,0x28,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,
|
|
0x38,0x31,0x2c,0x20,0x5f,0x37,0x38,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x33,0x34,0x29,
|
|
0x2e,0x78,0x79,0x2c,0x20,0x5f,0x31,0x33,0x34,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,
|
|
0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,
|
|
0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,
|
|
0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x74,0x68,0x72,0x65,
|
|
0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,
|
|
0x20,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x63,0x2e,0x78,0x2c,0x20,
|
|
0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x63,0x2e,0x79,0x2c,0x20,0x63,
|
|
0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
|
|
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,
|
|
0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,
|
|
0x69,0x6e,0x65,0x29,0x29,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,
|
|
0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x74,0x68,0x72,
|
|
0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x26,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
|
|
0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x67,0x6c,0x6f,
|
|
0x77,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x26,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,
|
|
0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,
|
|
0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,
|
|
0x74,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
|
|
0x20,0x5f,0x36,0x32,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,
|
|
0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x77,0x61,0x74,
|
|
0x65,0x72,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,
|
|
0x36,0x37,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,
|
|
0x2c,0x20,0x64,0x65,0x70,0x74,0x68,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x20,0x5b,0x5b,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
|
0x73,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x32,0x29,0x5d,0x5d,
|
|
0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x3e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x33,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x72,
|
|
0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,
|
|
0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x34,0x29,0x5d,0x5d,0x2c,0x20,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,
|
|
0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
|
|
0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x33,
|
|
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,0x32,0x20,0x5f,0x31,0x37,0x35,
|
|
0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x30,0x2e,0x30,0x30,0x34,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x38,0x32,0x34,0x31,0x32,0x39,0x31,0x30,
|
|
0x34,0x36,0x31,0x34,0x32,0x35,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x2d,0x30,0x2e,
|
|
0x30,0x31,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x30,0x34,0x33,0x30,0x38,0x31,
|
|
0x32,0x38,0x33,0x35,0x36,0x39,0x33,0x33,0x35,0x39,0x33,0x37,0x35,0x29,0x20,0x2a,
|
|
0x20,0x5f,0x31,0x36,0x37,0x2e,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x31,0x37,0x20,0x3d,0x20,0x66,0x61,
|
|
0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x28,
|
|
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x28,0x28,0x69,0x6e,
|
|
0x2e,0x76,0x5f,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x34,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,
|
|
0x36,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x37,0x35,0x20,0x2a,0x20,0x31,
|
|
0x2e,0x35,0x29,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,
|
|
0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x20,
|
|
0x2b,0x20,0x28,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x2e,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,
|
|
0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,
|
|
0x37,0x35,0x20,0x2a,0x20,0x31,0x2e,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,
|
|
0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,
|
|
0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x32,0x32,0x20,0x3d,0x20,0x66,
|
|
0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x69,
|
|
0x6e,0x2e,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,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,0x69,0x6e,0x28,0x31,0x2e,0x30,0x2c,0x20,
|
|
0x28,0x30,0x2e,0x39,0x38,0x30,0x30,0x30,0x30,0x30,0x31,0x39,0x30,0x37,0x33,0x34,
|
|
0x38,0x36,0x33,0x32,0x38,0x31,0x32,0x35,0x20,0x2a,0x20,0x70,0x6f,0x77,0x72,0x28,
|
|
0x31,0x2e,0x30,0x20,0x2d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,
|
|
0x64,0x6f,0x74,0x28,0x5f,0x32,0x32,0x32,0x2c,0x20,0x5f,0x32,0x31,0x37,0x29,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x35,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x30,
|
|
0x2e,0x34,0x36,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,
|
|
0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x32,0x35,0x33,0x20,0x3d,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,0x72,0x65,0x66,
|
|
0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x67,0x65,0x74,0x5f,0x77,0x69,0x64,0x74,
|
|
0x68,0x28,0x29,0x2c,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,
|
|
0x67,0x65,0x74,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x28,0x29,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x32,0x36,0x37,0x20,
|
|
0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x32,0x35,0x33,0x2e,0x78,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x32,0x35,0x33,0x2e,0x79,0x29,0x20,0x2b,
|
|
0x20,0x28,0x5f,0x32,0x31,0x37,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x5f,0x31,0x36,0x37,
|
|
0x2e,0x64,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x38,0x30,0x20,0x3d,0x20,0x6d,
|
|
0x69,0x78,0x28,0x5f,0x32,0x33,0x38,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x5f,0x31,
|
|
0x36,0x37,0x2e,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x76,0x69,0x74,0x79,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,
|
|
0x3d,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x5f,0x36,0x32,
|
|
0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2c,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x74,0x69,0x6e,0x74,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,
|
|
0x6e,0x74,0x5f,0x73,0x6d,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x33,0x32,0x34,0x20,0x3d,0x20,0x73,0x6d,0x6f,0x6f,0x74,0x68,
|
|
0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x35,0x2c,0x20,0x30,0x2e,0x35,0x35,0x30,0x30,
|
|
0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,
|
|
0x38,0x31,0x32,0x35,0x2c,0x20,0x70,0x6f,0x77,0x72,0x28,0x66,0x61,0x73,0x74,0x3a,
|
|
0x3a,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x32,0x31,0x37,0x2c,0x20,0x66,
|
|
0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,
|
|
0x32,0x32,0x32,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x31,0x36,
|
|
0x37,0x2e,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x29,
|
|
0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x5f,0x31,0x36,0x37,0x2e,0x73,
|
|
0x68,0x69,0x6e,0x69,0x6e,0x65,0x73,0x73,0x29,0x29,0x20,0x2a,0x20,0x62,0x72,0x69,
|
|
0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x33,0x34,0x31,
|
|
0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x5f,0x31,0x36,0x37,0x2e,
|
|
0x77,0x61,0x74,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x72,0x65,0x66,
|
|
0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x72,
|
|
0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,
|
|
0x32,0x36,0x37,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x5f,0x32,0x38,0x30,0x29,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
|
|
0x5f,0x31,0x36,0x37,0x2e,0x73,0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x2c,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x33,0x32,0x34,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x33,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x33,0x34,0x31,
|
|
0x2c,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x6d,0x69,0x78,0x28,
|
|
0x6d,0x69,0x78,0x28,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,
|
|
0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,
|
|
0x30,0x2e,0x35,0x2c,0x20,0x5f,0x32,0x33,0x38,0x29,0x2c,0x20,0x31,0x2e,0x30,0x2c,
|
|
0x20,0x5f,0x31,0x36,0x37,0x2e,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x76,0x69,
|
|
0x74,0x79,0x29,0x2c,0x20,0x5f,0x33,0x32,0x34,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,
|
|
0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x5f,0x33,0x32,0x34,0x2c,
|
|
0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x67,0x6c,0x6f,0x77,
|
|
0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x32,0x36,0x37,0x29,0x2e,0x78,0x20,
|
|
0x2a,0x20,0x5f,0x32,0x38,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,
|
|
0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x2c,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x29,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"
|
|
#pragma clang diagnostic ignored "-Wmissing-braces"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
template<typename T, size_t Num>
|
|
struct spvUnsafeArray
|
|
{
|
|
T elements[Num ? Num : 1];
|
|
|
|
thread T& operator [] (size_t pos) thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const thread T& operator [] (size_t pos) const thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
device T& operator [] (size_t pos) device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const device T& operator [] (size_t pos) const device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
constexpr const constant T& operator [] (size_t pos) const constant
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
threadgroup T& operator [] (size_t pos) threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const threadgroup T& operator [] (size_t pos) const threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
};
|
|
|
|
struct view_params
|
|
{
|
|
float4x4 view_proj;
|
|
float4x4 inv_view_proj;
|
|
float4 camera;
|
|
float4 clip;
|
|
float4 sun_direction;
|
|
float4 sun_color;
|
|
float4 shade_color;
|
|
};
|
|
|
|
struct sprite_params
|
|
{
|
|
float lit;
|
|
};
|
|
|
|
constant spvUnsafeArray<float2, 6> _23 = spvUnsafeArray<float2, 6>({ float2(0.0), float2(1.0, 0.0), float2(1.0), float2(0.0), float2(1.0), float2(0.0, 1.0) });
|
|
|
|
struct main0_out
|
|
{
|
|
float v_clip [[user(locn0)]];
|
|
float3 v_to_camera [[user(locn1)]];
|
|
float2 v_uv [[user(locn2)]];
|
|
float4 v_color [[user(locn3)]];
|
|
float3 v_sun [[user(locn4)]];
|
|
float3 v_shade [[user(locn5)]];
|
|
float3 v_anchor [[user(locn6)]];
|
|
float v_glow [[user(locn7)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 center [[attribute(0)]];
|
|
float2 size [[attribute(1)]];
|
|
float4 uv_rect [[attribute(2)]];
|
|
float3 face [[attribute(3)]];
|
|
float4 color [[attribute(4)]];
|
|
float glow [[attribute(5)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float2 quad_corner(thread const int& vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant view_params& _60 [[buffer(0)]], constant sprite_params& _178 [[buffer(1)]], uint gl_VertexIndex [[vertex_id]])
|
|
{
|
|
main0_out out = {};
|
|
int param = int(gl_VertexIndex);
|
|
float2 _37 = quad_corner(param);
|
|
float3 look = in.face;
|
|
if (in.face.x < (-10.0))
|
|
{
|
|
look = float3(in.center.x - _60.camera.x, 0.0, in.center.z - _60.camera.z);
|
|
}
|
|
if (dot(look.xz, look.xz) < 9.9999997473787516355514526367188e-05)
|
|
{
|
|
look = float3(0.0, 0.0, 1.0);
|
|
}
|
|
float _93 = _37.x;
|
|
float _105 = _37.y;
|
|
float3 _110 = (in.center + (fast::normalize(cross(float3(0.0, 1.0, 0.0), look)) * ((_93 - 0.5) * in.size.x))) + float3(0.0, _105 * in.size.y, 0.0);
|
|
float4 _123 = float4(_110, 1.0);
|
|
out.gl_Position = _60.view_proj * _123;
|
|
out.v_clip = dot(_123, _60.clip);
|
|
out.v_to_camera = _60.camera.xyz - _110;
|
|
out.v_uv = float2(in.uv_rect.x + (_93 * in.uv_rect.z), in.uv_rect.y + ((1.0 - _105) * in.uv_rect.w));
|
|
out.v_color = in.color;
|
|
out.v_glow = in.glow;
|
|
bool _181 = _178.lit > 0.5;
|
|
float3 _182;
|
|
if (_181)
|
|
{
|
|
_182 = _60.sun_color.xyz;
|
|
}
|
|
else
|
|
{
|
|
_182 = float3(1.0);
|
|
}
|
|
out.v_sun = _182;
|
|
float3 _196;
|
|
if (_181)
|
|
{
|
|
_196 = _60.shade_color.xyz;
|
|
}
|
|
else
|
|
{
|
|
_196 = float3(1.0);
|
|
}
|
|
out.v_shade = _196;
|
|
out.v_anchor = (in.center + float3(0.0, in.size.y * 0.5, 0.0)) + (_60.sun_direction.xyz * 0.300000011920928955078125);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_sprite_source_metal_macos := u8.[
|
|
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,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,0x62,0x72,0x61,0x63,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,0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,0x3c,0x74,0x79,
|
|
0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x74,
|
|
0x20,0x4e,0x75,0x6d,0x3e,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x70,0x76,
|
|
0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x54,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x4e,0x75,0x6d,
|
|
0x20,0x3f,0x20,0x4e,0x75,0x6d,0x20,0x3a,0x20,0x31,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x0a,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,
|
|
0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,
|
|
0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,
|
|
0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,
|
|
0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,
|
|
0x6f,0x73,0x29,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,
|
|
0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,
|
|
0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,
|
|
0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,
|
|
0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x74,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,
|
|
0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x20,0x54,
|
|
0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,
|
|
0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,
|
|
0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,
|
|
0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,
|
|
0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,
|
|
0x75,0x63,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,
|
|
0x7b,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,
|
|
0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x6c,0x69,0x74,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
|
|
0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x70,0x76,0x55,0x6e,0x73,0x61,
|
|
0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x32,0x2c,0x20,
|
|
0x36,0x3e,0x20,0x5f,0x32,0x33,0x20,0x3d,0x20,0x73,0x70,0x76,0x55,0x6e,0x73,0x61,
|
|
0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x32,0x2c,0x20,
|
|
0x36,0x3e,0x28,0x7b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x7d,0x29,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,0x20,0x76,0x5f,
|
|
0x63,0x6c,0x69,0x70,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,0x33,
|
|
0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,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,0x32,0x20,0x76,0x5f,0x75,0x76,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,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,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,0x33,0x20,0x76,0x5f,
|
|
0x73,0x75,0x6e,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,0x33,0x20,
|
|
0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
|
|
0x6f,0x63,0x6e,0x35,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,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,0x20,0x76,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,
|
|
0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x37,0x29,0x5d,0x5d,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x20,0x5b,0x5b,0x61,
|
|
0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x73,0x69,0x7a,0x65,0x20,0x5b,
|
|
0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x75,0x76,0x5f,0x72,
|
|
0x65,0x63,0x74,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,
|
|
0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x66,0x61,0x63,0x65,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,
|
|
0x65,0x28,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,
|
|
0x62,0x75,0x74,0x65,0x28,0x34,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,
|
|
0x69,0x62,0x75,0x74,0x65,0x28,0x35,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
|
|
0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,
|
|
0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,
|
|
0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,
|
|
0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x69,0x6e,0x74,
|
|
0x26,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x32,0x33,
|
|
0x5b,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x5d,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
|
0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
|
0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
|
|
0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x69,0x65,
|
|
0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x36,0x30,0x20,0x5b,0x5b,
|
|
0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x37,0x38,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,
|
|
0x65,0x72,0x28,0x31,0x29,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,0x69,0x6e,0x74,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,
|
|
0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x71,0x75,0x61,0x64,
|
|
0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6c,0x6f,0x6f,0x6b,0x20,
|
|
0x3d,0x20,0x69,0x6e,0x2e,0x66,0x61,0x63,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x69,0x6e,0x2e,0x66,0x61,0x63,0x65,0x2e,0x78,0x20,0x3c,0x20,0x28,
|
|
0x2d,0x31,0x30,0x2e,0x30,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x28,0x69,0x6e,0x2e,0x63,0x65,0x6e,0x74,0x65,0x72,0x2e,0x78,0x20,
|
|
0x2d,0x20,0x5f,0x36,0x30,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,0x78,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x69,0x6e,0x2e,0x63,0x65,0x6e,0x74,0x65,0x72,0x2e,0x7a,
|
|
0x20,0x2d,0x20,0x5f,0x36,0x30,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,0x7a,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x64,0x6f,0x74,0x28,0x6c,0x6f,0x6f,0x6b,0x2e,0x78,0x7a,0x2c,0x20,0x6c,0x6f,0x6f,
|
|
0x6b,0x2e,0x78,0x7a,0x29,0x20,0x3c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,
|
|
0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x6f,
|
|
0x6b,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,0x33,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x37,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x31,0x30,0x35,0x20,0x3d,0x20,0x5f,0x33,0x37,0x2e,0x79,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,0x31,0x30,0x20,
|
|
0x3d,0x20,0x28,0x69,0x6e,0x2e,0x63,0x65,0x6e,0x74,0x65,0x72,0x20,0x2b,0x20,0x28,
|
|
0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,
|
|
0x63,0x72,0x6f,0x73,0x73,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x6c,0x6f,0x6f,
|
|
0x6b,0x29,0x29,0x20,0x2a,0x20,0x28,0x28,0x5f,0x39,0x33,0x20,0x2d,0x20,0x30,0x2e,
|
|
0x35,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x73,0x69,0x7a,0x65,0x2e,0x78,0x29,0x29,
|
|
0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x5f,0x31,0x30,0x35,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x73,0x69,0x7a,0x65,0x2e,0x79,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x28,0x5f,0x31,0x31,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x3d,0x20,0x5f,0x36,0x30,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,
|
|
0x20,0x2a,0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,
|
|
0x2e,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,0x5f,0x31,
|
|
0x32,0x33,0x2c,0x20,0x5f,0x36,0x30,0x2e,0x63,0x6c,0x69,0x70,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x20,0x3d,0x20,0x5f,0x36,0x30,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,
|
|
0x78,0x79,0x7a,0x20,0x2d,0x20,0x5f,0x31,0x31,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x6f,0x75,0x74,0x2e,0x76,0x5f,0x75,0x76,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x28,0x69,0x6e,0x2e,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,0x2e,0x78,0x20,0x2b,
|
|
0x20,0x28,0x5f,0x39,0x33,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x75,0x76,0x5f,0x72,0x65,
|
|
0x63,0x74,0x2e,0x7a,0x29,0x2c,0x20,0x69,0x6e,0x2e,0x75,0x76,0x5f,0x72,0x65,0x63,
|
|
0x74,0x2e,0x79,0x20,0x2b,0x20,0x28,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x31,
|
|
0x30,0x35,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x75,0x76,0x5f,0x72,0x65,0x63,0x74,
|
|
0x2e,0x77,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x67,0x6c,0x6f,0x77,
|
|
0x20,0x3d,0x20,0x69,0x6e,0x2e,0x67,0x6c,0x6f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x38,0x31,0x20,0x3d,0x20,0x5f,0x31,0x37,0x38,
|
|
0x2e,0x6c,0x69,0x74,0x20,0x3e,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,0x38,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x38,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x38,0x32,0x20,0x3d,0x20,
|
|
0x5f,0x36,0x30,0x2e,0x73,0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,
|
|
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,0x38,0x32,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,
|
|
0x74,0x2e,0x76,0x5f,0x73,0x75,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x38,0x32,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,0x39,0x36,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x38,0x31,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x39,
|
|
0x36,0x20,0x3d,0x20,0x5f,0x36,0x30,0x2e,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x2e,0x78,0x79,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,0x39,0x36,0x20,0x3d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x39,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,0x20,0x3d,0x20,0x28,0x69,0x6e,0x2e,0x63,
|
|
0x65,0x6e,0x74,0x65,0x72,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x69,0x6e,0x2e,0x73,0x69,0x7a,0x65,0x2e,0x79,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x35,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x5f,0x36,
|
|
0x30,0x2e,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,
|
|
0x78,0x79,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,
|
|
0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,
|
|
0x29,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;
|
|
|
|
struct shadow_params
|
|
{
|
|
float4x4 shadow_uv;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
float4 frag_scene [[color(2)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float v_clip [[user(locn0)]];
|
|
float3 v_to_camera [[user(locn1)]];
|
|
float2 v_uv [[user(locn2)]];
|
|
float4 v_color [[user(locn3)]];
|
|
float3 v_sun [[user(locn4)]];
|
|
float3 v_shade [[user(locn5)]];
|
|
float3 v_anchor [[user(locn6)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 sun_shadow(thread const float3& world, thread const float3& normal, constant shadow_params& _55, depth2d<float> shadow_map, sampler shadow_smp, texture2d<float> shadow_tint, sampler shadow_tint_smp)
|
|
{
|
|
float3 _35 = normal * 0.03125;
|
|
float4 _71 = _55.shadow_uv * float4((((floor((world - _35) * 16.0) + float3(0.5)) * float3(0.0625)) + _35) + (normal * 0.0199999995529651641845703125), 1.0);
|
|
float _76 = _71.x;
|
|
bool _78 = _76 < 0.0;
|
|
bool _85;
|
|
if (!_78)
|
|
{
|
|
_85 = _76 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_85 = _78;
|
|
}
|
|
bool _93;
|
|
if (!_85)
|
|
{
|
|
_93 = _71.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_93 = _85;
|
|
}
|
|
bool _100;
|
|
if (!_93)
|
|
{
|
|
_100 = _71.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_100 = _93;
|
|
}
|
|
bool _108;
|
|
if (!_100)
|
|
{
|
|
_108 = _71.z > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_108 = _100;
|
|
}
|
|
if (_108)
|
|
{
|
|
return float3(1.0);
|
|
}
|
|
float _131 = _71.z - 0.0005000000237487256526947021484375;
|
|
return shadow_tint.sample(shadow_tint_smp, _71.xy).xyz * shadow_map.sample_compare(shadow_smp, float3(_76, _71.y, _131).xy, _131);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float4 sprite_color(thread float& v_clip, texture2d<float> sprite, sampler sprite_smp, thread float2& v_uv, thread float4& v_color)
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
float4 _167 = sprite.sample(sprite_smp, v_uv);
|
|
if (_167.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
return _167 * v_color;
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
void write_scene(thread const float3& to_camera, thread const float& glow, thread float4& frag_glow, thread float4& frag_scene)
|
|
{
|
|
frag_glow = float4(glow);
|
|
frag_scene = float4(length(to_camera));
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant shadow_params& _55 [[buffer(0)]], depth2d<float> shadow_map [[texture(0)]], texture2d<float> shadow_tint [[texture(1)]], texture2d<float> sprite [[texture(2)]], sampler shadow_smp [[sampler(0)]], sampler shadow_tint_smp [[sampler(1)]], sampler sprite_smp [[sampler(2)]])
|
|
{
|
|
main0_out out = {};
|
|
float3 param = in.v_anchor;
|
|
float3 param_1 = float3(0.0, 1.0, 0.0);
|
|
float4 _197 = sprite_color(in.v_clip, sprite, sprite_smp, in.v_uv, in.v_color);
|
|
out.frag_color = _197 * float4(mix(in.v_shade, in.v_sun, sun_shadow(param, param_1, _55, shadow_map, shadow_smp, shadow_tint, shadow_tint_smp)), 1.0);
|
|
float3 param_2 = in.v_to_camera;
|
|
float param_3 = 0.0;
|
|
write_scene(param_2, param_3, out.frag_glow, out.frag_scene);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_sprite_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x78,0x34,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x75,0x76,0x3b,0x0a,
|
|
0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,
|
|
0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,
|
|
0x65,0x6e,0x65,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x32,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,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,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,0x33,0x20,0x76,0x5f,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,
|
|
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,0x32,0x20,0x76,0x5f,0x75,
|
|
0x76,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,0x34,0x20,0x76,0x5f,
|
|
0x63,0x6f,0x6c,0x6f,0x72,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,
|
|
0x33,0x20,0x76,0x5f,0x73,0x75,0x6e,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,0x33,0x20,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x5b,0x5b,0x75,0x73,
|
|
0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x35,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x76,0x5f,0x61,0x6e,0x63,0x68,0x6f,0x72,
|
|
0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x36,0x29,0x5d,0x5d,
|
|
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,
|
|
0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,
|
|
0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x77,0x6f,0x72,0x6c,0x64,0x2c,
|
|
0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x26,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x35,0x35,0x2c,0x20,0x64,0x65,0x70,0x74,0x68,
|
|
0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x6d,0x61,0x70,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x74,0x69,0x6e,0x74,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x33,
|
|
0x35,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,0x20,0x30,0x2e,0x30,
|
|
0x33,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,0x5f,0x35,0x35,0x2e,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x75,0x76,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,
|
|
0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x28,0x77,0x6f,0x72,0x6c,0x64,0x20,0x2d,0x20,
|
|
0x5f,0x33,0x35,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x20,0x2b,0x20,
|
|
0x5f,0x33,0x35,0x29,0x20,0x2b,0x20,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,
|
|
0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x37,0x36,0x20,0x3d,0x20,0x5f,0x37,0x31,0x2e,0x78,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x38,0x20,0x3d,0x20,0x5f,0x37,
|
|
0x36,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,
|
|
0x5f,0x37,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x38,0x35,0x20,0x3d,0x20,0x5f,0x37,0x36,0x20,0x3e,0x20,0x31,
|
|
0x2e,0x30,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,0x38,0x35,0x20,0x3d,0x20,0x5f,0x37,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x33,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x38,0x35,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x39,0x33,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x31,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,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,0x39,0x33,0x20,
|
|
0x3d,0x20,0x5f,0x38,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x33,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x30,0x20,0x3d,0x20,0x5f,
|
|
0x37,0x31,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x30,0x30,0x20,0x3d,0x20,
|
|
0x5f,0x39,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,
|
|
0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
|
0x20,0x28,0x21,0x5f,0x31,0x30,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x38,0x20,0x3d,0x20,0x5f,0x37,
|
|
0x31,0x2e,0x7a,0x20,0x3e,0x20,0x31,0x2e,0x30,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,0x30,0x38,0x20,0x3d,0x20,0x5f,
|
|
0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x31,0x30,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x33,0x31,0x20,
|
|
0x3d,0x20,0x5f,0x37,0x31,0x2e,0x7a,0x20,0x2d,0x20,0x30,0x2e,0x30,0x30,0x30,0x35,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x33,0x37,0x34,0x38,0x37,0x32,0x35,0x36,0x35,
|
|
0x32,0x36,0x39,0x34,0x37,0x30,0x32,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x74,0x69,0x6e,0x74,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x5f,
|
|
0x37,0x31,0x2e,0x78,0x79,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x5f,0x63,
|
|
0x6f,0x6d,0x70,0x61,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x37,0x36,0x2c,0x20,0x5f,
|
|
0x37,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x33,0x31,0x29,0x2e,0x78,0x79,0x2c,0x20,
|
|
0x5f,0x31,0x33,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
|
|
0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,
|
|
0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,
|
|
0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x76,0x5f,0x63,0x6c,0x69,0x70,0x2c,
|
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x3e,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,0x20,0x76,0x5f,0x75,
|
|
0x76,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x26,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,0x3c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,
|
|
0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x36,0x37,0x20,0x3d,0x20,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x70,0x72,0x69,0x74,
|
|
0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x37,0x2e,0x77,0x20,0x3c,0x20,0x30,
|
|
0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,
|
|
0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,
|
|
0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x28,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x5f,0x31,0x36,0x37,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,
|
|
0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,
|
|
0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x29,0x29,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,
|
|
0x65,0x6e,0x65,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,
|
|
0x72,0x61,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,
|
|
0x65,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,
|
|
0x6f,0x77,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x67,0x6c,0x6f,0x77,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,
|
|
0x65,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x6c,0x65,0x6e,0x67,0x74,
|
|
0x68,0x28,0x74,0x6f,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x29,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,
|
|
0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,
|
|
0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,
|
|
0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x35,0x35,
|
|
0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,
|
|
0x64,0x65,0x70,0x74,0x68,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,
|
|
0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,
|
|
0x77,0x5f,0x74,0x69,0x6e,0x74,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,
|
|
0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x20,0x5b,
|
|
0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,
|
|
0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
|
|
0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x32,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,
|
|
0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x61,
|
|
0x6e,0x63,0x68,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,
|
|
0x39,0x37,0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6c,0x69,0x70,0x2c,0x20,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x2c,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x69,0x6e,0x2e,0x76,0x5f,0x75,0x76,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x39,0x37,
|
|
0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x6d,0x69,0x78,0x28,0x69,0x6e,
|
|
0x2e,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,
|
|
0x75,0x6e,0x2c,0x20,0x73,0x75,0x6e,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x5f,
|
|
0x35,0x35,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x6d,0x61,0x70,0x2c,0x20,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x5f,0x74,0x69,0x6e,0x74,0x2c,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,
|
|
0x74,0x69,0x6e,0x74,0x5f,0x73,0x6d,0x70,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x74,0x6f,0x5f,0x63,
|
|
0x61,0x6d,0x65,0x72,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x73,0x63,0x65,0x6e,0x65,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,
|
|
0x2c,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x2c,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x29,
|
|
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;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float v_clip [[user(locn0)]];
|
|
float2 v_uv [[user(locn2)]];
|
|
float4 v_color [[user(locn3)]];
|
|
float v_glow [[user(locn7)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float4 sprite_color(thread float& v_clip, texture2d<float> sprite, sampler sprite_smp, thread float2& v_uv, thread float4& v_color)
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
float4 _42 = sprite.sample(sprite_smp, v_uv);
|
|
if (_42.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
return _42 * v_color;
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
void write_transparent(thread const float4& color, thread const float& glow, thread float4& frag_color, thread float4& frag_glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = float4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> sprite [[texture(0)]], sampler sprite_smp [[sampler(0)]])
|
|
{
|
|
main0_out out = {};
|
|
float4 _67 = sprite_color(in.v_clip, sprite, sprite_smp, in.v_uv, in.v_color);
|
|
float4 param = _67;
|
|
float param_1 = in.v_glow * 8.0;
|
|
write_transparent(param, param_1, out.frag_color, out.frag_glow);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_particle_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x28,0x31,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,0x20,0x76,0x5f,0x63,0x6c,0x69,
|
|
0x70,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,
|
|
0x75,0x76,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,0x34,0x20,0x76,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,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,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,
|
|
0x6c,0x6f,0x63,0x6e,0x37,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,
|
|
0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,
|
|
0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,
|
|
0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x74,
|
|
0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x76,0x5f,0x63,
|
|
0x6c,0x69,0x70,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x2c,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,
|
|
0x20,0x76,0x5f,0x75,0x76,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x26,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,
|
|
0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,
|
|
0x67,0x6d,0x65,0x6e,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x34,0x32,0x20,0x3d,0x20,
|
|
0x73,0x70,0x72,0x69,0x74,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x34,0x32,0x2e,0x77,0x20,0x3c,
|
|
0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,
|
|
0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,
|
|
0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x5f,0x34,0x32,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,
|
|
0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,
|
|
0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,
|
|
0x65,0x29,0x29,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,0x5f,0x74,
|
|
0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x67,0x6c,0x6f,0x77,0x2c,
|
|
0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,
|
|
0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x68,0x72,0x65,
|
|
0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,0x61,0x67,0x5f,
|
|
0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x29,0x3b,
|
|
0x0a,0x7d,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,0x73,0x70,0x72,0x69,0x74,0x65,0x20,0x5b,
|
|
0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,
|
|
0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x63,
|
|
0x6c,0x69,0x70,0x2c,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x2c,0x20,0x73,0x70,0x72,
|
|
0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x75,0x76,
|
|
0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,
|
|
0x3d,0x20,0x5f,0x36,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,
|
|
0x67,0x6c,0x6f,0x77,0x20,0x2a,0x20,0x38,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x77,0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,
|
|
0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x2c,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x2c,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x29,
|
|
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;
|
|
|
|
struct main0_in
|
|
{
|
|
float v_clip [[user(locn0)]];
|
|
float2 v_uv [[user(locn2)]];
|
|
float4 v_color [[user(locn3)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float4 sprite_color(thread float& v_clip, texture2d<float> sprite, sampler sprite_smp, thread float2& v_uv, thread float4& v_color)
|
|
{
|
|
if (v_clip < 0.0)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
float4 _36 = sprite.sample(sprite_smp, v_uv);
|
|
if (_36.w < 0.00999999977648258209228515625)
|
|
{
|
|
discard_fragment();
|
|
}
|
|
return _36 * v_color;
|
|
}
|
|
|
|
fragment void main0(main0_in in [[stage_in]], texture2d<float> sprite [[texture(0)]], sampler sprite_smp [[sampler(0)]])
|
|
{
|
|
float4 _54 = sprite_color(in.v_clip, sprite, sprite_smp, in.v_uv, in.v_color);
|
|
}
|
|
|
|
*/
|
|
fs_sprite_shadow_source_metal_macos := u8.[
|
|
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,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,0x20,0x76,0x5f,0x63,
|
|
0x6c,0x69,0x70,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,0x75,0x76,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,0x34,
|
|
0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,
|
|
0x6c,0x6f,0x63,0x6e,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,
|
|
0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,
|
|
0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,
|
|
0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x74,
|
|
0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x76,0x5f,0x63,
|
|
0x6c,0x69,0x70,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x2c,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,
|
|
0x20,0x76,0x5f,0x75,0x76,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x26,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x76,0x5f,0x63,0x6c,0x69,0x70,0x20,
|
|
0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,
|
|
0x67,0x6d,0x65,0x6e,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x33,0x36,0x20,0x3d,0x20,
|
|
0x73,0x70,0x72,0x69,0x74,0x65,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x70,
|
|
0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x76,0x5f,0x75,0x76,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x36,0x2e,0x77,0x20,0x3c,
|
|
0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,
|
|
0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x5f,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,
|
|
0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x5f,0x33,0x36,0x20,0x2a,0x20,0x76,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,
|
|
0x76,0x6f,0x69,0x64,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,0x73,0x70,0x72,0x69,0x74,0x65,0x20,0x5b,0x5b,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x20,
|
|
0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x34,
|
|
0x20,0x3d,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x28,
|
|
0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6c,0x69,0x70,0x2c,0x20,0x73,0x70,0x72,0x69,0x74,
|
|
0x65,0x2c,0x20,0x73,0x70,0x72,0x69,0x74,0x65,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x69,
|
|
0x6e,0x2e,0x76,0x5f,0x75,0x76,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct view_params
|
|
{
|
|
float4x4 view_proj;
|
|
float4x4 inv_view_proj;
|
|
float4 camera;
|
|
float4 clip;
|
|
float4 sun_direction;
|
|
float4 sun_color;
|
|
float4 shade_color;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 v_point [[user(locn0)]];
|
|
float3 v_camera [[user(locn1)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float2 fullscreen_position(thread const int& vertex_index)
|
|
{
|
|
return (float2(float((vertex_index << 1) & 2), float(vertex_index & 2)) * 2.0) - float2(1.0);
|
|
}
|
|
|
|
vertex main0_out main0(constant view_params& _57 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]])
|
|
{
|
|
main0_out out = {};
|
|
int param = int(gl_VertexIndex);
|
|
float2 _37 = fullscreen_position(param);
|
|
float _48 = _37.x;
|
|
out.gl_Position = float4(_48, _37.y, 0.0, 1.0);
|
|
out.v_point = _57.inv_view_proj * float4(_48, _37.y, 0.5, 1.0);
|
|
out.v_camera = _57.camera.xyz;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_sky_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x0a,0x7b,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,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,
|
|
0x65,0x63,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
|
|
0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,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,0x33,0x20,0x76,0x5f,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
|
|
0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,
|
|
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,
|
|
0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,
|
|
0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,
|
|
0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x32,0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x20,0x69,0x6e,0x74,0x26,0x20,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,
|
|
0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x28,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,
|
|
0x3c,0x3c,0x20,0x31,0x29,0x20,0x26,0x20,0x32,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x28,0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x26,
|
|
0x20,0x32,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,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,0x76,0x69,
|
|
0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x35,0x37,0x20,0x5b,
|
|
0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,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,0x69,
|
|
0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x67,
|
|
0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x33,0x37,0x20,0x3d,
|
|
0x20,0x66,0x75,0x6c,0x6c,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x38,0x20,0x3d,0x20,0x5f,0x33,0x37,
|
|
0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,
|
|
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,0x37,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x20,0x3d,0x20,0x5f,0x35,0x37,0x2e,0x69,0x6e,
|
|
0x76,0x5f,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20,0x2a,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x5f,0x34,0x38,0x2c,0x20,0x5f,0x33,0x37,0x2e,0x79,0x2c,
|
|
0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x3d,0x20,0x5f,
|
|
0x35,0x37,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct sky_params
|
|
{
|
|
float4 sky_base;
|
|
float4 sky_top;
|
|
float4 sun_disk;
|
|
float4 sun_halo;
|
|
float4 horizon_halo;
|
|
float4 sun;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
float4 frag_scene [[color(2)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 v_point [[user(locn0)]];
|
|
float3 v_camera [[user(locn1)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant sky_params& _30 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
float3 _26 = fast::normalize((in.v_point.xyz / float3(in.v_point.w)) - in.v_camera);
|
|
float _44 = _26.y;
|
|
float3 _62 = fast::normalize(cross(_30.sun.xyz, float3(0.0, 1.0, 0.0)));
|
|
float _72 = dot(_26, _30.sun.xyz);
|
|
float3 _74 = _26 - (_30.sun.xyz * _72);
|
|
float _84 = fast::max(abs(dot(_74, _62)), abs(dot(_74, cross(_62, _30.sun.xyz))));
|
|
float _91 = fast::clamp((0.25 - _84) * 6.0, 0.0, 1.0);
|
|
float3 color = mix(_30.sky_base.xyz, _30.sky_top.xyz, float3(fast::clamp(_44 * 2.0, 0.0, 0.699999988079071044921875))) + ((_30.sun_halo.xyz * _91) * _91);
|
|
bool _107 = _84 < 0.0320000015199184417724609375;
|
|
bool _114;
|
|
if (_107)
|
|
{
|
|
_114 = _72 > 0.0;
|
|
}
|
|
else
|
|
{
|
|
_114 = _107;
|
|
}
|
|
if (_114)
|
|
{
|
|
color = _30.sun_disk.xyz * 3.0;
|
|
}
|
|
float3 _138 = color;
|
|
float3 _139 = _138 + ((_30.horizon_halo.xyz * (1.0 - fast::clamp(abs(_44) * 20.0, 0.0, 1.0))) * 0.800000011920928955078125);
|
|
color = _139;
|
|
out.frag_color = float4(_139 * _30.sun.w, 1.0);
|
|
out.frag_glow = float4(float(_114));
|
|
out.frag_scene = float4(10000.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_sky_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,
|
|
0x6b,0x79,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x6b,0x79,0x5f,0x62,0x61,0x73,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,0x6b,0x79,0x5f,
|
|
0x74,0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
|
|
0x73,0x75,0x6e,0x5f,0x64,0x69,0x73,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x68,0x61,0x6c,0x6f,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,
|
|
0x6e,0x5f,0x68,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x73,0x75,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,
|
|
0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,
|
|
0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,0x65,0x6e,0x65,0x20,0x5b,0x5b,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x28,0x32,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,0x34,0x20,0x76,0x5f,0x70,0x6f,0x69,
|
|
0x6e,0x74,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,0x33,0x20,0x76,
|
|
0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
|
|
0x6f,0x63,0x6e,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,
|
|
0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,
|
|
0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,
|
|
0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x6b,0x79,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x26,0x20,0x5f,0x33,0x30,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x36,
|
|
0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x78,
|
|
0x79,0x7a,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x69,0x6e,0x2e,0x76,
|
|
0x5f,0x70,0x6f,0x69,0x6e,0x74,0x2e,0x77,0x29,0x29,0x20,0x2d,0x20,0x69,0x6e,0x2e,
|
|
0x76,0x5f,0x63,0x61,0x6d,0x65,0x72,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x34,0x20,0x3d,0x20,0x5f,0x32,0x36,0x2e,0x79,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x36,0x32,
|
|
0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
|
0x7a,0x65,0x28,0x63,0x72,0x6f,0x73,0x73,0x28,0x5f,0x33,0x30,0x2e,0x73,0x75,0x6e,
|
|
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x64,
|
|
0x6f,0x74,0x28,0x5f,0x32,0x36,0x2c,0x20,0x5f,0x33,0x30,0x2e,0x73,0x75,0x6e,0x2e,
|
|
0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x5f,0x37,0x34,0x20,0x3d,0x20,0x5f,0x32,0x36,0x20,0x2d,0x20,0x28,0x5f,0x33,
|
|
0x30,0x2e,0x73,0x75,0x6e,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x37,0x32,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x34,0x20,
|
|
0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x61,0x62,0x73,0x28,
|
|
0x64,0x6f,0x74,0x28,0x5f,0x37,0x34,0x2c,0x20,0x5f,0x36,0x32,0x29,0x29,0x2c,0x20,
|
|
0x61,0x62,0x73,0x28,0x64,0x6f,0x74,0x28,0x5f,0x37,0x34,0x2c,0x20,0x63,0x72,0x6f,
|
|
0x73,0x73,0x28,0x5f,0x36,0x32,0x2c,0x20,0x5f,0x33,0x30,0x2e,0x73,0x75,0x6e,0x2e,
|
|
0x78,0x79,0x7a,0x29,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x39,0x31,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x63,
|
|
0x6c,0x61,0x6d,0x70,0x28,0x28,0x30,0x2e,0x32,0x35,0x20,0x2d,0x20,0x5f,0x38,0x34,
|
|
0x29,0x20,0x2a,0x20,0x36,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,0x33,0x30,0x2e,0x73,
|
|
0x6b,0x79,0x5f,0x62,0x61,0x73,0x65,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x33,0x30,
|
|
0x2e,0x73,0x6b,0x79,0x5f,0x74,0x6f,0x70,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x63,0x6c,0x61,0x6d,0x70,
|
|
0x28,0x5f,0x34,0x34,0x20,0x2a,0x20,0x32,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x36,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,
|
|
0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x29,0x29,0x29,0x20,0x2b,
|
|
0x20,0x28,0x28,0x5f,0x33,0x30,0x2e,0x73,0x75,0x6e,0x5f,0x68,0x61,0x6c,0x6f,0x2e,
|
|
0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x39,0x31,0x29,0x20,0x2a,0x20,0x5f,0x39,0x31,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x37,
|
|
0x20,0x3d,0x20,0x5f,0x38,0x34,0x20,0x3c,0x20,0x30,0x2e,0x30,0x33,0x32,0x30,0x30,
|
|
0x30,0x30,0x30,0x31,0x35,0x31,0x39,0x39,0x31,0x38,0x34,0x34,0x31,0x37,0x37,0x32,
|
|
0x34,0x36,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,
|
|
0x6c,0x20,0x5f,0x31,0x31,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x5f,0x31,0x30,0x37,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x34,0x20,0x3d,0x20,0x5f,0x37,0x32,0x20,0x3e,
|
|
0x20,0x30,0x2e,0x30,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,0x31,0x34,0x20,0x3d,0x20,0x5f,0x31,0x30,0x37,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
|
|
0x31,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x33,0x30,0x2e,0x73,0x75,
|
|
0x6e,0x5f,0x64,0x69,0x73,0x6b,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x33,0x2e,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x5f,0x31,0x33,0x38,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,0x33,0x39,
|
|
0x20,0x3d,0x20,0x5f,0x31,0x33,0x38,0x20,0x2b,0x20,0x28,0x28,0x5f,0x33,0x30,0x2e,
|
|
0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x5f,0x68,0x61,0x6c,0x6f,0x2e,0x78,0x79,0x7a,
|
|
0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,
|
|
0x63,0x6c,0x61,0x6d,0x70,0x28,0x61,0x62,0x73,0x28,0x5f,0x34,0x34,0x29,0x20,0x2a,
|
|
0x20,0x32,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
|
0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,
|
|
0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,
|
|
0x33,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,
|
|
0x5f,0x31,0x33,0x39,0x20,0x2a,0x20,0x5f,0x33,0x30,0x2e,0x73,0x75,0x6e,0x2e,0x77,
|
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x31,0x31,0x34,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x73,0x63,
|
|
0x65,0x6e,0x65,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x31,0x30,0x30,
|
|
0x30,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
#pragma clang diagnostic ignored "-Wmissing-braces"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
template<typename T, size_t Num>
|
|
struct spvUnsafeArray
|
|
{
|
|
T elements[Num ? Num : 1];
|
|
|
|
thread T& operator [] (size_t pos) thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const thread T& operator [] (size_t pos) const thread
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
device T& operator [] (size_t pos) device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const device T& operator [] (size_t pos) const device
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
constexpr const constant T& operator [] (size_t pos) const constant
|
|
{
|
|
return elements[pos];
|
|
}
|
|
|
|
threadgroup T& operator [] (size_t pos) threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
constexpr const threadgroup T& operator [] (size_t pos) const threadgroup
|
|
{
|
|
return elements[pos];
|
|
}
|
|
};
|
|
|
|
struct view_params
|
|
{
|
|
float4x4 view_proj;
|
|
float4x4 inv_view_proj;
|
|
float4 camera;
|
|
float4 clip;
|
|
float4 sun_direction;
|
|
float4 sun_color;
|
|
float4 shade_color;
|
|
};
|
|
|
|
struct line_params
|
|
{
|
|
float2 viewport;
|
|
};
|
|
|
|
constant spvUnsafeArray<float2, 6> _23 = spvUnsafeArray<float2, 6>({ float2(0.0), float2(1.0, 0.0), float2(1.0), float2(0.0), float2(1.0), float2(0.0, 1.0) });
|
|
|
|
struct main0_out
|
|
{
|
|
float4 v_color [[user(locn0)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 a [[attribute(0)]];
|
|
float3 b [[attribute(1)]];
|
|
float4 color [[attribute(2)]];
|
|
float width [[attribute(3)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float2 quad_corner(thread const int& vertex_index)
|
|
{
|
|
return _23[vertex_index];
|
|
}
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant view_params& _44 [[buffer(0)]], constant line_params& _81 [[buffer(1)]], uint gl_VertexIndex [[vertex_id]])
|
|
{
|
|
main0_out out = {};
|
|
int param = int(gl_VertexIndex);
|
|
float2 _37 = quad_corner(param);
|
|
float4 _57 = _44.view_proj * float4(in.a, 1.0);
|
|
float4 _67 = _44.view_proj * float4(in.b, 1.0);
|
|
float2 _100 = ((_67.xy / float2(fast::max(_67.w, 9.9999997473787516355514526367188e-05))) * _81.viewport) - ((_57.xy / float2(fast::max(_57.w, 9.9999997473787516355514526367188e-05))) * _81.viewport);
|
|
float2 dir = _100;
|
|
float2 _106;
|
|
if (dot(_100, _100) > 9.9999997473787516355514526367188e-05)
|
|
{
|
|
_106 = fast::normalize(dir);
|
|
}
|
|
else
|
|
{
|
|
_106 = float2(1.0, 0.0);
|
|
}
|
|
dir = _106;
|
|
float4 _120 = mix(_57, _67, float4(_37.x));
|
|
float2 _145 = _120.xy + ((((float2(-_106.y, _106.x) * (_37.y - 0.5)) * in.width) / _81.viewport) * _120.w);
|
|
float4 _169 = _120;
|
|
_169.x = _145.x;
|
|
_169.y = _145.y;
|
|
out.gl_Position = _169;
|
|
out.v_color = in.color;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_line_source_metal_macos := u8.[
|
|
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,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,0x62,0x72,0x61,0x63,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,0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,0x3c,0x74,0x79,
|
|
0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x74,
|
|
0x20,0x4e,0x75,0x6d,0x3e,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x70,0x76,
|
|
0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x54,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x4e,0x75,0x6d,
|
|
0x20,0x3f,0x20,0x4e,0x75,0x6d,0x20,0x3a,0x20,0x31,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x0a,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,
|
|
0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,
|
|
0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,
|
|
0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,
|
|
0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,
|
|
0x6f,0x73,0x29,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,
|
|
0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,
|
|
0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,
|
|
0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,
|
|
0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x65,0x78,0x70,0x72,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x61,0x6e,0x74,0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,
|
|
0x20,0x5b,0x5d,0x20,0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,
|
|
0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x0a,0x20,
|
|
0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x20,0x54,
|
|
0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,0x28,0x73,
|
|
0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,
|
|
0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x65,0x78,0x70,0x72,0x20,0x63,
|
|
0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,
|
|
0x20,0x54,0x26,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x5b,0x5d,0x20,
|
|
0x28,0x73,0x69,0x7a,0x65,0x5f,0x74,0x20,0x70,0x6f,0x73,0x29,0x20,0x63,0x6f,0x6e,
|
|
0x73,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x67,0x72,0x6f,0x75,0x70,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x5b,0x70,0x6f,0x73,
|
|
0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,
|
|
0x75,0x63,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,
|
|
0x7b,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x63,0x6c,0x69,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x75,0x6e,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x73,
|
|
0x75,0x6e,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x73,0x68,0x61,0x64,0x65,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6c,0x69,0x6e,
|
|
0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x20,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x3b,0x0a,
|
|
0x7d,0x3b,0x0a,0x0a,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x70,0x76,
|
|
0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x3c,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x32,0x2c,0x20,0x36,0x3e,0x20,0x5f,0x32,0x33,0x20,0x3d,0x20,0x73,0x70,0x76,
|
|
0x55,0x6e,0x73,0x61,0x66,0x65,0x41,0x72,0x72,0x61,0x79,0x3c,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x32,0x2c,0x20,0x36,0x3e,0x28,0x7b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
|
|
0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,
|
|
0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,
|
|
0x7d,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,
|
|
0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,
|
|
0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x61,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,
|
|
0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x62,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,
|
|
0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,
|
|
0x65,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x77,0x69,0x64,0x74,0x68,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,
|
|
0x75,0x74,0x65,0x28,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,
|
|
0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,
|
|
0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,
|
|
0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,0x65,0x72,0x28,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x69,0x6e,0x74,0x26,0x20,
|
|
0x76,0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x32,0x33,0x5b,0x76,
|
|
0x65,0x72,0x74,0x65,0x78,0x5f,0x69,0x6e,0x64,0x65,0x78,0x5d,0x3b,0x0a,0x7d,0x0a,
|
|
0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,
|
|
0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,
|
|
0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x69,0x65,0x77,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x34,0x34,0x20,0x5b,0x5b,0x62,0x75,
|
|
0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x61,0x6e,0x74,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
|
|
0x20,0x5f,0x38,0x31,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,
|
|
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,0x69,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,
|
|
0x64,0x65,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x71,0x75,0x61,0x64,0x5f,0x63,0x6f,0x72,0x6e,
|
|
0x65,0x72,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x37,0x20,0x3d,0x20,0x5f,0x34,0x34,0x2e,
|
|
0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x28,0x69,0x6e,0x2e,0x61,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,
|
|
0x5f,0x34,0x34,0x2e,0x76,0x69,0x65,0x77,0x5f,0x70,0x72,0x6f,0x6a,0x20,0x2a,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x69,0x6e,0x2e,0x62,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,
|
|
0x30,0x30,0x20,0x3d,0x20,0x28,0x28,0x5f,0x36,0x37,0x2e,0x78,0x79,0x20,0x2f,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,
|
|
0x28,0x5f,0x36,0x37,0x2e,0x77,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,
|
|
0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x29,0x29,
|
|
0x20,0x2a,0x20,0x5f,0x38,0x31,0x2e,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x29,
|
|
0x20,0x2d,0x20,0x28,0x28,0x5f,0x35,0x37,0x2e,0x78,0x79,0x20,0x2f,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x5f,
|
|
0x35,0x37,0x2e,0x77,0x2c,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,
|
|
0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,
|
|
0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x29,0x29,0x20,0x2a,
|
|
0x20,0x5f,0x38,0x31,0x2e,0x76,0x69,0x65,0x77,0x70,0x6f,0x72,0x74,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x64,0x69,0x72,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x30,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x20,0x5f,0x31,0x30,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x64,0x6f,0x74,0x28,0x5f,0x31,0x30,0x30,0x2c,0x20,0x5f,0x31,0x30,0x30,0x29,0x20,
|
|
0x3e,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,
|
|
0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,
|
|
0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x36,0x20,0x3d,0x20,0x66,0x61,
|
|
0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x64,0x69,
|
|
0x72,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,0x30,0x36,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,0x64,0x69,0x72,0x20,0x3d,0x20,0x5f,0x31,0x30,0x36,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x32,0x30,0x20,
|
|
0x3d,0x20,0x6d,0x69,0x78,0x28,0x5f,0x35,0x37,0x2c,0x20,0x5f,0x36,0x37,0x2c,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x5f,0x33,0x37,0x2e,0x78,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,0x34,0x35,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x32,0x30,0x2e,0x78,0x79,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x2d,0x5f,0x31,0x30,0x36,0x2e,0x79,0x2c,0x20,
|
|
0x5f,0x31,0x30,0x36,0x2e,0x78,0x29,0x20,0x2a,0x20,0x28,0x5f,0x33,0x37,0x2e,0x79,
|
|
0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x77,0x69,
|
|
0x64,0x74,0x68,0x29,0x20,0x2f,0x20,0x5f,0x38,0x31,0x2e,0x76,0x69,0x65,0x77,0x70,
|
|
0x6f,0x72,0x74,0x29,0x20,0x2a,0x20,0x5f,0x31,0x32,0x30,0x2e,0x77,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x36,0x39,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x32,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x36,0x39,
|
|
0x2e,0x78,0x20,0x3d,0x20,0x5f,0x31,0x34,0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x5f,0x31,0x36,0x39,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x31,0x34,0x35,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,0x31,0x36,0x39,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,
|
|
0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
float4 frag_glow [[color(1)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 v_color [[user(locn0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
void write_transparent(thread const float4& color, thread const float& glow, thread float4& frag_color, thread float4& frag_glow)
|
|
{
|
|
frag_color = color;
|
|
frag_glow = float4(glow, 0.0, 0.0, color.w);
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]])
|
|
{
|
|
main0_out out = {};
|
|
float4 param = in.v_color;
|
|
float param_1 = 0.0;
|
|
write_transparent(param, param_1, out.frag_color, out.frag_glow);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_line_source_metal_macos := u8.[
|
|
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,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
|
|
0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,
|
|
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,0x5b,0x5b,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x28,0x31,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,0x34,0x20,0x76,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,
|
|
0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
|
|
0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,
|
|
0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,
|
|
0x69,0x6e,0x65,0x29,0x29,0x0a,0x76,0x6f,0x69,0x64,0x20,0x77,0x72,0x69,0x74,0x65,
|
|
0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x28,0x74,0x68,0x72,
|
|
0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x26,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
|
|
0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x67,0x6c,0x6f,
|
|
0x77,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x26,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x20,
|
|
0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x67,0x6c,0x6f,0x77,0x2c,0x20,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,
|
|
0x29,0x3b,0x0a,0x7d,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,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,
|
|
0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x77,
|
|
0x72,0x69,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x2c,
|
|
0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x67,0x6c,0x6f,0x77,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
bloom_down_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "bloom_down_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_bloom_down_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "bloom_source_bloom_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_bloom_down_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "bloom_source_bloom_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_bloom_down_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
bloom_glow_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "bloom_glow_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_bloom_glow_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "bloom_source_bloom_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "bloom_glow_bloom_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_bloom_glow_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "bloom_source_bloom_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "bloom_glow_bloom_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_bloom_glow_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[1].msl_texture_n = 1;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
bloom_up_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "bloom_up_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_bloom_up_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "bloom_source_bloom_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_bloom_up_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "bloom_source_bloom_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_bloom_up_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
line_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "line_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_line_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_line_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "a";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "b";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "color";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "width";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "line_params";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_line_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_line_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "a";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "b";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "color";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "width";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "line_params";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_line_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_line_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
}
|
|
return desc;
|
|
}
|
|
particle_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "particle_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_sprite_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_particle_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "center";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "size";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "uv_rect";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "face";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "color";
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.attrs[5].glsl_name = "glow";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sprite_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "sprite_sprite_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_sprite_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_particle_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "center";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "size";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "uv_rect";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "face";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "color";
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.attrs[5].glsl_name = "glow";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sprite_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "sprite_sprite_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_sprite_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_particle_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
post_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "post_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_post_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .FRAGMENT;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 16;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "post_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "view_color_view_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 1;
|
|
desc.image_sampler_pairs[1].glsl_name = "bloom_bloom_view_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 2;
|
|
desc.image_sampler_pairs[2].sampler_slot = 1;
|
|
desc.image_sampler_pairs[2].glsl_name = "shafts_bloom_view_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_post_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .FRAGMENT;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 16;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "post_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "view_color_view_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 1;
|
|
desc.image_sampler_pairs[1].glsl_name = "bloom_bloom_view_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 2;
|
|
desc.image_sampler_pairs[2].sampler_slot = 1;
|
|
desc.image_sampler_pairs[2].glsl_name = "shafts_bloom_view_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_fullscreen_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_post_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.uniform_blocks[0].stage = .FRAGMENT;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 16;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[1].msl_texture_n = 1;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[2].msl_texture_n = 2;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[1].msl_sampler_n = 1;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 1;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 2;
|
|
desc.image_sampler_pairs[2].sampler_slot = 1;
|
|
}
|
|
return desc;
|
|
}
|
|
shafts_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "shafts_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_shafts_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_shafts_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "shaft_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .UNFILTERABLE_FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .NONFILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "shaft_scene_shaft_scene_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 8;
|
|
desc.image_sampler_pairs[1].sampler_slot = 8;
|
|
desc.image_sampler_pairs[1].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 7;
|
|
desc.image_sampler_pairs[2].sampler_slot = 7;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_map_shadow_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_shafts_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_shafts_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "shaft_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .UNFILTERABLE_FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .NONFILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "shaft_scene_shaft_scene_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 8;
|
|
desc.image_sampler_pairs[1].sampler_slot = 8;
|
|
desc.image_sampler_pairs[1].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 7;
|
|
desc.image_sampler_pairs[2].sampler_slot = 7;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_map_shadow_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_shafts_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_shafts_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 0;
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].msl_buffer_n = 1;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .UNFILTERABLE_FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[7].msl_texture_n = 2;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.images[8].msl_texture_n = 1;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .NONFILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[7].msl_sampler_n = 2;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.samplers[8].msl_sampler_n = 1;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 8;
|
|
desc.image_sampler_pairs[1].sampler_slot = 8;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 7;
|
|
desc.image_sampler_pairs[2].sampler_slot = 7;
|
|
}
|
|
return desc;
|
|
}
|
|
sky_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "sky_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_sky_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_sky_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 96;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 6;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sky_params";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_sky_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_sky_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 96;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 6;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sky_params";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_sky_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_sky_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 96;
|
|
desc.uniform_blocks[1].msl_buffer_n = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
sprite_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "sprite_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_sprite_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_sprite_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "center";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "size";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "uv_rect";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "face";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "color";
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.attrs[5].glsl_name = "glow";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sprite_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 7;
|
|
desc.image_sampler_pairs[0].sampler_slot = 7;
|
|
desc.image_sampler_pairs[0].glsl_name = "shadow_map_shadow_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 8;
|
|
desc.image_sampler_pairs[1].sampler_slot = 8;
|
|
desc.image_sampler_pairs[1].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 0;
|
|
desc.image_sampler_pairs[2].sampler_slot = 0;
|
|
desc.image_sampler_pairs[2].glsl_name = "sprite_sprite_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_sprite_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_sprite_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "center";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "size";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "uv_rect";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "face";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "color";
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.attrs[5].glsl_name = "glow";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sprite_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 7;
|
|
desc.image_sampler_pairs[0].sampler_slot = 7;
|
|
desc.image_sampler_pairs[0].glsl_name = "shadow_map_shadow_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 8;
|
|
desc.image_sampler_pairs[1].sampler_slot = 8;
|
|
desc.image_sampler_pairs[1].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 0;
|
|
desc.image_sampler_pairs[2].sampler_slot = 0;
|
|
desc.image_sampler_pairs[2].glsl_name = "sprite_sprite_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_sprite_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_sprite_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 2;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[7].msl_texture_n = 0;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.images[8].msl_texture_n = 1;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 2;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[7].msl_sampler_n = 0;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.samplers[8].msl_sampler_n = 1;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 7;
|
|
desc.image_sampler_pairs[0].sampler_slot = 7;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 8;
|
|
desc.image_sampler_pairs[1].sampler_slot = 8;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 0;
|
|
desc.image_sampler_pairs[2].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
sprite_shadow_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "sprite_shadow_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_sprite_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_sprite_shadow_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "center";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "size";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "uv_rect";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "face";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "color";
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.attrs[5].glsl_name = "glow";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sprite_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "sprite_sprite_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_sprite_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_sprite_shadow_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "center";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "size";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "uv_rect";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "face";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "color";
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.attrs[5].glsl_name = "glow";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "sprite_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "sprite_sprite_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_sprite_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_sprite_shadow_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[5].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
trile_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "trile_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_trile_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_trile_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "data_n";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "instance";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "tint";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "cut";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 73;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "trile_params";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 64;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "trile_fs_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[3].stage = .FRAGMENT;
|
|
desc.images[3].multisampled = false;
|
|
desc.images[3].image_type = ._3D;
|
|
desc.images[3].sample_type = .FLOAT;
|
|
desc.images[4].stage = .FRAGMENT;
|
|
desc.images[4].multisampled = false;
|
|
desc.images[4].image_type = ._3D;
|
|
desc.images[4].sample_type = .FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[2].stage = .FRAGMENT;
|
|
desc.samplers[2].sampler_type = .FILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "palette_palette_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 7;
|
|
desc.image_sampler_pairs[1].sampler_slot = 7;
|
|
desc.image_sampler_pairs[1].glsl_name = "shadow_map_shadow_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 8;
|
|
desc.image_sampler_pairs[2].sampler_slot = 8;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[3].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[3].image_slot = 3;
|
|
desc.image_sampler_pairs[3].sampler_slot = 2;
|
|
desc.image_sampler_pairs[3].glsl_name = "probe_index_probe_smp";
|
|
desc.image_sampler_pairs[4].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[4].image_slot = 4;
|
|
desc.image_sampler_pairs[4].sampler_slot = 2;
|
|
desc.image_sampler_pairs[4].glsl_name = "probe_atlas_probe_smp";
|
|
desc.image_sampler_pairs[5].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[5].image_slot = 1;
|
|
desc.image_sampler_pairs[5].sampler_slot = 1;
|
|
desc.image_sampler_pairs[5].glsl_name = "trile_reflection_trile_reflection_smp";
|
|
desc.image_sampler_pairs[6].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[6].image_slot = 2;
|
|
desc.image_sampler_pairs[6].sampler_slot = 1;
|
|
desc.image_sampler_pairs[6].glsl_name = "trile_reflection_glow_trile_reflection_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_trile_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_trile_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "data_n";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "instance";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "tint";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "cut";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 73;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "trile_params";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 64;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "trile_fs_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[3].stage = .FRAGMENT;
|
|
desc.images[3].multisampled = false;
|
|
desc.images[3].image_type = ._3D;
|
|
desc.images[3].sample_type = .FLOAT;
|
|
desc.images[4].stage = .FRAGMENT;
|
|
desc.images[4].multisampled = false;
|
|
desc.images[4].image_type = ._3D;
|
|
desc.images[4].sample_type = .FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[2].stage = .FRAGMENT;
|
|
desc.samplers[2].sampler_type = .FILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "palette_palette_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 7;
|
|
desc.image_sampler_pairs[1].sampler_slot = 7;
|
|
desc.image_sampler_pairs[1].glsl_name = "shadow_map_shadow_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 8;
|
|
desc.image_sampler_pairs[2].sampler_slot = 8;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[3].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[3].image_slot = 3;
|
|
desc.image_sampler_pairs[3].sampler_slot = 2;
|
|
desc.image_sampler_pairs[3].glsl_name = "probe_index_probe_smp";
|
|
desc.image_sampler_pairs[4].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[4].image_slot = 4;
|
|
desc.image_sampler_pairs[4].sampler_slot = 2;
|
|
desc.image_sampler_pairs[4].glsl_name = "probe_atlas_probe_smp";
|
|
desc.image_sampler_pairs[5].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[5].image_slot = 1;
|
|
desc.image_sampler_pairs[5].sampler_slot = 1;
|
|
desc.image_sampler_pairs[5].glsl_name = "trile_reflection_trile_reflection_smp";
|
|
desc.image_sampler_pairs[6].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[6].image_slot = 2;
|
|
desc.image_sampler_pairs[6].sampler_slot = 1;
|
|
desc.image_sampler_pairs[6].glsl_name = "trile_reflection_glow_trile_reflection_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_trile_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_trile_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 1;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].msl_buffer_n = 0;
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 64;
|
|
desc.uniform_blocks[2].msl_buffer_n = 1;
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 4;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[1].msl_texture_n = 5;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[2].msl_texture_n = 6;
|
|
desc.images[3].stage = .FRAGMENT;
|
|
desc.images[3].multisampled = false;
|
|
desc.images[3].image_type = ._3D;
|
|
desc.images[3].sample_type = .FLOAT;
|
|
desc.images[3].msl_texture_n = 2;
|
|
desc.images[4].stage = .FRAGMENT;
|
|
desc.images[4].multisampled = false;
|
|
desc.images[4].image_type = ._3D;
|
|
desc.images[4].sample_type = .FLOAT;
|
|
desc.images[4].msl_texture_n = 3;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[7].msl_texture_n = 0;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.images[8].msl_texture_n = 1;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 3;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[1].msl_sampler_n = 4;
|
|
desc.samplers[2].stage = .FRAGMENT;
|
|
desc.samplers[2].sampler_type = .FILTERING;
|
|
desc.samplers[2].msl_sampler_n = 2;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[7].msl_sampler_n = 0;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.samplers[8].msl_sampler_n = 1;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 7;
|
|
desc.image_sampler_pairs[1].sampler_slot = 7;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 8;
|
|
desc.image_sampler_pairs[2].sampler_slot = 8;
|
|
desc.image_sampler_pairs[3].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[3].image_slot = 3;
|
|
desc.image_sampler_pairs[3].sampler_slot = 2;
|
|
desc.image_sampler_pairs[4].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[4].image_slot = 4;
|
|
desc.image_sampler_pairs[4].sampler_slot = 2;
|
|
desc.image_sampler_pairs[5].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[5].image_slot = 1;
|
|
desc.image_sampler_pairs[5].sampler_slot = 1;
|
|
desc.image_sampler_pairs[6].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[6].image_slot = 2;
|
|
desc.image_sampler_pairs[6].sampler_slot = 1;
|
|
}
|
|
return desc;
|
|
}
|
|
trile_glass_shadow_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "trile_glass_shadow_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_trile_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_trile_glass_shadow_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "data_n";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "instance";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "tint";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "cut";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 73;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "trile_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "palette_palette_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_trile_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_trile_glass_shadow_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "data_n";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "instance";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "tint";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "cut";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 73;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "trile_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "palette_palette_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_trile_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_trile_glass_shadow_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 1;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
trile_shadow_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "trile_shadow_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_trile_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_trile_shadow_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "data_n";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "instance";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "tint";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "cut";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 73;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "trile_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "palette_palette_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_trile_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_trile_shadow_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "data_n";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "instance";
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[3].glsl_name = "tint";
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.attrs[4].glsl_name = "cut";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 73;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "trile_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "palette_palette_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_trile_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_trile_shadow_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[3].base_type = .FLOAT;
|
|
desc.attrs[4].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 1;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 1168;
|
|
desc.uniform_blocks[1].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
ui_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "ui_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_ui_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_ui_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "uv";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "color0";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 16;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "ui_vs_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "tex_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_ui_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_ui_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "uv";
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.attrs[2].glsl_name = "color0";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 16;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "ui_vs_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "tex_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_ui_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_ui_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[2].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 16;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
water_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "water_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_water_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_water_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "water_vs_params";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 64;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "water_fs_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 1;
|
|
desc.image_sampler_pairs[0].sampler_slot = 1;
|
|
desc.image_sampler_pairs[0].glsl_name = "normals_normals_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 0;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "reflection_reflection_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 7;
|
|
desc.image_sampler_pairs[2].sampler_slot = 7;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_map_shadow_smp";
|
|
desc.image_sampler_pairs[3].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[3].image_slot = 8;
|
|
desc.image_sampler_pairs[3].sampler_slot = 8;
|
|
desc.image_sampler_pairs[3].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[4].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[4].image_slot = 2;
|
|
desc.image_sampler_pairs[4].sampler_slot = 0;
|
|
desc.image_sampler_pairs[4].glsl_name = "reflection_glow_reflection_smp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_water_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_water_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "water_vs_params";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 64;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "water_fs_params";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "shadow_params";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 1;
|
|
desc.image_sampler_pairs[0].sampler_slot = 1;
|
|
desc.image_sampler_pairs[0].glsl_name = "normals_normals_smp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 0;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "reflection_reflection_smp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 7;
|
|
desc.image_sampler_pairs[2].sampler_slot = 7;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_map_shadow_smp";
|
|
desc.image_sampler_pairs[3].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[3].image_slot = 8;
|
|
desc.image_sampler_pairs[3].sampler_slot = 8;
|
|
desc.image_sampler_pairs[3].glsl_name = "shadow_tint_shadow_tint_smp";
|
|
desc.image_sampler_pairs[4].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[4].image_slot = 2;
|
|
desc.image_sampler_pairs[4].sampler_slot = 0;
|
|
desc.image_sampler_pairs[4].glsl_name = "reflection_glow_reflection_smp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_water_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_water_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 64;
|
|
desc.uniform_blocks[2].msl_buffer_n = 1;
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 64;
|
|
desc.uniform_blocks[3].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 3;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[1].msl_texture_n = 2;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .FLOAT;
|
|
desc.images[2].msl_texture_n = 4;
|
|
desc.images[7].stage = .FRAGMENT;
|
|
desc.images[7].multisampled = false;
|
|
desc.images[7].image_type = ._2D;
|
|
desc.images[7].sample_type = .DEPTH;
|
|
desc.images[7].msl_texture_n = 0;
|
|
desc.images[8].stage = .FRAGMENT;
|
|
desc.images[8].multisampled = false;
|
|
desc.images[8].image_type = ._2D;
|
|
desc.images[8].sample_type = .FLOAT;
|
|
desc.images[8].msl_texture_n = 1;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 3;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[1].msl_sampler_n = 2;
|
|
desc.samplers[7].stage = .FRAGMENT;
|
|
desc.samplers[7].sampler_type = .COMPARISON;
|
|
desc.samplers[7].msl_sampler_n = 0;
|
|
desc.samplers[8].stage = .FRAGMENT;
|
|
desc.samplers[8].sampler_type = .FILTERING;
|
|
desc.samplers[8].msl_sampler_n = 1;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 1;
|
|
desc.image_sampler_pairs[0].sampler_slot = 1;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 0;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 7;
|
|
desc.image_sampler_pairs[2].sampler_slot = 7;
|
|
desc.image_sampler_pairs[3].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[3].image_slot = 8;
|
|
desc.image_sampler_pairs[3].sampler_slot = 8;
|
|
desc.image_sampler_pairs[4].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[4].image_slot = 2;
|
|
desc.image_sampler_pairs[4].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|
|
water_floor_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "water_floor_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_water_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_water_floor_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "water_vs_params";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 16;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "water_floor_params";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_water_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_water_floor_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 13;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "view_params";
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "water_vs_params";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 16;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "water_floor_params";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_water_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_water_floor_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 208;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .VERTEX;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 16;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 16;
|
|
desc.uniform_blocks[2].msl_buffer_n = 0;
|
|
}
|
|
return desc;
|
|
}
|