diff --git a/first.jai b/first.jai index 38d1e6d..cb51c8a 100644 --- a/first.jai +++ b/first.jai @@ -228,7 +228,7 @@ wasm_build :: (opts: Build_Options, trueno_opts: Trueno_Build_Options) { "emcc", "src/platform_specific/main.c", "dist/main.o", "modules/sokol-jai/sokol/gfx/sokol_gfx_wasm_gl_release.a", "modules/sokol-jai/sokol/log/sokol_log_wasm_gl_release.a", "modules/sokol-jai/sokol/audio/sokol_audio_wasm_gl_release.a", "modules/sokol-jai/sokol/time/sokol_time_wasm_gl_release.a", "modules/sokol-jai/sokol/app/sokol_app_wasm_gl_release.a", "modules/sokol-jai/sokol/glue/sokol_glue_wasm_gl_release.a", "modules/sokol-jai/sokol/fetch/sokol_fetch_wasm_gl_release.a", "modules/Fontstash/wasm/fontstash.a", "modules/sokol-jai/sokol/stbi/stb_image.a", - "modules/sokol-jai/sokol/stbv/stb_vorbis.a", + "modules/stb_vorbis/wasm/stb_vorbis.a", "-o", "dist/index.html", "-sSTACK_SIZE=10MB", "-sALLOW_MEMORY_GROWTH", diff --git a/modules/stb_vorbis/bindings.jai b/modules/stb_vorbis/bindings.jai index 4c64a55..bd1dcb2 100644 --- a/modules/stb_vorbis/bindings.jai +++ b/modules/stb_vorbis/bindings.jai @@ -265,6 +265,8 @@ STBVorbisError :: enum u32 { } else #if CPU == .ARM64 { lib_stb_vorbis :: #library "switch2/stb_vorbis"; } +} else #if OS == .WASM { + lib_stb_vorbis :: #library,no_dll "wasm/stb_vorbis"; } else { #assert false; } diff --git a/modules/stb_vorbis/generate.jai b/modules/stb_vorbis/generate.jai index 3557070..0a6c2f4 100644 --- a/modules/stb_vorbis/generate.jai +++ b/modules/stb_vorbis/generate.jai @@ -149,6 +149,8 @@ FOOTER_TEMPLATE :: #string END } else #if CPU == .ARM64 { %2 :: #library "switch2/%1"; } +} else #if OS == .WASM { + %2 :: #library,no_dll "wasm/%1"; } else { #assert false; } diff --git a/modules/stb_vorbis/wasm/stb_vorbis.a b/modules/stb_vorbis/wasm/stb_vorbis.a new file mode 100644 index 0000000..a6e01a3 Binary files /dev/null and b/modules/stb_vorbis/wasm/stb_vorbis.a differ diff --git a/settings.cfg b/settings.cfg index a66236c..47c64bb 100644 --- a/settings.cfg +++ b/settings.cfg @@ -1,4 +1,4 @@ -master_volume 0.205032 +master_volume 0.05216 music_volume 1 sfx_volume 1 -fullscreen 0 +fullscreen 1 diff --git a/src/audio/mixer.jai b/src/audio/mixer.jai index 68e3dd4..a28befc 100644 --- a/src/audio/mixer.jai +++ b/src/audio/mixer.jai @@ -92,6 +92,17 @@ mixer_queue_next :: (current_audio: *Audio_Data, next_task: Mixer_Play_Task) { array_add(*g_mixer.tasks, next_task); } +mixer_stop :: (audio: *Audio_Data) { + mixer_lock(*g_mixer); + defer mixer_unlock(*g_mixer); + for g_mixer.tasks { + if it.audio != audio continue; + if it.queued_next then free(it.queued_next); + free(it.audio_state); + remove it; + } +} + mixer_get_samples :: (buffer: *float, frame_count: s32, channel_count: s32) { mixer_lock(*g_mixer); defer mixer_unlock(*g_mixer); diff --git a/src/renderer_sokol/gpu.jai b/src/renderer_sokol/gpu.jai index 7428431..32f8077 100644 --- a/src/renderer_sokol/gpu.jai +++ b/src/renderer_sokol/gpu.jai @@ -90,6 +90,7 @@ Pass :: struct { kind : Pass_Kind; params : View_Params; shadow : Shadow_Params; + frustum : [6]Vector4; } make_pass :: (scene: *Scene, view_index: int, kind: Pass_Kind) -> Pass { @@ -110,6 +111,7 @@ make_pass :: (scene: *Scene, view_index: int, kind: Pass_Kind) -> Pass { camera = pass.view.camera.target + env.sun_direction * 1000; view_proj = scene.shadow_view_proj[view_index]; } + pass.frustum = frustum_planes(view_proj); _, inv_view_proj := inverse(view_proj); pass.params.view_proj = view_proj.floats; pass.params.inv_view_proj = inv_view_proj.floats; @@ -131,6 +133,22 @@ make_pass :: (scene: *Scene, view_index: int, kind: Pass_Kind) -> Pass { return pass; } +frustum_planes :: (m: Matrix4) -> [6]Vector4 { + column :: (m: Matrix4, j: int) -> Vector4 { return .{m.coef[0][j], m.coef[1][j], m.coef[2][j], m.coef[3][j]}; } + x, y, z, w := column(m, 0), column(m, 1), column(m, 2), column(m, 3); + return .[w + x, w - x, w + y, w - y, w + z, w - z]; +} + +box_in_frustum :: (planes: [6]Vector4, lo: Vector3, hi: Vector3) -> bool { + for planes { + x := ifx it.x > 0 then hi.x else lo.x; + y := ifx it.y > 0 then hi.y else lo.y; + z := ifx it.z > 0 then hi.z else lo.z; + if it.x * x + it.y * y + it.z * z + it.w < 0 return false; + } + return true; +} + apply_uniforms :: (slot: s32, params: *$T) { sg_apply_uniforms(slot, *(sg_range.{ params, size_of(T) })); } diff --git a/src/renderer_sokol/shaders/jai/shaders.jai b/src/renderer_sokol/shaders/jai/shaders.jai index 3299d33..7fbfe28 100644 --- a/src/renderer_sokol/shaders/jai/shaders.jai +++ b/src/renderer_sokol/shaders/jai/shaders.jai @@ -1561,8 +1561,8 @@ vs_trile_source_glsl430 := u8.[ layout(location = 5) in float v_facing; layout(location = 2) in vec3 v_world; layout(location = 3) in vec3 v_normal; - layout(location = 6) in float v_ao; 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; @@ -1745,74 +1745,77 @@ vs_trile_source_glsl430 := u8.[ vec3 param_2 = v_normal; vec3 _590 = sun_shadow(param_1, param_2); vec3 _591 = _590 * v_facing; - vec4 _605; + vec4 _598; if (trile_fs_params[1].w > 0.5) { vec3 param_3 = v_world; vec3 param_4 = v_normal; - _605 = probe_light(param_3, param_4); + _598 = probe_light(param_3, param_4); } else { - _605 = vec4(0.0); + _598 = vec4(0.0); } - vec3 color = albedo * mix((v_shade + _605.xyz) * mix(0.60000002384185791015625, 1.0, v_ao), v_sun, _591 * mix(0.25, 1.0, v_ao)); + 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 _638 = brightest(param_5); - if (_638 > 0.001000000047497451305389404296875) + float _637 = brightest(param_5); + if (_637 > 0.001000000047497451305389404296875) { - color = mix(color, _591 * v_sun, vec3(min(1.0, ((_638 - min(_591.x, min(_591.y, _591.z))) / _638) * 2.0))); + color += ((_627 * (vec3(1.0) - albedo)) * ((_637 - min(_591.x, min(_591.y, _591.z))) / _637)); } - float _668 = _548.w; - float glow = _668 * 8.0; - float _671 = _556.z; - if (_671 > 0.0) + 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 _696 = pow(max(dot(v_normal, normalize(normalize(v_to_camera) + trile_fs_params[0].xyz)), 0.0), mix(4.0, 96.0, _671)) * _671; - color += ((v_sun * _591) * _696); - vec3 param_6 = _591; - glow += ((_696 * brightest(param_6)) * 4.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 _714 = trile_fs_params[3].x > 0.5; - bool _720; - if (_714) + bool _718 = trile_fs_params[3].x > 0.5; + bool _724; + if (_718) { - _720 = _556.y > 0.0; + _724 = _556.y > 0.0; } else { - _720 = _714; + _724 = _718; } - bool _726; - if (_720) + bool _730; + if (_724) { - _726 = v_normal.y > 0.5; + _730 = v_normal.y > 0.5; } else { - _726 = _720; + _730 = _724; } - bool _736; - if (_726) + bool _740; + if (_730) { - _736 = abs(v_world.y - trile_fs_params[3].y) < 0.0199999995529651641845703125; + _740 = abs(v_world.y - trile_fs_params[3].y) < 0.0199999995529651641845703125; } else { - _736 = _726; + _740 = _730; } - if (_736) + if (_740) { - vec2 _750 = gl_FragCoord.xy / vec2(textureSize(trile_reflection_trile_reflection_smp, 0)); - vec2 _757 = vec2(_750.x, 1.0 - _750.y); - float _766 = _556.y; - color = mix(color, texture(trile_reflection_trile_reflection_smp, _757).xyz, vec3(_766)); - glow = max(glow, texture(trile_reflection_glow_trile_reflection_smp, _757).x * pow(_766, 0.4000000059604644775390625)); + 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(_668)), 1.0); - vec3 param_7 = v_to_camera; - float param_8 = glow; - write_scene(param_7, param_8); + 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); } */ @@ -1882,11 +1885,11 @@ fs_trile_source_glsl430 := u8.[ 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,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, + 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, @@ -2191,132 +2194,137 @@ fs_trile_source_glsl430 := u8.[ 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,0x36, - 0x30,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x72,0x69,0x6c, + 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,0x36,0x30,0x35,0x20,0x3d,0x20,0x70,0x72, + 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,0x36,0x30,0x35,0x20,0x3d, + 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,0x63,0x6f,0x6c,0x6f,0x72, - 0x20,0x3d,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x2a,0x20,0x6d,0x69,0x78,0x28, - 0x28,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x2b,0x20,0x5f,0x36,0x30,0x35,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, - 0x2c,0x20,0x76,0x5f,0x73,0x75,0x6e,0x2c,0x20,0x5f,0x35,0x39,0x31,0x20,0x2a,0x20, - 0x6d,0x69,0x78,0x28,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x76, - 0x5f,0x61,0x6f,0x29,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,0x38,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, - 0x38,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,0x3d,0x20,0x6d, - 0x69,0x78,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x5f,0x35,0x39,0x31,0x20,0x2a, - 0x20,0x76,0x5f,0x73,0x75,0x6e,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x6d,0x69,0x6e, - 0x28,0x31,0x2e,0x30,0x2c,0x20,0x28,0x28,0x5f,0x36,0x33,0x38,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,0x38,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29, + 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,0x38,0x20,0x3d,0x20,0x5f,0x35,0x34,0x38,0x2e,0x77, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6c,0x6f,0x77, - 0x20,0x3d,0x20,0x5f,0x36,0x36,0x38,0x20,0x2a,0x20,0x38,0x2e,0x30,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x31,0x20,0x3d,0x20, - 0x5f,0x35,0x35,0x36,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28, - 0x5f,0x36,0x37,0x31,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,0x36,0x39,0x36,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,0x31,0x29,0x29,0x20,0x2a,0x20,0x5f,0x36,0x37,0x31,0x3b,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28, - 0x28,0x76,0x5f,0x73,0x75,0x6e,0x20,0x2a,0x20,0x5f,0x35,0x39,0x31,0x29,0x20,0x2a, - 0x20,0x5f,0x36,0x39,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,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,0x36,0x39,0x36,0x20,0x2a,0x20,0x62,0x72, - 0x69,0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,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,0x34,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,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x28,0x5f,0x37,0x31,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x30,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,0x30,0x20,0x3d,0x20, - 0x5f,0x37,0x31,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20, - 0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x32,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x28,0x5f,0x37,0x32,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x36,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,0x32, - 0x36,0x20,0x3d,0x20,0x5f,0x37,0x32,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a, - 0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x33,0x36,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x32,0x36,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x33,0x36,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,0x33,0x36,0x20,0x3d,0x20,0x5f,0x37, - 0x32,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x28,0x5f,0x37,0x33,0x36,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x37,0x35,0x30,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, - 0x35,0x37,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x37,0x35,0x30,0x2e,0x78, - 0x2c,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x37,0x35,0x30,0x2e,0x79,0x29,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f, - 0x37,0x36,0x36,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,0x35,0x37,0x29,0x2e,0x78,0x79, - 0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x37,0x36,0x36,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,0x35, - 0x37,0x29,0x2e,0x78,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x5f,0x37,0x36,0x36,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,0x38,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29, + 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,0x37,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,0x38,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,0x37,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x29,0x3b,0x0a,0x7d, - 0x0a,0x0a,0x00, + 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 @@ -5061,8 +5069,8 @@ vs_trile_source_glsl300es := u8.[ in highp float v_facing; in highp vec3 v_world; in highp vec3 v_normal; - in highp float v_ao; 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; @@ -5245,74 +5253,77 @@ vs_trile_source_glsl300es := u8.[ highp vec3 param_2 = v_normal; highp vec3 _590 = sun_shadow(param_1, param_2); highp vec3 _591 = _590 * v_facing; - highp vec4 _605; + highp vec4 _598; if (trile_fs_params[1].w > 0.5) { highp vec3 param_3 = v_world; highp vec3 param_4 = v_normal; - _605 = probe_light(param_3, param_4); + _598 = probe_light(param_3, param_4); } else { - _605 = vec4(0.0); + _598 = vec4(0.0); } - highp vec3 color = albedo * mix((v_shade + _605.xyz) * mix(0.60000002384185791015625, 1.0, v_ao), v_sun, _591 * mix(0.25, 1.0, v_ao)); + 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 _638 = brightest(param_5); - if (_638 > 0.001000000047497451305389404296875) + highp float _637 = brightest(param_5); + if (_637 > 0.001000000047497451305389404296875) { - color = mix(color, _591 * v_sun, vec3(min(1.0, ((_638 - min(_591.x, min(_591.y, _591.z))) / _638) * 2.0))); + color += ((_627 * (vec3(1.0) - albedo)) * ((_637 - min(_591.x, min(_591.y, _591.z))) / _637)); } - highp float _668 = _548.w; - highp float glow = _668 * 8.0; - highp float _671 = _556.z; - if (_671 > 0.0) + 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 _696 = pow(max(dot(v_normal, normalize(normalize(v_to_camera) + trile_fs_params[0].xyz)), 0.0), mix(4.0, 96.0, _671)) * _671; - color += ((v_sun * _591) * _696); - highp vec3 param_6 = _591; - glow += ((_696 * brightest(param_6)) * 4.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 _714 = trile_fs_params[3].x > 0.5; - bool _720; - if (_714) + bool _718 = trile_fs_params[3].x > 0.5; + bool _724; + if (_718) { - _720 = _556.y > 0.0; + _724 = _556.y > 0.0; } else { - _720 = _714; + _724 = _718; } - bool _726; - if (_720) + bool _730; + if (_724) { - _726 = v_normal.y > 0.5; + _730 = v_normal.y > 0.5; } else { - _726 = _720; + _730 = _724; } - bool _736; - if (_726) + bool _740; + if (_730) { - _736 = abs(v_world.y - trile_fs_params[3].y) < 0.0199999995529651641845703125; + _740 = abs(v_world.y - trile_fs_params[3].y) < 0.0199999995529651641845703125; } else { - _736 = _726; + _740 = _730; } - if (_736) + if (_740) { - highp vec2 _750 = gl_FragCoord.xy / vec2(textureSize(trile_reflection_trile_reflection_smp, 0)); - highp vec2 _757 = vec2(_750.x, 1.0 - _750.y); - highp float _766 = _556.y; - color = mix(color, texture(trile_reflection_trile_reflection_smp, _757).xyz, vec3(_766)); - glow = max(glow, texture(trile_reflection_glow_trile_reflection_smp, _757).x * pow(_766, 0.4000000059604644775390625)); + 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(_668)), 1.0); - highp vec3 param_7 = v_to_camera; - highp float param_8 = glow; - write_scene(param_7, param_8); + 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); } */ @@ -5373,9 +5384,9 @@ fs_trile_source_glsl300es := u8.[ 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, - 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, + 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, @@ -5696,7 +5707,7 @@ fs_trile_source_glsl300es := u8.[ 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,0x36,0x30,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x74,0x72, + 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, @@ -5704,128 +5715,134 @@ fs_trile_source_glsl300es := u8.[ 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,0x36,0x30,0x35,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62, + 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,0x36,0x30,0x35,0x20,0x3d,0x20,0x76, + 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,0x63, - 0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x2a,0x20, - 0x6d,0x69,0x78,0x28,0x28,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x2b,0x20,0x5f, - 0x36,0x30,0x35,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,0x2c,0x20,0x76,0x5f,0x73,0x75,0x6e,0x2c,0x20,0x5f,0x35,0x39, - 0x31,0x20,0x2a,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x32,0x35,0x2c,0x20,0x31,0x2e, - 0x30,0x2c,0x20,0x76,0x5f,0x61,0x6f,0x29,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,0x38,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, - 0x38,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,0x3d,0x20,0x6d, - 0x69,0x78,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x5f,0x35,0x39,0x31,0x20,0x2a, - 0x20,0x76,0x5f,0x73,0x75,0x6e,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x6d,0x69,0x6e, - 0x28,0x31,0x2e,0x30,0x2c,0x20,0x28,0x28,0x5f,0x36,0x33,0x38,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,0x38,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,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,0x38,0x20,0x3d,0x20, - 0x5f,0x35,0x34,0x38,0x2e,0x77,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,0x5f, - 0x36,0x36,0x38,0x20,0x2a,0x20,0x38,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68, - 0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x31,0x20, - 0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x28,0x5f,0x36,0x37,0x31,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,0x36,0x39,0x36,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,0x31,0x29,0x29,0x20,0x2a,0x20, - 0x5f,0x36,0x37,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f, - 0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x28,0x76,0x5f,0x73,0x75,0x6e,0x20,0x2a, - 0x20,0x5f,0x35,0x39,0x31,0x29,0x20,0x2a,0x20,0x5f,0x36,0x39,0x36,0x29,0x3b,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,0x36,0x20,0x3d,0x20,0x5f,0x35,0x39, + 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,0x36,0x39,0x36,0x20,0x2a,0x20,0x62,0x72,0x69,0x67, - 0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x29,0x29,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,0x34,0x20,0x3d,0x20,0x74,0x72, + 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,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x28,0x5f,0x37,0x31,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x30,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36, + 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,0x30,0x20,0x3d,0x20,0x5f,0x37, - 0x31,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f, - 0x6f,0x6c,0x20,0x5f,0x37,0x32,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x28,0x5f,0x37,0x32,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x36,0x20,0x3d,0x20,0x76,0x5f,0x6e,0x6f, + 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,0x32,0x36,0x20, - 0x3d,0x20,0x5f,0x37,0x32,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20, - 0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x33,0x36,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x32,0x36,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x33,0x36,0x20,0x3d,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,0x33,0x36,0x20,0x3d,0x20,0x5f,0x37,0x32,0x36, + 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,0x33,0x36,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20, + 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,0x30,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f, + 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,0x35,0x37,0x20,0x3d,0x20,0x76, - 0x65,0x63,0x32,0x28,0x5f,0x37,0x35,0x30,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20, - 0x2d,0x20,0x5f,0x37,0x35,0x30,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20, + 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,0x36,0x36,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20, + 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,0x35,0x37,0x29,0x2e,0x78,0x79, - 0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x37,0x36,0x36,0x29,0x29,0x3b,0x0a, + 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,0x35, - 0x37,0x29,0x2e,0x78,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x5f,0x37,0x36,0x36,0x2c, + 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,0x38,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29, + 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,0x37,0x20,0x3d,0x20,0x76,0x5f,0x74,0x6f,0x5f, + 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,0x38,0x20, + 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,0x37,0x2c, - 0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 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 @@ -9222,74 +9239,77 @@ vs_trile_source_metal_macos := u8.[ 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 _605; + float4 _598; if (_193.probe_min.w > 0.5) { float3 param_3 = in.v_world; float3 param_4 = in.v_normal; - _605 = probe_light(param_3, param_4, _193, probe_index, probe_smp, probe_atlas); + _598 = probe_light(param_3, param_4, _193, probe_index, probe_smp, probe_atlas); } else { - _605 = float4(0.0); + _598 = float4(0.0); } - float3 color = albedo * mix((in.v_shade + _605.xyz) * mix(0.60000002384185791015625, 1.0, in.v_ao), in.v_sun, _591 * mix(0.25, 1.0, in.v_ao)); + 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 _638 = brightest(param_5); - if (_638 > 0.001000000047497451305389404296875) + float _637 = brightest(param_5); + if (_637 > 0.001000000047497451305389404296875) { - color = mix(color, _591 * in.v_sun, float3(fast::min(1.0, ((_638 - fast::min(_591.x, fast::min(_591.y, _591.z))) / _638) * 2.0))); + color += ((_627 * (float3(1.0) - albedo)) * ((_637 - fast::min(_591.x, fast::min(_591.y, _591.z))) / _637)); } - float _668 = _548.w; - float glow = _668 * 8.0; - float _671 = _556.z; - if (_671 > 0.0) + 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 _696 = 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, _671)) * _671; - color += ((in.v_sun * _591) * _696); - float3 param_6 = _591; - glow += ((_696 * brightest(param_6)) * 4.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 _714 = _193.use_reflection > 0.5; - bool _720; - if (_714) + bool _718 = _193.use_reflection > 0.5; + bool _724; + if (_718) { - _720 = _556.y > 0.0; + _724 = _556.y > 0.0; } else { - _720 = _714; + _724 = _718; } - bool _726; - if (_720) + bool _730; + if (_724) { - _726 = in.v_normal.y > 0.5; + _730 = in.v_normal.y > 0.5; } else { - _726 = _720; + _730 = _724; } - bool _736; - if (_726) + bool _740; + if (_730) { - _736 = abs(in.v_world.y - _193.reflection_height) < 0.0199999995529651641845703125; + _740 = abs(in.v_world.y - _193.reflection_height) < 0.0199999995529651641845703125; } else { - _736 = _726; + _740 = _730; } - if (_736) + if (_740) { - float2 _750 = gl_FragCoord.xy / float2(int2(trile_reflection.get_width(), trile_reflection.get_height())); - float2 _757 = float2(_750.x, 1.0 - _750.y); - float _766 = _556.y; - color = mix(color, trile_reflection.sample(trile_reflection_smp, _757).xyz, float3(_766)); - glow = fast::max(glow, trile_reflection_glow.sample(trile_reflection_smp, _757).x * powr(_766, 0.4000000059604644775390625)); + 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(_668)), 1.0); - float3 param_7 = in.v_to_camera; - float param_8 = glow; - write_scene(param_7, param_8, out.frag_glow, out.frag_scene); + 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; } @@ -9814,7 +9834,7 @@ fs_trile_source_metal_macos := u8.[ 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,0x36,0x30,0x35,0x3b, + 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, @@ -9822,137 +9842,141 @@ fs_trile_source_metal_macos := u8.[ 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,0x36,0x30,0x35,0x20,0x3d, + 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,0x36,0x30,0x35,0x20,0x3d,0x20,0x66, + 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,0x63,0x6f,0x6c, - 0x6f,0x72,0x20,0x3d,0x20,0x61,0x6c,0x62,0x65,0x64,0x6f,0x20,0x2a,0x20,0x6d,0x69, - 0x78,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x68,0x61,0x64,0x65,0x20,0x2b,0x20, - 0x5f,0x36,0x30,0x35,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,0x2c,0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73, - 0x75,0x6e,0x2c,0x20,0x5f,0x35,0x39,0x31,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,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,0x38,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, - 0x38,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,0x3d,0x20,0x6d, - 0x69,0x78,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x5f,0x35,0x39,0x31,0x20,0x2a, - 0x20,0x69,0x6e,0x2e,0x76,0x5f,0x73,0x75,0x6e,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74, - 0x33,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x69,0x6e,0x28,0x31,0x2e,0x30,0x2c, - 0x20,0x28,0x28,0x5f,0x36,0x33,0x38,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,0x38,0x29,0x20, - 0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a, - 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x36,0x38,0x20,0x3d, - 0x20,0x5f,0x35,0x34,0x38,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x20,0x67,0x6c,0x6f,0x77,0x20,0x3d,0x20,0x5f,0x36,0x36,0x38,0x20,0x2a, - 0x20,0x38,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20, - 0x5f,0x36,0x37,0x31,0x20,0x3d,0x20,0x5f,0x35,0x35,0x36,0x2e,0x7a,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x36,0x37,0x31,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,0x36,0x39,0x36,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,0x31,0x29,0x29,0x20, - 0x2a,0x20,0x5f,0x36,0x37,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x2b,0x3d,0x20,0x28,0x28,0x69,0x6e,0x2e,0x76,0x5f, - 0x73,0x75,0x6e,0x20,0x2a,0x20,0x5f,0x35,0x39,0x31,0x29,0x20,0x2a,0x20,0x5f,0x36, - 0x39,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,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,0x36,0x39,0x36,0x20,0x2a,0x20,0x62,0x72,0x69, - 0x67,0x68,0x74,0x65,0x73,0x74,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,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,0x34,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,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x28,0x5f,0x37,0x31,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x30,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,0x30,0x20,0x3d,0x20,0x5f,0x37, - 0x31,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x62,0x6f, - 0x6f,0x6c,0x20,0x5f,0x37,0x32,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x28,0x5f,0x37,0x32,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x32,0x36,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, - 0x32,0x36,0x20,0x3d,0x20,0x5f,0x37,0x32,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d, - 0x0a,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x37,0x33,0x36,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x32,0x36,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x37,0x33,0x36, - 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, + 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, - 0x36,0x20,0x3d,0x20,0x5f,0x37,0x32,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x33,0x36,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,0x30,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,0x35,0x37,0x20,0x3d,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x32,0x28,0x5f,0x37,0x35,0x30,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20, - 0x2d,0x20,0x5f,0x37,0x35,0x30,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x36,0x36,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,0x35,0x37,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61, - 0x74,0x33,0x28,0x5f,0x37,0x36,0x36,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,0x35, - 0x37,0x29,0x2e,0x78,0x20,0x2a,0x20,0x70,0x6f,0x77,0x72,0x28,0x5f,0x37,0x36,0x36, - 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, - 0x38,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,0x37,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, - 0x38,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, - 0x37,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,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, - + 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 diff --git a/src/renderer_sokol/shaders/trile.glsl b/src/renderer_sokol/shaders/trile.glsl index ddbded5..6c4f8b1 100644 --- a/src/renderer_sokol/shaders/trile.glsl +++ b/src/renderer_sokol/shaders/trile.glsl @@ -92,8 +92,8 @@ layout(binding=4) uniform texture3D probe_atlas; // per brick 32^3 probes, 3 t layout(binding=2) uniform sampler probe_smp; const float GLOSS_GLOW = 4.0; // how much a full gloss highlight blooms +const float SUN_GLOW = 1.5; const float REFLECTED_GLOW_CURVE = 0.4; // below 1, reflected glow fades slower than reflected colour -const float GLASS_PROJECTION = 2.0; // how strongly coloured sunlight paints its colour on const int PROBE_BRICKS_PER_COLUMN = 16; @@ -160,20 +160,17 @@ void main() { if (v_tint > 1.5) albedo = mix(albedo, vec3(1.0, 0.2, 0.2), 0.5); else if (v_tint > 0.5) albedo = mix(albedo, vec3(0.2, 1.0, 0.2), 0.5); vec3 sun = v_facing * sun_shadow(v_world, v_normal); - vec3 lit = sun * mix(0.25, 1.0, v_ao); vec4 probe = probe_min.w > 0.5 ? probe_light(v_world, v_normal) : vec4(0.0); - vec3 shade = v_shade + probe.rgb; - vec3 light = mix(shade * mix(0.6, 1.0, v_ao), v_sun, lit); - vec3 color = albedo * light; + vec3 shade = (v_shade + probe.rgb) * mix(0.6, 1.0, v_ao); + vec3 incoming = v_sun * sun * mix(0.25, 1.0, v_ao); + vec3 color = albedo * (shade + incoming); - // Light through glass paints the glass colour onto what it hits, so the pattern - // shows on dark surfaces too, not only where the albedo can reflect it. float bright = brightest(sun); if (bright > 0.001) { float tinted = (bright - min(sun.r, min(sun.g, sun.b))) / bright; - color = mix(color, sun * v_sun, min(1.0, tinted * GLASS_PROJECTION)); + color += incoming * (1.0 - albedo) * tinted; } - float glow = swatch.a * EMISSIVE_GLOW; + float glow = swatch.a * EMISSIVE_GLOW + brightest(incoming) * SUN_GLOW; // Glossier is both stronger and sharper. if (material.b > 0.0) { diff --git a/src/renderer_sokol/triles.jai b/src/renderer_sokol/triles.jai index f9190fa..99bff5b 100644 --- a/src/renderer_sokol/triles.jai +++ b/src/renderer_sokol/triles.jai @@ -73,23 +73,36 @@ triles_upload :: (scene: *Scene) { triles.palette_image = sg_make_image(*desc); } + if triles.world_version != scene.world_version world_rebuild(scene); + array_reset_keeping_memory(*triles.instances); array_reset_keeping_memory(*triles.batches); + chunk_count := triles.world_chunks.count; + array_resize(*triles.cut_chunks, scene.views.count * chunk_count, initialize = false); + memset(triles.cut_chunks.data, 0, triles.cut_chunks.count); draws : [..]Keyed(Instance); draws.allocator = temp; for view, view_index: scene.views { array_reset_keeping_memory(*draws); if view.draw_world { - for chunk: scene.chunks for group: chunk.groups for group.instances { - position := chunk.origin + Vector3.{xx it.x, xx it.y, xx it.z}; - cut := trile_cut(.{xx view_index}, group.mesh, position); - array_add(*draws, .{group.mesh.id, .{position, xx it.orientation, 0, cut}}); + cut_chunks := array_view(triles.cut_chunks, view_index * chunk_count, chunk_count); + for view_cut_chunks(.{xx view_index}) { + index := table_find_pointer(*triles.chunk_index, it); + if index cut_chunks[index.*] = true; + } + for batch: triles.world_batches { + if !batch.cuttable || !cut_chunks[batch.chunk] continue; + for batch.first..batch.first + batch.count - 1 { + instance := triles.world_instances[it]; + instance.cut = trile_cut(.{xx view_index}, .{batch.mesh}, instance.position); + array_add(*draws, .{MAIN_ONLY_KEY | cast(s64) batch.mesh, instance}); + } } } for scene.triles { if it.view.index != view_index continue; - preview : s64 = ifx it.tint != .NONE then PREVIEW_KEY else 0; + preview : s64 = ifx it.tint != .NONE then MAIN_ONLY_KEY else 0; cut := ifx preview then 0.0 else trile_cut(it.view, it.mesh, it.position); array_add(*draws, .{preview | it.mesh.id, .{it.position, xx it.orientation, xx it.tint, cut}}); } @@ -104,14 +117,13 @@ triles_draw_glass_shadow :: (pass: *Pass) { apply_uniforms(UB_view_params, *pass.params); triles.params.show_hidden = 1; apply_uniforms(UB_trile_params, *triles.params); - for triles.batches { - if it.view_index != pass.view_index || it.key & PREVIEW_KEY continue; - mesh := slot_get(*triles.meshes, xx it.key); + for pass_draws(pass) { + mesh := slot_get(*triles.meshes, it.mesh); if !mesh || mesh.index_count == 0 continue; bind : sg_bindings; bind.vertex_buffers[0] = mesh.vertices; bind.index_buffer = mesh.indices; - bind.vertex_buffers[1] = triles.stream.buffer; + bind.vertex_buffers[1] = it.buffer; bind.vertex_buffer_offsets[1] = it.first * size_of(Instance); bind.images[IMG_palette] = triles.palette_image; bind.samplers[SMP_palette_smp] = samplers.nearest_clamp; @@ -137,15 +149,14 @@ triles_draw :: (pass: *Pass) { apply_uniforms(UB_trile_fs_params, *fs_params); } - for triles.batches { - if it.view_index != pass.view_index || (pass.kind != .MAIN && it.key & PREVIEW_KEY) continue; - mesh := slot_get(*triles.meshes, xx (it.key & ~PREVIEW_KEY)); + for pass_draws(pass) { + mesh := slot_get(*triles.meshes, it.mesh); if !mesh || mesh.index_count == 0 continue; bind : sg_bindings; bind.vertex_buffers[0] = mesh.vertices; bind.index_buffer = mesh.indices; - bind.vertex_buffers[1] = triles.stream.buffer; + bind.vertex_buffers[1] = it.buffer; bind.vertex_buffer_offsets[1] = it.first * size_of(Instance); bind.images[IMG_palette] = triles.palette_image; bind.samplers[SMP_palette_smp] = samplers.nearest_clamp; @@ -176,7 +187,27 @@ Instance :: struct { cut : float; // 0..1 dissolved away from the camera, still casts shadows } -PREVIEW_KEY :: 1 << 32; +MAIN_ONLY_KEY :: 1 << 32; + +World_Chunk :: struct { + key : Chunk_Key; + origin : Vector3; +} + +World_Batch :: struct { + mesh : u32; + chunk : s32; + cuttable : bool; + first : s32; + count : s32; +} + +Trile_Draw :: struct { + mesh : u32; + buffer : sg_buffer; + first : s32; + count : s32; +} triles : struct { pipeline : sg_pipeline; @@ -192,6 +223,94 @@ triles : struct { instances : [..]Instance; batches : [..]Batch; stream : Stream_Buffer; + + world_version : u64; + world_chunks : [..]World_Chunk; + chunk_index : Table(Chunk_Key, s32, chunk_key_hash, chunk_key_compare); + world_batches : [..]World_Batch; + world_instances : [..]Instance; + world_buffer : sg_buffer; + cut_chunks : [..]bool; +} + +world_rebuild :: (scene: *Scene) { + triles.world_version = scene.world_version; + array_reset_keeping_memory(*triles.world_chunks); + array_reset_keeping_memory(*triles.world_batches); + array_reset_keeping_memory(*triles.world_instances); + table_reset(*triles.chunk_index); + + for scene.chunks array_add(*triles.world_chunks, .{it_index, it.origin}); + quick_sort(triles.world_chunks, (a: World_Chunk, b: World_Chunk) -> s64 { + if a.key.x != b.key.x return a.key.x - b.key.x; + if a.key.z != b.key.z return a.key.z - b.key.z; + return a.key.y - b.key.y; + }); + + Piece :: struct { + key : s64; + chunk : s32; + group : *World_Group; + } + pieces : [..]Piece; + pieces.allocator = temp; + for chunk, index: triles.world_chunks { + table_set(*triles.chunk_index, chunk.key, xx index); + scene_chunk := table_find_pointer(*scene.chunks, chunk.key); + for * scene_chunk.groups array_add(*pieces, .{(cast(s64) it.mesh.id << 32) | index, xx index, it}); + } + quick_sort(pieces, (a: Piece, b: Piece) -> s64 { return a.key - b.key; }); + + occluders := world_occluders(); + for pieces { + chunk := triles.world_chunks[it.chunk]; + batch := World_Batch.{mesh = it.group.mesh.id, chunk = it.chunk, cuttable = trile_mesh_cuttable(it.group.mesh), first = xx triles.world_instances.count}; + for instance: it.group.instances { + if trile_buried(*occluders, chunk.key, instance.x, instance.y, instance.z) continue; + position := chunk.origin + Vector3.{xx instance.x, xx instance.y, xx instance.z}; + array_add(*triles.world_instances, .{position, xx instance.orientation, 0, 0}); + } + batch.count = xx (triles.world_instances.count - batch.first); + if batch.count array_add(*triles.world_batches, batch); + } + + if triles.world_buffer.id sg_destroy_buffer(triles.world_buffer); + triles.world_buffer = .{}; + if triles.world_instances.count { + size := triles.world_instances.count * size_of(Instance); + triles.world_buffer = sg_make_buffer(*(sg_buffer_desc.{ data = .{ triles.world_instances.data, xx size } })); + } +} + +pass_draws :: (pass: *Pass) -> []Trile_Draw { + draws : [..]Trile_Draw; + draws.allocator = temp; + main := pass.kind == .MAIN; + + if pass.view.draw_world && triles.world_batches.count { + chunk_count := triles.world_chunks.count; + visible := NewArray(chunk_count, bool,, temp); + for triles.world_chunks visible[it_index] = box_in_frustum(pass.frustum, it.origin, it.origin + Vector3.{CHUNK_SIZE, CHUNK_SIZE, CHUNK_SIZE}); + cut_chunks := array_view(triles.cut_chunks, pass.view_index * chunk_count, chunk_count); + + run : Trile_Draw; + for triles.world_batches { + if !visible[it.chunk] || (main && it.cuttable && cut_chunks[it.chunk]) continue; + if run.count && run.mesh == it.mesh && run.first + run.count == it.first { + run.count += it.count; + continue; + } + if run.count array_add(*draws, run); + run = .{it.mesh, triles.world_buffer, it.first, it.count}; + } + if run.count array_add(*draws, run); + } + + for triles.batches { + if it.view_index != pass.view_index || (!main && it.key & MAIN_ONLY_KEY) continue; + array_add(*draws, .{xx (it.key & ~MAIN_ONLY_KEY), triles.stream.buffer, it.first, it.count}); + } + return draws; } make_mesh :: (mesh: *Mesh, vertices: []Trile_Vertex, indices: []u16) { diff --git a/src/rendering/scene.jai b/src/rendering/scene.jai index a94ef16..124ca46 100644 --- a/src/rendering/scene.jai +++ b/src/rendering/scene.jai @@ -94,19 +94,19 @@ Ui_Vertex :: struct { trile_mesh_create :: (trile: *Trile) -> Trile_Mesh { vertices, indices := mesh_trile(trile); mesh := Trile_Mesh.{renderer_trile_mesh_create(vertices, indices)}; - set_mesh_cut(mesh, trile.cut); + set_mesh_info(mesh, trile.cut, trile_fills_cell(trile)); return mesh; } trile_mesh_update :: (mesh: Trile_Mesh, trile: *Trile) { vertices, indices := mesh_trile(trile); renderer_trile_mesh_update(mesh.id, vertices, indices); - set_mesh_cut(mesh, trile.cut); + set_mesh_info(mesh, trile.cut, trile_fills_cell(trile)); } trile_mesh_destroy :: (mesh: Trile_Mesh) { renderer_trile_mesh_destroy(mesh.id); - set_mesh_cut(mesh, .NONE); + set_mesh_info(mesh, .NONE, false); } swatch_set :: (id: u8, color: [3]u8, reflectivity: u8, gloss: u8, emittance: u8, glass: bool) { @@ -142,6 +142,7 @@ Probe :: struct { PROBES_PER_CHUNK :: CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE; world_set_chunk :: (key: Chunk_Key, origin: Vector3, groups: []World_Group) { + scene.world_version += 1; chunk := find_or_add(*scene.chunks, key); chunk.origin = origin; for chunk.groups array_free(it.instances); @@ -156,12 +157,14 @@ world_set_chunk :: (key: Chunk_Key, origin: Vector3, groups: []World_Group) { world_remove_chunk :: (key: Chunk_Key) { chunk := table_find_pointer(*scene.chunks, key); if !chunk return; + scene.world_version += 1; for chunk.groups array_free(it.instances); array_free(chunk.groups); table_remove(*scene.chunks, key); } world_clear :: () { + scene.world_version += 1; for chunk: scene.chunks { for chunk.groups array_free(it.instances); array_free(chunk.groups); @@ -221,6 +224,65 @@ trile_cut :: (view: View_Id, mesh: Trile_Mesh, position: Vector3) -> float { return result; } +view_cut_chunks :: (view: View_Id) -> []Chunk_Key { + keys : [..]Chunk_Key; + keys.allocator = temp; + cut := scene.view_cuts[view.index]; + if !cut.enabled return keys; + + for scene.chunks { + if chunk_column_distance(it.origin, cut.focus) <= CUT_RADIUS array_add(*keys, it_index); + } + unpack :: (bits: s64) -> s32 { return xx (((bits & 0xFFFFF) ^ 0x80000) - 0x80000); } + for scene.cut_fades { + if (it_index >> 60) != view.index continue; + array_add_if_unique(*keys, world_to_chunk_coord(unpack(it_index >> 40), unpack(it_index >> 20), unpack(it_index)), chunk_key_compare); + } + return keys; +} + +trile_mesh_cuttable :: (mesh: Trile_Mesh) -> bool { + return mesh_cut(mesh) != .NONE; +} + +OCCLUDER_WORDS :: CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE / 64; +World_Occluders :: Table(Chunk_Key, *[OCCLUDER_WORDS]u64, chunk_key_hash, chunk_key_compare); + +world_occluders :: () -> World_Occluders { + occluders : World_Occluders; + occluders.allocator = temp; + for chunk: scene.chunks { + bits := New([OCCLUDER_WORDS]u64,, temp); + for group: chunk.groups { + if !mesh_occludes(group.mesh) continue; + for group.instances { + cell := cast(s64) it.x + cast(s64) it.y * CHUNK_SIZE + cast(s64) it.z * CHUNK_SIZE * CHUNK_SIZE; + bits.*[cell >> 6] |= (cast(u64) 1) << cast(u64) (cell & 63); + } + } + table_set(*occluders, it_index, bits); + } + return occluders; +} + +trile_buried :: (occluders: *World_Occluders, key: Chunk_Key, x: s32, y: s32, z: s32) -> bool { + occluded :: (occluders: *World_Occluders, key: Chunk_Key, x: s32, y: s32, z: s32) -> bool { + c := s32.[x, y, z]; + k := s32.[key.x, key.y, key.z]; + for 0..2 { + if c[it] < 0 { c[it] += CHUNK_SIZE; k[it] -= 1; } + if c[it] >= CHUNK_SIZE { c[it] -= CHUNK_SIZE; k[it] += 1; } + } + bits := table_find_pointer(occluders, .{k[0], k[1], k[2]}); + if !bits return false; + cell := cast(s64) c[0] + c[1] * CHUNK_SIZE + c[2] * CHUNK_SIZE * CHUNK_SIZE; + return ((bits.*.*[cell >> 6] >> cast(u64) (cell & 63)) & 1) != 0; + } + return occluded(occluders, key, x - 1, y, z) && occluded(occluders, key, x + 1, y, z) + && occluded(occluders, key, x, y - 1, z) && occluded(occluders, key, x, y + 1, z) + && occluded(occluders, key, x, y, z - 1) && occluded(occluders, key, x, y, z + 1); +} + draw_trile :: (view: View_Id, mesh: Trile_Mesh, position: Vector3, orientation: u8, tint := Trile_Tint.NONE) { array_add(*scene.triles, .{view, mesh, position, orientation, tint}); } @@ -309,7 +371,9 @@ Trile_Vertex :: struct { Scene :: struct { chunks : Table(Chunk_Key, Scene_Chunk, chunk_key_hash, chunk_key_compare); - mesh_cuts : [..]Trile_Cut; // by mesh id + world_version : u64; + mesh_cuts : [..]Trile_Cut; // by mesh id + mesh_occluders : [..]bool; views : [..]View; view_proj : [..]Matrix4; @@ -362,9 +426,34 @@ scene_end_frame :: (width: s32, height: s32, time: float) { scene : Scene; -set_mesh_cut :: (mesh: Trile_Mesh, cut: Trile_Cut) { - if scene.mesh_cuts.count <= mesh.id array_resize(*scene.mesh_cuts, mesh.id + 1); +set_mesh_info :: (mesh: Trile_Mesh, cut: Trile_Cut, fills_cell: bool) { + if scene.mesh_cuts.count <= mesh.id { + array_resize(*scene.mesh_cuts, mesh.id + 1); + array_resize(*scene.mesh_occluders, mesh.id + 1); + } scene.mesh_cuts[mesh.id] = cut; + scene.mesh_occluders[mesh.id] = fills_cell && cut == .NONE; + scene.world_version += 1; +} + +mesh_occludes :: (mesh: Trile_Mesh) -> bool { + if mesh.id >= scene.mesh_occluders.count return false; + return scene.mesh_occluders[mesh.id]; +} + +trile_fills_cell :: (trile: *Trile) -> bool { + if !trile.is_opaque return false; + for x: 0..15 for y: 0..15 for z: 0..15 { + id := trile.trixels[x][y][z]; + if !id || g_swatches[id].glass return false; + } + return true; +} + +chunk_column_distance :: (origin: Vector3, point: Vector3) -> float { + dx := max(max(origin.x - point.x, point.x - origin.x - CHUNK_SIZE), 0); + dz := max(max(origin.z - point.z, point.z - origin.z - CHUNK_SIZE), 0); + return sqrt(dx * dx + dz * dz); } mesh_cut :: (mesh: Trile_Mesh) -> Trile_Cut { @@ -382,13 +471,16 @@ make_view_cut :: (view: View) -> View_Cut { to_camera := Vector2.{view.camera.position.x - view.focus.x, view.camera.position.z - view.focus.z}; if length(to_camera) > 0.0001 cut.toward_camera = normalize(to_camera); - for chunk: scene.chunks for group: chunk.groups { - if mesh_cut(group.mesh) != .ROOF continue; - for group.instances { - p := chunk.origin + Vector3.{xx it.x, xx it.y, xx it.z}; - if p.y <= cut.floor continue; - if length(Vector2.{p.x + 0.5 - view.focus.x, p.z + 0.5 - view.focus.z}) > CUT_RADIUS continue; - cut.height = min(cut.height, p.y); + for chunk: scene.chunks { + if chunk.origin.y + CHUNK_SIZE <= cut.floor || chunk_column_distance(chunk.origin, view.focus) > CUT_RADIUS continue; + for group: chunk.groups { + if mesh_cut(group.mesh) != .ROOF continue; + for group.instances { + p := chunk.origin + Vector3.{xx it.x, xx it.y, xx it.z}; + if p.y <= cut.floor continue; + if length(Vector2.{p.x + 0.5 - view.focus.x, p.z + 0.5 - view.focus.z}) > CUT_RADIUS continue; + cut.height = min(cut.height, p.y); + } } } return cut;