From a3fee27cfe957fd8feae99082d6db45274b48da0 Mon Sep 17 00:00:00 2001 From: itaskaev2 <165683571+itaskaev2@users.noreply.github.com> Date: Sat, 14 Nov 2026 18:19:58 +0100 Subject: [PATCH] Leave surfaces turned away from the sun out of the contact shadows The contact shadow march darkened the whole lit colour of every pixel whose ray toward the sun passed behind geometry. On a face turned away from the sun the ray runs into that face at once, so every such face within 80 m was darkened by the full strength, although it gets no direct sunlight to lose: what was darkened was its ambient light and the fog the composite had already added. In hazy scenes (the Gerudo sandstorm) the shaded rock faces and the undersides of overhangs showed as dark smoky silhouettes in the haze, and objects such as a wagon lost their fogged look. The shader now takes the surface normal from the linear depth and scales the shadow by how far the surface faces the sun: none for faces turned away, a growing share from a grazing angle on. Co-Authored-By: Claude Opus 5.5 --- runtime/contact_shadow_spv.h | 379 +++++++++++++++++----------- runtime/shaders/contact_shadow.comp | 31 ++- runtime/vk_contact.c | 8 +- 3 files changed, 263 insertions(+), 155 deletions(-) diff --git a/runtime/contact_shadow_spv.h b/runtime/contact_shadow_spv.h index 7d506c8f..bfaa874c 100644 --- a/runtime/contact_shadow_spv.h +++ b/runtime/contact_shadow_spv.h @@ -1,156 +1,239 @@ // Generated by tools/build_shaders.py from runtime/shaders/contact_shadow.comp; do not edit. -// source sha256 b452a1920e59c4d83b2c994b0c6573cc1e479f7032a1310a7432d11c5c2e9908 +// source sha256 7e625632717c105f85856cfd1ce4002453e379bd7f4a7fd0b35096af0af93770 #pragma once #include static const uint32_t contact_shadow_spv[] = { - 0x07230203, 0x00010300, 0x000d000b, 0x000001b1, 0x00000000, 0x00020011, 0x00000001, 0x00020011, + 0x07230203, 0x00010300, 0x000d000b, 0x0000038b, 0x00000000, 0x00020011, 0x00000001, 0x00020011, 0x00000031, 0x0006000b, 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, - 0x00000000, 0x00000001, 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x00000069, - 0x00060010, 0x00000004, 0x00000011, 0x00000008, 0x00000008, 0x00000001, 0x00030047, 0x00000027, - 0x00000002, 0x00050048, 0x00000027, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000027, - 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x00000027, 0x00000002, 0x00000023, 0x00000020, - 0x00050048, 0x00000027, 0x00000003, 0x00000023, 0x00000030, 0x00040047, 0x00000069, 0x0000000b, - 0x0000001c, 0x00040047, 0x00000088, 0x00000021, 0x00000000, 0x00040047, 0x00000088, 0x00000022, - 0x00000000, 0x00040047, 0x0000013f, 0x00000021, 0x00000001, 0x00040047, 0x0000013f, 0x00000022, - 0x00000000, 0x00040047, 0x0000015c, 0x0000000b, 0x00000019, 0x00020013, 0x00000002, 0x00030021, + 0x00000000, 0x00000001, 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000000f4, + 0x00060010, 0x00000004, 0x00000011, 0x00000008, 0x00000008, 0x00000001, 0x00030047, 0x00000033, + 0x00000002, 0x00050048, 0x00000033, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000033, + 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x00000033, 0x00000002, 0x00000023, 0x00000020, + 0x00050048, 0x00000033, 0x00000003, 0x00000023, 0x00000030, 0x00040047, 0x00000086, 0x00000021, + 0x00000000, 0x00040047, 0x00000086, 0x00000022, 0x00000000, 0x00040047, 0x000000f4, 0x0000000b, + 0x0000001c, 0x00040047, 0x000001d4, 0x00000021, 0x00000001, 0x00040047, 0x000001d4, 0x00000022, + 0x00000000, 0x00040047, 0x000001f1, 0x0000000b, 0x00000019, 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00030016, 0x00000006, 0x00000020, 0x00040017, 0x00000007, 0x00000006, - 0x00000002, 0x00040017, 0x0000000a, 0x00000006, 0x00000003, 0x0004002b, 0x00000006, 0x0000001b, - 0x40000000, 0x0004002b, 0x00000006, 0x0000001d, 0x3f800000, 0x00040015, 0x00000020, 0x00000020, - 0x00000000, 0x0004002b, 0x00000020, 0x00000021, 0x00000000, 0x00040017, 0x00000026, 0x00000006, - 0x00000004, 0x0006001e, 0x00000027, 0x00000026, 0x00000026, 0x00000026, 0x00000026, 0x00040020, - 0x00000028, 0x00000009, 0x00000027, 0x0004003b, 0x00000028, 0x00000029, 0x00000009, 0x00040015, - 0x0000002a, 0x00000020, 0x00000001, 0x0004002b, 0x0000002a, 0x0000002b, 0x00000000, 0x00040020, - 0x0000002c, 0x00000009, 0x00000006, 0x0004002b, 0x00000020, 0x00000030, 0x00000001, 0x0004002b, - 0x00000020, 0x0000003f, 0x00000002, 0x0004002b, 0x00000006, 0x00000043, 0x3f000000, 0x0004002b, - 0x00000006, 0x00000059, 0x4253ee82, 0x0004002b, 0x00000006, 0x0000005b, 0x3d897143, 0x0004002b, - 0x00000006, 0x0000005c, 0x3bbf4590, 0x0005002c, 0x00000007, 0x0000005d, 0x0000005b, 0x0000005c, - 0x00040017, 0x00000064, 0x0000002a, 0x00000002, 0x00040017, 0x00000067, 0x00000020, 0x00000003, - 0x00040020, 0x00000068, 0x00000001, 0x00000067, 0x0004003b, 0x00000068, 0x00000069, 0x00000001, - 0x00040017, 0x0000006a, 0x00000020, 0x00000002, 0x00020014, 0x0000006e, 0x0004002b, 0x0000002a, - 0x00000072, 0x00000002, 0x00090019, 0x00000085, 0x00000006, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x0003001b, 0x00000086, 0x00000085, 0x00040020, 0x00000087, - 0x00000000, 0x00000086, 0x0004003b, 0x00000087, 0x00000088, 0x00000000, 0x0004002b, 0x00000006, - 0x0000008f, 0x00000000, 0x0004002b, 0x00000006, 0x00000092, 0x3f7fbe77, 0x0004002b, 0x00000006, - 0x0000009e, 0x42a00000, 0x00040020, 0x000000a8, 0x00000009, 0x00000026, 0x0004002b, 0x0000002a, - 0x000000b4, 0x00000001, 0x0004002b, 0x00000020, 0x000000b5, 0x00000003, 0x0004002b, 0x00000006, - 0x000000bb, 0x3ecccccd, 0x0004002b, 0x00000006, 0x000000bc, 0x40400000, 0x0004002b, 0x00000006, - 0x000000c0, 0x3e19999a, 0x0004002b, 0x00000006, 0x000000c2, 0x3c23d70a, 0x0004002b, 0x00000006, - 0x000000cb, 0x3e800000, 0x0004002b, 0x0000002a, 0x000000da, 0x00000010, 0x0004002b, 0x00000006, - 0x000000e6, 0xbd4ccccd, 0x0005002c, 0x00000007, 0x000000f0, 0x0000008f, 0x0000008f, 0x00040017, - 0x000000f1, 0x0000006e, 0x00000002, 0x0005002c, 0x00000007, 0x000000f8, 0x0000001d, 0x0000001d, - 0x0004002b, 0x00000006, 0x00000114, 0x3ca3d70a, 0x0004002b, 0x00000006, 0x00000116, 0x3b03126f, - 0x0004002b, 0x00000006, 0x0000012b, 0x42200000, 0x0004002b, 0x0000002a, 0x00000137, 0x00000003, - 0x00090019, 0x0000013d, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000008, 0x00040020, 0x0000013e, 0x00000000, 0x0000013d, 0x0004003b, 0x0000013e, 0x0000013f, - 0x00000000, 0x0004002b, 0x00000020, 0x0000015b, 0x00000008, 0x0006002c, 0x00000067, 0x0000015c, - 0x0000015b, 0x0000015b, 0x00000030, 0x0005002c, 0x00000007, 0x000001ad, 0x00000043, 0x00000043, - 0x0004002b, 0x00000006, 0x000001af, 0x3dcccccd, 0x0004002b, 0x00000006, 0x000001b0, 0x3d800000, + 0x00000002, 0x00040017, 0x0000000a, 0x00000006, 0x00000003, 0x00040015, 0x00000019, 0x00000020, + 0x00000001, 0x00040017, 0x0000001a, 0x00000019, 0x00000002, 0x0004002b, 0x00000006, 0x00000027, + 0x40000000, 0x0004002b, 0x00000006, 0x00000029, 0x3f800000, 0x00040015, 0x0000002c, 0x00000020, + 0x00000000, 0x0004002b, 0x0000002c, 0x0000002d, 0x00000000, 0x00040017, 0x00000032, 0x00000006, + 0x00000004, 0x0006001e, 0x00000033, 0x00000032, 0x00000032, 0x00000032, 0x00000032, 0x00040020, + 0x00000034, 0x00000009, 0x00000033, 0x0004003b, 0x00000034, 0x00000035, 0x00000009, 0x0004002b, + 0x00000019, 0x00000036, 0x00000000, 0x00040020, 0x00000037, 0x00000009, 0x00000006, 0x0004002b, + 0x0000002c, 0x0000003b, 0x00000001, 0x0004002b, 0x0000002c, 0x0000004a, 0x00000002, 0x0004002b, + 0x00000006, 0x0000004e, 0x3f000000, 0x0004002b, 0x00000006, 0x00000064, 0x4253ee82, 0x0004002b, + 0x00000006, 0x00000066, 0x3d897143, 0x0004002b, 0x00000006, 0x00000067, 0x3bbf4590, 0x0005002c, + 0x00000007, 0x00000068, 0x00000066, 0x00000067, 0x0005002c, 0x0000001a, 0x00000070, 0x00000036, + 0x00000036, 0x0004002b, 0x00000019, 0x00000071, 0x00000002, 0x00040020, 0x00000072, 0x00000009, + 0x00000032, 0x0004002b, 0x00000019, 0x00000077, 0x00000001, 0x00090019, 0x00000083, 0x00000006, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0003001b, 0x00000084, + 0x00000083, 0x00040020, 0x00000085, 0x00000000, 0x00000084, 0x0004003b, 0x00000085, 0x00000086, + 0x00000000, 0x0005002c, 0x0000001a, 0x00000096, 0x00000077, 0x00000036, 0x0005002c, 0x0000001a, + 0x000000a1, 0x00000036, 0x00000077, 0x00020014, 0x000000b7, 0x0004002b, 0x00000006, 0x000000e5, + 0x00000000, 0x00040017, 0x000000f2, 0x0000002c, 0x00000003, 0x00040020, 0x000000f3, 0x00000001, + 0x000000f2, 0x0004003b, 0x000000f3, 0x000000f4, 0x00000001, 0x00040017, 0x000000f5, 0x0000002c, + 0x00000002, 0x0004002b, 0x00000006, 0x00000116, 0x3f7fbe77, 0x0004002b, 0x00000006, 0x00000122, + 0x42a00000, 0x0004002b, 0x00000006, 0x00000137, 0x3e99999a, 0x0004002b, 0x0000002c, 0x00000148, + 0x00000003, 0x0004002b, 0x00000006, 0x0000014e, 0x3ecccccd, 0x0004002b, 0x00000006, 0x0000014f, + 0x40400000, 0x0004002b, 0x00000006, 0x00000153, 0x3e19999a, 0x0004002b, 0x00000006, 0x00000155, + 0x3c23d70a, 0x0004002b, 0x00000006, 0x0000015e, 0x3e800000, 0x0004002b, 0x00000019, 0x0000016d, + 0x00000010, 0x0004002b, 0x00000006, 0x00000179, 0xbd4ccccd, 0x0005002c, 0x00000007, 0x00000183, + 0x000000e5, 0x000000e5, 0x00040017, 0x00000184, 0x000000b7, 0x00000002, 0x0005002c, 0x00000007, + 0x0000018b, 0x00000029, 0x00000029, 0x0004002b, 0x00000006, 0x000001a7, 0x3ca3d70a, 0x0004002b, + 0x00000006, 0x000001a9, 0x3b03126f, 0x0004002b, 0x00000006, 0x000001be, 0x42200000, 0x0004002b, + 0x00000019, 0x000001cc, 0x00000003, 0x00090019, 0x000001d2, 0x00000006, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000002, 0x00000008, 0x00040020, 0x000001d3, 0x00000000, 0x000001d2, + 0x0004003b, 0x000001d3, 0x000001d4, 0x00000000, 0x0004002b, 0x0000002c, 0x000001f0, 0x00000008, + 0x0006002c, 0x000000f2, 0x000001f1, 0x000001f0, 0x000001f0, 0x0000003b, 0x0005002c, 0x00000007, + 0x00000386, 0x0000004e, 0x0000004e, 0x0005002c, 0x0000001a, 0x00000387, 0x00000077, 0x00000077, + 0x0004002b, 0x00000006, 0x00000389, 0x3dcccccd, 0x0004002b, 0x00000006, 0x0000038a, 0x3d800000, 0x00050036, 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x000300f7, - 0x0000015d, 0x00000000, 0x000300fb, 0x00000021, 0x0000015e, 0x000200f8, 0x0000015e, 0x0004003d, - 0x00000067, 0x0000006b, 0x00000069, 0x0007004f, 0x0000006a, 0x0000006c, 0x0000006b, 0x0000006b, - 0x00000000, 0x00000001, 0x0004007c, 0x00000064, 0x0000006d, 0x0000006c, 0x00050051, 0x0000002a, - 0x00000071, 0x0000006d, 0x00000000, 0x00060041, 0x0000002c, 0x00000073, 0x00000029, 0x00000072, - 0x00000021, 0x0004003d, 0x00000006, 0x00000074, 0x00000073, 0x0004006e, 0x0000002a, 0x00000075, - 0x00000074, 0x000500af, 0x0000006e, 0x00000076, 0x00000071, 0x00000075, 0x000400a8, 0x0000006e, - 0x00000077, 0x00000076, 0x000300f7, 0x00000079, 0x00000000, 0x000400fa, 0x00000077, 0x00000078, - 0x00000079, 0x000200f8, 0x00000078, 0x00050051, 0x0000002a, 0x0000007b, 0x0000006d, 0x00000001, - 0x00060041, 0x0000002c, 0x0000007c, 0x00000029, 0x00000072, 0x00000030, 0x0004003d, 0x00000006, - 0x0000007d, 0x0000007c, 0x0004006e, 0x0000002a, 0x0000007e, 0x0000007d, 0x000500af, 0x0000006e, - 0x0000007f, 0x0000007b, 0x0000007e, 0x000200f9, 0x00000079, 0x000200f8, 0x00000079, 0x000700f5, - 0x0000006e, 0x00000080, 0x00000076, 0x0000015e, 0x0000007f, 0x00000078, 0x000300f7, 0x00000082, - 0x00000000, 0x000400fa, 0x00000080, 0x00000081, 0x00000082, 0x000200f8, 0x00000081, 0x000200f9, - 0x0000015d, 0x000200f8, 0x00000082, 0x0004003d, 0x00000086, 0x00000089, 0x00000088, 0x00040064, - 0x00000085, 0x0000008b, 0x00000089, 0x0007005f, 0x00000026, 0x0000008c, 0x0000008b, 0x0000006d, - 0x00000002, 0x0000002b, 0x00050051, 0x00000006, 0x0000008d, 0x0000008c, 0x00000000, 0x000500bc, - 0x0000006e, 0x00000090, 0x0000008d, 0x0000008f, 0x000500be, 0x0000006e, 0x00000093, 0x0000008d, - 0x00000092, 0x000500a6, 0x0000006e, 0x00000094, 0x00000090, 0x00000093, 0x000300f7, 0x00000096, - 0x00000000, 0x000400fa, 0x00000094, 0x00000095, 0x00000096, 0x000200f8, 0x00000095, 0x000200f9, - 0x0000015d, 0x000200f8, 0x00000096, 0x00060041, 0x0000002c, 0x0000009a, 0x00000029, 0x0000002b, - 0x0000003f, 0x0004003d, 0x00000006, 0x0000009b, 0x0000009a, 0x00050085, 0x00000006, 0x0000009c, - 0x0000008d, 0x0000009b, 0x000500ba, 0x0000006e, 0x0000009f, 0x0000009c, 0x0000009e, 0x000300f7, - 0x000000a1, 0x00000000, 0x000400fa, 0x0000009f, 0x000000a0, 0x000000a1, 0x000200f8, 0x000000a0, - 0x000200f9, 0x0000015d, 0x000200f8, 0x000000a1, 0x0004006f, 0x00000007, 0x000000a5, 0x0000006d, - 0x00050081, 0x00000007, 0x000000a7, 0x000000a5, 0x000001ad, 0x00050041, 0x000000a8, 0x000000a9, - 0x00000029, 0x00000072, 0x0004003d, 0x00000026, 0x000000aa, 0x000000a9, 0x0007004f, 0x00000007, - 0x000000ab, 0x000000aa, 0x000000aa, 0x00000002, 0x00000003, 0x00050085, 0x00000007, 0x000000ac, - 0x000000a7, 0x000000ab, 0x0005008e, 0x00000007, 0x00000167, 0x000000ac, 0x0000001b, 0x00050083, - 0x00000007, 0x00000169, 0x00000167, 0x000000f8, 0x00050051, 0x00000006, 0x0000016b, 0x00000169, - 0x00000000, 0x00050085, 0x00000006, 0x0000016d, 0x0000016b, 0x0000009c, 0x00060041, 0x0000002c, - 0x0000016e, 0x00000029, 0x0000002b, 0x00000021, 0x0004003d, 0x00000006, 0x0000016f, 0x0000016e, - 0x00050088, 0x00000006, 0x00000170, 0x0000016d, 0x0000016f, 0x00050051, 0x00000006, 0x00000172, - 0x00000169, 0x00000001, 0x0004007f, 0x00000006, 0x00000173, 0x00000172, 0x00050085, 0x00000006, - 0x00000175, 0x00000173, 0x0000009c, 0x00060041, 0x0000002c, 0x00000176, 0x00000029, 0x0000002b, - 0x00000030, 0x0004003d, 0x00000006, 0x00000177, 0x00000176, 0x00050088, 0x00000006, 0x00000178, - 0x00000175, 0x00000177, 0x0004007f, 0x00000006, 0x0000017a, 0x0000009c, 0x00060050, 0x0000000a, - 0x0000017b, 0x00000170, 0x00000178, 0x0000017a, 0x00060041, 0x0000002c, 0x000000b6, 0x00000029, - 0x000000b4, 0x000000b5, 0x0004003d, 0x00000006, 0x000000b7, 0x000000b6, 0x00050085, 0x00000006, - 0x000000ba, 0x0000009c, 0x000001af, 0x0008000c, 0x00000006, 0x000000bd, 0x00000001, 0x0000002b, - 0x000000ba, 0x000000bb, 0x000000bc, 0x00050085, 0x00000006, 0x000000be, 0x000000b7, 0x000000bd, - 0x00050085, 0x00000006, 0x000000c3, 0x0000009c, 0x000000c2, 0x00050081, 0x00000006, 0x000000c4, - 0x000000c0, 0x000000c3, 0x00050085, 0x00000006, 0x000000c8, 0x000000be, 0x000001b0, 0x00050094, - 0x00000006, 0x0000017f, 0x000000a5, 0x0000005d, 0x0006000c, 0x00000006, 0x00000180, 0x00000001, - 0x0000000a, 0x0000017f, 0x00050085, 0x00000006, 0x00000181, 0x00000059, 0x00000180, 0x0006000c, - 0x00000006, 0x00000182, 0x00000001, 0x0000000a, 0x00000181, 0x00050081, 0x00000006, 0x000000d0, - 0x000000cb, 0x00000182, 0x00050085, 0x00000006, 0x000000d1, 0x000000c8, 0x000000d0, 0x000200f9, - 0x000000d4, 0x000200f8, 0x000000d4, 0x000700f5, 0x00000006, 0x000001a7, 0x000000d1, 0x000000a1, - 0x00000129, 0x000000d7, 0x000700f5, 0x0000002a, 0x000001a6, 0x0000002b, 0x000000a1, 0x00000126, - 0x000000d7, 0x000500b1, 0x0000006e, 0x000000db, 0x000001a6, 0x000000da, 0x000400f6, 0x000000d6, - 0x000000d7, 0x00000000, 0x000400fa, 0x000000db, 0x000000d5, 0x000000d6, 0x000200f8, 0x000000d5, - 0x00050041, 0x000000a8, 0x000000de, 0x00000029, 0x000000b4, 0x0004003d, 0x00000026, 0x000000df, - 0x000000de, 0x0008004f, 0x0000000a, 0x000000e0, 0x000000df, 0x000000df, 0x00000000, 0x00000001, - 0x00000002, 0x0005008e, 0x0000000a, 0x000000e2, 0x000000e0, 0x000001a7, 0x00050081, 0x0000000a, - 0x000000e3, 0x0000017b, 0x000000e2, 0x00050051, 0x00000006, 0x000000e5, 0x000000e3, 0x00000002, - 0x000500be, 0x0000006e, 0x000000e7, 0x000000e5, 0x000000e6, 0x000300f7, 0x000000e9, 0x00000000, - 0x000400fa, 0x000000e7, 0x000000e8, 0x000000e9, 0x000200f8, 0x000000e8, 0x000200f9, 0x000000d6, - 0x000200f8, 0x000000e9, 0x0004007f, 0x00000006, 0x00000188, 0x000000e5, 0x00050051, 0x00000006, - 0x0000018a, 0x000000e3, 0x00000000, 0x00050085, 0x00000006, 0x0000018b, 0x00000043, 0x0000018a, - 0x00050085, 0x00000006, 0x0000018e, 0x0000018b, 0x0000016f, 0x00050088, 0x00000006, 0x00000190, - 0x0000018e, 0x00000188, 0x00050081, 0x00000006, 0x00000191, 0x00000043, 0x00000190, 0x00050051, - 0x00000006, 0x00000193, 0x000000e3, 0x00000001, 0x00050085, 0x00000006, 0x00000194, 0x00000043, - 0x00000193, 0x00050085, 0x00000006, 0x00000197, 0x00000194, 0x00000177, 0x00050088, 0x00000006, - 0x00000199, 0x00000197, 0x00000188, 0x00050083, 0x00000006, 0x0000019a, 0x00000043, 0x00000199, - 0x00050050, 0x00000007, 0x0000019b, 0x00000191, 0x0000019a, 0x000500b8, 0x000000f1, 0x000000f2, - 0x0000019b, 0x000000f0, 0x0004009a, 0x0000006e, 0x000000f3, 0x000000f2, 0x000400a8, 0x0000006e, - 0x000000f4, 0x000000f3, 0x000300f7, 0x000000f6, 0x00000000, 0x000400fa, 0x000000f4, 0x000000f5, - 0x000000f6, 0x000200f8, 0x000000f5, 0x000500ba, 0x000000f1, 0x000000f9, 0x0000019b, 0x000000f8, - 0x0004009a, 0x0000006e, 0x000000fa, 0x000000f9, 0x000200f9, 0x000000f6, 0x000200f8, 0x000000f6, - 0x000700f5, 0x0000006e, 0x000000fb, 0x000000f3, 0x000000e9, 0x000000fa, 0x000000f5, 0x000300f7, - 0x000000fd, 0x00000000, 0x000400fa, 0x000000fb, 0x000000fc, 0x000000fd, 0x000200f8, 0x000000fc, - 0x000200f9, 0x000000d6, 0x000200f8, 0x000000fd, 0x0004003d, 0x00000086, 0x00000100, 0x00000088, - 0x0007004f, 0x00000007, 0x00000104, 0x000000aa, 0x000000aa, 0x00000000, 0x00000001, 0x00050085, - 0x00000007, 0x00000105, 0x0000019b, 0x00000104, 0x0004006e, 0x00000064, 0x00000106, 0x00000105, - 0x00040064, 0x00000085, 0x00000107, 0x00000100, 0x0007005f, 0x00000026, 0x00000108, 0x00000107, - 0x00000106, 0x00000002, 0x0000002b, 0x00050051, 0x00000006, 0x00000109, 0x00000108, 0x00000000, - 0x00050085, 0x00000006, 0x0000010c, 0x00000109, 0x0000009b, 0x00050083, 0x00000006, 0x00000112, - 0x00000188, 0x0000010c, 0x00050085, 0x00000006, 0x00000117, 0x0000009c, 0x00000116, 0x00050081, - 0x00000006, 0x00000118, 0x00000114, 0x00000117, 0x000500ba, 0x0000006e, 0x00000119, 0x00000112, - 0x00000118, 0x000500b8, 0x0000006e, 0x0000011c, 0x00000112, 0x000000c4, 0x000500a7, 0x0000006e, - 0x0000011d, 0x00000119, 0x0000011c, 0x000300f7, 0x0000011f, 0x00000000, 0x000400fa, 0x0000011d, - 0x0000011e, 0x0000011f, 0x000200f8, 0x0000011e, 0x0004006f, 0x00000006, 0x00000121, 0x000001a6, - 0x00050085, 0x00000006, 0x00000122, 0x00000121, 0x000001b0, 0x00050083, 0x00000006, 0x00000123, - 0x0000001d, 0x00000122, 0x000200f9, 0x000000d6, 0x000200f8, 0x0000011f, 0x000200f9, 0x000000d7, - 0x000200f8, 0x000000d7, 0x00050080, 0x0000002a, 0x00000126, 0x000001a6, 0x000000b4, 0x00050081, - 0x00000006, 0x00000129, 0x000001a7, 0x000000c8, 0x000200f9, 0x000000d4, 0x000200f8, 0x000000d6, - 0x000b00f5, 0x00000006, 0x000001aa, 0x0000008f, 0x000000d4, 0x0000008f, 0x000000e8, 0x0000008f, - 0x000000fc, 0x00000123, 0x0000011e, 0x0008000c, 0x00000006, 0x0000012d, 0x00000001, 0x00000031, - 0x0000012b, 0x0000009e, 0x0000009c, 0x00050083, 0x00000006, 0x0000012e, 0x0000001d, 0x0000012d, - 0x00060041, 0x0000002c, 0x00000130, 0x00000029, 0x0000002b, 0x000000b5, 0x0004003d, 0x00000006, - 0x00000131, 0x00000130, 0x00050085, 0x00000006, 0x00000133, 0x00000131, 0x000001aa, 0x00050085, - 0x00000006, 0x00000135, 0x00000133, 0x0000012e, 0x00050083, 0x00000006, 0x00000136, 0x0000001d, - 0x00000135, 0x00060041, 0x0000002c, 0x00000138, 0x00000029, 0x00000137, 0x00000021, 0x0004003d, - 0x00000006, 0x00000139, 0x00000138, 0x000500ba, 0x0000006e, 0x0000013a, 0x00000139, 0x00000043, - 0x000300f7, 0x0000013c, 0x00000000, 0x000400fa, 0x0000013a, 0x0000013b, 0x0000013c, 0x000200f8, - 0x0000013b, 0x0004003d, 0x0000013d, 0x00000140, 0x0000013f, 0x00070050, 0x00000026, 0x00000143, - 0x00000136, 0x00000136, 0x00000136, 0x0000001d, 0x00040063, 0x00000140, 0x0000006d, 0x00000143, - 0x000200f9, 0x0000015d, 0x000200f8, 0x0000013c, 0x000500be, 0x0000006e, 0x00000146, 0x00000136, - 0x00000092, 0x000300f7, 0x00000148, 0x00000000, 0x000400fa, 0x00000146, 0x00000147, 0x00000148, - 0x000200f8, 0x00000147, 0x000200f9, 0x0000015d, 0x000200f8, 0x00000148, 0x0004003d, 0x0000013d, - 0x0000014c, 0x0000013f, 0x00050062, 0x00000026, 0x0000014e, 0x0000014c, 0x0000006d, 0x0004003d, - 0x0000013d, 0x0000014f, 0x0000013f, 0x0008004f, 0x0000000a, 0x00000152, 0x0000014e, 0x0000014e, - 0x00000000, 0x00000001, 0x00000002, 0x0005008e, 0x0000000a, 0x00000154, 0x00000152, 0x00000136, - 0x00050051, 0x00000006, 0x00000156, 0x0000014e, 0x00000003, 0x00050051, 0x00000006, 0x00000157, - 0x00000154, 0x00000000, 0x00050051, 0x00000006, 0x00000158, 0x00000154, 0x00000001, 0x00050051, - 0x00000006, 0x00000159, 0x00000154, 0x00000002, 0x00070050, 0x00000026, 0x0000015a, 0x00000157, - 0x00000158, 0x00000159, 0x00000156, 0x00040063, 0x0000014f, 0x0000006d, 0x0000015a, 0x000200f9, - 0x0000015d, 0x000200f8, 0x0000015d, 0x000100fd, 0x00010038, + 0x000001f2, 0x00000000, 0x000300fb, 0x0000002d, 0x000001f3, 0x000200f8, 0x000001f3, 0x0004003d, + 0x000000f2, 0x000000f6, 0x000000f4, 0x0007004f, 0x000000f5, 0x000000f7, 0x000000f6, 0x000000f6, + 0x00000000, 0x00000001, 0x0004007c, 0x0000001a, 0x000000f8, 0x000000f7, 0x00050051, 0x00000019, + 0x000000fb, 0x000000f8, 0x00000000, 0x00060041, 0x00000037, 0x000000fc, 0x00000035, 0x00000071, + 0x0000002d, 0x0004003d, 0x00000006, 0x000000fd, 0x000000fc, 0x0004006e, 0x00000019, 0x000000fe, + 0x000000fd, 0x000500af, 0x000000b7, 0x000000ff, 0x000000fb, 0x000000fe, 0x000400a8, 0x000000b7, + 0x00000100, 0x000000ff, 0x000300f7, 0x00000102, 0x00000000, 0x000400fa, 0x00000100, 0x00000101, + 0x00000102, 0x000200f8, 0x00000101, 0x00050051, 0x00000019, 0x00000104, 0x000000f8, 0x00000001, + 0x00060041, 0x00000037, 0x00000105, 0x00000035, 0x00000071, 0x0000003b, 0x0004003d, 0x00000006, + 0x00000106, 0x00000105, 0x0004006e, 0x00000019, 0x00000107, 0x00000106, 0x000500af, 0x000000b7, + 0x00000108, 0x00000104, 0x00000107, 0x000200f9, 0x00000102, 0x000200f8, 0x00000102, 0x000700f5, + 0x000000b7, 0x00000109, 0x000000ff, 0x000001f3, 0x00000108, 0x00000101, 0x000300f7, 0x0000010b, + 0x00000000, 0x000400fa, 0x00000109, 0x0000010a, 0x0000010b, 0x000200f8, 0x0000010a, 0x000200f9, + 0x000001f2, 0x000200f8, 0x0000010b, 0x0004003d, 0x00000084, 0x0000010e, 0x00000086, 0x00040064, + 0x00000083, 0x00000110, 0x0000010e, 0x0007005f, 0x00000032, 0x00000111, 0x00000110, 0x000000f8, + 0x00000002, 0x00000036, 0x00050051, 0x00000006, 0x00000112, 0x00000111, 0x00000000, 0x000500bc, + 0x000000b7, 0x00000114, 0x00000112, 0x000000e5, 0x000500be, 0x000000b7, 0x00000117, 0x00000112, + 0x00000116, 0x000500a6, 0x000000b7, 0x00000118, 0x00000114, 0x00000117, 0x000300f7, 0x0000011a, + 0x00000000, 0x000400fa, 0x00000118, 0x00000119, 0x0000011a, 0x000200f8, 0x00000119, 0x000200f9, + 0x000001f2, 0x000200f8, 0x0000011a, 0x00060041, 0x00000037, 0x0000011e, 0x00000035, 0x00000036, + 0x0000004a, 0x0004003d, 0x00000006, 0x0000011f, 0x0000011e, 0x00050085, 0x00000006, 0x00000120, + 0x00000112, 0x0000011f, 0x000500ba, 0x000000b7, 0x00000123, 0x00000120, 0x00000122, 0x000300f7, + 0x00000125, 0x00000000, 0x000400fa, 0x00000123, 0x00000124, 0x00000125, 0x000200f8, 0x00000124, + 0x000200f9, 0x000001f2, 0x000200f8, 0x00000125, 0x0004006f, 0x00000007, 0x00000129, 0x000000f8, + 0x00050081, 0x00000007, 0x0000012b, 0x00000129, 0x00000386, 0x00050041, 0x00000072, 0x0000012c, + 0x00000035, 0x00000071, 0x0004003d, 0x00000032, 0x0000012d, 0x0000012c, 0x0007004f, 0x00000007, + 0x0000012e, 0x0000012d, 0x0000012d, 0x00000002, 0x00000003, 0x00050085, 0x00000007, 0x0000012f, + 0x0000012b, 0x0000012e, 0x0005008e, 0x00000007, 0x000001fc, 0x0000012f, 0x00000027, 0x00050083, + 0x00000007, 0x000001fe, 0x000001fc, 0x0000018b, 0x00050051, 0x00000006, 0x00000200, 0x000001fe, + 0x00000000, 0x00050085, 0x00000006, 0x00000202, 0x00000200, 0x00000120, 0x00060041, 0x00000037, + 0x00000203, 0x00000035, 0x00000036, 0x0000002d, 0x0004003d, 0x00000006, 0x00000204, 0x00000203, + 0x00050088, 0x00000006, 0x00000205, 0x00000202, 0x00000204, 0x00050051, 0x00000006, 0x00000207, + 0x000001fe, 0x00000001, 0x0004007f, 0x00000006, 0x00000208, 0x00000207, 0x00050085, 0x00000006, + 0x0000020a, 0x00000208, 0x00000120, 0x00060041, 0x00000037, 0x0000020b, 0x00000035, 0x00000036, + 0x0000003b, 0x0004003d, 0x00000006, 0x0000020c, 0x0000020b, 0x00050088, 0x00000006, 0x0000020d, + 0x0000020a, 0x0000020c, 0x0004007f, 0x00000006, 0x0000020f, 0x00000120, 0x00060050, 0x0000000a, + 0x00000210, 0x00000205, 0x0000020d, 0x0000020f, 0x00050082, 0x0000001a, 0x00000222, 0x000000f8, + 0x00000096, 0x0007004f, 0x00000007, 0x00000271, 0x0000012d, 0x0000012d, 0x00000000, 0x00000001, + 0x0004006e, 0x0000001a, 0x00000272, 0x00000271, 0x00050082, 0x0000001a, 0x00000274, 0x00000272, + 0x00000387, 0x0008000c, 0x0000001a, 0x00000275, 0x00000001, 0x0000002d, 0x00000222, 0x00000070, + 0x00000274, 0x0004006f, 0x00000007, 0x00000277, 0x00000275, 0x00050081, 0x00000007, 0x00000279, + 0x00000277, 0x00000386, 0x00050085, 0x00000007, 0x0000027d, 0x00000279, 0x0000012e, 0x0004003d, + 0x00000084, 0x0000027e, 0x00000086, 0x00040064, 0x00000083, 0x00000280, 0x0000027e, 0x0007005f, + 0x00000032, 0x00000281, 0x00000280, 0x00000275, 0x00000002, 0x00000036, 0x00050051, 0x00000006, + 0x00000282, 0x00000281, 0x00000000, 0x00050085, 0x00000006, 0x00000285, 0x00000282, 0x0000011f, + 0x0005008e, 0x00000007, 0x0000028b, 0x0000027d, 0x00000027, 0x00050083, 0x00000007, 0x0000028d, + 0x0000028b, 0x0000018b, 0x00050051, 0x00000006, 0x0000028f, 0x0000028d, 0x00000000, 0x00050085, + 0x00000006, 0x00000291, 0x0000028f, 0x00000285, 0x00050088, 0x00000006, 0x00000294, 0x00000291, + 0x00000204, 0x00050051, 0x00000006, 0x00000296, 0x0000028d, 0x00000001, 0x0004007f, 0x00000006, + 0x00000297, 0x00000296, 0x00050085, 0x00000006, 0x00000299, 0x00000297, 0x00000285, 0x00050088, + 0x00000006, 0x0000029c, 0x00000299, 0x0000020c, 0x0004007f, 0x00000006, 0x0000029e, 0x00000285, + 0x00060050, 0x0000000a, 0x0000029f, 0x00000294, 0x0000029c, 0x0000029e, 0x00050080, 0x0000001a, + 0x00000225, 0x000000f8, 0x00000096, 0x0008000c, 0x0000001a, 0x000002ab, 0x00000001, 0x0000002d, + 0x00000225, 0x00000070, 0x00000274, 0x0004006f, 0x00000007, 0x000002ad, 0x000002ab, 0x00050081, + 0x00000007, 0x000002af, 0x000002ad, 0x00000386, 0x00050085, 0x00000007, 0x000002b3, 0x000002af, + 0x0000012e, 0x0004003d, 0x00000084, 0x000002b4, 0x00000086, 0x00040064, 0x00000083, 0x000002b6, + 0x000002b4, 0x0007005f, 0x00000032, 0x000002b7, 0x000002b6, 0x000002ab, 0x00000002, 0x00000036, + 0x00050051, 0x00000006, 0x000002b8, 0x000002b7, 0x00000000, 0x00050085, 0x00000006, 0x000002bb, + 0x000002b8, 0x0000011f, 0x0005008e, 0x00000007, 0x000002c1, 0x000002b3, 0x00000027, 0x00050083, + 0x00000007, 0x000002c3, 0x000002c1, 0x0000018b, 0x00050051, 0x00000006, 0x000002c5, 0x000002c3, + 0x00000000, 0x00050085, 0x00000006, 0x000002c7, 0x000002c5, 0x000002bb, 0x00050088, 0x00000006, + 0x000002ca, 0x000002c7, 0x00000204, 0x00050051, 0x00000006, 0x000002cc, 0x000002c3, 0x00000001, + 0x0004007f, 0x00000006, 0x000002cd, 0x000002cc, 0x00050085, 0x00000006, 0x000002cf, 0x000002cd, + 0x000002bb, 0x00050088, 0x00000006, 0x000002d2, 0x000002cf, 0x0000020c, 0x0004007f, 0x00000006, + 0x000002d4, 0x000002bb, 0x00060050, 0x0000000a, 0x000002d5, 0x000002ca, 0x000002d2, 0x000002d4, + 0x00050082, 0x0000001a, 0x00000228, 0x000000f8, 0x000000a1, 0x0008000c, 0x0000001a, 0x000002e1, + 0x00000001, 0x0000002d, 0x00000228, 0x00000070, 0x00000274, 0x0004006f, 0x00000007, 0x000002e3, + 0x000002e1, 0x00050081, 0x00000007, 0x000002e5, 0x000002e3, 0x00000386, 0x00050085, 0x00000007, + 0x000002e9, 0x000002e5, 0x0000012e, 0x0004003d, 0x00000084, 0x000002ea, 0x00000086, 0x00040064, + 0x00000083, 0x000002ec, 0x000002ea, 0x0007005f, 0x00000032, 0x000002ed, 0x000002ec, 0x000002e1, + 0x00000002, 0x00000036, 0x00050051, 0x00000006, 0x000002ee, 0x000002ed, 0x00000000, 0x00050085, + 0x00000006, 0x000002f1, 0x000002ee, 0x0000011f, 0x0005008e, 0x00000007, 0x000002f7, 0x000002e9, + 0x00000027, 0x00050083, 0x00000007, 0x000002f9, 0x000002f7, 0x0000018b, 0x00050051, 0x00000006, + 0x000002fb, 0x000002f9, 0x00000000, 0x00050085, 0x00000006, 0x000002fd, 0x000002fb, 0x000002f1, + 0x00050088, 0x00000006, 0x00000300, 0x000002fd, 0x00000204, 0x00050051, 0x00000006, 0x00000302, + 0x000002f9, 0x00000001, 0x0004007f, 0x00000006, 0x00000303, 0x00000302, 0x00050085, 0x00000006, + 0x00000305, 0x00000303, 0x000002f1, 0x00050088, 0x00000006, 0x00000308, 0x00000305, 0x0000020c, + 0x0004007f, 0x00000006, 0x0000030a, 0x000002f1, 0x00060050, 0x0000000a, 0x0000030b, 0x00000300, + 0x00000308, 0x0000030a, 0x00050080, 0x0000001a, 0x0000022b, 0x000000f8, 0x000000a1, 0x0008000c, + 0x0000001a, 0x00000317, 0x00000001, 0x0000002d, 0x0000022b, 0x00000070, 0x00000274, 0x0004006f, + 0x00000007, 0x00000319, 0x00000317, 0x00050081, 0x00000007, 0x0000031b, 0x00000319, 0x00000386, + 0x00050085, 0x00000007, 0x0000031f, 0x0000031b, 0x0000012e, 0x0004003d, 0x00000084, 0x00000320, + 0x00000086, 0x00040064, 0x00000083, 0x00000322, 0x00000320, 0x0007005f, 0x00000032, 0x00000323, + 0x00000322, 0x00000317, 0x00000002, 0x00000036, 0x00050051, 0x00000006, 0x00000324, 0x00000323, + 0x00000000, 0x00050085, 0x00000006, 0x00000327, 0x00000324, 0x0000011f, 0x0005008e, 0x00000007, + 0x0000032d, 0x0000031f, 0x00000027, 0x00050083, 0x00000007, 0x0000032f, 0x0000032d, 0x0000018b, + 0x00050051, 0x00000006, 0x00000331, 0x0000032f, 0x00000000, 0x00050085, 0x00000006, 0x00000333, + 0x00000331, 0x00000327, 0x00050088, 0x00000006, 0x00000336, 0x00000333, 0x00000204, 0x00050051, + 0x00000006, 0x00000338, 0x0000032f, 0x00000001, 0x0004007f, 0x00000006, 0x00000339, 0x00000338, + 0x00050085, 0x00000006, 0x0000033b, 0x00000339, 0x00000327, 0x00050088, 0x00000006, 0x0000033e, + 0x0000033b, 0x0000020c, 0x0004007f, 0x00000006, 0x00000340, 0x00000327, 0x00060050, 0x0000000a, + 0x00000341, 0x00000336, 0x0000033e, 0x00000340, 0x00050083, 0x00000006, 0x00000231, 0x00000120, + 0x000002bb, 0x0006000c, 0x00000006, 0x00000232, 0x00000001, 0x00000004, 0x00000231, 0x00050083, + 0x00000006, 0x00000237, 0x00000285, 0x00000120, 0x0006000c, 0x00000006, 0x00000238, 0x00000001, + 0x00000004, 0x00000237, 0x000500b8, 0x000000b7, 0x00000239, 0x00000232, 0x00000238, 0x000300f7, + 0x00000242, 0x00000000, 0x000400fa, 0x00000239, 0x0000023a, 0x0000023e, 0x000200f8, 0x0000023a, + 0x00050083, 0x0000000a, 0x0000023d, 0x000002d5, 0x00000210, 0x000200f9, 0x00000242, 0x000200f8, + 0x0000023e, 0x00050083, 0x0000000a, 0x00000241, 0x00000210, 0x0000029f, 0x000200f9, 0x00000242, + 0x000200f8, 0x00000242, 0x000700f5, 0x0000000a, 0x0000037c, 0x0000023d, 0x0000023a, 0x00000241, + 0x0000023e, 0x00050083, 0x00000006, 0x00000248, 0x00000120, 0x00000327, 0x0006000c, 0x00000006, + 0x00000249, 0x00000001, 0x00000004, 0x00000248, 0x00050083, 0x00000006, 0x0000024e, 0x000002f1, + 0x00000120, 0x0006000c, 0x00000006, 0x0000024f, 0x00000001, 0x00000004, 0x0000024e, 0x000500b8, + 0x000000b7, 0x00000250, 0x00000249, 0x0000024f, 0x000300f7, 0x00000259, 0x00000000, 0x000400fa, + 0x00000250, 0x00000251, 0x00000255, 0x000200f8, 0x00000251, 0x00050083, 0x0000000a, 0x00000254, + 0x00000341, 0x00000210, 0x000200f9, 0x00000259, 0x000200f8, 0x00000255, 0x00050083, 0x0000000a, + 0x00000258, 0x00000210, 0x0000030b, 0x000200f9, 0x00000259, 0x000200f8, 0x00000259, 0x000700f5, + 0x0000000a, 0x0000037d, 0x00000254, 0x00000251, 0x00000258, 0x00000255, 0x0007000c, 0x0000000a, + 0x0000025d, 0x00000001, 0x00000044, 0x0000037c, 0x0000037d, 0x0006000c, 0x0000000a, 0x0000025e, + 0x00000001, 0x00000045, 0x0000025d, 0x00050094, 0x00000006, 0x00000261, 0x0000025e, 0x00000210, + 0x000500ba, 0x000000b7, 0x00000262, 0x00000261, 0x000000e5, 0x000300f7, 0x00000268, 0x00000000, + 0x000400fa, 0x00000262, 0x00000263, 0x00000266, 0x000200f8, 0x00000263, 0x0004007f, 0x0000000a, + 0x00000265, 0x0000025e, 0x000200f9, 0x00000268, 0x000200f8, 0x00000266, 0x000200f9, 0x00000268, + 0x000200f8, 0x00000268, 0x000700f5, 0x0000000a, 0x0000037e, 0x00000265, 0x00000263, 0x0000025e, + 0x00000266, 0x00050041, 0x00000072, 0x0000013d, 0x00000035, 0x00000077, 0x0004003d, 0x00000032, + 0x0000013e, 0x0000013d, 0x0008004f, 0x0000000a, 0x0000013f, 0x0000013e, 0x0000013e, 0x00000000, + 0x00000001, 0x00000002, 0x00050094, 0x00000006, 0x00000140, 0x0000037e, 0x0000013f, 0x0008000c, + 0x00000006, 0x00000141, 0x00000001, 0x00000031, 0x000000e5, 0x00000137, 0x00000140, 0x000500bc, + 0x000000b7, 0x00000143, 0x00000141, 0x000000e5, 0x000300f7, 0x00000145, 0x00000000, 0x000400fa, + 0x00000143, 0x00000144, 0x00000145, 0x000200f8, 0x00000144, 0x000200f9, 0x000001f2, 0x000200f8, + 0x00000145, 0x00060041, 0x00000037, 0x00000149, 0x00000035, 0x00000077, 0x00000148, 0x0004003d, + 0x00000006, 0x0000014a, 0x00000149, 0x00050085, 0x00000006, 0x0000014d, 0x00000120, 0x00000389, + 0x0008000c, 0x00000006, 0x00000150, 0x00000001, 0x0000002b, 0x0000014d, 0x0000014e, 0x0000014f, + 0x00050085, 0x00000006, 0x00000151, 0x0000014a, 0x00000150, 0x00050085, 0x00000006, 0x00000156, + 0x00000120, 0x00000155, 0x00050081, 0x00000006, 0x00000157, 0x00000153, 0x00000156, 0x00050085, + 0x00000006, 0x0000015b, 0x00000151, 0x0000038a, 0x00050094, 0x00000006, 0x00000345, 0x00000129, + 0x00000068, 0x0006000c, 0x00000006, 0x00000346, 0x00000001, 0x0000000a, 0x00000345, 0x00050085, + 0x00000006, 0x00000347, 0x00000064, 0x00000346, 0x0006000c, 0x00000006, 0x00000348, 0x00000001, + 0x0000000a, 0x00000347, 0x00050081, 0x00000006, 0x00000163, 0x0000015e, 0x00000348, 0x00050085, + 0x00000006, 0x00000164, 0x0000015b, 0x00000163, 0x000200f9, 0x00000167, 0x000200f8, 0x00000167, + 0x000700f5, 0x00000006, 0x00000380, 0x00000164, 0x00000145, 0x000001bc, 0x0000016a, 0x000700f5, + 0x00000019, 0x0000037f, 0x00000036, 0x00000145, 0x000001b9, 0x0000016a, 0x000500b1, 0x000000b7, + 0x0000016e, 0x0000037f, 0x0000016d, 0x000400f6, 0x00000169, 0x0000016a, 0x00000000, 0x000400fa, + 0x0000016e, 0x00000168, 0x00000169, 0x000200f8, 0x00000168, 0x0005008e, 0x0000000a, 0x00000175, + 0x0000013f, 0x00000380, 0x00050081, 0x0000000a, 0x00000176, 0x00000210, 0x00000175, 0x00050051, + 0x00000006, 0x00000178, 0x00000176, 0x00000002, 0x000500be, 0x000000b7, 0x0000017a, 0x00000178, + 0x00000179, 0x000300f7, 0x0000017c, 0x00000000, 0x000400fa, 0x0000017a, 0x0000017b, 0x0000017c, + 0x000200f8, 0x0000017b, 0x000200f9, 0x00000169, 0x000200f8, 0x0000017c, 0x0004007f, 0x00000006, + 0x0000034e, 0x00000178, 0x00050051, 0x00000006, 0x00000350, 0x00000176, 0x00000000, 0x00050085, + 0x00000006, 0x00000351, 0x0000004e, 0x00000350, 0x00050085, 0x00000006, 0x00000354, 0x00000351, + 0x00000204, 0x00050088, 0x00000006, 0x00000356, 0x00000354, 0x0000034e, 0x00050081, 0x00000006, + 0x00000357, 0x0000004e, 0x00000356, 0x00050051, 0x00000006, 0x00000359, 0x00000176, 0x00000001, + 0x00050085, 0x00000006, 0x0000035a, 0x0000004e, 0x00000359, 0x00050085, 0x00000006, 0x0000035d, + 0x0000035a, 0x0000020c, 0x00050088, 0x00000006, 0x0000035f, 0x0000035d, 0x0000034e, 0x00050083, + 0x00000006, 0x00000360, 0x0000004e, 0x0000035f, 0x00050050, 0x00000007, 0x00000361, 0x00000357, + 0x00000360, 0x000500b8, 0x00000184, 0x00000185, 0x00000361, 0x00000183, 0x0004009a, 0x000000b7, + 0x00000186, 0x00000185, 0x000400a8, 0x000000b7, 0x00000187, 0x00000186, 0x000300f7, 0x00000189, + 0x00000000, 0x000400fa, 0x00000187, 0x00000188, 0x00000189, 0x000200f8, 0x00000188, 0x000500ba, + 0x00000184, 0x0000018c, 0x00000361, 0x0000018b, 0x0004009a, 0x000000b7, 0x0000018d, 0x0000018c, + 0x000200f9, 0x00000189, 0x000200f8, 0x00000189, 0x000700f5, 0x000000b7, 0x0000018e, 0x00000186, + 0x0000017c, 0x0000018d, 0x00000188, 0x000300f7, 0x00000190, 0x00000000, 0x000400fa, 0x0000018e, + 0x0000018f, 0x00000190, 0x000200f8, 0x0000018f, 0x000200f9, 0x00000169, 0x000200f8, 0x00000190, + 0x0004003d, 0x00000084, 0x00000193, 0x00000086, 0x00050085, 0x00000007, 0x00000198, 0x00000361, + 0x00000271, 0x0004006e, 0x0000001a, 0x00000199, 0x00000198, 0x00040064, 0x00000083, 0x0000019a, + 0x00000193, 0x0007005f, 0x00000032, 0x0000019b, 0x0000019a, 0x00000199, 0x00000002, 0x00000036, + 0x00050051, 0x00000006, 0x0000019c, 0x0000019b, 0x00000000, 0x00050085, 0x00000006, 0x0000019f, + 0x0000019c, 0x0000011f, 0x00050083, 0x00000006, 0x000001a5, 0x0000034e, 0x0000019f, 0x00050085, + 0x00000006, 0x000001aa, 0x00000120, 0x000001a9, 0x00050081, 0x00000006, 0x000001ab, 0x000001a7, + 0x000001aa, 0x000500ba, 0x000000b7, 0x000001ac, 0x000001a5, 0x000001ab, 0x000500b8, 0x000000b7, + 0x000001af, 0x000001a5, 0x00000157, 0x000500a7, 0x000000b7, 0x000001b0, 0x000001ac, 0x000001af, + 0x000300f7, 0x000001b2, 0x00000000, 0x000400fa, 0x000001b0, 0x000001b1, 0x000001b2, 0x000200f8, + 0x000001b1, 0x0004006f, 0x00000006, 0x000001b4, 0x0000037f, 0x00050085, 0x00000006, 0x000001b5, + 0x000001b4, 0x0000038a, 0x00050083, 0x00000006, 0x000001b6, 0x00000029, 0x000001b5, 0x000200f9, + 0x00000169, 0x000200f8, 0x000001b2, 0x000200f9, 0x0000016a, 0x000200f8, 0x0000016a, 0x00050080, + 0x00000019, 0x000001b9, 0x0000037f, 0x00000077, 0x00050081, 0x00000006, 0x000001bc, 0x00000380, + 0x0000015b, 0x000200f9, 0x00000167, 0x000200f8, 0x00000169, 0x000b00f5, 0x00000006, 0x00000383, + 0x000000e5, 0x00000167, 0x000000e5, 0x0000017b, 0x000000e5, 0x0000018f, 0x000001b6, 0x000001b1, + 0x0008000c, 0x00000006, 0x000001c0, 0x00000001, 0x00000031, 0x000001be, 0x00000122, 0x00000120, + 0x00050083, 0x00000006, 0x000001c1, 0x00000029, 0x000001c0, 0x00060041, 0x00000037, 0x000001c3, + 0x00000035, 0x00000036, 0x00000148, 0x0004003d, 0x00000006, 0x000001c4, 0x000001c3, 0x00050085, + 0x00000006, 0x000001c6, 0x000001c4, 0x00000383, 0x00050085, 0x00000006, 0x000001c8, 0x000001c6, + 0x000001c1, 0x00050085, 0x00000006, 0x000001ca, 0x000001c8, 0x00000141, 0x00050083, 0x00000006, + 0x000001cb, 0x00000029, 0x000001ca, 0x00060041, 0x00000037, 0x000001cd, 0x00000035, 0x000001cc, + 0x0000002d, 0x0004003d, 0x00000006, 0x000001ce, 0x000001cd, 0x000500ba, 0x000000b7, 0x000001cf, + 0x000001ce, 0x0000004e, 0x000300f7, 0x000001d1, 0x00000000, 0x000400fa, 0x000001cf, 0x000001d0, + 0x000001d1, 0x000200f8, 0x000001d0, 0x0004003d, 0x000001d2, 0x000001d5, 0x000001d4, 0x00070050, + 0x00000032, 0x000001d8, 0x000001cb, 0x000001cb, 0x000001cb, 0x00000029, 0x00040063, 0x000001d5, + 0x000000f8, 0x000001d8, 0x000200f9, 0x000001f2, 0x000200f8, 0x000001d1, 0x000500be, 0x000000b7, + 0x000001db, 0x000001cb, 0x00000116, 0x000300f7, 0x000001dd, 0x00000000, 0x000400fa, 0x000001db, + 0x000001dc, 0x000001dd, 0x000200f8, 0x000001dc, 0x000200f9, 0x000001f2, 0x000200f8, 0x000001dd, + 0x0004003d, 0x000001d2, 0x000001e1, 0x000001d4, 0x00050062, 0x00000032, 0x000001e3, 0x000001e1, + 0x000000f8, 0x0004003d, 0x000001d2, 0x000001e4, 0x000001d4, 0x0008004f, 0x0000000a, 0x000001e7, + 0x000001e3, 0x000001e3, 0x00000000, 0x00000001, 0x00000002, 0x0005008e, 0x0000000a, 0x000001e9, + 0x000001e7, 0x000001cb, 0x00050051, 0x00000006, 0x000001eb, 0x000001e3, 0x00000003, 0x00050051, + 0x00000006, 0x000001ec, 0x000001e9, 0x00000000, 0x00050051, 0x00000006, 0x000001ed, 0x000001e9, + 0x00000001, 0x00050051, 0x00000006, 0x000001ee, 0x000001e9, 0x00000002, 0x00070050, 0x00000032, + 0x000001ef, 0x000001ec, 0x000001ed, 0x000001ee, 0x000001eb, 0x00040063, 0x000001e4, 0x000000f8, + 0x000001ef, 0x000200f9, 0x000001f2, 0x000200f8, 0x000001f2, 0x000100fd, 0x00010038, }; diff --git a/runtime/shaders/contact_shadow.comp b/runtime/shaders/contact_shadow.comp index 78828bb4..7c0935bf 100644 --- a/runtime/shaders/contact_shadow.comp +++ b/runtime/shaders/contact_shadow.comp @@ -1,7 +1,8 @@ #version 450 -// Screen-space contact shadows (runtime/vk_contact.c). Each pixel of the game's lit scene colour marches a short way -// toward the sun through the linear depth target; when the ray passes behind something close in front of it, the pixel -// is in a contact shadow the shadow maps are too coarse to show, and its colour is darkened. +// Screen-space contact shadows (runtime/vk_contact.c). Each pixel of the game's lit scene colour on a surface facing +// the sun marches a short way toward the sun through the linear depth target; when the ray passes behind something +// close in front of it, the pixel is in a contact shadow the shadow maps are too coarse to show, and its colour is +// darkened. layout(local_size_x = 8, local_size_y = 8) in; layout(binding = 0) uniform sampler2D lin_depth; // the game's linear depth: view distance / far @@ -28,6 +29,22 @@ float ign(vec2 px) { // interleaved gradient noise: a per-pixel start offset t return fract(52.9829189 * fract(dot(px, vec2(0.06711056, 0.00583715)))); } +vec3 pos_at(ivec2 q) { // the view-space position of a pixel, clamped to the image + q = clamp(q, ivec2(0), ivec2(pc.size.xy) - 1); + return view_pos((vec2(q) + 0.5) * pc.size.zw, texelFetch(lin_depth, q, 0).x * pc.proj.z); +} + +// The surface normal from the linear depth: on each axis the neighbour nearer in depth, so an edge pixel takes the +// slope of its own surface rather than the step to what lies behind it. Turned toward the camera. +vec3 normal_at(ivec2 px, vec3 p) { + vec3 l = pos_at(px - ivec2(1, 0)), r = pos_at(px + ivec2(1, 0)); + vec3 d = pos_at(px - ivec2(0, 1)), u = pos_at(px + ivec2(0, 1)); + vec3 dx = abs(r.z - p.z) < abs(p.z - l.z) ? r - p : p - l; + vec3 dy = abs(u.z - p.z) < abs(p.z - d.z) ? u - p : p - d; + vec3 n = normalize(cross(dx, dy)); + return dot(n, p) > 0.0 ? -n : n; +} + void main() { ivec2 px = ivec2(gl_GlobalInvocationID.xy); if (px.x >= int(pc.size.x) || px.y >= int(pc.size.y)) return; @@ -37,6 +54,12 @@ void main() { if (z > 80.0) return; vec2 uv = (vec2(px) + 0.5) * pc.size.zw; vec3 p = view_pos(uv, z); + // A contact shadow can only take away direct sunlight, and a surface turned away from the sun gets none: its march + // runs into the surface itself at once, and darkening it would darken the ambient light and the fog the composite + // already put on it (dark silhouettes of rock faces in the Gerudo sandstorm haze). Faces at a grazing angle to the + // sun get a share that grows with that angle. + float lit = smoothstep(0.0, 0.3, dot(normal_at(px, p), pc.light.xyz)); + if (lit <= 0.0) return; // the march grows with distance, as one pixel covers more ground; thickness keeps thin blades from hiding the sky float len = pc.light.w * clamp(z / 10.0, 0.4, 3.0); float thick = 0.15 + z * 0.01; @@ -56,7 +79,7 @@ void main() { } } float fade = 1.0 - smoothstep(40.0, 80.0, z); - float k = 1.0 - pc.proj.w * occ * fade; + float k = 1.0 - pc.proj.w * occ * fade * lit; if (pc.opt.x > 0.5) { imageStore(scene, px, vec4(k, k, k, 1.0)); return; diff --git a/runtime/vk_contact.c b/runtime/vk_contact.c index e7dee3b4..10944798 100644 --- a/runtime/vk_contact.c +++ b/runtime/vk_contact.c @@ -3,9 +3,11 @@ // (is_gbuffer), lights it in half resolution, and then composites the lighting into that scene colour in one pass // whose only target is the scene colour, with a D16 depth that sorts pixels into material classes (is_composite). // When the pass after the composite begins, or a dispatch or copy comes first, runtime/shaders/contact_shadow.comp -// marches each pixel a short way toward the sun through the linear depth and darkens the scene colour where the ray -// passes behind nearby geometry: the small shadows at feet, under stones and in grass that the shadow maps are too -// coarse for. Transparent surfaces, the sky and post-processing come after, untouched. +// marches each pixel of a surface facing the sun (normal from the linear depth) a short way toward the sun through the +// linear depth and darkens the scene colour where the ray passes behind nearby geometry: the small shadows at feet, +// under stones and in grass that the shadow maps are too coarse for. Surfaces turned away from the sun are left alone: +// they get no direct light to take away, and the colour the composite wrote already holds their ambient light and fog. +// Transparent surfaces, the sky and post-processing come after, untouched. // // vk_contact_plan decides that in replay order and vk_contact_exec records it: a chunked replay's scan // plans the march (vk_exec.c scan_contact) and the chunk that holds its op records it.