diff --git a/Cargo.lock b/Cargo.lock index ac1ab41a..d7b51e18 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -810,11 +810,11 @@ dependencies = [ "bevy_core_pipeline 0.16.1", "bevy_ecs 0.16.1", "bevy_egui", - "bevy_image", + "bevy_image 0.16.1", "bevy_log 0.16.1", "bevy_math 0.16.1", "bevy_pbr 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_state", @@ -868,6 +868,37 @@ dependencies = [ "serde", ] +[[package]] +name = "bevy_android" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e089776d5d8d79aedc896c7b1ef89f47da60838f5bfbda38aabbfcc150dc44e9" +dependencies = [ + "android-activity", +] + +[[package]] +name = "bevy_anti_alias" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d42a6f09fb5f40e5a065dcd383d40fdacefd0f940a26ead5bc1e83a4fd77ebd" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_camera", + "bevy_core_pipeline 0.17.1", + "bevy_derive 0.17.1", + "bevy_diagnostic 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_reflect 0.17.1", + "bevy_render 0.17.1", + "bevy_shader", + "bevy_utils 0.17.1", + "tracing", +] + [[package]] name = "bevy_app" version = "0.14.2" @@ -894,7 +925,7 @@ checksum = "4491cc4c718ae76b4c6883df58b94cc88b32dcd894ea8d5b603c7c7da72ca967" dependencies = [ "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_tasks 0.16.1", "bevy_utils 0.16.1", @@ -909,6 +940,29 @@ dependencies = [ "web-sys", ] +[[package]] +name = "bevy_app" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9527d9367eac6e38b4094a9b3ab727fabdf0744c739ee92af85bd1be2824455" +dependencies = [ + "bevy_derive 0.17.1", + "bevy_ecs 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_tasks 0.17.1", + "bevy_utils 0.17.1", + "cfg-if", + "console_error_panic_hook", + "ctrlc", + "downcast-rs 2.0.2", + "log", + "thiserror 2.0.16", + "variadics_please", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "bevy_args" version = "1.8.0" @@ -947,7 +1001,7 @@ dependencies = [ "futures-lite 2.6.1", "js-sys", "parking_lot", - "ron", + "ron 0.8.1", "serde", "thiserror 1.0.69", "uuid", @@ -969,7 +1023,7 @@ dependencies = [ "bevy_app 0.16.1", "bevy_asset_macros 0.16.1", "bevy_ecs 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_tasks 0.16.1", "bevy_utils 0.16.1", @@ -977,7 +1031,47 @@ dependencies = [ "bitflags 2.9.4", "blake3", "crossbeam-channel", - "derive_more", + "derive_more 1.0.0", + "disqualified", + "downcast-rs 2.0.2", + "either", + "futures-io", + "futures-lite 2.6.1", + "js-sys", + "parking_lot", + "ron 0.8.1", + "serde", + "stackfuture", + "thiserror 2.0.16", + "tracing", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "bevy_asset" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c538c82129cf2d0dff4864be41edf73dcd8d4a38a9d59a4948adb413697024" +dependencies = [ + "async-broadcast 0.7.2", + "async-fs", + "async-lock 3.4.1", + "atomicow", + "bevy_android", + "bevy_app 0.17.1", + "bevy_asset_macros 0.17.1", + "bevy_ecs 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_tasks 0.17.1", + "bevy_utils 0.17.1", + "bitflags 2.9.4", + "blake3", + "crossbeam-channel", + "derive_more 2.0.1", "disqualified", "downcast-rs 2.0.2", "either", @@ -985,7 +1079,7 @@ dependencies = [ "futures-lite 2.6.1", "js-sys", "parking_lot", - "ron", + "ron 0.10.1", "serde", "stackfuture", "thiserror 2.0.16", @@ -1020,6 +1114,44 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "bevy_asset_macros" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3543268d0987803e75a2abd3e4a3d9ba8dbc0e904478086b0d27ad9d38f256" +dependencies = [ + "bevy_macro_utils 0.17.1", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "bevy_camera" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21dec6f7b2ad30a910a8897966871dd351e6eb9cb621d3d73a987d9919599b89" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_color 0.17.1", + "bevy_derive 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_mesh 0.17.1", + "bevy_reflect 0.17.1", + "bevy_transform 0.17.1", + "bevy_utils 0.17.1", + "bevy_window 0.17.1", + "derive_more 2.0.1", + "downcast-rs 2.0.2", + "serde", + "smallvec", + "thiserror 2.0.16", + "wgpu-types 26.0.0", +] + [[package]] name = "bevy_color" version = "0.14.3" @@ -1044,13 +1176,29 @@ dependencies = [ "bevy_math 0.16.1", "bevy_reflect 0.16.1", "bytemuck", - "derive_more", + "derive_more 1.0.0", "encase 0.10.0", "serde", "thiserror 2.0.16", "wgpu-types 24.0.0", ] +[[package]] +name = "bevy_color" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d68bc1fc38c31eac8d84b168214870739b9bc6850d017f25536bf864c9adc9c6" +dependencies = [ + "bevy_math 0.17.1", + "bevy_reflect 0.17.1", + "bytemuck", + "derive_more 2.0.1", + "encase 0.11.2", + "serde", + "thiserror 2.0.16", + "wgpu-types 26.0.0", +] + [[package]] name = "bevy_core" version = "0.14.2" @@ -1102,9 +1250,9 @@ dependencies = [ "bevy_derive 0.16.1", "bevy_diagnostic 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_transform 0.16.1", @@ -1120,6 +1268,35 @@ dependencies = [ "tracing", ] +[[package]] +name = "bevy_core_pipeline" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa36f102864cbade07df77f56d1465bdf53fc74676cda488cffef6507d6b3383" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_camera", + "bevy_color 0.17.1", + "bevy_derive 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_render 0.17.1", + "bevy_shader", + "bevy_transform 0.17.1", + "bevy_utils 0.17.1", + "bevy_window 0.17.1", + "bitflags 2.9.4", + "nonmax", + "radsort", + "smallvec", + "thiserror 2.0.16", + "tracing", +] + [[package]] name = "bevy_derive" version = "0.14.2" @@ -1142,6 +1319,17 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "bevy_derive" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374863e54340f9571b12478f7ff5db8deb14d7f83e283b6c889f211317892cc0" +dependencies = [ + "bevy_macro_utils 0.17.1", + "quote", + "syn 2.0.106", +] + [[package]] name = "bevy_diagnostic" version = "0.14.2" @@ -1165,7 +1353,7 @@ checksum = "48797366f312a8f31e237d08ce3ee70162591282d2bfe7c5ad8be196fb263e55" dependencies = [ "bevy_app 0.16.1", "bevy_ecs 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_tasks 0.16.1", "bevy_time 0.16.1", "bevy_utils 0.16.1", @@ -1174,6 +1362,23 @@ dependencies = [ "serde", ] +[[package]] +name = "bevy_diagnostic" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da524091c1f4144cb8d54bf6dc66a9af7226a9469984c6e4be8c02e7203e4bca" +dependencies = [ + "atomic-waker", + "bevy_app 0.17.1", + "bevy_ecs 0.17.1", + "bevy_platform 0.17.1", + "bevy_tasks 0.17.1", + "bevy_time 0.17.1", + "const-fnv1a-hash", + "log", + "serde", +] + [[package]] name = "bevy_ecs" version = "0.14.2" @@ -1202,7 +1407,7 @@ checksum = "3c2bf6521aae57a0ec3487c4bfb59e36c4a378e834b626a4bea6a885af2fdfe7" dependencies = [ "arrayvec 0.7.6", "bevy_ecs_macros 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_ptr 0.16.1", "bevy_reflect 0.16.1", "bevy_tasks 0.16.1", @@ -1210,7 +1415,7 @@ dependencies = [ "bitflags 2.9.4", "bumpalo", "concurrent-queue", - "derive_more", + "derive_more 1.0.0", "disqualified", "fixedbitset 0.5.7", "indexmap", @@ -1222,6 +1427,34 @@ dependencies = [ "variadics_please", ] +[[package]] +name = "bevy_ecs" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e509d757323e068e905f8582feec0021e3e3560b8c9ddc2a6bf4a701ec45af9e" +dependencies = [ + "arrayvec 0.7.6", + "bevy_ecs_macros 0.17.1", + "bevy_platform 0.17.1", + "bevy_ptr 0.17.1", + "bevy_reflect 0.17.1", + "bevy_tasks 0.17.1", + "bevy_utils 0.17.1", + "bitflags 2.9.4", + "bumpalo", + "concurrent-queue", + "derive_more 2.0.1", + "fixedbitset 0.5.7", + "indexmap", + "log", + "nonmax", + "serde", + "slotmap", + "smallvec", + "thiserror 2.0.16", + "variadics_please", +] + [[package]] name = "bevy_ecs_macros" version = "0.14.2" @@ -1246,6 +1479,18 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "bevy_ecs_macros" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f1ef45cc7c4d269776db0279e702a18d8191f22d893bf9b8babcb4ee2f1a65" +dependencies = [ + "bevy_macro_utils 0.17.1", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "bevy_egui" version = "0.34.1" @@ -1257,11 +1502,11 @@ dependencies = [ "bevy_asset 0.16.1", "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_input 0.16.1", "bevy_log 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_time 0.16.1", @@ -1301,6 +1546,16 @@ dependencies = [ "encase_derive_impl 0.10.0", ] +[[package]] +name = "bevy_encase_derive" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a1a2f91645642065cfe4e37e0cf5dcc93e204ae553e48428279a5554ba3c88" +dependencies = [ + "bevy_macro_utils 0.17.1", + "encase_derive_impl 0.11.2", +] + [[package]] name = "bevy_eventlistener" version = "0.8.1" @@ -1350,6 +1605,7 @@ dependencies = [ "bevy_file_asset", "bevy_interleave", "bevy_panorbit_camera", + "bevy_solari", "bevy_transform_gizmo", "bevy_web_asset", "bincode2", @@ -1363,6 +1619,7 @@ dependencies = [ "futures-intrusive", "half", "kd-tree", + "mcubes", "noise", "ply-rs", "pollster", @@ -1411,7 +1668,7 @@ dependencies = [ "bevy_core_pipeline 0.16.1", "bevy_ecs 0.16.1", "bevy_gizmos_macros 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_math 0.16.1", "bevy_pbr 0.16.1", "bevy_reflect 0.16.1", @@ -1472,7 +1729,7 @@ dependencies = [ "bevy_asset 0.16.1", "bevy_color 0.16.2", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_utils 0.16.1", "bitflags 2.9.4", @@ -1488,6 +1745,33 @@ dependencies = [ "wgpu-types 24.0.0", ] +[[package]] +name = "bevy_image" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f7678dd8c36124f29d7c20d3f848630f3152671c4bd7cb1b5252cd8e4cbb0db" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_color 0.17.1", + "bevy_ecs 0.17.1", + "bevy_math 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_utils 0.17.1", + "bitflags 2.9.4", + "bytemuck", + "futures-lite 2.6.1", + "guillotiere", + "half", + "image", + "rectangle-pack", + "serde", + "thiserror 2.0.16", + "tracing", + "wgpu-types 26.0.0", +] + [[package]] name = "bevy_input" version = "0.14.2" @@ -1512,16 +1796,32 @@ dependencies = [ "bevy_app 0.16.1", "bevy_ecs 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_utils 0.16.1", - "derive_more", + "derive_more 1.0.0", "log", "serde", "smol_str", "thiserror 2.0.16", ] +[[package]] +name = "bevy_input" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9764b5ad64a2b62ad890ff215429e1a357d73cc1347e74c412b82b483d18938" +dependencies = [ + "bevy_app 0.17.1", + "bevy_ecs 0.17.1", + "bevy_math 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "derive_more 2.0.1", + "log", + "thiserror 2.0.16", +] + [[package]] name = "bevy_input_focus" version = "0.16.1" @@ -1628,13 +1928,13 @@ dependencies = [ "bevy_diagnostic 0.16.1", "bevy_ecs 0.16.1", "bevy_gizmos 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_input 0.16.1", "bevy_input_focus", "bevy_log 0.16.1", "bevy_math 0.16.1", "bevy_pbr 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_ptr 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", @@ -1651,6 +1951,27 @@ dependencies = [ "bevy_winit 0.16.1", ] +[[package]] +name = "bevy_light" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1982f33fc33e0f36a7de1cb330bfaca9cd6ca9968c9eea4750ec06c6a7310d91" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_camera", + "bevy_color 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_mesh 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_transform 0.17.1", + "bevy_utils 0.17.1", + "tracing", +] + [[package]] name = "bevy_log" version = "0.14.2" @@ -1678,7 +1999,25 @@ dependencies = [ "bevy_utils 0.16.1", "tracing", "tracing-log", - "tracing-oslog", + "tracing-oslog 0.2.0", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "bevy_log" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f91436f30c22d252d51283abd9f5b0137d516fd8a50c55de882d901d3a2cc12" +dependencies = [ + "android_log-sys", + "bevy_app 0.17.1", + "bevy_ecs 0.17.1", + "bevy_platform 0.17.1", + "bevy_utils 0.17.1", + "tracing", + "tracing-log", + "tracing-oslog 0.3.0", "tracing-subscriber", "tracing-wasm", ] @@ -1708,6 +2047,19 @@ dependencies = [ "toml_edit 0.22.27", ] +[[package]] +name = "bevy_macro_utils" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61e64e7431f7349b5caa1ea4ff2efd94afd73480fac2f44a2b94b1642b4a02a" +dependencies = [ + "parking_lot", + "proc-macro2", + "quote", + "syn 2.0.106", + "toml_edit 0.23.6", +] + [[package]] name = "bevy_math" version = "0.14.2" @@ -1730,12 +2082,31 @@ checksum = "68553e0090fe9c3ba066c65629f636bd58e4ebd9444fdba097b91af6cd3e243f" dependencies = [ "approx", "bevy_reflect 0.16.1", - "derive_more", + "derive_more 1.0.0", "glam 0.29.3", "itertools 0.14.0", "libm", "rand 0.8.5", - "rand_distr", + "rand_distr 0.4.3", + "serde", + "smallvec", + "thiserror 2.0.16", + "variadics_please", +] + +[[package]] +name = "bevy_math" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04e37afed57e19baafbe60635f6f1d9d5635900eb590c226648c646dcf351c" +dependencies = [ + "approx", + "bevy_reflect 0.17.1", + "derive_more 2.0.1", + "glam 0.30.8", + "itertools 0.14.0", + "rand 0.9.2", + "rand_distr 0.5.1", "serde", "smallvec", "thiserror 2.0.16", @@ -1751,10 +2122,10 @@ dependencies = [ "bevy_asset 0.16.1", "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_math 0.16.1", "bevy_mikktspace 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_transform 0.16.1", "bevy_utils 0.16.1", @@ -1767,6 +2138,31 @@ dependencies = [ "wgpu-types 24.0.0", ] +[[package]] +name = "bevy_mesh" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07d07ed1b7587d0f314221ba547a58f8dcc90ba4a00c5c16784e7805acb60d5b" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_derive 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_mikktspace 0.17.0-dev", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_transform 0.17.1", + "bitflags 2.9.4", + "bytemuck", + "derive_more 2.0.1", + "hexasphere 16.0.0", + "thiserror 2.0.16", + "tracing", + "wgpu-types 26.0.0", +] + [[package]] name = "bevy_mikktspace" version = "0.14.2" @@ -1785,6 +2181,12 @@ dependencies = [ "glam 0.29.3", ] +[[package]] +name = "bevy_mikktspace" +version = "0.17.0-dev" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef8e4b7e61dfe7719bb03c884dc270cd46a82efb40f93e9933b990c5c190c59" + [[package]] name = "bevy_mod_picking" version = "0.20.1" @@ -1876,9 +2278,9 @@ dependencies = [ "bevy_derive 0.16.1", "bevy_diagnostic 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_transform 0.16.1", @@ -1886,7 +2288,7 @@ dependencies = [ "bevy_window 0.16.1", "bitflags 2.9.4", "bytemuck", - "derive_more", + "derive_more 1.0.0", "fixedbitset 0.5.7", "nonmax", "offset-allocator", @@ -1897,6 +2299,42 @@ dependencies = [ "tracing", ] +[[package]] +name = "bevy_pbr" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ef44d987fde96736a9b60b020a39bfa46cfd1cdc218b0b439c12a054c551d7" +dependencies = [ + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_camera", + "bevy_color 0.17.1", + "bevy_core_pipeline 0.17.1", + "bevy_derive 0.17.1", + "bevy_diagnostic 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_light", + "bevy_math 0.17.1", + "bevy_mesh 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_render 0.17.1", + "bevy_shader", + "bevy_transform 0.17.1", + "bevy_utils 0.17.1", + "bitflags 2.9.4", + "bytemuck", + "derive_more 2.0.1", + "fixedbitset 0.5.7", + "nonmax", + "offset-allocator", + "smallvec", + "static_assertions", + "thiserror 2.0.16", + "tracing", +] + [[package]] name = "bevy_picking_core" version = "0.20.0" @@ -1973,7 +2411,7 @@ checksum = "f7573dc824a1b08b4c93fdbe421c53e1e8188e9ca1dd74a414455fe571facb47" dependencies = [ "cfg-if", "critical-section", - "foldhash", + "foldhash 0.1.5", "getrandom 0.2.16", "hashbrown 0.15.5", "portable-atomic", @@ -1983,6 +2421,27 @@ dependencies = [ "web-time", ] +[[package]] +name = "bevy_platform" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239c3f54e9e25a01e4d0f54a3a066e1d8d6d5509b071a78c729c1e0143db7f4b" +dependencies = [ + "critical-section", + "foldhash 0.2.0", + "futures-channel", + "getrandom 0.3.3", + "hashbrown 0.16.0", + "js-sys", + "portable-atomic", + "portable-atomic-util", + "serde", + "spin 0.10.0", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-time", +] + [[package]] name = "bevy_ptr" version = "0.14.2" @@ -1995,6 +2454,12 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df7370d0e46b60e071917711d0860721f5347bc958bf325975ae6913a5dfcf01" +[[package]] +name = "bevy_ptr" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b3533a9a9c2158bc704c18ba26f0f0692d0423ff0a10b656b8db46a9b953620" + [[package]] name = "bevy_reflect" version = "0.14.2" @@ -2021,15 +2486,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daeb91a63a1a4df00aa58da8cc4ddbd4b9f16ab8bb647c5553eb156ce36fa8c2" dependencies = [ "assert_type_match", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_ptr 0.16.1", "bevy_reflect_derive 0.16.1", "bevy_utils 0.16.1", - "derive_more", + "derive_more 1.0.0", "disqualified", "downcast-rs 2.0.2", "erased-serde", - "foldhash", + "foldhash 0.1.5", "glam 0.29.3", "serde", "smallvec", @@ -2040,6 +2505,33 @@ dependencies = [ "wgpu-types 24.0.0", ] +[[package]] +name = "bevy_reflect" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f363a1e984a5b9e908e9b98181e396d4a93ee8209a698c0d0e38227f464e45" +dependencies = [ + "assert_type_match", + "bevy_platform 0.17.1", + "bevy_ptr 0.17.1", + "bevy_reflect_derive 0.17.1", + "bevy_utils 0.17.1", + "derive_more 2.0.1", + "disqualified", + "downcast-rs 2.0.2", + "erased-serde", + "foldhash 0.2.0", + "glam 0.30.8", + "inventory", + "serde", + "smallvec", + "smol_str", + "thiserror 2.0.16", + "uuid", + "variadics_please", + "wgpu-types 26.0.0", +] + [[package]] name = "bevy_reflect_derive" version = "0.14.2" @@ -2066,6 +2558,20 @@ dependencies = [ "uuid", ] +[[package]] +name = "bevy_reflect_derive" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65b08cc2fb06b872143c506ee7e14decb3ade19bf25af9ddd39dfc1799ccc85" +dependencies = [ + "bevy_macro_utils 0.17.1", + "indexmap", + "proc-macro2", + "quote", + "syn 2.0.106", + "uuid", +] + [[package]] name = "bevy_render" version = "0.14.2" @@ -2093,7 +2599,7 @@ dependencies = [ "bevy_window 0.14.2", "bitflags 2.9.4", "bytemuck", - "codespan-reporting", + "codespan-reporting 0.11.1", "downcast-rs 1.2.1", "encase 0.8.0", "futures-lite 2.6.1", @@ -2126,10 +2632,10 @@ dependencies = [ "bevy_diagnostic 0.16.1", "bevy_ecs 0.16.1", "bevy_encase_derive 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_math 0.16.1", - "bevy_mesh", - "bevy_platform", + "bevy_mesh 0.16.1", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render_macros 0.16.1", "bevy_tasks 0.16.1", @@ -2139,8 +2645,8 @@ dependencies = [ "bevy_window 0.16.1", "bitflags 2.9.4", "bytemuck", - "codespan-reporting", - "derive_more", + "codespan-reporting 0.11.1", + "derive_more 1.0.0", "downcast-rs 2.0.2", "encase 0.10.0", "fixedbitset 0.5.7", @@ -2163,6 +2669,55 @@ dependencies = [ "wgpu 24.0.5", ] +[[package]] +name = "bevy_render" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94eeb50052c9b0730eb50f0fbbf7bf449a5ebe6e365ec8043833d3c24c24be10" +dependencies = [ + "async-channel 2.5.0", + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_camera", + "bevy_color 0.17.1", + "bevy_derive 0.17.1", + "bevy_diagnostic 0.17.1", + "bevy_ecs 0.17.1", + "bevy_encase_derive 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_mesh 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_render_macros 0.17.1", + "bevy_shader", + "bevy_tasks 0.17.1", + "bevy_time 0.17.1", + "bevy_transform 0.17.1", + "bevy_utils 0.17.1", + "bevy_window 0.17.1", + "bitflags 2.9.4", + "bytemuck", + "derive_more 2.0.1", + "downcast-rs 2.0.2", + "encase 0.11.2", + "fixedbitset 0.5.7", + "image", + "indexmap", + "js-sys", + "naga 26.0.0", + "nonmax", + "offset-allocator", + "send_wrapper", + "smallvec", + "thiserror 2.0.16", + "tracing", + "variadics_please", + "wasm-bindgen", + "web-sys", + "wgpu 26.0.1", +] + [[package]] name = "bevy_render_macros" version = "0.14.2" @@ -2187,6 +2742,18 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "bevy_render_macros" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "789506f81c3d134345c3be73832cbf65f9011ccfea24a8d24dc18de98e99c7f2" +dependencies = [ + "bevy_macro_utils 0.17.1", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "bevy_scene" version = "0.14.2" @@ -2217,17 +2784,64 @@ dependencies = [ "bevy_asset 0.16.1", "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_transform 0.16.1", "bevy_utils 0.16.1", - "derive_more", + "derive_more 1.0.0", "serde", "thiserror 2.0.16", "uuid", ] +[[package]] +name = "bevy_shader" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c30e09274223fe69287449d89c92b3840f600028026078d7bcbde4d4428420d5" +dependencies = [ + "bevy_asset 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "naga 26.0.0", + "naga_oil 0.19.1", + "serde", + "thiserror 2.0.16", + "tracing", + "wgpu-types 26.0.0", +] + +[[package]] +name = "bevy_solari" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bed57662c236a01b0cd5bfcf338a1751645681e813a5462fec3987b25a35210" +dependencies = [ + "bevy_anti_alias", + "bevy_app 0.17.1", + "bevy_asset 0.17.1", + "bevy_camera", + "bevy_color 0.17.1", + "bevy_core_pipeline 0.17.1", + "bevy_derive 0.17.1", + "bevy_diagnostic 0.17.1", + "bevy_ecs 0.17.1", + "bevy_image 0.17.1", + "bevy_math 0.17.1", + "bevy_mesh 0.17.1", + "bevy_pbr 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "bevy_render 0.17.1", + "bevy_shader", + "bevy_transform 0.17.1", + "bevy_utils 0.17.1", + "bytemuck", + "derive_more 2.0.1", + "tracing", +] + [[package]] name = "bevy_sprite" version = "0.16.1" @@ -2240,16 +2854,16 @@ dependencies = [ "bevy_core_pipeline 0.16.1", "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_transform 0.16.1", "bevy_utils 0.16.1", "bitflags 2.9.4", "bytemuck", - "derive_more", + "derive_more 1.0.0", "fixedbitset 0.5.7", "nonmax", "radsort", @@ -2264,7 +2878,7 @@ checksum = "155d3cd97b900539008cdcaa702f88b724d94b08977b8e591a32536ce66faa8c" dependencies = [ "bevy_app 0.16.1", "bevy_ecs 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_state_macros", "bevy_utils 0.16.1", @@ -2305,11 +2919,11 @@ dependencies = [ "async-executor", "async-task", "atomic-waker", - "bevy_platform", + "bevy_platform 0.16.1", "cfg-if", "concurrent-queue", "crossbeam-queue", - "derive_more", + "derive_more 1.0.0", "futures-channel", "futures-lite 2.6.1", "heapless", @@ -2317,6 +2931,24 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "bevy_tasks" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cef691881c4eaacbd98f57239cb410281adfbbfc59e2c2a38402e4c661a3133" +dependencies = [ + "async-channel 2.5.0", + "async-executor", + "async-task", + "atomic-waker", + "bevy_platform 0.17.1", + "crossbeam-queue", + "derive_more 2.0.1", + "futures-lite 2.6.1", + "heapless", + "pin-project", +] + [[package]] name = "bevy_text" version = "0.16.1" @@ -2328,10 +2960,10 @@ dependencies = [ "bevy_color 0.16.2", "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_log 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_sprite", @@ -2369,13 +3001,28 @@ checksum = "bc98eb356c75be04fbbc77bb3d8ffa24c8bacd99f76111cee23d444be6ac8c9c" dependencies = [ "bevy_app 0.16.1", "bevy_ecs 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "crossbeam-channel", "log", "serde", ] +[[package]] +name = "bevy_time" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "663b4bed2c2e9ce27e2af1feea4353a0a93b405ca0c82fa19047dd476804db14" +dependencies = [ + "bevy_app 0.17.1", + "bevy_ecs 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "crossbeam-channel", + "log", + "serde", +] + [[package]] name = "bevy_transform" version = "0.14.2" @@ -2403,7 +3050,25 @@ dependencies = [ "bevy_reflect 0.16.1", "bevy_tasks 0.16.1", "bevy_utils 0.16.1", - "derive_more", + "derive_more 1.0.0", + "serde", + "thiserror 2.0.16", +] + +[[package]] +name = "bevy_transform" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5217649fa27979b67f2555f752963450d171953d6b6f159a3b4f8c7a33bde86" +dependencies = [ + "bevy_app 0.17.1", + "bevy_ecs 0.17.1", + "bevy_log 0.17.1", + "bevy_math 0.17.1", + "bevy_reflect 0.17.1", + "bevy_tasks 0.17.1", + "bevy_utils 0.17.1", + "derive_more 2.0.1", "serde", "thiserror 2.0.16", ] @@ -2433,10 +3098,10 @@ dependencies = [ "bevy_core_pipeline 0.16.1", "bevy_derive 0.16.1", "bevy_ecs 0.16.1", - "bevy_image", + "bevy_image 0.16.1", "bevy_input 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_render 0.16.1", "bevy_sprite", @@ -2445,7 +3110,7 @@ dependencies = [ "bevy_utils 0.16.1", "bevy_window 0.16.1", "bytemuck", - "derive_more", + "derive_more 1.0.0", "nonmax", "serde", "smallvec", @@ -2475,7 +3140,18 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94f7a8905a125d2017e8561beefb7f2f5e67e93ff6324f072ad87c5fd6ec3b99" dependencies = [ - "bevy_platform", + "bevy_platform 0.16.1", + "thread_local", +] + +[[package]] +name = "bevy_utils" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6927fae6678c8ca2984b97d1a77bb244cfe095f5fd28ed2f88e0d66cfab938fa" +dependencies = [ + "bevy_platform 0.17.1", + "disqualified", "thread_local", ] @@ -2532,7 +3208,7 @@ dependencies = [ "bevy_ecs 0.16.1", "bevy_input 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_utils 0.16.1", "log", @@ -2541,6 +3217,23 @@ dependencies = [ "smol_str", ] +[[package]] +name = "bevy_window" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82ab2cb7a220a157a4441b29198ba23b3000d73cbb434185f4ffea89eda3df41" +dependencies = [ + "bevy_app 0.17.1", + "bevy_ecs 0.17.1", + "bevy_input 0.17.1", + "bevy_math 0.17.1", + "bevy_platform 0.17.1", + "bevy_reflect 0.17.1", + "log", + "raw-window-handle", + "serde", +] + [[package]] name = "bevy_winit" version = "0.14.2" @@ -2586,7 +3279,7 @@ dependencies = [ "bevy_input_focus", "bevy_log 0.16.1", "bevy_math 0.16.1", - "bevy_platform", + "bevy_platform 0.16.1", "bevy_reflect 0.16.1", "bevy_tasks 0.16.1", "bevy_utils 0.16.1", @@ -2679,6 +3372,7 @@ version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" dependencies = [ + "bytemuck", "serde", ] @@ -3095,6 +3789,17 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "codespan-reporting" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" +dependencies = [ + "serde", + "termcolor", + "unicode-width", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -3257,6 +3962,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -3270,8 +3985,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", + "core-foundation 0.9.4", + "core-graphics-types 0.1.3", "foreign-types", "libc", ] @@ -3283,7 +3998,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.9.4", + "core-foundation 0.10.1", "libc", ] @@ -3518,7 +4244,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ - "derive_more-impl", + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl 2.0.1", ] [[package]] @@ -3533,6 +4268,18 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "unicode-xid", +] + [[package]] name = "digest" version = "0.9.0" @@ -3690,6 +4437,18 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "encase" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02ba239319a4f60905966390f5e52799d868103a533bb7e27822792332504ddd" +dependencies = [ + "const_panic", + "encase_derive 0.11.2", + "glam 0.30.8", + "thiserror 2.0.16", +] + [[package]] name = "encase_derive" version = "0.8.0" @@ -3708,6 +4467,15 @@ dependencies = [ "encase_derive_impl 0.10.0", ] +[[package]] +name = "encase_derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5223d6c647f09870553224f6e37261fe5567bc5a4f4cf13ed337476e79990f2f" +dependencies = [ + "encase_derive_impl 0.11.2", +] + [[package]] name = "encase_derive_impl" version = "0.8.0" @@ -3730,6 +4498,17 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "encase_derive_impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1796db3d892515842ca2dfb11124c4bb4a9e58d9f2c5c1072e5bca1b2334507b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "enumn" version = "0.1.14" @@ -3968,6 +4747,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "font-types" version = "0.9.0" @@ -4230,9 +5015,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasi 0.14.7+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -4295,6 +5082,17 @@ dependencies = [ "serde", ] +[[package]] +name = "glam" +version = "0.30.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12d847aeb25f41be4c0ec9587d624e9cd631bc007a8fd7ce3f5851e064c6460" +dependencies = [ + "bytemuck", + "rand 0.9.2", + "serde_core", +] + [[package]] name = "glob" version = "0.3.3" @@ -4443,6 +5241,7 @@ checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if", "crunchy", + "num-traits", "serde", ] @@ -4482,7 +5281,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "equivalent", - "foldhash", + "foldhash 0.1.5", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "equivalent", "serde", ] @@ -4537,17 +5346,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd6b038160f086b0a7496edae34169ae22f328793cbe2b627a5a3d8373748ec" dependencies = [ "constgebra", - "glam 0.27.0", + "glam 0.27.0", +] + +[[package]] +name = "hexasphere" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c9e718d32b6e6b2b32354e1b0367025efdd0b11d6a740b905ddf5db1074679" +dependencies = [ + "constgebra", + "glam 0.29.3", + "tinyvec", ] [[package]] name = "hexasphere" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9e718d32b6e6b2b32354e1b0367025efdd0b11d6a740b905ddf5db1074679" +checksum = "29a164ceff4500f2a72b1d21beaa8aa8ad83aec2b641844c659b190cb3ea2e0b" dependencies = [ "constgebra", - "glam 0.29.3", + "glam 0.30.8", "tinyvec", ] @@ -4782,9 +5602,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.3" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92119844f513ffa41556430369ab02c295a3578af21cf945caa3e9e0c2481ac3" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", "hashbrown 0.15.5", @@ -4818,6 +5638,15 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "inventory" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" +dependencies = [ + "rustversion", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -5046,6 +5875,16 @@ dependencies = [ "redox_syscall 0.5.17", ] +[[package]] +name = "lin_alg" +version = "1.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91303a2019caa2c9f73877bcd24110e7d753a92942c7337210e489b507ce460" +dependencies = [ + "num-traits", + "paste", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -5138,6 +5977,15 @@ dependencies = [ "rayon", ] +[[package]] +name = "mcubes" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9b903d112fecf8ea103f0b61ea9cf327d388b50900914c32af0934e8b5bffc6" +dependencies = [ + "lin_alg", +] + [[package]] name = "memchr" version = "2.7.5" @@ -5161,7 +6009,7 @@ checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" dependencies = [ "bitflags 2.9.4", "block", - "core-graphics-types", + "core-graphics-types 0.1.3", "foreign-types", "log", "objc", @@ -5176,7 +6024,22 @@ checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ "bitflags 2.9.4", "block", - "core-graphics-types", + "core-graphics-types 0.1.3", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "metal" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" +dependencies = [ + "bitflags 2.9.4", + "block", + "core-graphics-types 0.2.0", "foreign-types", "log", "objc", @@ -5245,7 +6108,7 @@ dependencies = [ "arrayvec 0.7.6", "bit-set 0.5.3", "bitflags 2.9.4", - "codespan-reporting", + "codespan-reporting 0.11.1", "hexf-parse", "indexmap", "log", @@ -5268,7 +6131,7 @@ dependencies = [ "bit-set 0.8.0", "bitflags 2.9.4", "cfg_aliases 0.2.1", - "codespan-reporting", + "codespan-reporting 0.11.1", "hexf-parse", "indexmap", "log", @@ -5281,6 +6144,33 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "naga" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" +dependencies = [ + "arrayvec 0.7.6", + "bit-set 0.8.0", + "bitflags 2.9.4", + "cfg-if", + "cfg_aliases 0.2.1", + "codespan-reporting 0.12.0", + "half", + "hashbrown 0.15.5", + "hexf-parse", + "indexmap", + "libm", + "log", + "num-traits", + "once_cell", + "pp-rs", + "rustc-hash", + "spirv", + "thiserror 2.0.16", + "unicode-ident", +] + [[package]] name = "naga_oil" version = "0.14.0" @@ -5288,7 +6178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "275d9720a7338eedac966141089232514c84d76a246a58ef501af88c5edf402f" dependencies = [ "bit-set 0.5.3", - "codespan-reporting", + "codespan-reporting 0.11.1", "data-encoding", "indexmap", "naga 0.20.0", @@ -5308,7 +6198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2464f7395decfd16bb4c33fb0cb3b2c645cc60d051bc7fb652d3720bfb20f18" dependencies = [ "bit-set 0.5.3", - "codespan-reporting", + "codespan-reporting 0.11.1", "data-encoding", "indexmap", "naga 24.0.0", @@ -5321,6 +6211,23 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "naga_oil" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b586d3cf5c9b7e13fe2af6e114406ff70773fd80881960378933b63e76f37dd" +dependencies = [ + "codespan-reporting 0.12.0", + "data-encoding", + "indexmap", + "naga 26.0.0", + "regex", + "rustc-hash", + "thiserror 2.0.16", + "tracing", + "unicode-ident", +] + [[package]] name = "ndk" version = "0.9.0" @@ -6352,6 +7259,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -6372,6 +7289,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -6390,6 +7317,15 @@ dependencies = [ "getrandom 0.2.16", ] +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] + [[package]] name = "rand_distr" version = "0.4.3" @@ -6400,6 +7336,16 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "rand_distr" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" +dependencies = [ + "num-traits", + "rand 0.9.2", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -6646,6 +7592,19 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "ron" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f" +dependencies = [ + "base64 0.22.1", + "bitflags 2.9.4", + "serde", + "serde_derive", + "unicode-ident", +] + [[package]] name = "roxmltree" version = "0.20.0" @@ -6860,9 +7819,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.224" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aaeb1e94f53b16384af593c71e20b095e958dab1d26939c1b70645c5cfbcc0b" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -6870,18 +7829,18 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.224" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f39390fa6346e24defbcdd3d9544ba8a19985d0af74df8501fbfe9a64341ab" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.224" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ff78ab5e8561c9a675bfc1785cb07ae721f0ee53329a595cefd8c04c2ac4e0" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -7116,6 +8075,15 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "spin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" +dependencies = [ + "portable-atomic", +] + [[package]] name = "spirv" version = "0.3.0+sdk-1.3.268.0" @@ -7564,7 +8532,7 @@ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", - "toml_datetime", + "toml_datetime 0.6.11", "toml_edit 0.22.27", ] @@ -7577,6 +8545,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.19.15" @@ -7584,7 +8561,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", - "toml_datetime", + "toml_datetime 0.6.11", "winnow 0.5.40", ] @@ -7597,7 +8574,28 @@ dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime", + "toml_datetime 0.6.11", + "winnow 0.7.13", +] + +[[package]] +name = "toml_edit" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3effe7c0e86fdff4f69cdd2ccc1b96f933e24811c5441d44904e8683e27184b" +dependencies = [ + "indexmap", + "toml_datetime 0.7.2", + "toml_parser", + "winnow 0.7.13", +] + +[[package]] +name = "toml_parser" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" +dependencies = [ "winnow 0.7.13", ] @@ -7659,6 +8657,18 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "tracing-oslog" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76902d2a8d5f9f55a81155c08971734071968c90f2d9bfe645fe700579b2950" +dependencies = [ + "cc", + "cfg-if", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-subscriber" version = "0.3.20" @@ -8218,6 +9228,30 @@ dependencies = [ "wgpu-types 24.0.0", ] +[[package]] +name = "wgpu" +version = "26.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798" +dependencies = [ + "arrayvec 0.7.6", + "bitflags 2.9.4", + "cfg-if", + "cfg_aliases 0.2.1", + "document-features", + "hashbrown 0.15.5", + "log", + "naga 26.0.0", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wgpu-core 26.0.1", + "wgpu-hal 26.0.4", + "wgpu-types 26.0.0", +] + [[package]] name = "wgpu-core" version = "0.21.1" @@ -8228,7 +9262,7 @@ dependencies = [ "bit-vec 0.6.3", "bitflags 2.9.4", "cfg_aliases 0.1.1", - "codespan-reporting", + "codespan-reporting 0.11.1", "document-features", "indexmap", "log", @@ -8270,6 +9304,54 @@ dependencies = [ "wgpu-types 24.0.0", ] +[[package]] +name = "wgpu-core" +version = "26.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" +dependencies = [ + "arrayvec 0.7.6", + "bit-set 0.8.0", + "bit-vec 0.8.0", + "bitflags 2.9.4", + "cfg_aliases 0.2.1", + "document-features", + "hashbrown 0.15.5", + "indexmap", + "log", + "naga 26.0.0", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash", + "smallvec", + "thiserror 2.0.16", + "wgpu-core-deps-apple", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal 26.0.4", + "wgpu-types 26.0.0", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" +dependencies = [ + "wgpu-hal 26.0.4", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" +dependencies = [ + "wgpu-hal 26.0.4", +] + [[package]] name = "wgpu-hal" version = "0.21.1" @@ -8283,7 +9365,7 @@ dependencies = [ "bitflags 2.9.4", "block", "cfg_aliases 0.1.1", - "core-graphics-types", + "core-graphics-types 0.1.3", "d3d12", "glow 0.13.1", "glutin_wgl_sys 0.5.0", @@ -8329,7 +9411,7 @@ dependencies = [ "block", "bytemuck", "cfg_aliases 0.2.1", - "core-graphics-types", + "core-graphics-types 0.1.3", "glow 0.16.0", "glutin_wgl_sys 0.6.1", "gpu-alloc", @@ -8361,6 +9443,47 @@ dependencies = [ "windows-core 0.58.0", ] +[[package]] +name = "wgpu-hal" +version = "26.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.6", + "ash 0.38.0+1.3.281", + "bit-set 0.8.0", + "bitflags 2.9.4", + "block", + "bytemuck", + "cfg-if", + "cfg_aliases 0.2.1", + "core-graphics-types 0.2.0", + "gpu-alloc", + "gpu-allocator 0.27.0", + "gpu-descriptor", + "hashbrown 0.15.5", + "libc", + "libloading 0.8.8", + "log", + "metal 0.32.0", + "naga 26.0.0", + "objc", + "ordered-float 5.0.0", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle", + "renderdoc-sys", + "smallvec", + "thiserror 2.0.16", + "wgpu-types 26.0.0", + "windows 0.58.0", + "windows-core 0.58.0", +] + [[package]] name = "wgpu-types" version = "0.20.0" @@ -8385,6 +9508,21 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wgpu-types" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +dependencies = [ + "bitflags 2.9.4", + "bytemuck", + "js-sys", + "log", + "serde", + "thiserror 2.0.16", + "web-sys", +] + [[package]] name = "widestring" version = "1.2.0" @@ -8882,7 +10020,7 @@ dependencies = [ "calloop", "cfg_aliases 0.2.1", "concurrent-queue", - "core-foundation", + "core-foundation 0.9.4", "core-graphics", "cursor-icon", "dpi", diff --git a/Cargo.toml b/Cargo.toml index 1b77b0f6..cd8ff893 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,10 +53,14 @@ default = [ "query_select", # "query_sparse", + "mesh_proxy", + # TODO: bevy_interleave storage bind group read_only per plane attribute support # "morph_particles", "morph_interpolate", + # "solari", + "sort_bitonic", "sort_radix", # TODO: fix macos radix sort "sort_rayon", @@ -93,6 +97,10 @@ precompute_covariance_3d = [] packed = [] planar = [] +mesh_proxy = ["dep:mcubes"] + +solari = ["mesh_proxy", "dep:bevy_solari"] + buffer_storage = [] buffer_texture = [] @@ -174,6 +182,8 @@ flexbuffers = { version = "25.2", optional = true } half = { version = "2.6", features = ["serde"] } # image = { version = "0.25.6", default-features = false, features = ["png"] } kd-tree = { version = "0.6", optional = true } +mcubes = { version = "0.1.5", optional = true } +bevy_solari = { version = "0.17.1", optional = true } noise = { version = "0.9.0", optional = true } ply-rs = { version = "0.1", optional = true } rand = "0.8" diff --git a/README.md b/README.md index 0218c59a..f6c21b4d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ bevy_gaussian_splatting --input-cloud [file://gaussian.ply | https://mitchell.mo - [X] 3dgs - [x] 4dgs - [x] multi-cloud scene format +- [x] lighting and shadows +- [ ] morph targets and skeletons - [ ] gltf gaussian extensions - [ ] 4dgs motion blur - [ ] [deformable radial kernel](https://github.com/VAST-AI-Research/Deformable-Radial-Kernel-Splatting) @@ -45,10 +47,8 @@ bevy_gaussian_splatting --input-cloud [file://gaussian.ply | https://mitchell.mo - [ ] 4D gaussian cloud wavelet compression - [ ] accelerated spatial queries - [ ] temporal depth sorting -- [ ] skeletons - [ ] volume masks - [ ] level of detail -- [ ] lighting and shadows - [ ] bevy_openxr support - [ ] bevy 3D camera to gaussian cloud pipeline diff --git a/examples/solari.rs b/examples/solari.rs new file mode 100644 index 00000000..e69de29b diff --git a/src/lib.rs b/src/lib.rs index 0a1d716c..dfccbab9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,6 +25,8 @@ pub mod gaussian; pub mod io; pub mod material; pub mod math; +#[cfg(feature = "mesh_proxy")] +pub mod mesh; pub mod morph; pub mod query; pub mod render; @@ -35,6 +37,9 @@ pub mod utils; #[cfg(feature = "noise")] pub mod noise; +#[cfg(feature = "mesh_proxy")] +pub use mesh::proxy::{ProxyMesh, ProxyMeshPlugin, ProxyMeshSettings, ProxyParams}; + pub struct GaussianSplattingPlugin; impl Plugin for GaussianSplattingPlugin { @@ -62,6 +67,9 @@ impl Plugin for GaussianSplattingPlugin { render::RenderPipelinePlugin::::default(), )); + #[cfg(feature = "mesh_proxy")] + app.add_plugins(mesh::proxy::ProxyMeshPlugin); + app.add_plugins((material::MaterialPlugin, query::QueryPlugin)); #[cfg(feature = "noise")] diff --git a/src/material/mod.rs b/src/material/mod.rs index 73e6b60e..cbb4ee51 100644 --- a/src/material/mod.rs +++ b/src/material/mod.rs @@ -10,6 +10,9 @@ pub mod spherindrical_harmonics; #[cfg(feature = "material_noise")] pub mod noise; +#[cfg(feature = "solari")] +pub mod solari; + #[derive(Default)] pub struct MaterialPlugin; @@ -19,6 +22,9 @@ impl Plugin for MaterialPlugin { #[cfg(feature = "material_noise")] app.add_plugins(noise::NoiseMaterialPlugin); + #[cfg(feature = "solari")] + app.add_plugins(solari::SolariMaterialPlugin); + app.add_plugins(( classification::ClassificationMaterialPlugin, depth::DepthMaterialPlugin, diff --git a/src/material/solari.rs b/src/material/solari.rs new file mode 100644 index 00000000..04bcb120 --- /dev/null +++ b/src/material/solari.rs @@ -0,0 +1,81 @@ +use bevy::{ + asset::{load_internal_asset, weak_handle}, + ecs::query::Or, + pbr::MeshMaterial3d, + prelude::*, + solari::prelude::*, +}; + +use crate::mesh::proxy::{ProxyMesh, ProxyMeshSettings, ProxyParams}; + +const SOLARI_SHADER_HANDLE: Handle = weak_handle!("6beaa8d4-026e-43a3-8f6b-13213e63ed05"); + +pub struct SolariMaterialPlugin; + +impl Plugin for SolariMaterialPlugin { + fn build(&self, app: &mut App) { + load_internal_asset!(app, SOLARI_SHADER_HANDLE, "solari.wgsl", Shader::from_wgsl); + + app.register_type::(); + + app.add_systems( + PostUpdate, + ( + ensure_proxy_settings, + attach_solari_proxies.after(ensure_proxy_settings), + ), + ); + } +} + +#[derive(Component, Default, Clone, Copy, Reflect)] +#[reflect(Component)] +pub struct GaussianCloudSolari; + +fn ensure_proxy_settings( + mut commands: Commands, + query: Query, Without)>, +) { + for entity in &query { + commands + .entity(entity) + .insert(ProxyMeshSettings { + params: ProxyParams::default(), + }); + } +} + +fn attach_solari_proxies( + mut commands: Commands, + mut materials: ResMut>, + query: Query< + ( + Entity, + &ProxyMesh, + Option<&RaytracingMesh3d>, + Option<&MeshMaterial3d>, + ), + (With, Or<(Changed, Added)>), + >, +) { + for (entity, mesh_proxy, raytracing_mesh, mesh_material) in &query { + if raytracing_mesh.is_none() { + commands + .entity(entity) + .insert(RaytracingMesh3d(mesh_proxy.0.clone())); + } + + if mesh_material.is_none() { + let material_handle = materials.add(StandardMaterial { + base_color: Color::WHITE.into(), + perceptual_roughness: 0.9, + metallic: 0.0, + ..default() + }); + + commands + .entity(entity) + .insert(MeshMaterial3d::(material_handle)); + } + } +} diff --git a/src/material/solari.wgsl b/src/material/solari.wgsl new file mode 100644 index 00000000..51802589 --- /dev/null +++ b/src/material/solari.wgsl @@ -0,0 +1,113 @@ +#define_import_path bevy_gaussian_splatting::solari + +#import bevy_render::maths::PI + +const SOLARI_WORLD_CACHE_MAX_SEARCH_STEPS: u32 = 3u; +const SOLARI_WORLD_CACHE_POSITION_BASE_CELL_SIZE: f32 = 0.25; +const SOLARI_WORLD_CACHE_POSITION_LOD_SCALE: f32 = 30.0; +const SOLARI_WORLD_CACHE_EMPTY_CELL: u32 = 0u; +const SOLARI_WORLD_CACHE_SIZE: u32 = #{SOLARI_WORLD_CACHE_SIZE}; +const SOLARI_WORLD_CACHE_MASK: u32 = SOLARI_WORLD_CACHE_SIZE - 1u; + +@group(4) @binding(0) var solari_world_cache_checksums: + array, #{SOLARI_WORLD_CACHE_SIZE}>; +@group(4) @binding(1) var solari_world_cache_radiance: + array, #{SOLARI_WORLD_CACHE_SIZE}>; + +fn solari_shade_diffuse( + base_color: vec3, + world_position: vec3, + world_normal: vec3, + view_position: vec3, + exposure: f32, +) -> vec3 { + let radiance = solari_world_cache_lookup(world_position, world_normal, view_position); + if all(radiance == vec3(0.0)) { + return base_color; + } + + let diffuse_brdf = base_color / PI; + return radiance * exposure * diffuse_brdf; +} + +fn solari_world_cache_lookup( + world_position: vec3, + world_normal: vec3, + view_position: vec3, +) -> vec3 { + let cell_size = solari_get_cell_size(world_position, view_position); + let world_position_quantized = + bitcast>(solari_quantize_position(world_position, cell_size)); + let world_normal_quantized = + bitcast>(solari_quantize_normal(world_normal)); + + var key = solari_compute_key(world_position_quantized, world_normal_quantized); + let checksum = solari_compute_checksum(world_position_quantized, world_normal_quantized); + + for (var i = 0u; i < SOLARI_WORLD_CACHE_MAX_SEARCH_STEPS; i = i + 1u) { + let existing_checksum = atomicLoad(&solari_world_cache_checksums[key]); + if existing_checksum == checksum { + return solari_world_cache_radiance[key].rgb; + } + + if existing_checksum == SOLARI_WORLD_CACHE_EMPTY_CELL { + return vec3(0.0); + } + + key = solari_wrap_key(solari_pcg_hash(key)); + } + + return vec3(0.0); +} + +fn solari_get_cell_size(world_position: vec3, view_position: vec3) -> f32 { + let camera_distance = distance(view_position, world_position) / + SOLARI_WORLD_CACHE_POSITION_LOD_SCALE; + let lod = exp2(floor(log2(1.0 + camera_distance))); + return SOLARI_WORLD_CACHE_POSITION_BASE_CELL_SIZE * lod; +} + +fn solari_quantize_position( + world_position: vec3, + quantization_factor: f32, +) -> vec3 { + return floor(world_position / quantization_factor + 0.0001); +} + +fn solari_quantize_normal(world_normal: vec3) -> vec3 { + return floor(normalize(world_normal) + 0.0001); +} + +fn solari_compute_key(world_position: vec3, world_normal: vec3) -> u32 { + var key = solari_pcg_hash(world_position.x); + key = solari_pcg_hash(key + world_position.y); + key = solari_pcg_hash(key + world_position.z); + key = solari_pcg_hash(key + world_normal.x); + key = solari_pcg_hash(key + world_normal.y); + key = solari_pcg_hash(key + world_normal.z); + return solari_wrap_key(key); +} + +fn solari_compute_checksum(world_position: vec3, world_normal: vec3) -> u32 { + var key = solari_iqint_hash(world_position.x); + key = solari_iqint_hash(key + world_position.y); + key = solari_iqint_hash(key + world_position.z); + key = solari_iqint_hash(key + world_normal.x); + key = solari_iqint_hash(key + world_normal.y); + key = solari_iqint_hash(key + world_normal.z); + return key; +} + +fn solari_wrap_key(key: u32) -> u32 { + return key & SOLARI_WORLD_CACHE_MASK; +} + +fn solari_pcg_hash(input: u32) -> u32 { + let state = input * 747796405u + 2891336453u; + let word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u; + return (word >> 22u) ^ word; +} +fn solari_iqint_hash(input: u32) -> u32 { + let n = (input << 13u) ^ input; + return n * (n * n * 15731u + 789221u) + 1376312589u; +} diff --git a/src/mesh/mod.rs b/src/mesh/mod.rs new file mode 100644 index 00000000..25ea5e5a --- /dev/null +++ b/src/mesh/mod.rs @@ -0,0 +1,2 @@ +#[cfg(feature = "mesh_proxy")] +pub mod proxy; diff --git a/src/mesh/proxy.rs b/src/mesh/proxy.rs new file mode 100644 index 00000000..03d3ba56 --- /dev/null +++ b/src/mesh/proxy.rs @@ -0,0 +1,255 @@ +use bevy::{ + ecs::query::{Or, Without}, + prelude::*, +}; +// TODO: depend on lin_alg crate for Vec3 +use mcubes::{MarchingCubes, MeshSide, Vec3 as McVec3}; + +use crate::{ + Gaussian3d as StoredGaussian3d, + PlanarGaussian3d, + PlanarGaussian3dHandle, +}; + +#[derive(Debug, Clone, Copy, Reflect)] +#[reflect(Default)] +pub struct ProxyParams { + pub voxel_size: f32, + pub iso_threshold: f32, + pub nsig: f32, +} + +impl Default for ProxyParams { + fn default() -> Self { + Self { + voxel_size: 0.05, + iso_threshold: 0.25, + nsig: 3.0, + } + } +} + +#[derive(Component, Debug, Clone, Copy, Reflect)] +#[reflect(Component)] +pub struct ProxyMeshSettings { + pub params: ProxyParams, +} + +impl Default for ProxyMeshSettings { + fn default() -> Self { + Self { + params: ProxyParams::default(), + } + } +} + +#[derive(Component, Debug, Clone, Reflect)] +#[reflect(Component)] +pub struct ProxyMesh(pub Handle); + +#[derive(Debug, Clone, Copy)] +struct Gaussian3D { + center: Vec3, + rot: Quat, + sigma: Vec3, + weight: f32, +} + +pub struct ProxyMeshPlugin; + +impl Plugin for ProxyMeshPlugin { + fn build(&self, app: &mut App) { + app.register_type::(); + app.register_type::(); + app.register_type::(); + app.add_systems(Update, generate_mesh_proxyes); + } +} + +fn generate_mesh_proxyes( + mut commands: Commands, + mut meshes: ResMut>, + planar_clouds: Res>, + query: Query< + ( + Entity, + &ProxyMeshSettings, + &PlanarGaussian3dHandle, + Option<&ProxyMesh>, + ), + Or<( + Changed, + Added, + Without, + )>, + >, +) { + for (entity, settings, handle, existing_proxy) in &query { + let Some(cloud) = planar_clouds.get(&handle.0) else { + continue; + }; + + let gaussians: Vec = cloud + .iter() + .map(convert_gaussian) + .collect(); + + if gaussians.is_empty() { + continue; + } + + let mesh_proxy = mesh_from_gaussians(&gaussians, settings.params, &mut meshes); + + match existing_proxy { + Some(current) if current.0 == mesh_proxy => {} + _ => { + commands.entity(entity).insert(ProxyMesh(mesh_proxy)); + } + } + } +} + +fn convert_gaussian(gaussian: StoredGaussian3d) -> Gaussian3D { + let mut rotation = Quat::from_array(gaussian.rotation.rotation); + if !rotation.is_normalized() { + rotation = rotation.normalize(); + } + + let sigma = Vec3::from_array(gaussian.scale_opacity.scale).max(Vec3::splat(1e-4)); + + Gaussian3D { + center: Vec3::from_array(gaussian.position_visibility.position), + rot: rotation, + sigma, + weight: gaussian.position_visibility.visibility * gaussian.scale_opacity.opacity, + } +} + +fn mesh_from_gaussians( + gaussians: &[Gaussian3D], + params: ProxyParams, + meshes: &mut Assets, +) -> Handle { + let (minv, maxv) = union_aabb(gaussians, params.nsig); + let size = maxv - minv; + + let steps = Vec3::splat(params.voxel_size); + let nx = (size.x / steps.x).ceil().max(1.0) as usize + 1; + let ny = (size.y / steps.y).ceil().max(1.0) as usize + 1; + let nz = (size.z / steps.z).ceil().max(1.0) as usize + 1; + + let mut values = Vec::with_capacity(nx * ny * nz); + + for kz in 0..nz { + let z = minv.z + kz as f32 * steps.z; + for jy in 0..ny { + let y = minv.y + jy as f32 * steps.y; + for ix in 0..nx { + let x = minv.x + ix as f32 * steps.x; + values.push(density_at(Vec3::new(x, y, z), gaussians)); + } + } + } + + let marching_cubes = MarchingCubes::new( + (nx, ny, nz), + (size.x, size.y, size.z), + (steps.x, steps.y, steps.z), + McVec3::new(minv.x, minv.y, minv.z), + values, + params.iso_threshold, + ) + .expect("failed to initialise marching cubes"); + + let mesh_data = marching_cubes.generate(MeshSide::Both); + + let positions: Vec<[f32; 3]> = mesh_data + .vertices + .iter() + .map(|vertex| { + let p = vertex.posit; + [p.x, p.y, p.z] + }) + .collect(); + + let normals: Vec<[f32; 3]> = mesh_data + .vertices + .iter() + .map(|vertex| { + let n = vertex.normal; + [n.x, n.y, n.z] + }) + .collect(); + + let indices: Vec = mesh_data.indices + .iter() + .map(|&i| i as u32) + .collect(); + + let mut mesh = Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsage::default()); + mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions); + mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, normals); + mesh.insert_attribute(Mesh::ATTRIBUTE_UV_0, vec![[0.0f32, 0.0f32]; mesh.count_vertices()]); + + mesh.insert_indices(Some(Indices::U32(indices))); + + let normals_attr = mesh + .attribute(Mesh::ATTRIBUTE_NORMAL) + .unwrap() + .as_float3() + .unwrap() + .to_vec(); + + let tangents: Vec<[f32; 4]> = normals_attr + .iter() + .map(|normal| { + let n = Vec3::from_array(*normal); + let up = if n.z.abs() < 0.999 { Vec3::Z } else { Vec3::X }; + let tangent = n.cross(up).normalize_or_zero(); + [tangent.x, tangent.y, tangent.z, 1.0] + }) + .collect(); + + mesh.insert_attribute(Mesh::ATTRIBUTE_TANGENT, tangents); + + mesh.compute_normals(); + + meshes.add(mesh) +} + +fn union_aabb(gaussians: &[Gaussian3D], nsig: f32) -> (Vec3, Vec3) { + let mut minv = Vec3::splat(f32::INFINITY); + let mut maxv = Vec3::splat(f32::NEG_INFINITY); + + for gaussian in gaussians { + let ax = gaussian.rot * (Vec3::X * gaussian.sigma.x * nsig); + let ay = gaussian.rot * (Vec3::Y * gaussian.sigma.y * nsig); + let az = gaussian.rot * (Vec3::Z * gaussian.sigma.z * nsig); + let extent = Vec3::new( + ax.x.abs() + ay.x.abs() + az.x.abs(), + ax.y.abs() + ay.y.abs() + az.y.abs(), + ax.z.abs() + ay.z.abs() + az.z.abs(), + ); + + minv = minv.min(gaussian.center - extent); + maxv = maxv.max(gaussian.center + extent); + } + + (minv, maxv) +} + +fn density_at(p: Vec3, gaussians: &[Gaussian3D]) -> f32 { + let mut s = 0.0; + for gaussian in gaussians { + let delta = p - gaussian.center; + let local = gaussian.rot.conjugate() * delta; + let q = (local.x * local.x) / (gaussian.sigma.x * gaussian.sigma.x) + + (local.y * local.y) / (gaussian.sigma.y * gaussian.sigma.y) + + (local.z * local.z) / (gaussian.sigma.z * gaussian.sigma.z); + + if q < 36.0 { + s += gaussian.weight * (-0.5 * q).exp(); + } + } + s +} diff --git a/src/morph/interpolate.rs b/src/morph/interpolate.rs index 2812cb63..41a52109 100644 --- a/src/morph/interpolate.rs +++ b/src/morph/interpolate.rs @@ -96,7 +96,10 @@ fn ensure_gaussian_interpolate_synced( ) { for (entity, sync_tag) in &query { if sync_tag.is_none() { - debug!(?entity, "adding SyncToRenderWorld to GaussianInterpolate entity"); + debug!( + ?entity, + "adding SyncToRenderWorld to GaussianInterpolate entity" + ); commands.entity(entity).insert(SyncToRenderWorld); } } @@ -106,7 +109,11 @@ fn ensure_gaussian_interpolate_output_gaussian3d( mut commands: Commands, mut planar_assets: ResMut>, mut rebind_queue: ResMut>, - query: Query<(Entity, &GaussianInterpolate, Option<&PlanarGaussian3dHandle>)>, + query: Query<( + Entity, + &GaussianInterpolate, + Option<&PlanarGaussian3dHandle>, + )>, ) { for (entity, interpolate, existing_output) in &query { if existing_output.is_some() { @@ -114,8 +121,14 @@ fn ensure_gaussian_interpolate_output_gaussian3d( } let lhs_handle = interpolate.lhs.handle(); - let Some(cloned_asset) = planar_assets.get(lhs_handle).map(|asset| asset.iter().collect::()) else { - debug!(?entity, "lhs planar asset not available for GaussianInterpolate output"); + let Some(cloned_asset) = planar_assets + .get(lhs_handle) + .map(|asset| asset.iter().collect::()) + else { + debug!( + ?entity, + "lhs planar asset not available for GaussianInterpolate output" + ); continue; }; @@ -222,14 +235,20 @@ pub fn extract_gaussian_interpolate( debug!("no GaussianInterpolate components extracted this frame"); } else { let count = extracted.len(); - debug!(count, "inserting GaussianInterpolate components into render world"); + debug!( + count, + "inserting GaussianInterpolate components into render world" + ); for (entity, bundle) in extracted { match commands.get_entity(entity) { Ok(mut entity_cmd) => { entity_cmd.insert(bundle); } Err(_) => { - debug!(?entity, "skipping GaussianInterpolate insertion; render entity missing"); + debug!( + ?entity, + "skipping GaussianInterpolate insertion; render entity missing" + ); } } } @@ -264,7 +283,10 @@ pub fn queue_gaussian_interpolate_bind_groups( } if !rebuild { - debug!(?entity, "GaussianInterpolate bind groups unchanged; skipping"); + debug!( + ?entity, + "GaussianInterpolate bind groups unchanged; skipping" + ); continue; } @@ -273,20 +295,33 @@ pub fn queue_gaussian_interpolate_bind_groups( let output_asset_handle = output_handle.handle().clone(); let mut ready = true; - for (label, handle) in [("lhs", &lhs_handle), ("rhs", &rhs_handle), ("output", &output_asset_handle)] { + for (label, handle) in [ + ("lhs", &lhs_handle), + ("rhs", &rhs_handle), + ("output", &output_asset_handle), + ] { // Assets created at runtime (like the interpolation output) are not tracked by the AssetServer, so // `get_load_state` returns `None` even though the data is ready. Treat `None` as ready and only block // while the server explicitly reports a non-loaded state. if let Some(load_state) = asset_server.get_load_state(handle.id()) { if !matches!(load_state, LoadState::Loaded) { - debug!(?entity, handle_label = label, ?load_state, "waiting for GaussianInterpolate asset load"); + debug!( + ?entity, + handle_label = label, + ?load_state, + "waiting for GaussianInterpolate asset load" + ); ready = false; break; } } if gpu_planars.get(handle.id()).is_none() { - debug!(?entity, handle_label = label, "GaussianInterpolate GPU asset not ready"); + debug!( + ?entity, + handle_label = label, + "GaussianInterpolate GPU asset not ready" + ); ready = false; break; } @@ -315,7 +350,10 @@ pub fn queue_gaussian_interpolate_bind_groups( output_gpu.bind_group(render_device.as_ref(), &interpolate_pipeline.output_layout); let gaussian_count = output_gpu.len(); - debug!(?entity, gaussian_count, "queued GaussianInterpolate bind groups"); + debug!( + ?entity, + gaussian_count, "queued GaussianInterpolate bind groups" + ); pending_inserts.push(( entity, @@ -332,7 +370,10 @@ pub fn queue_gaussian_interpolate_bind_groups( debug!("no GaussianInterpolate bind groups queued this frame"); } else { let count = pending_inserts.len(); - debug!(count, "inserted GaussianInterpolate bind groups into render world"); + debug!( + count, + "inserted GaussianInterpolate bind groups into render world" + ); commands.try_insert_batch(pending_inserts); } } @@ -381,7 +422,10 @@ where debug!("GaussianInterpolate pipeline ready"); } state => { - debug!(?state, "GaussianInterpolate pipeline not ready; skipping update"); + debug!( + ?state, + "GaussianInterpolate pipeline not ready; skipping update" + ); return; } } @@ -473,4 +517,3 @@ where Ok(()) } } - diff --git a/src/render/gaussian.wgsl b/src/render/gaussian.wgsl index dc7f8b14..b6f1ba85 100644 --- a/src/render/gaussian.wgsl +++ b/src/render/gaussian.wgsl @@ -18,6 +18,10 @@ in_frustum, } +#ifdef SOLARI +#import bevy_gaussian_splatting::solari::solari_shade_diffuse +#endif + #ifdef GAUSSIAN_2D #import bevy_gaussian_splatting::gaussian_2d::{ compute_cov2d_surfel, @@ -141,6 +145,8 @@ @location(2) conic: vec3, @location(3) major_minor: vec2, #endif + @location(7) world_position: vec3, + @location(8) world_normal: vec3, }; #else struct GaussianVertexOutput { @@ -160,6 +166,8 @@ @location(2) @interpolate(flat) conic: vec3, @location(3) @interpolate(linear) major_minor: vec2, #endif + @location(7) @interpolate(flat) world_position: vec3, + @location(8) @interpolate(flat) world_normal: vec3, }; #endif @@ -211,6 +219,8 @@ fn vs_points( #endif if (discard_quad) { + output.world_position = transformed_position; + output.world_normal = normalize(transformed_position - view.world_position); output.color = vec4(0.0, 0.0, 0.0, 0.0); output.position = vec4(0.0, 0.0, 0.0, 0.0); return output; @@ -420,6 +430,9 @@ fn vs_points( opacity * gaussian_uniforms.global_opacity, ); + output.world_position = transformed_position; + output.world_normal = normalize(transformed_position - view.world_position); + #ifdef HIGHLIGHT_SELECTED if (get_visibility(splat_index) > 0.5) { output.color = vec4(0.3, 1.0, 0.1, 1.0); @@ -497,9 +510,20 @@ fn fs_main(input: GaussianVertexOutput) -> @location(0) vec4 { let alpha = min(exp(power) * input.color.a, 0.999); // TODO: round alpha to terminate depth test? + var shaded_rgb = input.color.rgb; + +#ifdef SOLARI + shaded_rgb = solari_shade_diffuse( + shaded_rgb, + input.world_position, + input.world_normal, + view.world_position, + view.exposure, + ); +#endif return vec4( - input.color.rgb * alpha, + shaded_rgb * alpha, alpha, ); } diff --git a/src/render/mod.rs b/src/render/mod.rs index 06ab0dc7..82654811 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -36,6 +36,9 @@ use bevy::{ }; use bevy_interleave::prelude::*; +#[cfg(feature = "solari")] +mod solari; + use crate::{ camera::GaussianCamera, gaussian::{ @@ -126,6 +129,9 @@ where queue_gaussians::.in_set(RenderSet::Queue), ), ); + + #[cfg(feature = "solari")] + solari::configure_render_app::(render_app); } // TODO: refactor common resources into a common plugin @@ -464,6 +470,8 @@ pub struct CloudPipeline { pub view_layout: BindGroupLayout, pub compute_view_layout: BindGroupLayout, pub sorted_layout: BindGroupLayout, + #[cfg(feature = "solari")] + pub solari: solari::CloudPipelineSolariExtras, phantom: std::marker::PhantomData, } @@ -617,6 +625,9 @@ where #[cfg(feature = "buffer_texture")] let sorted_layout = texture::get_sorted_bind_group_layout(render_device); + #[cfg(feature = "solari")] + let solari = solari::init_cloud_pipeline_extras(render_device); + debug!("created cloud pipeline"); Self { @@ -626,6 +637,8 @@ where compute_view_layout, shader: GAUSSIAN_SHADER_HANDLE, sorted_layout, + #[cfg(feature = "solari")] + solari, phantom: std::marker::PhantomData, } } @@ -725,6 +738,9 @@ pub fn shader_defs(key: CloudPipelineKey) -> Vec { ), ]; + #[cfg(feature = "solari")] + solari::push_shader_defs(&mut shader_defs); + if key.aabb { shader_defs.push("USE_AABB".into()); } @@ -842,14 +858,28 @@ impl SpecializedRenderPipeline for CloudPipeline { debug!("specializing cloud pipeline"); - RenderPipelineDescriptor { - label: Some("gaussian cloud render pipeline".into()), - layout: vec![ + #[cfg(feature = "solari")] + let layout = solari::pipeline_layout( + self, + vec![ self.view_layout.clone(), self.gaussian_uniform_layout.clone(), self.gaussian_cloud_layout.clone(), self.sorted_layout.clone(), ], + ); + + #[cfg(not(feature = "solari"))] + let layout = vec![ + self.view_layout.clone(), + self.gaussian_uniform_layout.clone(), + self.gaussian_cloud_layout.clone(), + self.sorted_layout.clone(), + ]; + + RenderPipelineDescriptor { + label: Some("gaussian cloud render pipeline".into()), + layout, vertex: VertexState { shader: self.shader.clone(), shader_defs: shader_defs.clone(), @@ -902,6 +932,7 @@ impl SpecializedRenderPipeline for CloudPipeline { } } +#[cfg(not(feature = "solari"))] type DrawGaussians = ( SetItemPipeline, // SetViewBindGroup<0>, @@ -910,6 +941,9 @@ type DrawGaussians = ( DrawGaussianInstanced, ); +#[cfg(feature = "solari")] +type DrawGaussians = solari::DrawGaussians; + #[allow(dead_code)] #[derive(Component, ShaderType, Clone, Copy)] pub struct CloudUniform { diff --git a/src/render/solari.rs b/src/render/solari.rs new file mode 100644 index 00000000..3d093244 --- /dev/null +++ b/src/render/solari.rs @@ -0,0 +1,183 @@ +#![cfg(feature = "solari")] + +use std::marker::PhantomData; + +use bevy::solari::realtime::prepare::{ + SolariLightingResources, WORLD_CACHE_SIZE as SOLARI_WORLD_CACHE_SIZE, +}; +use bevy::{ + prelude::*, + render::{ + Render, RenderApp, RenderSet, + render_phase::{ + PhaseItem, RenderCommand, RenderCommandResult, SetItemPipeline, TrackedRenderPass, + }, + render_resource::{ + BindGroup, BindGroupEntry, BindGroupLayout, BindGroupLayoutEntry, BindingType, + BufferBindingType, ShaderDefVal, ShaderStages, + }, + renderer::RenderDevice, + }, +}; +use bevy_interleave::prelude::PlanarSync; + +use super::{ + CloudPipeline, DrawGaussianInstanced, GaussianUniformBindGroups, SetGaussianUniformBindGroup, + SetPreviousViewBindGroup, +}; +use crate::camera::GaussianCamera; + +pub(super) struct CloudPipelineSolariExtras { + pub layout: BindGroupLayout, +} + +pub(super) fn init_cloud_pipeline_extras( + render_device: &RenderDevice, +) -> CloudPipelineSolariExtras { + let layout = render_device.create_bind_group_layout( + Some("gaussian_solari_layout"), + &[ + BindGroupLayoutEntry { + binding: 0, + visibility: ShaderStages::FRAGMENT, + ty: BindingType::Buffer { + ty: BufferBindingType::Storage { read_only: true }, + has_dynamic_offset: false, + min_binding_size: None, + }, + count: None, + }, + BindGroupLayoutEntry { + binding: 1, + visibility: ShaderStages::FRAGMENT, + ty: BindingType::Buffer { + ty: BufferBindingType::Storage { read_only: true }, + has_dynamic_offset: false, + min_binding_size: None, + }, + count: None, + }, + ], + ); + + CloudPipelineSolariExtras { layout } +} + +pub(super) fn push_shader_defs(shader_defs: &mut Vec) { + shader_defs.push("SOLARI".into()); + shader_defs.push(ShaderDefVal::UInt( + "SOLARI_WORLD_CACHE_SIZE".into(), + SOLARI_WORLD_CACHE_SIZE as u32, + )); +} + +pub(super) fn pipeline_layout( + pipeline: &CloudPipeline, + mut base: Vec, +) -> Vec { + base.push(pipeline.solari.layout.clone()); + base +} + +pub(super) fn configure_render_app(render_app: &mut App) { + render_app.add_plugins(RenderSolariPlugin::::default()); +} + +pub(super) type DrawGaussians = ( + SetItemPipeline, + // SetViewBindGroup<0>, + SetPreviousViewBindGroup<0>, + SetGaussianUniformBindGroup<1>, + SetGaussianSolariBindGroup<4>, + DrawGaussianInstanced, +); + +#[derive(Component)] +pub(super) struct GaussianSolariBindGroup { + value: BindGroup, +} + +fn queue_gaussian_solari_bind_groups( + mut commands: Commands, + render_device: Res, + gaussian_cloud_pipeline: Res>, + views: Query< + ( + Entity, + Option<&SolariLightingResources>, + Option<&GaussianSolariBindGroup>, + ), + With, + >, +) { + for (entity, solari_resources, existing_bind_group) in &views { + match solari_resources { + Some(resources) => { + let bind_group = render_device.create_bind_group( + "gaussian_solari_bind_group", + &gaussian_cloud_pipeline.solari.layout, + &[ + BindGroupEntry { + binding: 0, + resource: resources.world_cache_checksums.as_entire_binding(), + }, + BindGroupEntry { + binding: 1, + resource: resources.world_cache_radiance.as_entire_binding(), + }, + ], + ); + + commands + .entity(entity) + .insert(GaussianSolariBindGroup { value: bind_group }); + } + None => { + if existing_bind_group.is_some() { + commands.entity(entity).remove::(); + } + } + } + } +} + +pub(super) struct SetGaussianSolariBindGroup; + +impl RenderCommand

for SetGaussianSolariBindGroup { + type Param = (); + type ViewQuery = Option>; + type ItemQuery = (); + + #[inline] + fn render<'w>( + _: &P, + solari_bind_group: Option>, + _entity: Option<()>, + _: SystemParamItem<'w, '_, Self::Param>, + pass: &mut TrackedRenderPass<'w>, + ) -> RenderCommandResult { + if let Some(Some(bind_group)) = solari_bind_group { + pass.set_bind_group(I, &bind_group.value, &[]); + RenderCommandResult::Success + } else { + RenderCommandResult::Skip + } + } +} + +struct RenderSolariPlugin(PhantomData); + +impl Default for RenderSolariPlugin { + fn default() -> Self { + Self(PhantomData) + } +} + +impl Plugin for RenderSolariPlugin { + fn build(&self, app: &mut App) { + app.add_systems( + Render, + queue_gaussian_solari_bind_groups::.in_set(RenderSet::PrepareBindGroups), + ); + } +}