diff --git a/.cargo/config.toml b/.cargo/config.toml index 3937a294..6a86f80d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,9 @@ [alias] -shaders = "gpu toml crates/renderling" +xtask = "run --package xtask --" [build] rustflags = ["--cfg=web_sys_unstable_apis"] rustdocflags = ["--cfg=web_sys_unstable_apis"] + +[env] +CARGO_WORKSPACE_DIR = { value = "", relative = true } diff --git a/.gitattributes b/.gitattributes index 7c3f0664..42f0b0f0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ -* text=auto +*.txt text +*.rs text +*.md text +*.yaml text *.spv binary -*.wgsl binary +**/*.wgsl linguist-generated=true binary diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index d878aea7..5f88e0dc 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -33,14 +33,16 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cargo - key: cargo-cache-${{ runner.os }} + # THIS KEY MUST MATCH BELOW + key: cargo-cache-1-${{ runner.os }} - uses: moonrepo/setup-rust@v1 - run: rustup default stable - run: rustup update - run: cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu + - run: cargo gpu show commitsh - id: cachepathstep run: | - CACHE_PATH=`cargo gpu show --cache-directory` + CACHE_PATH=`cargo gpu show cache-directory` echo $CACHE_PATH echo "cachepath-$RUNNER_OS=$CACHE_PATH" >> "$GITHUB_OUTPUT" @@ -61,7 +63,8 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cargo - key: cargo-cache-${{ runner.os }} + # THIS KEY MUST MATCH ABOVE + key: cargo-cache-1-${{ runner.os }} - uses: actions/cache@v4 with: path: | @@ -70,8 +73,9 @@ jobs: ${{ needs.install-cargo-gpu.outputs.cachepath-Windows }} key: rust-gpu-cache-0-${{ runner.os }} - uses: moonrepo/setup-rust@v1 + - run: cargo gpu show commitsh - run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders - - run: cargo shaders + - run: cargo xtask compile-shaders - run: cargo build -p renderling - run: git diff --exit-code --no-ext-diff diff --git a/Cargo.lock b/Cargo.lock index cbe8b919..43dff4f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ab_glyph" @@ -46,6 +46,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" + [[package]] name = "allocator-api2" version = "0.2.19" @@ -146,6 +152,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "anyhow" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" + [[package]] name = "approx" version = "0.3.2" @@ -164,6 +176,23 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -279,6 +308,29 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "av1-grain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62" +dependencies = [ + "arrayvec", +] + [[package]] name = "base64" version = "0.13.1" @@ -318,6 +370,12 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + [[package]] name = "block" version = "0.1.6" @@ -346,6 +404,12 @@ dependencies = [ "piper", ] +[[package]] +name = "built" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b" + [[package]] name = "bumpalo" version = "3.16.0" @@ -369,7 +433,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -433,6 +497,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -480,9 +554,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", "clap_derive", @@ -490,9 +564,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -509,14 +583,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cloudabi" @@ -648,7 +722,7 @@ checksum = "ef999dd82fff9dc1f2cf371c0f9a6315016b9562a04811fbefae2d80da6a1fad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -713,7 +787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -863,12 +937,12 @@ dependencies = [ name = "example" version = "0.1.0" dependencies = [ - "clap 4.5.20", + "clap 4.5.23", "env_logger", "futures-lite 1.13.0", "gltf", "icosahedron", - "image 0.24.9", + "image", "img-diff", "lazy_static", "loading-bytes", @@ -1001,7 +1075,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -1125,7 +1199,7 @@ dependencies = [ "base64", "byteorder", "gltf-json", - "image 0.25.5", + "image", "lazy_static", "serde_json", "urlencoding", @@ -1140,7 +1214,7 @@ dependencies = [ "inflections", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -1334,34 +1408,35 @@ dependencies = [ [[package]] name = "image" -version = "0.24.9" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", "gif", - "jpeg-decoder", + "image-webp", "num-traits", "png", "qoi", + "ravif", + "rayon", + "rgb", "tiff", + "zune-core", + "zune-jpeg", ] [[package]] -name = "image" -version = "0.25.5" +name = "image-webp" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" +checksum = "e031e8e3d94711a9ccb5d6ea357439ef3dcbed361798bd4071dc4d9793fbe22f" dependencies = [ - "bytemuck", "byteorder-lite", - "num-traits", - "png", - "zune-core", - "zune-jpeg", + "quick-error", ] [[package]] @@ -1369,10 +1444,16 @@ name = "img-diff" version = "0.1.0" dependencies = [ "glam", - "image 0.24.9", + "image", "snafu", ] +[[package]] +name = "imgref" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" + [[package]] name = "indexmap" version = "2.6.0" @@ -1398,6 +1479,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "is-terminal" version = "0.4.13" @@ -1415,6 +1507,15 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1457,9 +1558,6 @@ name = "jpeg-decoder" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" -dependencies = [ - "rayon", -] [[package]] name = "js-sys" @@ -1505,6 +1603,16 @@ version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" +[[package]] +name = "libfuzzer-sys" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" +dependencies = [ + "arbitrary", + "cc", +] + [[package]] name = "libloading" version = "0.8.5" @@ -1579,6 +1687,15 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "lyon" version = "1.0.1" @@ -1640,6 +1757,16 @@ dependencies = [ "libc", ] +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "memchr" version = "2.7.4" @@ -1680,6 +1807,12 @@ dependencies = [ "walkdir", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1750,6 +1883,69 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1778,7 +1974,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2100,7 +2296,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2190,9 +2386,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2202,6 +2398,19 @@ name = "profiling" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" +dependencies = [ + "quote", + "syn 2.0.90", +] [[package]] name = "qoi" @@ -2212,6 +2421,12 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quick-xml" version = "0.36.2" @@ -2372,6 +2587,56 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand 0.8.5", + "rand_chacha 0.3.1", + "simd_helpers", + "system-deps", + "thiserror", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + [[package]] name = "raw-window-handle" version = "0.6.2" @@ -2467,6 +2732,7 @@ dependencies = [ "assert_approx_eq", "async-channel 1.9.0", "bytemuck", + "cfg_aliases 0.2.1", "crabslab", "crunch", "ctor", @@ -2479,13 +2745,14 @@ dependencies = [ "gltf", "half", "icosahedron", - "image 0.24.9", + "image", "img-diff", "log", "naga", "pathdiff", "pretty_assertions", "quote", + "renderling_build", "rustc-hash 1.1.0", "serde", "serde_json", @@ -2496,6 +2763,17 @@ dependencies = [ "winit", ] +[[package]] +name = "renderling_build" +version = "0.1.0" +dependencies = [ + "log", + "naga", + "quote", + "serde", + "serde_json", +] + [[package]] name = "renderling_ui" version = "0.3.5" @@ -2505,7 +2783,7 @@ dependencies = [ "env_logger", "futures-lite 1.13.0", "glyph_brush", - "image 0.24.9", + "image", "img-diff", "loading-bytes", "log", @@ -2517,6 +2795,12 @@ dependencies = [ "wgpu", ] +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" + [[package]] name = "rustc-hash" version = "1.1.0" @@ -2614,7 +2898,7 @@ checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2629,6 +2913,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + [[package]] name = "shlex" version = "1.3.0" @@ -2641,6 +2934,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "slab" version = "0.4.9" @@ -2733,7 +3035,7 @@ dependencies = [ [[package]] name = "spirv-std" version = "0.9.0" -source = "git+https://github.com/Rust-GPU/rust-gpu#9be942e96730726a61a742fd41465bdc8a81aa34" +source = "git+https://github.com/Rust-GPU/rust-gpu#565db88a8c9022ffcf23d85e369a2595aa4e81cd" dependencies = [ "bitflags 1.3.2", "glam", @@ -2745,18 +3047,18 @@ dependencies = [ [[package]] name = "spirv-std-macros" version = "0.9.0" -source = "git+https://github.com/Rust-GPU/rust-gpu#9be942e96730726a61a742fd41465bdc8a81aa34" +source = "git+https://github.com/Rust-GPU/rust-gpu#565db88a8c9022ffcf23d85e369a2595aa4e81cd" dependencies = [ "proc-macro2", "quote", "spirv-std-types", - "syn 1.0.109", + "syn 2.0.90", ] [[package]] name = "spirv-std-types" version = "0.9.0" -source = "git+https://github.com/Rust-GPU/rust-gpu#9be942e96730726a61a742fd41465bdc8a81aa34" +source = "git+https://github.com/Rust-GPU/rust-gpu#565db88a8c9022ffcf23d85e369a2595aa4e81cd" [[package]] name = "static_assertions" @@ -2795,15 +3097,34 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "termcolor" version = "1.4.1" @@ -2839,7 +3160,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2878,11 +3199,26 @@ dependencies = [ "strict-num", ] +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -2891,6 +3227,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -2968,12 +3306,29 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "v_frame" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "vec_map" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version-compare" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" + [[package]] name = "version_check" version = "0.9.5" @@ -3024,7 +3379,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -3058,7 +3413,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3092,7 +3447,7 @@ checksum = "c97b2ef2c8d627381e51c071c2ab328eac606d3f69dd82bcbca20a9e389d95f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3395,7 +3750,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3406,7 +3761,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3763,6 +4118,16 @@ version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" +[[package]] +name = "xtask" +version = "0.1.0" +dependencies = [ + "clap 4.5.23", + "env_logger", + "log", + "renderling_build", +] + [[package]] name = "yansi" version = "1.0.1" @@ -3787,7 +4152,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 95479051..eef64945 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,10 @@ members = [ "crates/example-wasm", "crates/loading-bytes", "crates/renderling", + "crates/renderling-build", "crates/renderling-ui", - "crates/sandbox" + "crates/sandbox", + "crates/xtask" ] exclude = ["./shaders"] @@ -17,6 +19,8 @@ resolver = "2" assert_approx_eq = "1.1.0" async-channel = "1.8" bytemuck = { version = "1.13.0", features = ["derive"] } +clap = { version = "4.5.23", features = ["derive"] } +cfg_aliases = "0.2" crabslab = { version = "0.6.2", default-features = false } ctor = "0.2.2" dagga = "0.2.1" @@ -24,16 +28,18 @@ env_logger = "0.10.0" futures-lite = "1.13" glam = { version = "0.29", default-features = false } gltf = { version = "1.4,1", features = ["KHR_lights_punctual", "KHR_materials_unlit", "KHR_materials_emissive_strength", "extras", "extensions"] } -image = "0.24" +image = "0.25" log = "0.4" naga = { version = "23.0.0", features = ["spv-in", "wgsl-out", "wgsl-in", "msl-out"] } pretty_assertions = "1.4.0" proc-macro2 = { version = "1.0", features = ["span-locations"] } +quote = "1.0" rustc-hash = "1.1" +serde = {version = "1.0", features = ["derive"]} serde_json = "1.0.117" send_wrapper = "0.6.0" snafu = "0.7" -syn = { version = "2.0.49", features = ["full", "extra-traits", "parsing"] } +syn = { version = "2.0", features = ["full", "extra-traits", "parsing"] } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = "0.3" @@ -54,5 +60,3 @@ opt-level = 3 naga = { git = "https://github.com/gfx-rs/wgpu.git" } wgpu = { git = "https://github.com/gfx-rs/wgpu.git" } spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu" } - - diff --git a/crates/img-diff/Cargo.toml b/crates/img-diff/Cargo.toml index f745b614..8a93cd81 100644 --- a/crates/img-diff/Cargo.toml +++ b/crates/img-diff/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [dependencies] glam = { workspace = true, features = ["std"] } -image = { version = "^0.24" } +image.workspace = true snafu = "^0.7" diff --git a/crates/img-diff/src/lib.rs b/crates/img-diff/src/lib.rs index e6bd24df..50ad997a 100644 --- a/crates/img-diff/src/lib.rs +++ b/crates/img-diff/src/lib.rs @@ -218,6 +218,28 @@ pub fn assert_img_eq(filename: &str, seen: impl Into) { assert_img_eq_cfg(filename, seen, DiffCfg::default()) } +/// Normalize the depth image to make it easier to see. +/// +/// ## Warning +/// This is only normalization, not linearization. +pub fn normalize_gray_img(seen: &mut image::GrayImage) { + let mut max = 0u8; + let mut min = u8::MAX; + seen.pixels().for_each(|Luma([c])| { + max = max.max(*c); + min = min.min(*c); + }); + let total = (max - min) as f32; + seen.pixels_mut().for_each(|c| { + let comps = c.0.map(|u| { + let percent = (u as f32 - min as f32) / total; + let float = percent * 255.0; + float as u8 + }); + c.0 = comps; + }); +} + #[cfg(test)] mod test { use crate::assert_img_eq; diff --git a/crates/renderling-build/Cargo.toml b/crates/renderling-build/Cargo.toml new file mode 100644 index 00000000..3d157bf8 --- /dev/null +++ b/crates/renderling-build/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "renderling_build" +version = "0.1.0" +edition = "2021" +description = "Builds shader linkage for the Renderling project" +repository = "https://github.com/schell/renderling" +license = "MIT OR Apache-2.0" +keywords = ["game", "graphics", "shader", "rendering"] +categories = ["rendering", "game-development", "graphics"] + +[dependencies] +log.workspace = true +naga.workspace = true +quote.workspace = true +serde.workspace = true +serde_json.workspace = true diff --git a/crates/renderling-build/src/lib.rs b/crates/renderling-build/src/lib.rs new file mode 100644 index 00000000..054be926 --- /dev/null +++ b/crates/renderling-build/src/lib.rs @@ -0,0 +1,181 @@ +#![allow(unexpected_cfgs)] +use quote::quote; + +#[derive(Debug, serde::Deserialize)] +struct Linkage { + source_path: std::path::PathBuf, + entry_point: String, + wgsl_entry_point: String, +} + +impl core::fmt::Display for Linkage { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let spv_source_path = self.source_path.clone(); + let spv_source_filename = spv_source_path.file_name().unwrap().to_str().unwrap(); + let spv_include_source_path = format!("../../shaders/{spv_source_filename}"); + + let wgsl_source_path = self.source_path.with_extension("wgsl"); + let wgsl_source_filename = wgsl_source_path.file_name().unwrap().to_str().unwrap(); + let wgsl_include_source_path = format!("../../shaders/{wgsl_source_filename}"); + + let Linkage { + source_path: _, + entry_point, + wgsl_entry_point, + } = self; + + let fn_name = self.fn_name(); + + let quote = quote! { + use crate::linkage::ShaderLinkage; + + #[cfg(not(target_arch = "wasm32"))] + mod target { + pub const ENTRY_POINT: &str = #entry_point; + + pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { + wgpu::include_spirv!(#spv_include_source_path) + } + + pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { + log::debug!("creating native linkage for {}", #fn_name); + super::ShaderLinkage { + entry_point: ENTRY_POINT, + module: device.create_shader_module(descriptor()).into() + } + } + } + #[cfg(target_arch = "wasm32")] + mod target { + pub const ENTRY_POINT: &str = #wgsl_entry_point; + + pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { + wgpu::include_wgsl!(#wgsl_include_source_path) + } + + pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { + log::debug!("creating web linkage for {}", #fn_name); + super::ShaderLinkage { + entry_point: ENTRY_POINT, + module: device.create_shader_module(descriptor()).into() + } + } + } + + pub fn linkage(device: &wgpu::Device) -> ShaderLinkage { + target::linkage(device) + } + }; + + f.write_fmt(format_args!( + r#"#![allow(dead_code)] + //! Automatically generated by Renderling's `build.rs`. + {quote} + "#, + )) + } +} + +impl Linkage { + pub fn fn_name(&self) -> &str { + self.entry_point.split("::").last().unwrap() + } +} + +fn wgsl(spv_filepath: impl AsRef, destination: impl AsRef) { + let bytes = std::fs::read(spv_filepath.as_ref()).unwrap_or_else(|e| { + panic!( + "could not read spv filepath '{}' while attempting to translate to wgsl: {e}", + spv_filepath.as_ref().display() + ); + }); + let opts = naga::front::spv::Options::default(); + let module = naga::front::spv::parse_u8_slice(&bytes, &opts).unwrap(); + let mut validator = + naga::valid::Validator::new(Default::default(), naga::valid::Capabilities::empty()); + let info = validator.validate(&module).unwrap(); + let wgsl = + naga::back::wgsl::write_string(&module, &info, naga::back::wgsl::WriterFlags::empty()) + .unwrap(); + let destination = destination.as_ref().with_extension("wgsl"); + std::fs::write(destination, wgsl).unwrap(); +} + +pub struct RenderlingPaths { + pub cargo_workspace: std::path::PathBuf, + pub renderling_crate: std::path::PathBuf, + pub shader_dir: std::path::PathBuf, + pub shader_manifest: std::path::PathBuf, + pub linkage_dir: std::path::PathBuf, +} + +impl Default for RenderlingPaths { + fn default() -> Self { + let cargo_workspace = + std::path::PathBuf::from(std::env::var("CARGO_WORKSPACE_DIR").unwrap()); + let renderling_crate = cargo_workspace.join("crates").join("renderling"); + log::debug!("cargo_manifest_dir: {renderling_crate:#?}"); + let shader_dir = renderling_crate.join("shaders"); + + let shader_manifest = shader_dir.join("manifest.json"); + let linkage_dir = renderling_crate.join("src").join("linkage"); + + Self { + cargo_workspace, + renderling_crate, + shader_dir, + shader_manifest, + linkage_dir, + } + } +} +/// Generate linkage (Rust source) files for each shader in the manifest. +pub fn generate_linkage() { + log::trace!("{:#?}", std::env::vars().collect::>()); + let paths = RenderlingPaths::default(); + + assert!( + paths.shader_manifest.is_file(), + "missing file '{}', you must first compile the shaders", + paths.shader_manifest.display() + ); + + if !paths.linkage_dir.is_dir() { + log::info!("creating linkage directory"); + std::fs::create_dir_all(&paths.linkage_dir).unwrap(); + } + + log::debug!("cwd: {:?}", std::env::current_dir().unwrap()); + + let manifest_file = std::fs::File::open(&paths.shader_manifest).unwrap(); + let manifest: Vec = serde_json::from_reader(manifest_file).unwrap(); + let mut set = std::collections::HashSet::new(); + for linkage in manifest.into_iter() { + log::debug!("linkage: {linkage:#?}"); + let fn_name = linkage.fn_name(); + + if set.contains(fn_name) { + panic!("Shader name '{fn_name}' is used for two or more shaders, aborting!"); + } + set.insert(fn_name.to_string()); + + let absolute_source_path = paths + .shader_dir + .join(linkage.source_path.file_name().unwrap()); + let wgsl_source_path = linkage.source_path.with_extension("wgsl"); + let absolute_wgsl_source_path = + paths.shader_dir.join(wgsl_source_path.file_name().unwrap()); + wgsl(absolute_source_path, absolute_wgsl_source_path); + + let filepath = paths.linkage_dir.join(fn_name).with_extension("rs"); + log::info!("generating: {}", linkage.entry_point,); + + let contents = linkage.to_string(); + std::fs::write(&filepath, contents).unwrap(); + std::process::Command::new("rustfmt") + .args([&format!("{}", filepath.display())]) + .output() + .expect("could not format generated code"); + } + log::info!("...done!") +} diff --git a/crates/renderling/Cargo.toml b/crates/renderling/Cargo.toml index b03b43d2..7462b9e1 100644 --- a/crates/renderling/Cargo.toml +++ b/crates/renderling/Cargo.toml @@ -10,11 +10,8 @@ categories = ["rendering", "game-development", "graphics"] readme = "../../README.md" build = "src/build.rs" -[package.metadata.rust-gpu.build.spirv-builder] -git = "https://github.com/Rust-GPU/rust-gpu.git" -rev = "0da80f8" - [package.metadata.rust-gpu.build] +auto-install-rust-toolchain = true output-dir = "shaders" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -34,11 +31,13 @@ tutorial = [] wasm = ["wgpu/fragile-send-sync-non-atomic-wasm"] [build-dependencies] -naga = {workspace = true} +cfg_aliases.workspace = true +naga.workspace = true pathdiff = "0.2.2" -quote = "1.0" -serde = {version = "1.0", features = ["derive"]} -serde_json = {workspace = true} +quote.workspace = true +renderling_build = { path = "../renderling-build", version = "0.1.0" } +serde.workspace = true +serde_json.workspace = true # dependencies for CPU and GPU code [dependencies] diff --git a/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.spv b/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.spv index 1e418faf..50662b7c 100644 Binary files a/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.spv and b/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.spv differ diff --git a/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.wgsl b/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.wgsl index 99b2a287..35c613e2 100644 --- a/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.wgsl +++ b/crates/renderling/shaders/convolution-brdf_lut_convolution_fragment.wgsl @@ -7,21 +7,21 @@ var global: vec2; var global_1: vec2; fn function() { - var phi_415_: type_6; - var phi_416_: f32; - var phi_417_: f32; - var phi_430_: type_6; - var phi_431_: type_6; - var phi_680_: vec3; - var phi_715_: vec3; - var phi_750_: vec3; - var phi_792_: f32; - var phi_805_: f32; - var phi_488_: f32; - var phi_489_: f32; - var phi_491_: f32; - var phi_492_: f32; - var phi_493_: bool; + var phi_266_: type_6; + var phi_269_: f32; + var phi_271_: f32; + var phi_267_: type_6; + var phi_294_: type_6; + var phi_586_: vec3; + var phi_621_: vec3; + var phi_656_: vec3; + var phi_698_: f32; + var phi_711_: f32; + var phi_352_: f32; + var phi_353_: f32; + var phi_270_: f32; + var phi_272_: f32; + var phi_354_: bool; var local: f32; var local_1: f32; @@ -29,29 +29,29 @@ fn function() { let _e40 = max(_e37.x, 0.00000011920929f); let _e41 = -(_e40); let _e43 = sqrt(fma(_e41, _e40, 1f)); - phi_415_ = type_6(1u, 1024u); - phi_416_ = 0f; - phi_417_ = 0f; + phi_266_ = type_6(1u, 1024u); + phi_269_ = 0f; + phi_271_ = 0f; loop { - let _e45 = phi_415_; - let _e47 = phi_416_; - let _e49 = phi_417_; + let _e45 = phi_266_; + let _e47 = phi_269_; + let _e49 = phi_271_; local = _e49; local_1 = _e47; if (_e45.member < _e45.member_1) { - phi_430_ = type_6((_e45.member + 1u), _e45.member_1); - phi_431_ = type_6(1u, _e45.member); + phi_267_ = type_6((_e45.member + 1u), _e45.member_1); + phi_294_ = type_6(1u, _e45.member); } else { - phi_430_ = _e45; - phi_431_ = type_6(0u, type_6().member_1); + phi_267_ = _e45; + phi_294_ = type_6(0u, type_6().member_1); } - let _e62 = phi_430_; - let _e64 = phi_431_; + let _e62 = phi_267_; + let _e64 = phi_294_; switch bitcast(_e64.member) { case 0: { - phi_491_ = f32(); - phi_492_ = f32(); - phi_493_ = false; + phi_270_ = f32(); + phi_272_ = f32(); + phi_354_ = false; break; } case 1: { @@ -70,21 +70,21 @@ fn function() { let _e125 = -(_e122.x); let _e129 = sqrt(fma(_e122.y, _e122.y, (_e125 * _e125))); if (_e129 == 0f) { - phi_680_ = vec3(0f, 0f, 0f); + phi_586_ = vec3(0f, 0f, 0f); } else { - phi_680_ = (vec3(_e122.y, _e125, 0f) * (1f / _e129)); + phi_586_ = (vec3(_e122.y, _e125, 0f) * (1f / _e129)); } - let _e134 = phi_680_; + let _e134 = phi_586_; let _e141 = fma(_e134.x, _e116, (-(_e134.y) * _e118)); let _e142 = fma(_e134.y, _e116, (_e134.x * _e118)); let _e143 = fma(_e134.z, _e116, _e111); let _e148 = sqrt(fma(_e143, _e143, fma(_e141, _e141, (_e142 * _e142)))); if (_e148 == 0f) { - phi_715_ = vec3(0f, 0f, 0f); + phi_621_ = vec3(0f, 0f, 0f); } else { - phi_715_ = (vec3(_e141, _e142, _e143) * (1f / _e148)); + phi_621_ = (vec3(_e141, _e142, _e143) * (1f / _e148)); } - let _e153 = phi_715_; + let _e153 = phi_621_; let _e158 = fma(_e43, _e153.x, (_e40 * _e153.z)); let _e159 = (2f * _e158); let _e160 = (_e159 * _e153.y); @@ -92,11 +92,11 @@ fn function() { let _e163 = fma(_e159, _e153.z, _e41); let _e168 = sqrt(fma(_e163, _e163, fma(_e162, _e162, (_e160 * _e160)))); if (_e168 == 0f) { - phi_750_ = vec3(0f, 0f, 0f); + phi_656_ = vec3(0f, 0f, 0f); } else { - phi_750_ = (vec3(_e162, _e160, _e163) * (1f / _e168)); + phi_656_ = (vec3(_e162, _e160, _e163) * (1f / _e168)); } - let _e173 = phi_750_; + let _e173 = phi_656_; let _e175 = max(_e173.z, 0f); let _e177 = max(_e158, 0f); if (_e175 > 0f) { @@ -105,48 +105,48 @@ fn function() { let _e182 = fma(-(_e104), 0.5f, 1f); let _e183 = fma(_e179, _e182, _e180); if (_e183 == 0f) { - phi_792_ = 0f; + phi_698_ = 0f; } else { - phi_792_ = (_e179 / _e183); + phi_698_ = (_e179 / _e183); } - let _e187 = phi_792_; + let _e187 = phi_698_; let _e188 = fma(_e175, _e182, _e180); if (_e188 == 0f) { - phi_805_ = 0f; + phi_711_ = 0f; } else { - phi_805_ = (_e175 / _e188); + phi_711_ = (_e175 / _e188); } - let _e192 = phi_805_; + let _e192 = phi_711_; let _e196 = (((_e187 * _e192) * _e177) / (max(_e153.z, 0f) * _e40)); let _e198 = pow((1f - _e177), 5f); - phi_488_ = fma(_e198, _e196, _e47); - phi_489_ = fma((1f - _e198), _e196, _e49); + phi_352_ = fma(_e198, _e196, _e47); + phi_353_ = fma((1f - _e198), _e196, _e49); } else { - phi_488_ = _e47; - phi_489_ = _e49; + phi_352_ = _e47; + phi_353_ = _e49; } - let _e203 = phi_488_; - let _e205 = phi_489_; - phi_491_ = _e203; - phi_492_ = _e205; - phi_493_ = true; + let _e203 = phi_352_; + let _e205 = phi_353_; + phi_270_ = _e203; + phi_272_ = _e205; + phi_354_ = true; break; } default: { - phi_491_ = f32(); - phi_492_ = f32(); - phi_493_ = bool(); + phi_270_ = f32(); + phi_272_ = f32(); + phi_354_ = bool(); break; } } - let _e207 = phi_491_; - let _e209 = phi_492_; - let _e211 = phi_493_; + let _e207 = phi_270_; + let _e209 = phi_272_; + let _e211 = phi_354_; continue; continuing { - phi_415_ = _e62; - phi_416_ = _e207; - phi_417_ = _e209; + phi_266_ = _e62; + phi_269_ = _e207; + phi_271_ = _e209; break if !(_e211); } } diff --git a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.spv b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.spv index 14d02e93..07b728ce 100644 Binary files a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.spv and b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.spv differ diff --git a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.wgsl b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.wgsl index 29e5c0d7..148b79c8 100644 --- a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.wgsl +++ b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_fragment.wgsl @@ -12,21 +12,21 @@ var global_3: f32; var global_4: texture_cube; fn function() { - var phi_446_: vec3; + var phi_454_: vec3; var phi_104_: type_7; var phi_107_: vec3; var phi_109_: f32; var phi_105_: type_7; - var phi_124_: type_7; - var phi_627_: vec3; - var phi_662_: vec3; - var phi_697_: vec3; - var phi_178_: f32; - var phi_197_: vec3; - var phi_198_: f32; + var phi_132_: type_7; + var phi_635_: vec3; + var phi_670_: vec3; + var phi_705_: vec3; + var phi_186_: f32; + var phi_205_: vec3; + var phi_206_: f32; var phi_108_: vec3; var phi_110_: f32; - var phi_199_: bool; + var phi_207_: bool; var local: vec3; var local_1: f32; var local_2: vec3; @@ -38,11 +38,11 @@ fn function() { let _e43 = global_3; let _e50 = sqrt(fma(_e42.z, _e42.z, fma(_e42.x, _e42.x, (_e42.y * _e42.y)))); if (_e50 == 0f) { - phi_446_ = vec3(0f, 0f, 0f); + phi_454_ = vec3(0f, 0f, 0f); } else { - phi_446_ = (_e42 * (1f / _e50)); + phi_454_ = (_e42 * (1f / _e50)); } - let _e55 = phi_446_; + let _e55 = phi_454_; let _e57 = (_e55.y * -1f); phi_104_ = type_7(0u, 1024u); phi_107_ = vec3(0f, 0f, 0f); @@ -59,18 +59,18 @@ fn function() { local_5 = _e63; if (_e59.member < _e59.member_1) { phi_105_ = type_7((_e59.member + 1u), _e59.member_1); - phi_124_ = type_7(1u, _e59.member); + phi_132_ = type_7(1u, _e59.member); } else { phi_105_ = _e59; - phi_124_ = type_7(0u, type_7().member_1); + phi_132_ = type_7(0u, type_7().member_1); } let _e76 = phi_105_; - let _e78 = phi_124_; + let _e78 = phi_132_; switch bitcast(_e78.member) { case 0: { phi_108_ = vec3(); phi_110_ = f32(); - phi_199_ = false; + phi_207_ = false; break; } case 1: { @@ -91,64 +91,64 @@ fn function() { let _e150 = fma(_e137.x, _e57, -((_e55.x * _e137.y))); let _e155 = sqrt(fma(_e150, _e150, fma(_e142, _e142, (_e147 * _e147)))); if (_e155 == 0f) { - phi_627_ = vec3(0f, 0f, 0f); + phi_635_ = vec3(0f, 0f, 0f); } else { - phi_627_ = (vec3(_e142, _e147, _e150) * (1f / _e155)); + phi_635_ = (vec3(_e142, _e147, _e150) * (1f / _e155)); } - let _e160 = phi_627_; + let _e160 = phi_635_; let _e179 = fma(_e55.x, _e125, fma(_e160.x, _e130, (fma(_e57, _e160.z, -((_e160.y * _e55.z))) * _e132))); let _e180 = fma(_e57, _e125, fma(_e160.y, _e130, (fma(_e55.z, _e160.x, -((_e160.z * _e55.x))) * _e132))); let _e181 = fma(_e55.z, _e125, fma(_e160.z, _e130, (fma(_e55.x, _e160.y, -((_e160.x * _e57))) * _e132))); let _e186 = sqrt(fma(_e181, _e181, fma(_e179, _e179, (_e180 * _e180)))); if (_e186 == 0f) { - phi_662_ = vec3(0f, 0f, 0f); + phi_670_ = vec3(0f, 0f, 0f); } else { - phi_662_ = (vec3(_e179, _e180, _e181) * (1f / _e186)); + phi_670_ = (vec3(_e179, _e180, _e181) * (1f / _e186)); } - let _e191 = phi_662_; + let _e191 = phi_670_; let _e198 = (2f * fma(_e55.z, _e191.z, fma(_e55.x, _e191.x, (_e57 * _e191.y)))); let _e200 = fma(_e198, _e191.x, -(_e55.x)); let _e201 = fma(_e198, _e191.y, _e55.y); let _e203 = fma(_e198, _e191.z, -(_e55.z)); let _e208 = sqrt(fma(_e203, _e203, fma(_e200, _e200, (_e201 * _e201)))); if (_e208 == 0f) { - phi_697_ = vec3(0f, 0f, 0f); + phi_705_ = vec3(0f, 0f, 0f); } else { - phi_697_ = (vec3(_e200, _e201, _e203) * (1f / _e208)); + phi_705_ = (vec3(_e200, _e201, _e203) * (1f / _e208)); } - let _e213 = phi_697_; + let _e213 = phi_705_; let _e220 = max(fma(_e55.z, _e213.z, fma(_e55.x, _e213.x, (_e57 * _e213.y))), 0f); if (_e220 > 0f) { if (_e43 == 0f) { - phi_178_ = 0f; + phi_186_ = 0f; } else { - phi_178_ = (0.5f * log2((1572864f / max((1024f * max((_e220 * 0.31830987f), 0f)), 0.00000011920929f)))); + phi_186_ = (0.5f * log2((1572864f / max((1024f * max((_e220 * 0.31830987f), 0f)), 0.00000011920929f)))); } - let _e231 = phi_178_; + let _e231 = phi_186_; let _e232 = textureSampleLevel(global_4, global, _e213, _e231); - phi_197_ = vec3(fma(_e232.x, _e220, _e61.x), fma(_e232.y, _e220, _e61.y), fma(_e232.z, _e220, _e61.z)); - phi_198_ = (_e63 + _e220); + phi_205_ = vec3(fma(_e232.x, _e220, _e61.x), fma(_e232.y, _e220, _e61.y), fma(_e232.z, _e220, _e61.z)); + phi_206_ = (_e63 + _e220); } else { - phi_197_ = _e61; - phi_198_ = _e63; + phi_205_ = _e61; + phi_206_ = _e63; } - let _e245 = phi_197_; - let _e247 = phi_198_; + let _e245 = phi_205_; + let _e247 = phi_206_; phi_108_ = _e245; phi_110_ = _e247; - phi_199_ = true; + phi_207_ = true; break; } default: { phi_108_ = vec3(); phi_110_ = f32(); - phi_199_ = bool(); + phi_207_ = bool(); break; } } let _e249 = phi_108_; let _e251 = phi_110_; - let _e253 = phi_199_; + let _e253 = phi_207_; continue; continuing { phi_104_ = _e76; diff --git a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.spv b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.spv index 7b350164..03c5c9d5 100644 Binary files a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.spv and b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.spv differ diff --git a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.wgsl b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.wgsl index 98c2226a..39e33527 100644 --- a/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.wgsl +++ b/crates/renderling/shaders/convolution-prefilter_environment_cubemap_vertex.wgsl @@ -44,20 +44,20 @@ fn function() { var local: array, 8>; var local_1: array, 6>; var local_2: array, 36>; - var phi_767_: bool; + var phi_783_: bool; var phi_165_: type_24; - var phi_795_: bool; + var phi_811_: bool; var phi_326_: type_24; var phi_327_: type_24; - var phi_342_: type_24; - var phi_369_: bool; - var phi_375_: type_24; - var phi_376_: type_24; - var phi_391_: type_24; - var phi_414_: bool; - var phi_422_: type_22; - var phi_827_: bool; - var phi_430_: f32; + var phi_350_: type_24; + var phi_377_: bool; + var phi_383_: type_24; + var phi_384_: type_24; + var phi_407_: type_24; + var phi_430_: bool; + var phi_438_: type_22; + var phi_843_: bool; + var phi_446_: f32; switch bitcast(0u) { default: { @@ -71,11 +71,11 @@ fn function() { } let _e87 = local_2[_e82]; if (_e84 >= 2u) { - phi_767_ = (_e81 <= (_e84 - 2u)); + phi_783_ = (_e81 <= (_e84 - 2u)); } else { - phi_767_ = false; + phi_783_ = false; } - let _e92 = phi_767_; + let _e92 = phi_783_; if _e92 { let _e95 = global.member[_e81]; let _e99 = global.member[(_e81 + 1u)]; @@ -85,11 +85,11 @@ fn function() { } let _e102 = phi_165_; if (_e84 >= 83u) { - phi_795_ = (_e102.member <= (_e84 - 83u)); + phi_811_ = (_e102.member <= (_e84 - 83u)); } else { - phi_795_ = false; + phi_811_ = false; } - let _e109 = phi_795_; + let _e109 = phi_811_; if _e109 { let _e112 = global.member[_e102.member]; let _e117 = global.member[(_e102.member + 1u)]; @@ -132,16 +132,16 @@ fn function() { let _e297 = phi_326_; if (_e297.member < _e297.member_1) { phi_327_ = type_24((_e297.member + 1u), _e297.member_1); - phi_342_ = type_24(1u, _e297.member); + phi_350_ = type_24(1u, _e297.member); } else { phi_327_ = _e297; - phi_342_ = type_24(0u, type_24().member_1); + phi_350_ = type_24(0u, type_24().member_1); } let _e310 = phi_327_; - let _e312 = phi_342_; + let _e312 = phi_350_; switch bitcast(_e312.member) { case 0: { - phi_369_ = false; + phi_377_ = false; break; } case 1: { @@ -151,15 +151,15 @@ fn function() { let _e330 = global.member[(_e317 + 2u)]; let _e335 = global.member[(_e317 + 3u)]; local_1[_e312.member_1] = vec4(bitcast(_e320), bitcast(_e325), bitcast(_e330), bitcast(_e335)); - phi_369_ = true; + phi_377_ = true; break; } default: { - phi_369_ = bool(); + phi_377_ = bool(); break; } } - let _e340 = phi_369_; + let _e340 = phi_377_; continue; continuing { phi_326_ = _e310; @@ -168,21 +168,21 @@ fn function() { } let _e342 = local_1; local = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_375_ = type_24(0u, 8u); + phi_383_ = type_24(0u, 8u); loop { - let _e345 = phi_375_; + let _e345 = phi_383_; if (_e345.member < _e345.member_1) { - phi_376_ = type_24((_e345.member + 1u), _e345.member_1); - phi_391_ = type_24(1u, _e345.member); + phi_384_ = type_24((_e345.member + 1u), _e345.member_1); + phi_407_ = type_24(1u, _e345.member); } else { - phi_376_ = _e345; - phi_391_ = type_24(0u, type_24().member_1); + phi_384_ = _e345; + phi_407_ = type_24(0u, type_24().member_1); } - let _e358 = phi_376_; - let _e360 = phi_391_; + let _e358 = phi_384_; + let _e360 = phi_407_; switch bitcast(_e360.member) { case 0: { - phi_414_ = false; + phi_430_ = false; break; } case 1: { @@ -191,40 +191,40 @@ fn function() { let _e373 = global.member[(_e365 + 1u)]; let _e378 = global.member[(_e365 + 2u)]; local[_e360.member_1] = vec3(bitcast(_e368), bitcast(_e373), bitcast(_e378)); - phi_414_ = true; + phi_430_ = true; break; } default: { - phi_414_ = bool(); + phi_430_ = bool(); break; } } - let _e383 = phi_414_; + let _e383 = phi_430_; continue; continuing { - phi_375_ = _e358; + phi_383_ = _e358; break if !(_e383); } } let _e385 = local; - phi_422_ = type_22(type_20(vec4(bitcast(_e112), bitcast(_e117), bitcast(_e122), bitcast(_e127)), vec4(bitcast(_e133), bitcast(_e138), bitcast(_e143), bitcast(_e148)), vec4(bitcast(_e154), bitcast(_e159), bitcast(_e164), bitcast(_e169)), vec4(bitcast(_e175), bitcast(_e180), bitcast(_e185), bitcast(_e190))), type_20(vec4(bitcast(_e197), bitcast(_e202), bitcast(_e207), bitcast(_e212)), vec4(bitcast(_e218), bitcast(_e223), bitcast(_e228), bitcast(_e233)), vec4(bitcast(_e239), bitcast(_e244), bitcast(_e249), bitcast(_e254)), vec4(bitcast(_e260), bitcast(_e265), bitcast(_e270), bitcast(_e275))), type_21(_e385, _e342), vec3(bitcast(_e282), bitcast(_e287), bitcast(_e292))); + phi_438_ = type_22(type_20(vec4(bitcast(_e112), bitcast(_e117), bitcast(_e122), bitcast(_e127)), vec4(bitcast(_e133), bitcast(_e138), bitcast(_e143), bitcast(_e148)), vec4(bitcast(_e154), bitcast(_e159), bitcast(_e164), bitcast(_e169)), vec4(bitcast(_e175), bitcast(_e180), bitcast(_e185), bitcast(_e190))), type_20(vec4(bitcast(_e197), bitcast(_e202), bitcast(_e207), bitcast(_e212)), vec4(bitcast(_e218), bitcast(_e223), bitcast(_e228), bitcast(_e233)), vec4(bitcast(_e239), bitcast(_e244), bitcast(_e249), bitcast(_e254)), vec4(bitcast(_e260), bitcast(_e265), bitcast(_e270), bitcast(_e275))), type_21(_e385, _e342), vec3(bitcast(_e282), bitcast(_e287), bitcast(_e292))); } else { - phi_422_ = type_22(type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_21(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_438_ = type_22(type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_21(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e389 = phi_422_; + let _e389 = phi_438_; if (_e84 >= 1u) { - phi_827_ = (_e102.member_1 <= (_e84 - 1u)); + phi_843_ = (_e102.member_1 <= (_e84 - 1u)); } else { - phi_827_ = false; + phi_843_ = false; } - let _e396 = phi_827_; + let _e396 = phi_843_; if _e396 { let _e399 = global.member[_e102.member_1]; - phi_430_ = bitcast(_e399); + phi_446_ = bitcast(_e399); } else { - phi_430_ = 0f; + phi_446_ = 0f; } - let _e402 = phi_430_; + let _e402 = phi_446_; global_3 = _e402; global_4 = _e87; global_5 = vec4((fma(fma(_e389.member.member_3.x, _e389.member_1.member_2.w, fma(_e389.member.member_2.x, _e389.member_1.member_2.z, fma(_e389.member.member.x, _e389.member_1.member_2.x, (_e389.member.member_1.x * _e389.member_1.member_2.y)))), _e87.z, fma(fma(_e389.member.member_3.x, _e389.member_1.member.w, fma(_e389.member.member_2.x, _e389.member_1.member.z, fma(_e389.member.member.x, _e389.member_1.member.x, (_e389.member.member_1.x * _e389.member_1.member.y)))), _e87.x, (fma(_e389.member.member_3.x, _e389.member_1.member_1.w, fma(_e389.member.member_2.x, _e389.member_1.member_1.z, fma(_e389.member.member.x, _e389.member_1.member_1.x, (_e389.member.member_1.x * _e389.member_1.member_1.y)))) * _e87.y))) + fma(_e389.member.member_3.x, _e389.member_1.member_3.w, fma(_e389.member.member_2.x, _e389.member_1.member_3.z, fma(_e389.member.member.x, _e389.member_1.member_3.x, (_e389.member.member_1.x * _e389.member_1.member_3.y))))), (fma(fma(_e389.member.member_3.y, _e389.member_1.member_2.w, fma(_e389.member.member_2.y, _e389.member_1.member_2.z, fma(_e389.member.member.y, _e389.member_1.member_2.x, (_e389.member.member_1.y * _e389.member_1.member_2.y)))), _e87.z, fma(fma(_e389.member.member_3.y, _e389.member_1.member.w, fma(_e389.member.member_2.y, _e389.member_1.member.z, fma(_e389.member.member.y, _e389.member_1.member.x, (_e389.member.member_1.y * _e389.member_1.member.y)))), _e87.x, (fma(_e389.member.member_3.y, _e389.member_1.member_1.w, fma(_e389.member.member_2.y, _e389.member_1.member_1.z, fma(_e389.member.member.y, _e389.member_1.member_1.x, (_e389.member.member_1.y * _e389.member_1.member_1.y)))) * _e87.y))) + fma(_e389.member.member_3.y, _e389.member_1.member_3.w, fma(_e389.member.member_2.y, _e389.member_1.member_3.z, fma(_e389.member.member.y, _e389.member_1.member_3.x, (_e389.member.member_1.y * _e389.member_1.member_3.y))))), (fma(fma(_e389.member.member_3.z, _e389.member_1.member_2.w, fma(_e389.member.member_2.z, _e389.member_1.member_2.z, fma(_e389.member.member.z, _e389.member_1.member_2.x, (_e389.member.member_1.z * _e389.member_1.member_2.y)))), _e87.z, fma(fma(_e389.member.member_3.z, _e389.member_1.member.w, fma(_e389.member.member_2.z, _e389.member_1.member.z, fma(_e389.member.member.z, _e389.member_1.member.x, (_e389.member.member_1.z * _e389.member_1.member.y)))), _e87.x, (fma(_e389.member.member_3.z, _e389.member_1.member_1.w, fma(_e389.member.member_2.z, _e389.member_1.member_1.z, fma(_e389.member.member.z, _e389.member_1.member_1.x, (_e389.member.member_1.z * _e389.member_1.member_1.y)))) * _e87.y))) + fma(_e389.member.member_3.z, _e389.member_1.member_3.w, fma(_e389.member.member_2.z, _e389.member_1.member_3.z, fma(_e389.member.member.z, _e389.member_1.member_3.x, (_e389.member.member_1.z * _e389.member_1.member_3.y))))), (fma(fma(_e389.member.member_3.w, _e389.member_1.member_2.w, fma(_e389.member.member_2.w, _e389.member_1.member_2.z, fma(_e389.member.member.w, _e389.member_1.member_2.x, (_e389.member.member_1.w * _e389.member_1.member_2.y)))), _e87.z, fma(fma(_e389.member.member_3.w, _e389.member_1.member.w, fma(_e389.member.member_2.w, _e389.member_1.member.z, fma(_e389.member.member.w, _e389.member_1.member.x, (_e389.member.member_1.w * _e389.member_1.member.y)))), _e87.x, (fma(_e389.member.member_3.w, _e389.member_1.member_1.w, fma(_e389.member.member_2.w, _e389.member_1.member_1.z, fma(_e389.member.member.w, _e389.member_1.member_1.x, (_e389.member.member_1.w * _e389.member_1.member_1.y)))) * _e87.y))) + fma(_e389.member.member_3.w, _e389.member_1.member_3.w, fma(_e389.member.member_2.w, _e389.member_1.member_3.z, fma(_e389.member.member.w, _e389.member_1.member_3.x, (_e389.member.member_1.w * _e389.member_1.member_3.y)))))); diff --git a/crates/renderling/shaders/cull-compute_culling.spv b/crates/renderling/shaders/cull-compute_culling.spv index ad827503..76c52bfc 100644 Binary files a/crates/renderling/shaders/cull-compute_culling.spv and b/crates/renderling/shaders/cull-compute_culling.spv differ diff --git a/crates/renderling/shaders/cull-compute_culling.wgsl b/crates/renderling/shaders/cull-compute_culling.wgsl index 59fbdbd1..29195b56 100644 --- a/crates/renderling/shaders/cull-compute_culling.wgsl +++ b/crates/renderling/shaders/cull-compute_culling.wgsl @@ -78,69 +78,69 @@ fn function() { var local_7: array, 6>; var phi_631_: u32; var phi_667_: type_31; - var phi_2083_: bool; + var phi_2131_: bool; var phi_832_: type_19; var phi_833_: type_19; - var phi_848_: type_19; - var phi_875_: bool; - var phi_881_: type_19; - var phi_882_: type_19; - var phi_897_: type_19; - var phi_920_: bool; - var phi_928_: type_17; - var phi_2115_: bool; - var phi_979_: type_32; - var phi_1111_: type_19; - var phi_1112_: type_19; + var phi_856_: type_19; + var phi_883_: bool; + var phi_889_: type_19; + var phi_890_: type_19; + var phi_913_: type_19; + var phi_936_: bool; + var phi_944_: type_17; + var phi_2163_: bool; + var phi_995_: type_32; var phi_1127_: type_19; - var phi_1171_: bool; - var phi_1175_: bool; - var phi_1176_: bool; - var phi_2679_: bool; - var phi_1984_: bool; - var phi_2705_: bool; - var phi_1183_: type_19; - var phi_1184_: type_19; - var phi_1199_: type_19; - var phi_1209_: type_19; - var phi_1212_: i32; - var phi_1210_: type_19; - var phi_1227_: type_19; - var phi_1268_: i32; - var phi_1213_: i32; - var phi_1269_: bool; - var phi_2700_: bool; + var phi_1128_: type_19; + var phi_1151_: type_19; + var phi_1195_: bool; + var phi_1199_: bool; + var phi_1200_: bool; + var phi_2727_: bool; + var phi_2032_: bool; + var phi_2754_: bool; + var phi_1207_: type_19; + var phi_1208_: type_19; + var phi_1231_: type_19; + var phi_1241_: type_19; + var phi_1244_: i32; + var phi_1242_: type_19; + var phi_1267_: type_19; + var phi_1308_: i32; + var phi_1245_: i32; + var phi_1309_: bool; + var phi_2748_: bool; var local_8: i32; - var phi_1276_: type_19; - var phi_1279_: i32; - var phi_1277_: type_19; - var phi_1294_: type_19; - var phi_1335_: i32; - var phi_1280_: i32; - var phi_1336_: bool; - var phi_2707_: bool; + var phi_1316_: type_19; + var phi_1319_: i32; + var phi_1317_: type_19; + var phi_1342_: type_19; + var phi_1383_: i32; + var phi_1320_: i32; + var phi_1384_: bool; + var phi_2755_: bool; var local_9: i32; - var phi_2714_: bool; - var phi_1342_: bool; - var phi_1343_: bool; - var phi_2713_: bool; - var phi_1344_: bool; - var phi_1345_: bool; - var phi_1346_: bool; - var phi_1347_: bool; - var phi_2712_: bool; - var phi_1987_: bool; - var phi_1986_: bool; - var phi_1985_: bool; - var phi_1370_: type_33; - var phi_1371_: type_33; + var phi_2762_: bool; + var phi_1390_: bool; + var phi_1391_: bool; + var phi_2761_: bool; + var phi_1392_: bool; + var phi_1393_: bool; + var phi_1394_: bool; + var phi_1395_: bool; + var phi_2760_: bool; + var phi_2035_: bool; + var phi_2034_: bool; + var phi_2033_: bool; + var phi_1418_: type_33; + var phi_1419_: type_33; var local_10: u32; - var phi_1377_: type_33; - var phi_1378_: type_33; - var phi_1642_: u32; - var phi_2498_: bool; - var phi_1660_: type_19; - var phi_2524_: u32; + var phi_1425_: type_33; + var phi_1426_: type_33; + var phi_1690_: u32; + var phi_2546_: bool; + var phi_1708_: type_19; + var phi_2572_: u32; switch bitcast(0u) { default: { @@ -274,11 +274,11 @@ fn function() { let _e203 = phi_667_; if _e203.member_6 { if (_e90 >= 83u) { - phi_2083_ = (_e141 <= (_e90 - 83u)); + phi_2131_ = (_e141 <= (_e90 - 83u)); } else { - phi_2083_ = false; + phi_2131_ = false; } - let _e209 = phi_2083_; + let _e209 = phi_2131_; if _e209 { let _e212 = global.member[_e141]; let _e217 = global.member[(_e141 + 1u)]; @@ -321,16 +321,16 @@ fn function() { let _e397 = phi_832_; if (_e397.member < _e397.member_1) { phi_833_ = type_19((_e397.member + 1u), _e397.member_1); - phi_848_ = type_19(1u, _e397.member); + phi_856_ = type_19(1u, _e397.member); } else { phi_833_ = _e397; - phi_848_ = type_19(0u, type_19().member_1); + phi_856_ = type_19(0u, type_19().member_1); } let _e410 = phi_833_; - let _e412 = phi_848_; + let _e412 = phi_856_; switch bitcast(_e412.member) { case 0: { - phi_875_ = false; + phi_883_ = false; break; } case 1: { @@ -340,15 +340,15 @@ fn function() { let _e430 = global.member[(_e417 + 2u)]; let _e435 = global.member[(_e417 + 3u)]; local_7[_e412.member_1] = vec4(bitcast(_e420), bitcast(_e425), bitcast(_e430), bitcast(_e435)); - phi_875_ = true; + phi_883_ = true; break; } default: { - phi_875_ = bool(); + phi_883_ = bool(); break; } } - let _e440 = phi_875_; + let _e440 = phi_883_; continue; continuing { phi_832_ = _e410; @@ -357,21 +357,21 @@ fn function() { } let _e442 = local_7; local_6 = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_881_ = type_19(0u, 8u); + phi_889_ = type_19(0u, 8u); loop { - let _e445 = phi_881_; + let _e445 = phi_889_; if (_e445.member < _e445.member_1) { - phi_882_ = type_19((_e445.member + 1u), _e445.member_1); - phi_897_ = type_19(1u, _e445.member); + phi_890_ = type_19((_e445.member + 1u), _e445.member_1); + phi_913_ = type_19(1u, _e445.member); } else { - phi_882_ = _e445; - phi_897_ = type_19(0u, type_19().member_1); + phi_890_ = _e445; + phi_913_ = type_19(0u, type_19().member_1); } - let _e458 = phi_882_; - let _e460 = phi_897_; + let _e458 = phi_890_; + let _e460 = phi_913_; switch bitcast(_e460.member) { case 0: { - phi_920_ = false; + phi_936_ = false; break; } case 1: { @@ -380,33 +380,33 @@ fn function() { let _e473 = global.member[(_e465 + 1u)]; let _e478 = global.member[(_e465 + 2u)]; local_6[_e460.member_1] = vec3(bitcast(_e468), bitcast(_e473), bitcast(_e478)); - phi_920_ = true; + phi_936_ = true; break; } default: { - phi_920_ = bool(); + phi_936_ = bool(); break; } } - let _e483 = phi_920_; + let _e483 = phi_936_; continue; continuing { - phi_881_ = _e458; + phi_889_ = _e458; break if !(_e483); } } let _e485 = local_6; - phi_928_ = type_17(type_15(vec4(bitcast(_e212), bitcast(_e217), bitcast(_e222), bitcast(_e227)), vec4(bitcast(_e233), bitcast(_e238), bitcast(_e243), bitcast(_e248)), vec4(bitcast(_e254), bitcast(_e259), bitcast(_e264), bitcast(_e269)), vec4(bitcast(_e275), bitcast(_e280), bitcast(_e285), bitcast(_e290))), type_15(vec4(bitcast(_e297), bitcast(_e302), bitcast(_e307), bitcast(_e312)), vec4(bitcast(_e318), bitcast(_e323), bitcast(_e328), bitcast(_e333)), vec4(bitcast(_e339), bitcast(_e344), bitcast(_e349), bitcast(_e354)), vec4(bitcast(_e360), bitcast(_e365), bitcast(_e370), bitcast(_e375))), type_16(_e485, _e442), vec3(bitcast(_e382), bitcast(_e387), bitcast(_e392))); + phi_944_ = type_17(type_15(vec4(bitcast(_e212), bitcast(_e217), bitcast(_e222), bitcast(_e227)), vec4(bitcast(_e233), bitcast(_e238), bitcast(_e243), bitcast(_e248)), vec4(bitcast(_e254), bitcast(_e259), bitcast(_e264), bitcast(_e269)), vec4(bitcast(_e275), bitcast(_e280), bitcast(_e285), bitcast(_e290))), type_15(vec4(bitcast(_e297), bitcast(_e302), bitcast(_e307), bitcast(_e312)), vec4(bitcast(_e318), bitcast(_e323), bitcast(_e328), bitcast(_e333)), vec4(bitcast(_e339), bitcast(_e344), bitcast(_e349), bitcast(_e354)), vec4(bitcast(_e360), bitcast(_e365), bitcast(_e370), bitcast(_e375))), type_16(_e485, _e442), vec3(bitcast(_e382), bitcast(_e387), bitcast(_e392))); } else { - phi_928_ = type_17(type_15(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_15(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_16(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_944_ = type_17(type_15(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_15(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_16(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e489 = phi_928_; + let _e489 = phi_944_; if (_e90 >= 10u) { - phi_2115_ = (_e145 <= (_e90 - 10u)); + phi_2163_ = (_e145 <= (_e90 - 10u)); } else { - phi_2115_ = false; + phi_2163_ = false; } - let _e497 = phi_2115_; + let _e497 = phi_2163_; if _e497 { let _e500 = global.member[_e145]; let _e505 = global.member[(_e145 + 1u)]; @@ -418,11 +418,11 @@ fn function() { let _e537 = global.member[(_e145 + 7u)]; let _e542 = global.member[(_e145 + 8u)]; let _e547 = global.member[(_e145 + 9u)]; - phi_979_ = type_32(vec3(bitcast(_e500), bitcast(_e505), bitcast(_e510)), vec4(bitcast(_e516), bitcast(_e521), bitcast(_e526), bitcast(_e531)), vec3(bitcast(_e537), bitcast(_e542), bitcast(_e547))); + phi_995_ = type_32(vec3(bitcast(_e500), bitcast(_e505), bitcast(_e510)), vec4(bitcast(_e516), bitcast(_e521), bitcast(_e526), bitcast(_e531)), vec3(bitcast(_e537), bitcast(_e542), bitcast(_e547))); } else { - phi_979_ = type_32(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); + phi_995_ = type_32(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); } - let _e552 = phi_979_; + let _e552 = phi_995_; let _e560 = (_e552.member_1.x + _e552.member_1.x); let _e561 = (_e552.member_1.y + _e552.member_1.y); let _e562 = (_e552.member_1.z + _e552.member_1.z); @@ -447,66 +447,66 @@ fn function() { let _e638 = local[0u][3u]; let _e640 = -(_e621); if ((fma(_e634, _e615, fma(_e626, _e613, (_e629 * _e614))) + _e638) < _e640) { - phi_1378_ = type_33(true, 0u); + phi_1426_ = type_33(true, 0u); } else { - phi_1111_ = type_19(0u, 6u); + phi_1127_ = type_19(0u, 6u); loop { - let _e643 = phi_1111_; + let _e643 = phi_1127_; if (_e643.member < _e643.member_1) { - phi_1112_ = type_19((_e643.member + 1u), _e643.member_1); - phi_1127_ = type_19(1u, _e643.member); + phi_1128_ = type_19((_e643.member + 1u), _e643.member_1); + phi_1151_ = type_19(1u, _e643.member); } else { - phi_1112_ = _e643; - phi_1127_ = type_19(0u, type_19().member_1); + phi_1128_ = _e643; + phi_1151_ = type_19(0u, type_19().member_1); } - let _e656 = phi_1112_; - let _e658 = phi_1127_; + let _e656 = phi_1128_; + let _e658 = phi_1151_; local_10 = _e658.member_1; switch bitcast(_e658.member) { case 0: { - phi_1175_ = false; - phi_1176_ = true; + phi_1199_ = false; + phi_1200_ = true; break; } case 1: { if (_e658.member_1 != 0u) { if (_e658.member_1 < 6u) { } else { - phi_2679_ = true; - phi_1984_ = bool(); + phi_2727_ = true; + phi_2032_ = bool(); break; } let _e666 = local[_e658.member_1][0u]; let _e669 = local[_e658.member_1][1u]; let _e674 = local[_e658.member_1][2u]; let _e678 = local[_e658.member_1][3u]; - phi_1171_ = select(true, false, ((fma(_e674, _e615, fma(_e666, _e613, (_e669 * _e614))) + _e678) < _e640)); + phi_1195_ = select(true, false, ((fma(_e674, _e615, fma(_e666, _e613, (_e669 * _e614))) + _e678) < _e640)); } else { - phi_1171_ = true; + phi_1195_ = true; } - let _e683 = phi_1171_; - phi_1175_ = _e683; - phi_1176_ = false; + let _e683 = phi_1195_; + phi_1199_ = _e683; + phi_1200_ = false; break; } default: { - phi_1175_ = bool(); - phi_1176_ = bool(); + phi_1199_ = bool(); + phi_1200_ = bool(); break; } } - let _e685 = phi_1175_; - let _e687 = phi_1176_; + let _e685 = phi_1199_; + let _e687 = phi_1200_; continue; continuing { - phi_1111_ = _e656; - phi_2679_ = false; - phi_1984_ = _e687; + phi_1127_ = _e656; + phi_2727_ = false; + phi_2032_ = _e687; break if !(_e685); } } - let _e690 = phi_2679_; - let _e692 = phi_1984_; + let _e690 = phi_2727_; + let _e692 = phi_2032_; if _e690 { break; } @@ -514,55 +514,55 @@ fn function() { let _e693 = vec3(_e621); let _e694 = (_e616 - _e693); let _e695 = (_e616 + _e693); - phi_2705_ = _e690; - phi_1183_ = type_19(0u, 3u); + phi_2754_ = _e690; + phi_1207_ = type_19(0u, 3u); loop { - let _e697 = phi_2705_; - let _e699 = phi_1183_; + let _e697 = phi_2754_; + let _e699 = phi_1207_; if (_e699.member < _e699.member_1) { - phi_1184_ = type_19((_e699.member + 1u), _e699.member_1); - phi_1199_ = type_19(1u, _e699.member); + phi_1208_ = type_19((_e699.member + 1u), _e699.member_1); + phi_1231_ = type_19(1u, _e699.member); } else { - phi_1184_ = _e699; - phi_1199_ = type_19(0u, type_19().member_1); + phi_1208_ = _e699; + phi_1231_ = type_19(0u, type_19().member_1); } - let _e712 = phi_1184_; - let _e714 = phi_1199_; + let _e712 = phi_1208_; + let _e714 = phi_1231_; switch bitcast(_e714.member) { case 0: { - phi_2713_ = _e697; - phi_1344_ = false; - phi_1345_ = true; - phi_1346_ = false; - phi_1347_ = false; + phi_2761_ = _e697; + phi_1392_ = false; + phi_1393_ = true; + phi_1394_ = false; + phi_1395_ = false; break; } case 1: { - phi_1209_ = type_19(0u, 8u); - phi_1212_ = 0i; + phi_1241_ = type_19(0u, 8u); + phi_1244_ = 0i; loop { - let _e719 = phi_1209_; - let _e721 = phi_1212_; + let _e719 = phi_1241_; + let _e721 = phi_1244_; local_8 = _e721; if (_e719.member < _e719.member_1) { - phi_1210_ = type_19((_e719.member + 1u), _e719.member_1); - phi_1227_ = type_19(1u, _e719.member); + phi_1242_ = type_19((_e719.member + 1u), _e719.member_1); + phi_1267_ = type_19(1u, _e719.member); } else { - phi_1210_ = _e719; - phi_1227_ = type_19(0u, type_19().member_1); + phi_1242_ = _e719; + phi_1267_ = type_19(0u, type_19().member_1); } - let _e734 = phi_1210_; - let _e736 = phi_1227_; + let _e734 = phi_1242_; + let _e736 = phi_1267_; switch bitcast(_e736.member) { case 0: { - phi_1213_ = i32(); - phi_1269_ = false; + phi_1245_ = i32(); + phi_1309_ = false; break; } case 1: { if (_e736.member_1 < 8u) { } else { - phi_2700_ = true; + phi_2748_ = true; break; } let _e743 = local_1[_e736.member_1][0u]; @@ -572,83 +572,83 @@ fn function() { let _e751 = (_e714.member_1 < 3u); if _e751 { } else { - phi_2700_ = true; + phi_2748_ = true; break; } let _e753 = local_2[_e714.member_1]; local_3 = array(_e694.x, _e694.y, _e694.z); if _e751 { } else { - phi_2700_ = true; + phi_2748_ = true; break; } let _e759 = local_3[_e714.member_1]; if (_e753 < _e759) { - phi_1268_ = (_e721 + 1i); + phi_1308_ = (_e721 + 1i); } else { - phi_1268_ = _e721; + phi_1308_ = _e721; } - let _e763 = phi_1268_; - phi_1213_ = _e763; - phi_1269_ = true; + let _e763 = phi_1308_; + phi_1245_ = _e763; + phi_1309_ = true; break; } default: { - phi_1213_ = i32(); - phi_1269_ = bool(); + phi_1245_ = i32(); + phi_1309_ = bool(); break; } } - let _e765 = phi_1213_; - let _e767 = phi_1269_; + let _e765 = phi_1245_; + let _e767 = phi_1309_; continue; continuing { - phi_1209_ = _e734; - phi_1212_ = _e765; - phi_2700_ = _e697; + phi_1241_ = _e734; + phi_1244_ = _e765; + phi_2748_ = _e697; break if !(_e767); } } - let _e770 = phi_2700_; - phi_2712_ = _e770; - phi_1987_ = bool(); - phi_1986_ = bool(); - phi_1985_ = bool(); + let _e770 = phi_2748_; + phi_2760_ = _e770; + phi_2035_ = bool(); + phi_2034_ = bool(); + phi_2033_ = bool(); if _e770 { break; } let _e772 = local_8; let _e773 = (_e772 == 8i); if _e773 { - phi_2714_ = _e770; - phi_1342_ = false; - phi_1343_ = false; + phi_2762_ = _e770; + phi_1390_ = false; + phi_1391_ = false; } else { - phi_1276_ = type_19(0u, 8u); - phi_1279_ = 0i; + phi_1316_ = type_19(0u, 8u); + phi_1319_ = 0i; loop { - let _e775 = phi_1276_; - let _e777 = phi_1279_; + let _e775 = phi_1316_; + let _e777 = phi_1319_; local_9 = _e777; if (_e775.member < _e775.member_1) { - phi_1277_ = type_19((_e775.member + 1u), _e775.member_1); - phi_1294_ = type_19(1u, _e775.member); + phi_1317_ = type_19((_e775.member + 1u), _e775.member_1); + phi_1342_ = type_19(1u, _e775.member); } else { - phi_1277_ = _e775; - phi_1294_ = type_19(0u, type_19().member_1); + phi_1317_ = _e775; + phi_1342_ = type_19(0u, type_19().member_1); } - let _e790 = phi_1277_; - let _e792 = phi_1294_; + let _e790 = phi_1317_; + let _e792 = phi_1342_; switch bitcast(_e792.member) { case 0: { - phi_1280_ = i32(); - phi_1336_ = false; + phi_1320_ = i32(); + phi_1384_ = false; break; } case 1: { if (_e792.member_1 < 8u) { } else { - phi_2707_ = true; + phi_2755_ = true; break; } let _e799 = local_1[_e792.member_1][0u]; @@ -658,121 +658,121 @@ fn function() { let _e807 = (_e714.member_1 < 3u); if _e807 { } else { - phi_2707_ = true; + phi_2755_ = true; break; } let _e809 = local_4[_e714.member_1]; local_5 = array(_e695.x, _e695.y, _e695.z); if _e807 { } else { - phi_2707_ = true; + phi_2755_ = true; break; } let _e815 = local_5[_e714.member_1]; if (_e809 > _e815) { - phi_1335_ = (_e777 + 1i); + phi_1383_ = (_e777 + 1i); } else { - phi_1335_ = _e777; + phi_1383_ = _e777; } - let _e819 = phi_1335_; - phi_1280_ = _e819; - phi_1336_ = true; + let _e819 = phi_1383_; + phi_1320_ = _e819; + phi_1384_ = true; break; } default: { - phi_1280_ = i32(); - phi_1336_ = bool(); + phi_1320_ = i32(); + phi_1384_ = bool(); break; } } - let _e821 = phi_1280_; - let _e823 = phi_1336_; + let _e821 = phi_1320_; + let _e823 = phi_1384_; continue; continuing { - phi_1276_ = _e790; - phi_1279_ = _e821; - phi_2707_ = _e770; + phi_1316_ = _e790; + phi_1319_ = _e821; + phi_2755_ = _e770; break if !(_e823); } } - let _e826 = phi_2707_; - phi_2712_ = _e826; - phi_1987_ = bool(); - phi_1986_ = bool(); - phi_1985_ = bool(); + let _e826 = phi_2755_; + phi_2760_ = _e826; + phi_2035_ = bool(); + phi_2034_ = bool(); + phi_2033_ = bool(); if _e826 { break; } let _e828 = local_9; let _e829 = (_e828 == 8i); - phi_2714_ = _e826; - phi_1342_ = select(true, false, _e829); - phi_1343_ = _e829; + phi_2762_ = _e826; + phi_1390_ = select(true, false, _e829); + phi_1391_ = _e829; } - let _e832 = phi_2714_; - let _e834 = phi_1342_; - let _e836 = phi_1343_; - phi_2713_ = _e832; - phi_1344_ = _e834; - phi_1345_ = false; - phi_1346_ = _e773; - phi_1347_ = _e836; + let _e832 = phi_2762_; + let _e834 = phi_1390_; + let _e836 = phi_1391_; + phi_2761_ = _e832; + phi_1392_ = _e834; + phi_1393_ = false; + phi_1394_ = _e773; + phi_1395_ = _e836; break; } default: { - phi_2713_ = _e697; - phi_1344_ = bool(); - phi_1345_ = bool(); - phi_1346_ = bool(); - phi_1347_ = bool(); + phi_2761_ = _e697; + phi_1392_ = bool(); + phi_1393_ = bool(); + phi_1394_ = bool(); + phi_1395_ = bool(); break; } } - let _e838 = phi_2713_; - let _e840 = phi_1344_; - let _e842 = phi_1345_; - let _e844 = phi_1346_; - let _e846 = phi_1347_; + let _e838 = phi_2761_; + let _e840 = phi_1392_; + let _e842 = phi_1393_; + let _e844 = phi_1394_; + let _e846 = phi_1395_; continue; continuing { - phi_2705_ = _e838; - phi_1183_ = _e712; - phi_2712_ = _e838; - phi_1987_ = _e846; - phi_1986_ = _e844; - phi_1985_ = _e842; + phi_2754_ = _e838; + phi_1207_ = _e712; + phi_2760_ = _e838; + phi_2035_ = _e846; + phi_2034_ = _e844; + phi_2033_ = _e842; break if !(_e840); } } - let _e849 = phi_2712_; - let _e851 = phi_1987_; - let _e853 = phi_1986_; - let _e855 = phi_1985_; + let _e849 = phi_2760_; + let _e851 = phi_2035_; + let _e853 = phi_2034_; + let _e855 = phi_2033_; if _e849 { break; } let _e856 = select(_e853, false, _e855); if select(true, false, select(_e856, true, select(select(_e851, false, _e855), false, _e856))) { - phi_1370_ = type_33(false, 0u); + phi_1418_ = type_33(false, 0u); } else { - phi_1370_ = type_33(true, 0u); + phi_1418_ = type_33(true, 0u); } - let _e862 = phi_1370_; - phi_1371_ = _e862; + let _e862 = phi_1418_; + phi_1419_ = _e862; } else { - phi_1371_ = type_33(); + phi_1419_ = type_33(); } - let _e864 = phi_1371_; + let _e864 = phi_1419_; if select(true, false, _e692) { let _e867 = local_10; - phi_1377_ = type_33(true, _e867); + phi_1425_ = type_33(true, _e867); } else { - phi_1377_ = _e864; + phi_1425_ = _e864; } - let _e870 = phi_1377_; - phi_1378_ = _e870; + let _e870 = phi_1425_; + phi_1426_ = _e870; } - let _e872 = phi_1378_; + let _e872 = phi_1426_; if (_e872.member != true) { global_2.member[_e95.x].member_1 = 1u; if _e203.member_7 { @@ -813,32 +813,32 @@ fn function() { let _e1090 = (_e1078 & 31u); let _e1093 = round(((_e1059.y + _e1060.y) * 0.5f)); if (_e1078 >= _e887) { - phi_1642_ = 4294967295u; + phi_1690_ = 4294967295u; } else { - phi_1642_ = (_e884 + (2u * _e1078)); + phi_1690_ = (_e884 + (2u * _e1078)); } - let _e1105 = phi_1642_; + let _e1105 = phi_1690_; if (_e92 >= 2u) { - phi_2498_ = (_e1105 <= (_e92 - 2u)); + phi_2546_ = (_e1105 <= (_e92 - 2u)); } else { - phi_2498_ = false; + phi_2546_ = false; } - let _e1110 = phi_2498_; + let _e1110 = phi_2546_; if _e1110 { let _e1113 = global_1.member[_e1105]; let _e1117 = global_1.member[(_e1105 + 1u)]; - phi_1660_ = type_19(_e1113, _e1117); + phi_1708_ = type_19(_e1113, _e1117); } else { - phi_1660_ = type_19(4294967295u, 0u); + phi_1708_ = type_19(4294967295u, 0u); } - let _e1120 = phi_1660_; + let _e1120 = phi_1708_; let _e1126 = (((select(select(u32(_e1093), 0u, (_e1093 < 0f)), 4294967295u, (_e1093 > 4294967000f)) >> bitcast(_e1090)) * (_e878 >> bitcast(_e1090))) + (select(select(u32(_e1084), 0u, (_e1084 < 0f)), 4294967295u, (_e1084 > 4294967000f)) >> bitcast(_e1090))); if (_e1126 >= _e1120.member_1) { - phi_2524_ = 4294967295u; + phi_2572_ = 4294967295u; } else { - phi_2524_ = (_e1120.member + _e1126); + phi_2572_ = (_e1120.member + _e1126); } - let _e1130 = phi_2524_; + let _e1130 = phi_2572_; let _e1133 = global_1.member[_e1130]; if select((_e1059.z > 1f), true, (_e1059.z > bitcast(_e1133))) { global_2.member[_e95.x].member_1 = 0u; diff --git a/crates/renderling/shaders/debug-debug_overlay_fragment.spv b/crates/renderling/shaders/debug-debug_overlay_fragment.spv index 43151e3a..5cb9a535 100644 Binary files a/crates/renderling/shaders/debug-debug_overlay_fragment.spv and b/crates/renderling/shaders/debug-debug_overlay_fragment.spv differ diff --git a/crates/renderling/shaders/debug-debug_overlay_fragment.wgsl b/crates/renderling/shaders/debug-debug_overlay_fragment.wgsl index a2ec575a..a9d46cae 100644 --- a/crates/renderling/shaders/debug-debug_overlay_fragment.wgsl +++ b/crates/renderling/shaders/debug-debug_overlay_fragment.wgsl @@ -40,59 +40,59 @@ fn function() { var local_5: array; var local_6: array, 8>; var local_7: array, 6>; - var phi_2139_: bool; + var phi_2195_: bool; + var phi_539_: type_17; var phi_540_: type_17; - var phi_541_: type_17; - var phi_556_: type_17; - var phi_726_: type_17; - var phi_727_: type_17; - var phi_742_: type_17; - var phi_769_: bool; - var phi_775_: type_17; - var phi_776_: type_17; + var phi_563_: type_17; + var phi_733_: type_17; + var phi_734_: type_17; + var phi_757_: type_17; + var phi_784_: bool; + var phi_790_: type_17; var phi_791_: type_17; - var phi_814_: bool; - var phi_870_: type_26; - var phi_1013_: type_17; - var phi_1014_: type_17; - var phi_1029_: type_17; - var phi_1073_: bool; - var phi_1077_: bool; - var phi_1078_: bool; - var phi_2127_: bool; - var phi_1576_: bool; - var phi_2147_: bool; - var phi_1085_: type_17; - var phi_1086_: type_17; - var phi_1101_: type_17; - var phi_1111_: type_17; - var phi_1114_: i32; - var phi_1112_: type_17; - var phi_1129_: type_17; - var phi_1170_: i32; - var phi_1115_: i32; - var phi_1171_: bool; - var phi_2142_: bool; + var phi_814_: type_17; + var phi_837_: bool; + var phi_893_: type_26; + var phi_1036_: type_17; + var phi_1037_: type_17; + var phi_1060_: type_17; + var phi_1104_: bool; + var phi_1108_: bool; + var phi_1109_: bool; + var phi_2182_: bool; + var phi_1631_: bool; + var phi_2203_: bool; + var phi_1116_: type_17; + var phi_1117_: type_17; + var phi_1140_: type_17; + var phi_1150_: type_17; + var phi_1153_: i32; + var phi_1151_: type_17; + var phi_1176_: type_17; + var phi_1217_: i32; + var phi_1154_: i32; + var phi_1218_: bool; + var phi_2197_: bool; var local_8: i32; - var phi_1178_: type_17; - var phi_1181_: i32; - var phi_1179_: type_17; - var phi_1196_: type_17; - var phi_1237_: i32; - var phi_1182_: i32; - var phi_1238_: bool; - var phi_2149_: bool; + var phi_1225_: type_17; + var phi_1228_: i32; + var phi_1226_: type_17; + var phi_1251_: type_17; + var phi_1292_: i32; + var phi_1229_: i32; + var phi_1293_: bool; + var phi_2204_: bool; var local_9: i32; - var phi_2156_: bool; - var phi_1244_: bool; - var phi_2155_: bool; - var phi_1246_: bool; - var phi_2154_: bool; - var phi_2162_: bool; - var phi_2161_: bool; - var phi_2159_: bool; - var phi_1491_: bool; - var phi_2158_: bool; + var phi_2211_: bool; + var phi_1299_: bool; + var phi_2210_: bool; + var phi_1301_: bool; + var phi_2209_: bool; + var phi_2219_: bool; + var phi_2218_: bool; + var phi_2214_: bool; + var phi_1546_: bool; + var phi_2213_: bool; switch bitcast(0u) { default: { @@ -100,24 +100,24 @@ fn function() { let _e78 = global.member[2u]; let _e81 = global.member[3u]; global_1 = vec4(0f, 0f, 0f, 0f); - phi_2139_ = false; - phi_540_ = type_17(0u, arrayLength((&global_2.member))); + phi_2195_ = false; + phi_539_ = type_17(0u, arrayLength((&global_2.member))); loop { - let _e84 = phi_2139_; - let _e86 = phi_540_; + let _e84 = phi_2195_; + let _e86 = phi_539_; if (_e86.member < _e86.member_1) { - phi_541_ = type_17((_e86.member + 1u), _e86.member_1); - phi_556_ = type_17(1u, _e86.member); + phi_540_ = type_17((_e86.member + 1u), _e86.member_1); + phi_563_ = type_17(1u, _e86.member); } else { - phi_541_ = _e86; - phi_556_ = type_17(0u, type_17().member_1); + phi_540_ = _e86; + phi_563_ = type_17(0u, type_17().member_1); } - let _e99 = phi_541_; - let _e101 = phi_556_; + let _e99 = phi_540_; + let _e101 = phi_563_; switch bitcast(_e101.member) { case 0: { - phi_2159_ = _e84; - phi_1491_ = false; + phi_2214_ = _e84; + phi_1546_ = false; break; } case 1: { @@ -188,21 +188,21 @@ fn function() { let _e270 = global.member[(_e112 + 31u)]; let _e271 = bitcast(_e270); local_7 = array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f)); - phi_726_ = type_17(0u, 6u); + phi_733_ = type_17(0u, 6u); loop { - let _e274 = phi_726_; + let _e274 = phi_733_; if (_e274.member < _e274.member_1) { - phi_727_ = type_17((_e274.member + 1u), _e274.member_1); - phi_742_ = type_17(1u, _e274.member); + phi_734_ = type_17((_e274.member + 1u), _e274.member_1); + phi_757_ = type_17(1u, _e274.member); } else { - phi_727_ = _e274; - phi_742_ = type_17(0u, type_17().member_1); + phi_734_ = _e274; + phi_757_ = type_17(0u, type_17().member_1); } - let _e287 = phi_727_; - let _e289 = phi_742_; + let _e287 = phi_734_; + let _e289 = phi_757_; switch bitcast(_e289.member) { case 0: { - phi_769_ = false; + phi_784_ = false; break; } case 1: { @@ -212,38 +212,38 @@ fn function() { let _e307 = global.member[(_e294 + 2u)]; let _e312 = global.member[(_e294 + 3u)]; local_7[_e289.member_1] = vec4(bitcast(_e297), bitcast(_e302), bitcast(_e307), bitcast(_e312)); - phi_769_ = true; + phi_784_ = true; break; } default: { - phi_769_ = bool(); + phi_784_ = bool(); break; } } - let _e317 = phi_769_; + let _e317 = phi_784_; continue; continuing { - phi_726_ = _e287; + phi_733_ = _e287; break if !(_e317); } } let _e319 = local_7; local_6 = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_775_ = type_17(0u, 8u); + phi_790_ = type_17(0u, 8u); loop { - let _e322 = phi_775_; + let _e322 = phi_790_; if (_e322.member < _e322.member_1) { - phi_776_ = type_17((_e322.member + 1u), _e322.member_1); - phi_791_ = type_17(1u, _e322.member); + phi_791_ = type_17((_e322.member + 1u), _e322.member_1); + phi_814_ = type_17(1u, _e322.member); } else { - phi_776_ = _e322; - phi_791_ = type_17(0u, type_17().member_1); + phi_791_ = _e322; + phi_814_ = type_17(0u, type_17().member_1); } - let _e335 = phi_776_; - let _e337 = phi_791_; + let _e335 = phi_791_; + let _e337 = phi_814_; switch bitcast(_e337.member) { case 0: { - phi_814_ = false; + phi_837_ = false; break; } case 1: { @@ -252,18 +252,18 @@ fn function() { let _e350 = global.member[(_e342 + 1u)]; let _e355 = global.member[(_e342 + 2u)]; local_6[_e337.member_1] = vec3(bitcast(_e345), bitcast(_e350), bitcast(_e355)); - phi_814_ = true; + phi_837_ = true; break; } default: { - phi_814_ = bool(); + phi_837_ = bool(); break; } } - let _e360 = phi_814_; + let _e360 = phi_837_; continue; continuing { - phi_775_ = _e335; + phi_790_ = _e335; break if !(_e360); } } @@ -280,11 +280,11 @@ fn function() { let _e408 = global.member[(_e366 + 7u)]; let _e413 = global.member[(_e366 + 8u)]; let _e418 = global.member[(_e366 + 9u)]; - phi_870_ = type_26(vec3(bitcast(_e371), bitcast(_e376), bitcast(_e381)), vec4(bitcast(_e387), bitcast(_e392), bitcast(_e397), bitcast(_e402)), vec3(bitcast(_e408), bitcast(_e413), bitcast(_e418))); + phi_893_ = type_26(vec3(bitcast(_e371), bitcast(_e376), bitcast(_e381)), vec4(bitcast(_e387), bitcast(_e392), bitcast(_e397), bitcast(_e402)), vec3(bitcast(_e408), bitcast(_e413), bitcast(_e418))); } else { - phi_870_ = type_26(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); + phi_893_ = type_26(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); } - let _e423 = phi_870_; + let _e423 = phi_893_; let _e427 = global.member[(_e108 + 3u)]; let _e428 = bitcast(_e427); let _e432 = global.member[(_e108 + 4u)]; @@ -316,66 +316,66 @@ fn function() { let _e527 = local[0u][3u]; let _e529 = -(_e512); if ((fma(_e523, _e506, fma(_e515, _e504, (_e518 * _e505))) + _e527) < _e529) { - phi_2161_ = _e84; + phi_2218_ = _e84; } else { - phi_1013_ = type_17(0u, 6u); + phi_1036_ = type_17(0u, 6u); loop { - let _e532 = phi_1013_; + let _e532 = phi_1036_; if (_e532.member < _e532.member_1) { - phi_1014_ = type_17((_e532.member + 1u), _e532.member_1); - phi_1029_ = type_17(1u, _e532.member); + phi_1037_ = type_17((_e532.member + 1u), _e532.member_1); + phi_1060_ = type_17(1u, _e532.member); } else { - phi_1014_ = _e532; - phi_1029_ = type_17(0u, type_17().member_1); + phi_1037_ = _e532; + phi_1060_ = type_17(0u, type_17().member_1); } - let _e545 = phi_1014_; - let _e547 = phi_1029_; + let _e545 = phi_1037_; + let _e547 = phi_1060_; switch bitcast(_e547.member) { case 0: { - phi_1077_ = false; - phi_1078_ = true; + phi_1108_ = false; + phi_1109_ = true; break; } case 1: { if (_e547.member_1 != 0u) { if (_e547.member_1 < 6u) { } else { - phi_2127_ = true; - phi_1576_ = bool(); + phi_2182_ = true; + phi_1631_ = bool(); break; } let _e555 = local[_e547.member_1][0u]; let _e558 = local[_e547.member_1][1u]; let _e563 = local[_e547.member_1][2u]; let _e567 = local[_e547.member_1][3u]; - phi_1073_ = select(true, false, ((fma(_e563, _e506, fma(_e555, _e504, (_e558 * _e505))) + _e567) < _e529)); + phi_1104_ = select(true, false, ((fma(_e563, _e506, fma(_e555, _e504, (_e558 * _e505))) + _e567) < _e529)); } else { - phi_1073_ = true; + phi_1104_ = true; } - let _e572 = phi_1073_; - phi_1077_ = _e572; - phi_1078_ = false; + let _e572 = phi_1104_; + phi_1108_ = _e572; + phi_1109_ = false; break; } default: { - phi_1077_ = bool(); - phi_1078_ = bool(); + phi_1108_ = bool(); + phi_1109_ = bool(); break; } } - let _e574 = phi_1077_; - let _e576 = phi_1078_; + let _e574 = phi_1108_; + let _e576 = phi_1109_; continue; continuing { - phi_1013_ = _e545; - phi_2127_ = _e84; - phi_1576_ = _e576; + phi_1036_ = _e545; + phi_2182_ = _e84; + phi_1631_ = _e576; break if !(_e574); } } - let _e579 = phi_2127_; - let _e581 = phi_1576_; - phi_2158_ = _e579; + let _e579 = phi_2182_; + let _e581 = phi_1631_; + phi_2213_ = _e579; if _e579 { break; } @@ -383,52 +383,52 @@ fn function() { let _e582 = vec3(_e512); let _e583 = (_e507 - _e582); let _e584 = (_e507 + _e582); - phi_2147_ = _e579; - phi_1085_ = type_17(0u, 3u); + phi_2203_ = _e579; + phi_1116_ = type_17(0u, 3u); loop { - let _e586 = phi_2147_; - let _e588 = phi_1085_; + let _e586 = phi_2203_; + let _e588 = phi_1116_; if (_e588.member < _e588.member_1) { - phi_1086_ = type_17((_e588.member + 1u), _e588.member_1); - phi_1101_ = type_17(1u, _e588.member); + phi_1117_ = type_17((_e588.member + 1u), _e588.member_1); + phi_1140_ = type_17(1u, _e588.member); } else { - phi_1086_ = _e588; - phi_1101_ = type_17(0u, type_17().member_1); + phi_1117_ = _e588; + phi_1140_ = type_17(0u, type_17().member_1); } - let _e601 = phi_1086_; - let _e603 = phi_1101_; + let _e601 = phi_1117_; + let _e603 = phi_1140_; switch bitcast(_e603.member) { case 0: { - phi_2155_ = _e586; - phi_1246_ = false; + phi_2210_ = _e586; + phi_1301_ = false; break; } case 1: { - phi_1111_ = type_17(0u, 8u); - phi_1114_ = 0i; + phi_1150_ = type_17(0u, 8u); + phi_1153_ = 0i; loop { - let _e608 = phi_1111_; - let _e610 = phi_1114_; + let _e608 = phi_1150_; + let _e610 = phi_1153_; local_8 = _e610; if (_e608.member < _e608.member_1) { - phi_1112_ = type_17((_e608.member + 1u), _e608.member_1); - phi_1129_ = type_17(1u, _e608.member); + phi_1151_ = type_17((_e608.member + 1u), _e608.member_1); + phi_1176_ = type_17(1u, _e608.member); } else { - phi_1112_ = _e608; - phi_1129_ = type_17(0u, type_17().member_1); + phi_1151_ = _e608; + phi_1176_ = type_17(0u, type_17().member_1); } - let _e623 = phi_1112_; - let _e625 = phi_1129_; + let _e623 = phi_1151_; + let _e625 = phi_1176_; switch bitcast(_e625.member) { case 0: { - phi_1115_ = i32(); - phi_1171_ = false; + phi_1154_ = i32(); + phi_1218_ = false; break; } case 1: { if (_e625.member_1 < 8u) { } else { - phi_2142_ = true; + phi_2197_ = true; break; } let _e632 = local_1[_e625.member_1][0u]; @@ -438,78 +438,78 @@ fn function() { let _e640 = (_e603.member_1 < 3u); if _e640 { } else { - phi_2142_ = true; + phi_2197_ = true; break; } let _e642 = local_2[_e603.member_1]; local_3 = array(_e583.x, _e583.y, _e583.z); if _e640 { } else { - phi_2142_ = true; + phi_2197_ = true; break; } let _e648 = local_3[_e603.member_1]; if (_e642 < _e648) { - phi_1170_ = (_e610 + 1i); + phi_1217_ = (_e610 + 1i); } else { - phi_1170_ = _e610; + phi_1217_ = _e610; } - let _e652 = phi_1170_; - phi_1115_ = _e652; - phi_1171_ = true; + let _e652 = phi_1217_; + phi_1154_ = _e652; + phi_1218_ = true; break; } default: { - phi_1115_ = i32(); - phi_1171_ = bool(); + phi_1154_ = i32(); + phi_1218_ = bool(); break; } } - let _e654 = phi_1115_; - let _e656 = phi_1171_; + let _e654 = phi_1154_; + let _e656 = phi_1218_; continue; continuing { - phi_1111_ = _e623; - phi_1114_ = _e654; - phi_2142_ = _e586; + phi_1150_ = _e623; + phi_1153_ = _e654; + phi_2197_ = _e586; break if !(_e656); } } - let _e659 = phi_2142_; - phi_2154_ = _e659; + let _e659 = phi_2197_; + phi_2209_ = _e659; if _e659 { break; } let _e661 = local_8; if (_e661 == 8i) { - phi_2156_ = _e659; - phi_1244_ = false; + phi_2211_ = _e659; + phi_1299_ = false; } else { - phi_1178_ = type_17(0u, 8u); - phi_1181_ = 0i; + phi_1225_ = type_17(0u, 8u); + phi_1228_ = 0i; loop { - let _e664 = phi_1178_; - let _e666 = phi_1181_; + let _e664 = phi_1225_; + let _e666 = phi_1228_; local_9 = _e666; if (_e664.member < _e664.member_1) { - phi_1179_ = type_17((_e664.member + 1u), _e664.member_1); - phi_1196_ = type_17(1u, _e664.member); + phi_1226_ = type_17((_e664.member + 1u), _e664.member_1); + phi_1251_ = type_17(1u, _e664.member); } else { - phi_1179_ = _e664; - phi_1196_ = type_17(0u, type_17().member_1); + phi_1226_ = _e664; + phi_1251_ = type_17(0u, type_17().member_1); } - let _e679 = phi_1179_; - let _e681 = phi_1196_; + let _e679 = phi_1226_; + let _e681 = phi_1251_; switch bitcast(_e681.member) { case 0: { - phi_1182_ = i32(); - phi_1238_ = false; + phi_1229_ = i32(); + phi_1293_ = false; break; } case 1: { if (_e681.member_1 < 8u) { } else { - phi_2149_ = true; + phi_2204_ = true; break; } let _e688 = local_1[_e681.member_1][0u]; @@ -519,87 +519,87 @@ fn function() { let _e696 = (_e603.member_1 < 3u); if _e696 { } else { - phi_2149_ = true; + phi_2204_ = true; break; } let _e698 = local_4[_e603.member_1]; local_5 = array(_e584.x, _e584.y, _e584.z); if _e696 { } else { - phi_2149_ = true; + phi_2204_ = true; break; } let _e704 = local_5[_e603.member_1]; if (_e698 > _e704) { - phi_1237_ = (_e666 + 1i); + phi_1292_ = (_e666 + 1i); } else { - phi_1237_ = _e666; + phi_1292_ = _e666; } - let _e708 = phi_1237_; - phi_1182_ = _e708; - phi_1238_ = true; + let _e708 = phi_1292_; + phi_1229_ = _e708; + phi_1293_ = true; break; } default: { - phi_1182_ = i32(); - phi_1238_ = bool(); + phi_1229_ = i32(); + phi_1293_ = bool(); break; } } - let _e710 = phi_1182_; - let _e712 = phi_1238_; + let _e710 = phi_1229_; + let _e712 = phi_1293_; continue; continuing { - phi_1178_ = _e679; - phi_1181_ = _e710; - phi_2149_ = _e659; + phi_1225_ = _e679; + phi_1228_ = _e710; + phi_2204_ = _e659; break if !(_e712); } } - let _e715 = phi_2149_; - phi_2154_ = _e715; + let _e715 = phi_2204_; + phi_2209_ = _e715; if _e715 { break; } let _e717 = local_9; - phi_2156_ = _e715; - phi_1244_ = select(true, false, (_e717 == 8i)); + phi_2211_ = _e715; + phi_1299_ = select(true, false, (_e717 == 8i)); } - let _e721 = phi_2156_; - let _e723 = phi_1244_; - phi_2155_ = _e721; - phi_1246_ = _e723; + let _e721 = phi_2211_; + let _e723 = phi_1299_; + phi_2210_ = _e721; + phi_1301_ = _e723; break; } default: { - phi_2155_ = _e586; - phi_1246_ = bool(); + phi_2210_ = _e586; + phi_1301_ = bool(); break; } } - let _e725 = phi_2155_; - let _e727 = phi_1246_; + let _e725 = phi_2210_; + let _e727 = phi_1301_; continue; continuing { - phi_2147_ = _e725; - phi_1085_ = _e601; - phi_2154_ = _e725; + phi_2203_ = _e725; + phi_1116_ = _e601; + phi_2209_ = _e725; break if !(_e727); } } - let _e730 = phi_2154_; - phi_2158_ = _e730; + let _e730 = phi_2209_; + phi_2213_ = _e730; if _e730 { break; } - phi_2162_ = _e730; + phi_2219_ = _e730; } else { - phi_2162_ = _e579; + phi_2219_ = _e579; } - let _e732 = phi_2162_; - phi_2161_ = _e732; + let _e732 = phi_2219_; + phi_2218_ = _e732; } - let _e734 = phi_2161_; + let _e734 = phi_2218_; let _e735 = f32(_e78); let _e752 = fma(_e186, _e211, fma(_e166, _e206, fma(_e126, _e196, (_e146 * _e201)))); let _e753 = fma(_e191, _e211, fma(_e171, _e206, fma(_e131, _e196, (_e151 * _e201)))); @@ -640,27 +640,27 @@ fn function() { } } } - phi_2159_ = _e734; - phi_1491_ = true; + phi_2214_ = _e734; + phi_1546_ = true; break; } default: { - phi_2159_ = _e84; - phi_1491_ = bool(); + phi_2214_ = _e84; + phi_1546_ = bool(); break; } } - let _e909 = phi_2159_; - let _e911 = phi_1491_; + let _e909 = phi_2214_; + let _e911 = phi_1546_; continue; continuing { - phi_2139_ = _e909; - phi_540_ = _e99; - phi_2158_ = _e909; + phi_2195_ = _e909; + phi_539_ = _e99; + phi_2213_ = _e909; break if !(_e911); } } - let _e914 = phi_2158_; + let _e914 = phi_2213_; if _e914 { break; } diff --git a/crates/renderling/shaders/skybox-skybox_cubemap_vertex.spv b/crates/renderling/shaders/skybox-skybox_cubemap_vertex.spv index ef4a3cdf..a8844f9b 100644 Binary files a/crates/renderling/shaders/skybox-skybox_cubemap_vertex.spv and b/crates/renderling/shaders/skybox-skybox_cubemap_vertex.spv differ diff --git a/crates/renderling/shaders/skybox-skybox_cubemap_vertex.wgsl b/crates/renderling/shaders/skybox-skybox_cubemap_vertex.wgsl index 277f1a99..275cf699 100644 --- a/crates/renderling/shaders/skybox-skybox_cubemap_vertex.wgsl +++ b/crates/renderling/shaders/skybox-skybox_cubemap_vertex.wgsl @@ -42,16 +42,16 @@ fn function() { var local: array, 8>; var local_1: array, 6>; var local_2: array, 36>; - var phi_689_: bool; + var phi_705_: bool; var phi_517_: type_23; var phi_518_: type_23; - var phi_533_: type_23; - var phi_560_: bool; - var phi_566_: type_23; - var phi_567_: type_23; - var phi_582_: type_23; - var phi_605_: bool; - var phi_613_: type_21; + var phi_541_: type_23; + var phi_568_: bool; + var phi_574_: type_23; + var phi_575_: type_23; + var phi_598_: type_23; + var phi_621_: bool; + var phi_629_: type_21; switch bitcast(0u) { default: { @@ -59,11 +59,11 @@ fn function() { let _e79 = global; let _e81 = arrayLength((&global_1.member)); if (_e81 >= 83u) { - phi_689_ = (_e78 <= (_e81 - 83u)); + phi_705_ = (_e78 <= (_e81 - 83u)); } else { - phi_689_ = false; + phi_705_ = false; } - let _e86 = phi_689_; + let _e86 = phi_705_; if _e86 { let _e89 = global_1.member[_e78]; let _e94 = global_1.member[(_e78 + 1u)]; @@ -106,16 +106,16 @@ fn function() { let _e274 = phi_517_; if (_e274.member < _e274.member_1) { phi_518_ = type_23((_e274.member + 1u), _e274.member_1); - phi_533_ = type_23(1u, _e274.member); + phi_541_ = type_23(1u, _e274.member); } else { phi_518_ = _e274; - phi_533_ = type_23(0u, type_23().member_1); + phi_541_ = type_23(0u, type_23().member_1); } let _e287 = phi_518_; - let _e289 = phi_533_; + let _e289 = phi_541_; switch bitcast(_e289.member) { case 0: { - phi_560_ = false; + phi_568_ = false; break; } case 1: { @@ -125,15 +125,15 @@ fn function() { let _e307 = global_1.member[(_e294 + 2u)]; let _e312 = global_1.member[(_e294 + 3u)]; local_1[_e289.member_1] = vec4(bitcast(_e297), bitcast(_e302), bitcast(_e307), bitcast(_e312)); - phi_560_ = true; + phi_568_ = true; break; } default: { - phi_560_ = bool(); + phi_568_ = bool(); break; } } - let _e317 = phi_560_; + let _e317 = phi_568_; continue; continuing { phi_517_ = _e287; @@ -142,21 +142,21 @@ fn function() { } let _e319 = local_1; local = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_566_ = type_23(0u, 8u); + phi_574_ = type_23(0u, 8u); loop { - let _e322 = phi_566_; + let _e322 = phi_574_; if (_e322.member < _e322.member_1) { - phi_567_ = type_23((_e322.member + 1u), _e322.member_1); - phi_582_ = type_23(1u, _e322.member); + phi_575_ = type_23((_e322.member + 1u), _e322.member_1); + phi_598_ = type_23(1u, _e322.member); } else { - phi_567_ = _e322; - phi_582_ = type_23(0u, type_23().member_1); + phi_575_ = _e322; + phi_598_ = type_23(0u, type_23().member_1); } - let _e335 = phi_567_; - let _e337 = phi_582_; + let _e335 = phi_575_; + let _e337 = phi_598_; switch bitcast(_e337.member) { case 0: { - phi_605_ = false; + phi_621_ = false; break; } case 1: { @@ -165,27 +165,27 @@ fn function() { let _e350 = global_1.member[(_e342 + 1u)]; let _e355 = global_1.member[(_e342 + 2u)]; local[_e337.member_1] = vec3(bitcast(_e345), bitcast(_e350), bitcast(_e355)); - phi_605_ = true; + phi_621_ = true; break; } default: { - phi_605_ = bool(); + phi_621_ = bool(); break; } } - let _e360 = phi_605_; + let _e360 = phi_621_; continue; continuing { - phi_566_ = _e335; + phi_574_ = _e335; break if !(_e360); } } let _e362 = local; - phi_613_ = type_21(type_19(vec4(bitcast(_e89), bitcast(_e94), bitcast(_e99), bitcast(_e104)), vec4(bitcast(_e110), bitcast(_e115), bitcast(_e120), bitcast(_e125)), vec4(bitcast(_e131), bitcast(_e136), bitcast(_e141), bitcast(_e146)), vec4(bitcast(_e152), bitcast(_e157), bitcast(_e162), bitcast(_e167))), type_19(vec4(bitcast(_e174), bitcast(_e179), bitcast(_e184), bitcast(_e189)), vec4(bitcast(_e195), bitcast(_e200), bitcast(_e205), bitcast(_e210)), vec4(bitcast(_e216), bitcast(_e221), bitcast(_e226), bitcast(_e231)), vec4(bitcast(_e237), bitcast(_e242), bitcast(_e247), bitcast(_e252))), type_20(_e362, _e319), vec3(bitcast(_e259), bitcast(_e264), bitcast(_e269))); + phi_629_ = type_21(type_19(vec4(bitcast(_e89), bitcast(_e94), bitcast(_e99), bitcast(_e104)), vec4(bitcast(_e110), bitcast(_e115), bitcast(_e120), bitcast(_e125)), vec4(bitcast(_e131), bitcast(_e136), bitcast(_e141), bitcast(_e146)), vec4(bitcast(_e152), bitcast(_e157), bitcast(_e162), bitcast(_e167))), type_19(vec4(bitcast(_e174), bitcast(_e179), bitcast(_e184), bitcast(_e189)), vec4(bitcast(_e195), bitcast(_e200), bitcast(_e205), bitcast(_e210)), vec4(bitcast(_e216), bitcast(_e221), bitcast(_e226), bitcast(_e231)), vec4(bitcast(_e237), bitcast(_e242), bitcast(_e247), bitcast(_e252))), type_20(_e362, _e319), vec3(bitcast(_e259), bitcast(_e264), bitcast(_e269))); } else { - phi_613_ = type_21(type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_629_ = type_21(type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e366 = phi_613_; + let _e366 = phi_629_; local_2 = array, 36>(vec3(-0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(-0.5f, 0.5f, -0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(0.5f, -0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, -0.5f, 0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(-0.5f, 0.5f, -0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(0.5f, -0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(-0.5f, 0.5f, -0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(-0.5f, -0.5f, -0.5f)); if (_e79 < 36u) { } else { diff --git a/crates/renderling/shaders/skybox-skybox_vertex.spv b/crates/renderling/shaders/skybox-skybox_vertex.spv index 55c9e197..f66577b4 100644 Binary files a/crates/renderling/shaders/skybox-skybox_vertex.spv and b/crates/renderling/shaders/skybox-skybox_vertex.spv differ diff --git a/crates/renderling/shaders/skybox-skybox_vertex.wgsl b/crates/renderling/shaders/skybox-skybox_vertex.wgsl index 6adee79a..13034d28 100644 --- a/crates/renderling/shaders/skybox-skybox_vertex.wgsl +++ b/crates/renderling/shaders/skybox-skybox_vertex.wgsl @@ -42,16 +42,16 @@ fn function() { var local: array, 8>; var local_1: array, 6>; var local_2: array, 36>; - var phi_714_: bool; + var phi_730_: bool; var phi_301_: type_23; var phi_302_: type_23; - var phi_317_: type_23; - var phi_344_: bool; - var phi_350_: type_23; - var phi_351_: type_23; - var phi_366_: type_23; - var phi_389_: bool; - var phi_397_: type_21; + var phi_325_: type_23; + var phi_352_: bool; + var phi_358_: type_23; + var phi_359_: type_23; + var phi_382_: type_23; + var phi_405_: bool; + var phi_413_: type_21; switch bitcast(0u) { default: { @@ -59,11 +59,11 @@ fn function() { let _e79 = global; let _e81 = arrayLength((&global_1.member)); if (_e81 >= 83u) { - phi_714_ = (_e78 <= (_e81 - 83u)); + phi_730_ = (_e78 <= (_e81 - 83u)); } else { - phi_714_ = false; + phi_730_ = false; } - let _e86 = phi_714_; + let _e86 = phi_730_; if _e86 { let _e89 = global_1.member[_e78]; let _e94 = global_1.member[(_e78 + 1u)]; @@ -106,16 +106,16 @@ fn function() { let _e274 = phi_301_; if (_e274.member < _e274.member_1) { phi_302_ = type_23((_e274.member + 1u), _e274.member_1); - phi_317_ = type_23(1u, _e274.member); + phi_325_ = type_23(1u, _e274.member); } else { phi_302_ = _e274; - phi_317_ = type_23(0u, type_23().member_1); + phi_325_ = type_23(0u, type_23().member_1); } let _e287 = phi_302_; - let _e289 = phi_317_; + let _e289 = phi_325_; switch bitcast(_e289.member) { case 0: { - phi_344_ = false; + phi_352_ = false; break; } case 1: { @@ -125,15 +125,15 @@ fn function() { let _e307 = global_1.member[(_e294 + 2u)]; let _e312 = global_1.member[(_e294 + 3u)]; local_1[_e289.member_1] = vec4(bitcast(_e297), bitcast(_e302), bitcast(_e307), bitcast(_e312)); - phi_344_ = true; + phi_352_ = true; break; } default: { - phi_344_ = bool(); + phi_352_ = bool(); break; } } - let _e317 = phi_344_; + let _e317 = phi_352_; continue; continuing { phi_301_ = _e287; @@ -142,21 +142,21 @@ fn function() { } let _e319 = local_1; local = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_350_ = type_23(0u, 8u); + phi_358_ = type_23(0u, 8u); loop { - let _e322 = phi_350_; + let _e322 = phi_358_; if (_e322.member < _e322.member_1) { - phi_351_ = type_23((_e322.member + 1u), _e322.member_1); - phi_366_ = type_23(1u, _e322.member); + phi_359_ = type_23((_e322.member + 1u), _e322.member_1); + phi_382_ = type_23(1u, _e322.member); } else { - phi_351_ = _e322; - phi_366_ = type_23(0u, type_23().member_1); + phi_359_ = _e322; + phi_382_ = type_23(0u, type_23().member_1); } - let _e335 = phi_351_; - let _e337 = phi_366_; + let _e335 = phi_359_; + let _e337 = phi_382_; switch bitcast(_e337.member) { case 0: { - phi_389_ = false; + phi_405_ = false; break; } case 1: { @@ -165,27 +165,27 @@ fn function() { let _e350 = global_1.member[(_e342 + 1u)]; let _e355 = global_1.member[(_e342 + 2u)]; local[_e337.member_1] = vec3(bitcast(_e345), bitcast(_e350), bitcast(_e355)); - phi_389_ = true; + phi_405_ = true; break; } default: { - phi_389_ = bool(); + phi_405_ = bool(); break; } } - let _e360 = phi_389_; + let _e360 = phi_405_; continue; continuing { - phi_350_ = _e335; + phi_358_ = _e335; break if !(_e360); } } let _e362 = local; - phi_397_ = type_21(type_19(vec4(bitcast(_e89), bitcast(_e94), bitcast(_e99), bitcast(_e104)), vec4(bitcast(_e110), bitcast(_e115), bitcast(_e120), bitcast(_e125)), vec4(bitcast(_e131), bitcast(_e136), bitcast(_e141), bitcast(_e146)), vec4(bitcast(_e152), bitcast(_e157), bitcast(_e162), bitcast(_e167))), type_19(vec4(bitcast(_e174), bitcast(_e179), bitcast(_e184), bitcast(_e189)), vec4(bitcast(_e195), bitcast(_e200), bitcast(_e205), bitcast(_e210)), vec4(bitcast(_e216), bitcast(_e221), bitcast(_e226), bitcast(_e231)), vec4(bitcast(_e237), bitcast(_e242), bitcast(_e247), bitcast(_e252))), type_20(_e362, _e319), vec3(bitcast(_e259), bitcast(_e264), bitcast(_e269))); + phi_413_ = type_21(type_19(vec4(bitcast(_e89), bitcast(_e94), bitcast(_e99), bitcast(_e104)), vec4(bitcast(_e110), bitcast(_e115), bitcast(_e120), bitcast(_e125)), vec4(bitcast(_e131), bitcast(_e136), bitcast(_e141), bitcast(_e146)), vec4(bitcast(_e152), bitcast(_e157), bitcast(_e162), bitcast(_e167))), type_19(vec4(bitcast(_e174), bitcast(_e179), bitcast(_e184), bitcast(_e189)), vec4(bitcast(_e195), bitcast(_e200), bitcast(_e205), bitcast(_e210)), vec4(bitcast(_e216), bitcast(_e221), bitcast(_e226), bitcast(_e231)), vec4(bitcast(_e237), bitcast(_e242), bitcast(_e247), bitcast(_e252))), type_20(_e362, _e319), vec3(bitcast(_e259), bitcast(_e264), bitcast(_e269))); } else { - phi_397_ = type_21(type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_413_ = type_21(type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_19(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e366 = phi_397_; + let _e366 = phi_413_; local_2 = array, 36>(vec3(-0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(-0.5f, 0.5f, -0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(0.5f, -0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(0.5f, 0.5f, 0.5f), vec3(0.5f, -0.5f, 0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(-0.5f, 0.5f, -0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(-0.5f, 0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(0.5f, -0.5f, 0.5f), vec3(-0.5f, -0.5f, 0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(-0.5f, -0.5f, -0.5f), vec3(-0.5f, 0.5f, -0.5f), vec3(0.5f, 0.5f, -0.5f), vec3(0.5f, -0.5f, -0.5f), vec3(-0.5f, -0.5f, -0.5f)); if (_e79 < 36u) { } else { diff --git a/crates/renderling/shaders/stage-renderlet_fragment.spv b/crates/renderling/shaders/stage-renderlet_fragment.spv index 2e3dd7e3..e0c5c13e 100644 Binary files a/crates/renderling/shaders/stage-renderlet_fragment.spv and b/crates/renderling/shaders/stage-renderlet_fragment.spv differ diff --git a/crates/renderling/shaders/stage-renderlet_fragment.wgsl b/crates/renderling/shaders/stage-renderlet_fragment.wgsl index cd912e7b..99194c34 100644 --- a/crates/renderling/shaders/stage-renderlet_fragment.wgsl +++ b/crates/renderling/shaders/stage-renderlet_fragment.wgsl @@ -113,174 +113,174 @@ fn function() { var local: array, 8>; var local_1: array, 6>; var phi_610_: u32; - var phi_3823_: bool; + var phi_3863_: bool; var phi_764_: type_31; var phi_768_: type_31; - var phi_3856_: bool; + var phi_3900_: bool; var phi_808_: u32; var phi_817_: u32; var phi_830_: type_32; - var phi_3912_: f32; - var phi_3894_: bool; + var phi_3922_: f32; + var phi_3935_: bool; var phi_884_: f32; var phi_879_: f32; var phi_885_: f32; - var phi_3877_: bool; + var phi_3952_: bool; var phi_850_: f32; var phi_887_: f32; - var phi_3960_: f32; - var phi_3942_: bool; + var phi_3970_: f32; + var phi_3983_: bool; var phi_942_: f32; var phi_937_: f32; var phi_943_: f32; - var phi_3925_: bool; + var phi_4000_: bool; var phi_908_: f32; var phi_945_: f32; - var phi_3992_: bool; + var phi_4036_: bool; var phi_1028_: u32; var phi_1037_: u32; var phi_1050_: type_32; - var phi_4047_: f32; - var phi_4029_: bool; + var phi_4057_: f32; + var phi_4070_: bool; var phi_1104_: f32; var phi_1099_: f32; var phi_1105_: f32; - var phi_4012_: bool; + var phi_4087_: bool; var phi_1070_: f32; var phi_1107_: f32; - var phi_4095_: f32; - var phi_4077_: bool; + var phi_4105_: f32; + var phi_4118_: bool; var phi_1162_: f32; var phi_1157_: f32; var phi_1163_: f32; - var phi_4060_: bool; + var phi_4135_: bool; var phi_1128_: f32; var phi_1165_: f32; - var phi_4127_: bool; + var phi_4171_: bool; var phi_1248_: u32; var phi_1257_: u32; var phi_1270_: type_32; - var phi_4182_: f32; - var phi_4164_: bool; + var phi_4192_: f32; + var phi_4205_: bool; var phi_1324_: f32; var phi_1319_: f32; var phi_1325_: f32; - var phi_4147_: bool; + var phi_4222_: bool; var phi_1290_: f32; var phi_1327_: f32; - var phi_4230_: f32; - var phi_4212_: bool; + var phi_4240_: f32; + var phi_4253_: bool; var phi_1382_: f32; var phi_1377_: f32; var phi_1383_: f32; - var phi_4195_: bool; + var phi_4270_: bool; var phi_1348_: f32; var phi_1385_: f32; - var phi_4262_: bool; + var phi_4306_: bool; var phi_1468_: u32; var phi_1477_: u32; var phi_1490_: type_32; - var phi_4317_: f32; - var phi_4299_: bool; + var phi_4327_: f32; + var phi_4340_: bool; var phi_1544_: f32; var phi_1539_: f32; var phi_1545_: f32; - var phi_4282_: bool; + var phi_4357_: bool; var phi_1510_: f32; var phi_1547_: f32; - var phi_4365_: f32; - var phi_4347_: bool; + var phi_4375_: f32; + var phi_4388_: bool; var phi_1602_: f32; var phi_1597_: f32; var phi_1603_: f32; - var phi_4330_: bool; + var phi_4405_: bool; var phi_1568_: f32; var phi_1605_: f32; - var phi_4397_: bool; + var phi_4441_: bool; var phi_1688_: u32; var phi_1697_: u32; var phi_1710_: type_32; - var phi_4452_: f32; - var phi_4434_: bool; + var phi_4462_: f32; + var phi_4475_: bool; var phi_1764_: f32; var phi_1759_: f32; var phi_1765_: f32; - var phi_4417_: bool; + var phi_4492_: bool; var phi_1730_: f32; var phi_1767_: f32; - var phi_4500_: f32; - var phi_4482_: bool; + var phi_4510_: f32; + var phi_4523_: bool; var phi_1822_: f32; var phi_1817_: f32; var phi_1823_: f32; - var phi_4465_: bool; + var phi_4540_: bool; var phi_1788_: f32; var phi_1825_: f32; - var phi_4554_: vec3; - var phi_4589_: vec3; - var phi_4624_: vec3; - var phi_4659_: vec3; - var phi_4694_: vec3; + var phi_4598_: vec3; + var phi_4633_: vec3; + var phi_4668_: vec3; + var phi_4703_: vec3; + var phi_4738_: vec3; var phi_1919_: vec3; var phi_1920_: vec3; - var phi_4726_: bool; + var phi_4770_: bool; var phi_2127_: type_24; var phi_2128_: type_24; - var phi_2143_: type_24; - var phi_2170_: bool; - var phi_2176_: type_24; - var phi_2177_: type_24; - var phi_2192_: type_24; - var phi_2215_: bool; - var phi_2223_: type_22; - var phi_4798_: vec3; - var phi_4857_: vec3; - var phi_4931_: vec3; - var phi_6075_: vec3; - var phi_6026_: vec3; - var phi_5977_: vec3; - var phi_5928_: vec3; - var phi_5879_: vec3; - var phi_5830_: vec3; - var phi_5781_: vec3; - var phi_4981_: vec3; - var phi_5016_: vec3; - var phi_2263_: type_24; - var phi_2266_: vec3; - var phi_2264_: type_24; - var phi_2281_: type_24; - var phi_5033_: u32; - var phi_5052_: bool; - var phi_2298_: u32; - var phi_5084_: bool; - var phi_2315_: u32; - var phi_2325_: type_33; - var phi_5114_: bool; - var phi_2375_: type_29; - var phi_5542_: bool; - var phi_2875_: type_35; - var phi_5592_: vec3; - var phi_5627_: vec3; - var phi_5662_: vec3; - var phi_3122_: vec3; - var phi_5369_: bool; - var phi_2626_: type_34; - var phi_5415_: vec3; - var phi_5450_: vec3; - var phi_2812_: vec3; - var phi_5194_: bool; - var phi_2423_: type_34; - var phi_5242_: vec3; - var phi_5277_: vec3; - var phi_3124_: vec3; - var phi_3125_: bool; - var phi_3134_: vec3; - var phi_2267_: vec3; - var phi_3136_: bool; + var phi_2151_: type_24; + var phi_2178_: bool; + var phi_2184_: type_24; + var phi_2185_: type_24; + var phi_2208_: type_24; + var phi_2231_: bool; + var phi_2239_: type_22; + var phi_4842_: vec3; + var phi_4901_: vec3; + var phi_4975_: vec3; + var phi_5035_: vec3; + var phi_5084_: vec3; + var phi_5133_: vec3; + var phi_5182_: vec3; + var phi_5231_: vec3; + var phi_5280_: vec3; + var phi_5329_: vec3; + var phi_5368_: vec3; + var phi_5403_: vec3; + var phi_2279_: type_24; + var phi_2282_: vec3; + var phi_2280_: type_24; + var phi_2305_: type_24; + var phi_5420_: u32; + var phi_5439_: bool; + var phi_2322_: u32; + var phi_5471_: bool; + var phi_2339_: u32; + var phi_2349_: type_33; + var phi_5501_: bool; + var phi_2399_: type_29; + var phi_5581_: bool; + var phi_2907_: type_35; + var phi_5631_: vec3; + var phi_5666_: vec3; + var phi_5701_: vec3; + var phi_3162_: vec3; + var phi_5793_: bool; + var phi_2654_: type_34; + var phi_5840_: vec3; + var phi_5875_: vec3; + var phi_2844_: vec3; + var phi_5967_: bool; + var phi_2447_: type_34; + var phi_6014_: vec3; + var phi_6049_: vec3; + var phi_3164_: vec3; + var phi_3165_: bool; + var phi_3174_: vec3; + var phi_2283_: vec3; + var phi_3176_: bool; var local_2: vec3; var local_3: vec3; var local_4: vec3; - var phi_3249_: vec4; + var phi_3293_: vec4; let _e110 = arrayLength((&global.member)); let _e111 = global_1; @@ -391,11 +391,11 @@ fn function() { phi_768_ = type_31(vec3(0f, 0f, 0f), 1f, vec4(1f, 1f, 1f, 1f), 1f, 1f, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 0u, 0u, 0u, 0u, 0u, false, 0f); } else { if (_e110 >= 22u) { - phi_3823_ = (_e126 <= (_e110 - 22u)); + phi_3863_ = (_e126 <= (_e110 - 22u)); } else { - phi_3823_ = false; + phi_3863_ = false; } - let _e163 = phi_3823_; + let _e163 = phi_3863_; if _e163 { let _e166 = global.member[_e126]; let _e171 = global.member[(_e126 + 1u)]; @@ -430,11 +430,11 @@ fn function() { let _e293 = select(_e114, _e113, vec2((_e289.member_10 == 0u))); let _e295 = (_e110 >= 8u); if _e295 { - phi_3856_ = (_e289.member_5 <= (_e110 - 8u)); + phi_3900_ = (_e289.member_5 <= (_e110 - 8u)); } else { - phi_3856_ = false; + phi_3900_ = false; } - let _e299 = phi_3856_; + let _e299 = phi_3900_; if _e299 { let _e302 = global.member[_e289.member_5]; let _e306 = global.member[(_e289.member_5 + 1u)]; @@ -492,11 +492,11 @@ fn function() { let _e380 = abs(_e293.x); let _e382 = (_e380 % 1f); if (_e380 >= 1f) { - phi_3877_ = select(true, false, (_e382 == 0f)); + phi_3952_ = select(true, false, (_e382 == 0f)); } else { - phi_3877_ = true; + phi_3952_ = true; } - let _e386 = phi_3877_; + let _e386 = phi_3952_; let _e387 = select(1f, _e382, _e386); if (select(-1f, 1f, (_e293.x >= 0f)) > 0f) { phi_850_ = _e387; @@ -512,11 +512,11 @@ fn function() { let _e361 = ((select(select(u32(_e354), 0u, (_e354 < 0f)), 4294967295u, (_e354 > 4294967000f)) % 2u) == 0u); let _e363 = (_e354 % 1f); if (_e354 >= 1f) { - phi_3894_ = select(true, false, (_e363 == 0f)); + phi_3935_ = select(true, false, (_e363 == 0f)); } else { - phi_3894_ = true; + phi_3935_ = true; } - let _e367 = phi_3894_; + let _e367 = phi_3935_; let _e368 = select(1f, _e363, _e367); if (select(-1f, 1f, (_e293.x >= 0f)) > 0f) { if _e361 { @@ -541,11 +541,11 @@ fn function() { } case 0: { if (_e293.x > 1f) { - phi_3912_ = 0.9999999f; + phi_3922_ = 0.9999999f; } else { - phi_3912_ = select(_e293.x, 0.00000011920929f, (_e293.x < 0f)); + phi_3922_ = select(_e293.x, 0.00000011920929f, (_e293.x < 0f)); } - let _e351 = phi_3912_; + let _e351 = phi_3922_; phi_887_ = _e351; break; } @@ -560,11 +560,11 @@ fn function() { let _e431 = abs(_e293.y); let _e433 = (_e431 % 1f); if (_e431 >= 1f) { - phi_3925_ = select(true, false, (_e433 == 0f)); + phi_4000_ = select(true, false, (_e433 == 0f)); } else { - phi_3925_ = true; + phi_4000_ = true; } - let _e437 = phi_3925_; + let _e437 = phi_4000_; let _e438 = select(1f, _e433, _e437); if (select(-1f, 1f, (_e293.y >= 0f)) > 0f) { phi_908_ = _e438; @@ -580,11 +580,11 @@ fn function() { let _e412 = ((select(select(u32(_e405), 0u, (_e405 < 0f)), 4294967295u, (_e405 > 4294967000f)) % 2u) == 0u); let _e414 = (_e405 % 1f); if (_e405 >= 1f) { - phi_3942_ = select(true, false, (_e414 == 0f)); + phi_3983_ = select(true, false, (_e414 == 0f)); } else { - phi_3942_ = true; + phi_3983_ = true; } - let _e418 = phi_3942_; + let _e418 = phi_3983_; let _e419 = select(1f, _e414, _e418); if (select(-1f, 1f, (_e293.y >= 0f)) > 0f) { if _e412 { @@ -609,11 +609,11 @@ fn function() { } case 0: { if (_e293.y > 1f) { - phi_3960_ = 0.9999999f; + phi_3970_ = 0.9999999f; } else { - phi_3960_ = select(_e293.y, 0.00000011920929f, (_e293.y < 0f)); + phi_3970_ = select(_e293.y, 0.00000011920929f, (_e293.y < 0f)); } - let _e402 = phi_3960_; + let _e402 = phi_3970_; phi_945_ = _e402; break; } @@ -632,11 +632,11 @@ fn function() { let _e486 = select(_e483, vec4(1f, 1f, 1f, 1f), vec4((_e289.member_5 == 4294967295u))); let _e490 = select(_e114, _e113, vec2((_e289.member_11 == 0u))); if _e295 { - phi_3992_ = (_e289.member_6 <= (_e110 - 8u)); + phi_4036_ = (_e289.member_6 <= (_e110 - 8u)); } else { - phi_3992_ = false; + phi_4036_ = false; } - let _e495 = phi_3992_; + let _e495 = phi_4036_; if _e495 { let _e498 = global.member[_e289.member_6]; let _e502 = global.member[(_e289.member_6 + 1u)]; @@ -694,11 +694,11 @@ fn function() { let _e576 = abs(_e490.x); let _e578 = (_e576 % 1f); if (_e576 >= 1f) { - phi_4012_ = select(true, false, (_e578 == 0f)); + phi_4087_ = select(true, false, (_e578 == 0f)); } else { - phi_4012_ = true; + phi_4087_ = true; } - let _e582 = phi_4012_; + let _e582 = phi_4087_; let _e583 = select(1f, _e578, _e582); if (select(-1f, 1f, (_e490.x >= 0f)) > 0f) { phi_1070_ = _e583; @@ -714,11 +714,11 @@ fn function() { let _e557 = ((select(select(u32(_e550), 0u, (_e550 < 0f)), 4294967295u, (_e550 > 4294967000f)) % 2u) == 0u); let _e559 = (_e550 % 1f); if (_e550 >= 1f) { - phi_4029_ = select(true, false, (_e559 == 0f)); + phi_4070_ = select(true, false, (_e559 == 0f)); } else { - phi_4029_ = true; + phi_4070_ = true; } - let _e563 = phi_4029_; + let _e563 = phi_4070_; let _e564 = select(1f, _e559, _e563); if (select(-1f, 1f, (_e490.x >= 0f)) > 0f) { if _e557 { @@ -743,11 +743,11 @@ fn function() { } case 0: { if (_e490.x > 1f) { - phi_4047_ = 0.9999999f; + phi_4057_ = 0.9999999f; } else { - phi_4047_ = select(_e490.x, 0.00000011920929f, (_e490.x < 0f)); + phi_4057_ = select(_e490.x, 0.00000011920929f, (_e490.x < 0f)); } - let _e547 = phi_4047_; + let _e547 = phi_4057_; phi_1107_ = _e547; break; } @@ -762,11 +762,11 @@ fn function() { let _e627 = abs(_e490.y); let _e629 = (_e627 % 1f); if (_e627 >= 1f) { - phi_4060_ = select(true, false, (_e629 == 0f)); + phi_4135_ = select(true, false, (_e629 == 0f)); } else { - phi_4060_ = true; + phi_4135_ = true; } - let _e633 = phi_4060_; + let _e633 = phi_4135_; let _e634 = select(1f, _e629, _e633); if (select(-1f, 1f, (_e490.y >= 0f)) > 0f) { phi_1128_ = _e634; @@ -782,11 +782,11 @@ fn function() { let _e608 = ((select(select(u32(_e601), 0u, (_e601 < 0f)), 4294967295u, (_e601 > 4294967000f)) % 2u) == 0u); let _e610 = (_e601 % 1f); if (_e601 >= 1f) { - phi_4077_ = select(true, false, (_e610 == 0f)); + phi_4118_ = select(true, false, (_e610 == 0f)); } else { - phi_4077_ = true; + phi_4118_ = true; } - let _e614 = phi_4077_; + let _e614 = phi_4118_; let _e615 = select(1f, _e610, _e614); if (select(-1f, 1f, (_e490.y >= 0f)) > 0f) { if _e608 { @@ -811,11 +811,11 @@ fn function() { } case 0: { if (_e490.y > 1f) { - phi_4095_ = 0.9999999f; + phi_4105_ = 0.9999999f; } else { - phi_4095_ = select(_e490.y, 0.00000011920929f, (_e490.y < 0f)); + phi_4105_ = select(_e490.y, 0.00000011920929f, (_e490.y < 0f)); } - let _e598 = phi_4095_; + let _e598 = phi_4105_; phi_1165_ = _e598; break; } @@ -832,11 +832,11 @@ fn function() { let _e680 = select(_e677, vec4(1f, 1f, 1f, 1f), vec4((_e289.member_6 == 4294967295u))); let _e684 = select(_e114, _e113, vec2((_e289.member_12 == 0u))); if _e295 { - phi_4127_ = (_e289.member_7 <= (_e110 - 8u)); + phi_4171_ = (_e289.member_7 <= (_e110 - 8u)); } else { - phi_4127_ = false; + phi_4171_ = false; } - let _e689 = phi_4127_; + let _e689 = phi_4171_; if _e689 { let _e692 = global.member[_e289.member_7]; let _e696 = global.member[(_e289.member_7 + 1u)]; @@ -894,11 +894,11 @@ fn function() { let _e770 = abs(_e684.x); let _e772 = (_e770 % 1f); if (_e770 >= 1f) { - phi_4147_ = select(true, false, (_e772 == 0f)); + phi_4222_ = select(true, false, (_e772 == 0f)); } else { - phi_4147_ = true; + phi_4222_ = true; } - let _e776 = phi_4147_; + let _e776 = phi_4222_; let _e777 = select(1f, _e772, _e776); if (select(-1f, 1f, (_e684.x >= 0f)) > 0f) { phi_1290_ = _e777; @@ -914,11 +914,11 @@ fn function() { let _e751 = ((select(select(u32(_e744), 0u, (_e744 < 0f)), 4294967295u, (_e744 > 4294967000f)) % 2u) == 0u); let _e753 = (_e744 % 1f); if (_e744 >= 1f) { - phi_4164_ = select(true, false, (_e753 == 0f)); + phi_4205_ = select(true, false, (_e753 == 0f)); } else { - phi_4164_ = true; + phi_4205_ = true; } - let _e757 = phi_4164_; + let _e757 = phi_4205_; let _e758 = select(1f, _e753, _e757); if (select(-1f, 1f, (_e684.x >= 0f)) > 0f) { if _e751 { @@ -943,11 +943,11 @@ fn function() { } case 0: { if (_e684.x > 1f) { - phi_4182_ = 0.9999999f; + phi_4192_ = 0.9999999f; } else { - phi_4182_ = select(_e684.x, 0.00000011920929f, (_e684.x < 0f)); + phi_4192_ = select(_e684.x, 0.00000011920929f, (_e684.x < 0f)); } - let _e741 = phi_4182_; + let _e741 = phi_4192_; phi_1327_ = _e741; break; } @@ -962,11 +962,11 @@ fn function() { let _e821 = abs(_e684.y); let _e823 = (_e821 % 1f); if (_e821 >= 1f) { - phi_4195_ = select(true, false, (_e823 == 0f)); + phi_4270_ = select(true, false, (_e823 == 0f)); } else { - phi_4195_ = true; + phi_4270_ = true; } - let _e827 = phi_4195_; + let _e827 = phi_4270_; let _e828 = select(1f, _e823, _e827); if (select(-1f, 1f, (_e684.y >= 0f)) > 0f) { phi_1348_ = _e828; @@ -982,11 +982,11 @@ fn function() { let _e802 = ((select(select(u32(_e795), 0u, (_e795 < 0f)), 4294967295u, (_e795 > 4294967000f)) % 2u) == 0u); let _e804 = (_e795 % 1f); if (_e795 >= 1f) { - phi_4212_ = select(true, false, (_e804 == 0f)); + phi_4253_ = select(true, false, (_e804 == 0f)); } else { - phi_4212_ = true; + phi_4253_ = true; } - let _e808 = phi_4212_; + let _e808 = phi_4253_; let _e809 = select(1f, _e804, _e808); if (select(-1f, 1f, (_e684.y >= 0f)) > 0f) { if _e802 { @@ -1011,11 +1011,11 @@ fn function() { } case 0: { if (_e684.y > 1f) { - phi_4230_ = 0.9999999f; + phi_4240_ = 0.9999999f; } else { - phi_4230_ = select(_e684.y, 0.00000011920929f, (_e684.y < 0f)); + phi_4240_ = select(_e684.y, 0.00000011920929f, (_e684.y < 0f)); } - let _e792 = phi_4230_; + let _e792 = phi_4240_; phi_1385_ = _e792; break; } @@ -1033,11 +1033,11 @@ fn function() { let _e874 = select(_e871, vec4(1f, 1f, 1f, 1f), vec4(_e872)); let _e878 = select(_e114, _e113, vec2((_e289.member_13 == 0u))); if _e295 { - phi_4262_ = (_e289.member_8 <= (_e110 - 8u)); + phi_4306_ = (_e289.member_8 <= (_e110 - 8u)); } else { - phi_4262_ = false; + phi_4306_ = false; } - let _e883 = phi_4262_; + let _e883 = phi_4306_; if _e883 { let _e886 = global.member[_e289.member_8]; let _e890 = global.member[(_e289.member_8 + 1u)]; @@ -1095,11 +1095,11 @@ fn function() { let _e964 = abs(_e878.x); let _e966 = (_e964 % 1f); if (_e964 >= 1f) { - phi_4282_ = select(true, false, (_e966 == 0f)); + phi_4357_ = select(true, false, (_e966 == 0f)); } else { - phi_4282_ = true; + phi_4357_ = true; } - let _e970 = phi_4282_; + let _e970 = phi_4357_; let _e971 = select(1f, _e966, _e970); if (select(-1f, 1f, (_e878.x >= 0f)) > 0f) { phi_1510_ = _e971; @@ -1115,11 +1115,11 @@ fn function() { let _e945 = ((select(select(u32(_e938), 0u, (_e938 < 0f)), 4294967295u, (_e938 > 4294967000f)) % 2u) == 0u); let _e947 = (_e938 % 1f); if (_e938 >= 1f) { - phi_4299_ = select(true, false, (_e947 == 0f)); + phi_4340_ = select(true, false, (_e947 == 0f)); } else { - phi_4299_ = true; + phi_4340_ = true; } - let _e951 = phi_4299_; + let _e951 = phi_4340_; let _e952 = select(1f, _e947, _e951); if (select(-1f, 1f, (_e878.x >= 0f)) > 0f) { if _e945 { @@ -1144,11 +1144,11 @@ fn function() { } case 0: { if (_e878.x > 1f) { - phi_4317_ = 0.9999999f; + phi_4327_ = 0.9999999f; } else { - phi_4317_ = select(_e878.x, 0.00000011920929f, (_e878.x < 0f)); + phi_4327_ = select(_e878.x, 0.00000011920929f, (_e878.x < 0f)); } - let _e935 = phi_4317_; + let _e935 = phi_4327_; phi_1547_ = _e935; break; } @@ -1163,11 +1163,11 @@ fn function() { let _e1015 = abs(_e878.y); let _e1017 = (_e1015 % 1f); if (_e1015 >= 1f) { - phi_4330_ = select(true, false, (_e1017 == 0f)); + phi_4405_ = select(true, false, (_e1017 == 0f)); } else { - phi_4330_ = true; + phi_4405_ = true; } - let _e1021 = phi_4330_; + let _e1021 = phi_4405_; let _e1022 = select(1f, _e1017, _e1021); if (select(-1f, 1f, (_e878.y >= 0f)) > 0f) { phi_1568_ = _e1022; @@ -1183,11 +1183,11 @@ fn function() { let _e996 = ((select(select(u32(_e989), 0u, (_e989 < 0f)), 4294967295u, (_e989 > 4294967000f)) % 2u) == 0u); let _e998 = (_e989 % 1f); if (_e989 >= 1f) { - phi_4347_ = select(true, false, (_e998 == 0f)); + phi_4388_ = select(true, false, (_e998 == 0f)); } else { - phi_4347_ = true; + phi_4388_ = true; } - let _e1002 = phi_4347_; + let _e1002 = phi_4388_; let _e1003 = select(1f, _e998, _e1002); if (select(-1f, 1f, (_e878.y >= 0f)) > 0f) { if _e996 { @@ -1212,11 +1212,11 @@ fn function() { } case 0: { if (_e878.y > 1f) { - phi_4365_ = 0.9999999f; + phi_4375_ = 0.9999999f; } else { - phi_4365_ = select(_e878.y, 0.00000011920929f, (_e878.y < 0f)); + phi_4375_ = select(_e878.y, 0.00000011920929f, (_e878.y < 0f)); } - let _e986 = phi_4365_; + let _e986 = phi_4375_; phi_1605_ = _e986; break; } @@ -1232,11 +1232,11 @@ fn function() { let _e1065 = textureSampleLevel(global_10, global_9, vec2(_e1059.x, _e1059.y), i32(_e1059.z), 0f); let _e1072 = select(_e114, _e113, vec2((_e289.member_14 == 0u))); if _e295 { - phi_4397_ = (_e289.member_9 <= (_e110 - 8u)); + phi_4441_ = (_e289.member_9 <= (_e110 - 8u)); } else { - phi_4397_ = false; + phi_4441_ = false; } - let _e1077 = phi_4397_; + let _e1077 = phi_4441_; if _e1077 { let _e1080 = global.member[_e289.member_9]; let _e1084 = global.member[(_e289.member_9 + 1u)]; @@ -1294,11 +1294,11 @@ fn function() { let _e1158 = abs(_e1072.x); let _e1160 = (_e1158 % 1f); if (_e1158 >= 1f) { - phi_4417_ = select(true, false, (_e1160 == 0f)); + phi_4492_ = select(true, false, (_e1160 == 0f)); } else { - phi_4417_ = true; + phi_4492_ = true; } - let _e1164 = phi_4417_; + let _e1164 = phi_4492_; let _e1165 = select(1f, _e1160, _e1164); if (select(-1f, 1f, (_e1072.x >= 0f)) > 0f) { phi_1730_ = _e1165; @@ -1314,11 +1314,11 @@ fn function() { let _e1139 = ((select(select(u32(_e1132), 0u, (_e1132 < 0f)), 4294967295u, (_e1132 > 4294967000f)) % 2u) == 0u); let _e1141 = (_e1132 % 1f); if (_e1132 >= 1f) { - phi_4434_ = select(true, false, (_e1141 == 0f)); + phi_4475_ = select(true, false, (_e1141 == 0f)); } else { - phi_4434_ = true; + phi_4475_ = true; } - let _e1145 = phi_4434_; + let _e1145 = phi_4475_; let _e1146 = select(1f, _e1141, _e1145); if (select(-1f, 1f, (_e1072.x >= 0f)) > 0f) { if _e1139 { @@ -1343,11 +1343,11 @@ fn function() { } case 0: { if (_e1072.x > 1f) { - phi_4452_ = 0.9999999f; + phi_4462_ = 0.9999999f; } else { - phi_4452_ = select(_e1072.x, 0.00000011920929f, (_e1072.x < 0f)); + phi_4462_ = select(_e1072.x, 0.00000011920929f, (_e1072.x < 0f)); } - let _e1129 = phi_4452_; + let _e1129 = phi_4462_; phi_1767_ = _e1129; break; } @@ -1362,11 +1362,11 @@ fn function() { let _e1209 = abs(_e1072.y); let _e1211 = (_e1209 % 1f); if (_e1209 >= 1f) { - phi_4465_ = select(true, false, (_e1211 == 0f)); + phi_4540_ = select(true, false, (_e1211 == 0f)); } else { - phi_4465_ = true; + phi_4540_ = true; } - let _e1215 = phi_4465_; + let _e1215 = phi_4540_; let _e1216 = select(1f, _e1211, _e1215); if (select(-1f, 1f, (_e1072.y >= 0f)) > 0f) { phi_1788_ = _e1216; @@ -1382,11 +1382,11 @@ fn function() { let _e1190 = ((select(select(u32(_e1183), 0u, (_e1183 < 0f)), 4294967295u, (_e1183 > 4294967000f)) % 2u) == 0u); let _e1192 = (_e1183 % 1f); if (_e1183 >= 1f) { - phi_4482_ = select(true, false, (_e1192 == 0f)); + phi_4523_ = select(true, false, (_e1192 == 0f)); } else { - phi_4482_ = true; + phi_4523_ = true; } - let _e1196 = phi_4482_; + let _e1196 = phi_4523_; let _e1197 = select(1f, _e1192, _e1196); if (select(-1f, 1f, (_e1072.y >= 0f)) > 0f) { if _e1190 { @@ -1411,11 +1411,11 @@ fn function() { } case 0: { if (_e1072.y > 1f) { - phi_4500_ = 0.9999999f; + phi_4510_ = 0.9999999f; } else { - phi_4500_ = select(_e1072.y, 0.00000011920929f, (_e1072.y < 0f)); + phi_4510_ = select(_e1072.y, 0.00000011920929f, (_e1072.y < 0f)); } - let _e1180 = phi_4500_; + let _e1180 = phi_4510_; phi_1825_ = _e1180; break; } @@ -1439,42 +1439,42 @@ fn function() { let _e1268 = fma(_e874.z, 2f, -1f); let _e1273 = sqrt(fma(_e1268, _e1268, fma(_e1266, _e1266, (_e1267 * _e1267)))); if (_e1273 == 0f) { - phi_4554_ = vec3(0f, 0f, 0f); + phi_4598_ = vec3(0f, 0f, 0f); } else { - phi_4554_ = (vec3(_e1266, _e1267, _e1268) * (1f / _e1273)); + phi_4598_ = (vec3(_e1266, _e1267, _e1268) * (1f / _e1273)); } - let _e1278 = phi_4554_; + let _e1278 = phi_4598_; let _e1285 = sqrt(fma(_e116.z, _e116.z, fma(_e116.x, _e116.x, (_e116.y * _e116.y)))); if (_e1285 == 0f) { - phi_4589_ = vec3(0f, 0f, 0f); + phi_4633_ = vec3(0f, 0f, 0f); } else { - phi_4589_ = (_e116 * (1f / _e1285)); + phi_4633_ = (_e116 * (1f / _e1285)); } - let _e1290 = phi_4589_; + let _e1290 = phi_4633_; let _e1297 = sqrt(fma(_e117.z, _e117.z, fma(_e117.x, _e117.x, (_e117.y * _e117.y)))); if (_e1297 == 0f) { - phi_4624_ = vec3(0f, 0f, 0f); + phi_4668_ = vec3(0f, 0f, 0f); } else { - phi_4624_ = (_e117 * (1f / _e1297)); + phi_4668_ = (_e117 * (1f / _e1297)); } - let _e1302 = phi_4624_; + let _e1302 = phi_4668_; let _e1309 = sqrt(fma(_e115.z, _e115.z, fma(_e115.x, _e115.x, (_e115.y * _e115.y)))); if (_e1309 == 0f) { - phi_4659_ = vec3(0f, 0f, 0f); + phi_4703_ = vec3(0f, 0f, 0f); } else { - phi_4659_ = (_e115 * (1f / _e1309)); + phi_4703_ = (_e115 * (1f / _e1309)); } - let _e1314 = phi_4659_; + let _e1314 = phi_4703_; let _e1333 = fma(_e1314.x, _e1278.z, fma(_e1290.x, _e1278.x, (_e1302.x * _e1278.y))); let _e1334 = fma(_e1314.y, _e1278.z, fma(_e1290.y, _e1278.x, (_e1302.y * _e1278.y))); let _e1335 = fma(_e1314.z, _e1278.z, fma(_e1290.z, _e1278.x, (_e1302.z * _e1278.y))); let _e1340 = sqrt(fma(_e1335, _e1335, fma(_e1333, _e1333, (_e1334 * _e1334)))); if (_e1340 == 0f) { - phi_4694_ = vec3(0f, 0f, 0f); + phi_4738_ = vec3(0f, 0f, 0f); } else { - phi_4694_ = (vec3(_e1333, _e1334, _e1335) * (1f / _e1340)); + phi_4738_ = (vec3(_e1333, _e1334, _e1335) * (1f / _e1340)); } - let _e1345 = phi_4694_; + let _e1345 = phi_4738_; phi_1919_ = _e1278; phi_1920_ = _e1345; } @@ -1494,11 +1494,11 @@ fn function() { let _e1390 = (_e1262.z * _e289.member.z); let _e1395 = textureSampleLevel(global_11, global_12, _e1349, 0f); if (_e110 >= 83u) { - phi_4726_ = (_e122 <= (_e110 - 83u)); + phi_4770_ = (_e122 <= (_e110 - 83u)); } else { - phi_4726_ = false; + phi_4770_ = false; } - let _e1403 = phi_4726_; + let _e1403 = phi_4770_; if _e1403 { let _e1406 = global.member[_e122]; let _e1411 = global.member[(_e122 + 1u)]; @@ -1541,16 +1541,16 @@ fn function() { let _e1591 = phi_2127_; if (_e1591.member < _e1591.member_1) { phi_2128_ = type_24((_e1591.member + 1u), _e1591.member_1); - phi_2143_ = type_24(1u, _e1591.member); + phi_2151_ = type_24(1u, _e1591.member); } else { phi_2128_ = _e1591; - phi_2143_ = type_24(0u, type_24().member_1); + phi_2151_ = type_24(0u, type_24().member_1); } let _e1604 = phi_2128_; - let _e1606 = phi_2143_; + let _e1606 = phi_2151_; switch bitcast(_e1606.member) { case 0: { - phi_2170_ = false; + phi_2178_ = false; break; } case 1: { @@ -1560,15 +1560,15 @@ fn function() { let _e1624 = global.member[(_e1611 + 2u)]; let _e1629 = global.member[(_e1611 + 3u)]; local_1[_e1606.member_1] = vec4(bitcast(_e1614), bitcast(_e1619), bitcast(_e1624), bitcast(_e1629)); - phi_2170_ = true; + phi_2178_ = true; break; } default: { - phi_2170_ = bool(); + phi_2178_ = bool(); break; } } - let _e1634 = phi_2170_; + let _e1634 = phi_2178_; continue; continuing { phi_2127_ = _e1604; @@ -1577,21 +1577,21 @@ fn function() { } let _e1636 = local_1; local = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_2176_ = type_24(0u, 8u); + phi_2184_ = type_24(0u, 8u); loop { - let _e1639 = phi_2176_; + let _e1639 = phi_2184_; if (_e1639.member < _e1639.member_1) { - phi_2177_ = type_24((_e1639.member + 1u), _e1639.member_1); - phi_2192_ = type_24(1u, _e1639.member); + phi_2185_ = type_24((_e1639.member + 1u), _e1639.member_1); + phi_2208_ = type_24(1u, _e1639.member); } else { - phi_2177_ = _e1639; - phi_2192_ = type_24(0u, type_24().member_1); + phi_2185_ = _e1639; + phi_2208_ = type_24(0u, type_24().member_1); } - let _e1652 = phi_2177_; - let _e1654 = phi_2192_; + let _e1652 = phi_2185_; + let _e1654 = phi_2208_; switch bitcast(_e1654.member) { case 0: { - phi_2215_ = false; + phi_2231_ = false; break; } case 1: { @@ -1600,156 +1600,156 @@ fn function() { let _e1667 = global.member[(_e1659 + 1u)]; let _e1672 = global.member[(_e1659 + 2u)]; local[_e1654.member_1] = vec3(bitcast(_e1662), bitcast(_e1667), bitcast(_e1672)); - phi_2215_ = true; + phi_2231_ = true; break; } default: { - phi_2215_ = bool(); + phi_2231_ = bool(); break; } } - let _e1677 = phi_2215_; + let _e1677 = phi_2231_; continue; continuing { - phi_2176_ = _e1652; + phi_2184_ = _e1652; break if !(_e1677); } } let _e1679 = local; - phi_2223_ = type_22(type_20(vec4(bitcast(_e1406), bitcast(_e1411), bitcast(_e1416), bitcast(_e1421)), vec4(bitcast(_e1427), bitcast(_e1432), bitcast(_e1437), bitcast(_e1442)), vec4(bitcast(_e1448), bitcast(_e1453), bitcast(_e1458), bitcast(_e1463)), vec4(bitcast(_e1469), bitcast(_e1474), bitcast(_e1479), bitcast(_e1484))), type_20(vec4(bitcast(_e1491), bitcast(_e1496), bitcast(_e1501), bitcast(_e1506)), vec4(bitcast(_e1512), bitcast(_e1517), bitcast(_e1522), bitcast(_e1527)), vec4(bitcast(_e1533), bitcast(_e1538), bitcast(_e1543), bitcast(_e1548)), vec4(bitcast(_e1554), bitcast(_e1559), bitcast(_e1564), bitcast(_e1569))), type_21(_e1679, _e1636), vec3(bitcast(_e1576), bitcast(_e1581), bitcast(_e1586))); + phi_2239_ = type_22(type_20(vec4(bitcast(_e1406), bitcast(_e1411), bitcast(_e1416), bitcast(_e1421)), vec4(bitcast(_e1427), bitcast(_e1432), bitcast(_e1437), bitcast(_e1442)), vec4(bitcast(_e1448), bitcast(_e1453), bitcast(_e1458), bitcast(_e1463)), vec4(bitcast(_e1469), bitcast(_e1474), bitcast(_e1479), bitcast(_e1484))), type_20(vec4(bitcast(_e1491), bitcast(_e1496), bitcast(_e1501), bitcast(_e1506)), vec4(bitcast(_e1512), bitcast(_e1517), bitcast(_e1522), bitcast(_e1527)), vec4(bitcast(_e1533), bitcast(_e1538), bitcast(_e1543), bitcast(_e1548)), vec4(bitcast(_e1554), bitcast(_e1559), bitcast(_e1564), bitcast(_e1569))), type_21(_e1679, _e1636), vec3(bitcast(_e1576), bitcast(_e1581), bitcast(_e1586))); } else { - phi_2223_ = type_22(type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_21(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_2239_ = type_22(type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_21(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e1683 = phi_2223_; + let _e1683 = phi_2239_; let _e1685 = (_e1683.member_3 - _e118); let _e1692 = sqrt(fma(_e1685.z, _e1685.z, fma(_e1685.x, _e1685.x, (_e1685.y * _e1685.y)))); let _e1693 = (_e1692 == 0f); if _e1693 { - phi_4798_ = vec3(0f, 0f, 0f); + phi_4842_ = vec3(0f, 0f, 0f); } else { - phi_4798_ = (_e1685 * (1f / _e1692)); + phi_4842_ = (_e1685 * (1f / _e1692)); } - let _e1697 = phi_4798_; + let _e1697 = phi_4842_; let _e1698 = -(_e1697); let _e1705 = sqrt(fma(_e1349.z, _e1349.z, fma(_e1349.x, _e1349.x, (_e1349.y * _e1349.y)))); let _e1706 = (_e1705 == 0f); if _e1706 { - phi_4857_ = vec3(0f, 0f, 0f); + phi_4901_ = vec3(0f, 0f, 0f); } else { - phi_4857_ = (_e1349 * (1f / _e1705)); + phi_4901_ = (_e1349 * (1f / _e1705)); } - let _e1710 = phi_4857_; + let _e1710 = phi_4901_; let _e1720 = (2f * fma(_e1710.z, _e1698.z, fma(_e1710.x, _e1698.x, (_e1710.y * _e1698.y)))); let _e1727 = textureSampleLevel(global_13, global_14, (_e1698 - vec3((_e1720 * _e1710.x), (_e1720 * _e1710.y), (_e1720 * _e1710.z))), (_e1373 * 4f)); if _e1693 { - phi_4931_ = vec3(0f, 0f, 0f); + phi_4975_ = vec3(0f, 0f, 0f); } else { - phi_4931_ = (_e1685 * (1f / _e1692)); + phi_4975_ = (_e1685 * (1f / _e1692)); } - let _e1734 = phi_4931_; + let _e1734 = phi_4975_; let _e1743 = textureSampleLevel(global_15, global_16, vec2(max(fma(_e1349.z, _e1734.z, fma(_e1349.x, _e1734.x, (_e1349.y * _e1734.y))), 0f), _e1373), 0f); switch bitcast(_e144) { case 0: { if _e289.member_15 { if _e1706 { - phi_4981_ = vec3(0f, 0f, 0f); + phi_5368_ = vec3(0f, 0f, 0f); } else { - phi_4981_ = (_e1349 * (1f / _e1705)); + phi_5368_ = (_e1349 * (1f / _e1705)); } - let _e1912 = phi_4981_; + let _e1912 = phi_5368_; if _e1693 { - phi_5016_ = vec3(0f, 0f, 0f); + phi_5403_ = vec3(0f, 0f, 0f); } else { - phi_5016_ = (_e1685 * (1f / _e1692)); + phi_5403_ = (_e1685 * (1f / _e1692)); } - let _e1916 = phi_5016_; - phi_2263_ = type_24(0u, _e157); - phi_2266_ = vec3(0f, 0f, 0f); + let _e1916 = phi_5403_; + phi_2279_ = type_24(0u, _e157); + phi_2282_ = vec3(0f, 0f, 0f); loop { - let _e1919 = phi_2263_; - let _e1921 = phi_2266_; + let _e1919 = phi_2279_; + let _e1921 = phi_2282_; local_2 = _e1921; local_3 = _e1921; local_4 = _e1921; if (_e1919.member < _e1919.member_1) { - phi_2264_ = type_24((_e1919.member + 1u), _e1919.member_1); - phi_2281_ = type_24(1u, _e1919.member); + phi_2280_ = type_24((_e1919.member + 1u), _e1919.member_1); + phi_2305_ = type_24(1u, _e1919.member); } else { - phi_2264_ = _e1919; - phi_2281_ = type_24(0u, type_24().member_1); + phi_2280_ = _e1919; + phi_2305_ = type_24(0u, type_24().member_1); } - let _e1934 = phi_2264_; - let _e1936 = phi_2281_; + let _e1934 = phi_2280_; + let _e1936 = phi_2305_; switch bitcast(_e1936.member) { case 0: { - phi_2267_ = vec3(); - phi_3136_ = false; + phi_2283_ = vec3(); + phi_3176_ = false; break; } case 1: { if (_e1936.member_1 >= _e157) { - phi_5033_ = 4294967295u; + phi_5420_ = 4294967295u; } else { - phi_5033_ = (_e153 + _e1936.member_1); + phi_5420_ = (_e153 + _e1936.member_1); } - let _e1943 = phi_5033_; + let _e1943 = phi_5420_; if (_e110 >= 1u) { - phi_5052_ = (_e1943 <= (_e110 - 1u)); + phi_5439_ = (_e1943 <= (_e110 - 1u)); } else { - phi_5052_ = false; + phi_5439_ = false; } - let _e1948 = phi_5052_; + let _e1948 = phi_5439_; if _e1948 { let _e1951 = global.member[_e1943]; - phi_2298_ = _e1951; + phi_2322_ = _e1951; } else { - phi_2298_ = 4294967295u; + phi_2322_ = 4294967295u; } - let _e1953 = phi_2298_; + let _e1953 = phi_2322_; let _e1954 = (_e1953 == 4294967295u); if _e1954 { - phi_3134_ = vec3(); + phi_3174_ = vec3(); } else { if (_e110 >= 3u) { - phi_5084_ = (_e1953 <= (_e110 - 3u)); + phi_5471_ = (_e1953 <= (_e110 - 3u)); } else { - phi_5084_ = false; + phi_5471_ = false; } - let _e1959 = phi_5084_; + let _e1959 = phi_5471_; if _e1959 { let _e1962 = global.member[_e1953]; switch bitcast(_e1962) { case 0: { - phi_2315_ = 0u; + phi_2339_ = 0u; break; } case 1: { - phi_2315_ = 1u; + phi_2339_ = 1u; break; } case 2: { - phi_2315_ = 2u; + phi_2339_ = 2u; break; } default: { - phi_2315_ = 0u; + phi_2339_ = 0u; break; } } - let _e1965 = phi_2315_; + let _e1965 = phi_2339_; let _e1969 = global.member[(_e1953 + 1u)]; let _e1973 = global.member[(_e1953 + 2u)]; - phi_2325_ = type_33(_e1965, _e1969, _e1973); + phi_2349_ = type_33(_e1965, _e1969, _e1973); } else { - phi_2325_ = type_33(0u, 4294967295u, 4294967295u); + phi_2349_ = type_33(0u, 4294967295u, 4294967295u); } - let _e1976 = phi_2325_; + let _e1976 = phi_2349_; if (_e110 >= 10u) { - phi_5114_ = (_e1976.member_2 <= (_e110 - 10u)); + phi_5501_ = (_e1976.member_2 <= (_e110 - 10u)); } else { - phi_5114_ = false; + phi_5501_ = false; } - let _e1982 = phi_5114_; + let _e1982 = phi_5501_; if _e1982 { let _e1985 = global.member[_e1976.member_2]; let _e1990 = global.member[(_e1976.member_2 + 1u)]; @@ -1761,11 +1761,11 @@ fn function() { let _e2022 = global.member[(_e1976.member_2 + 7u)]; let _e2027 = global.member[(_e1976.member_2 + 8u)]; let _e2032 = global.member[(_e1976.member_2 + 9u)]; - phi_2375_ = type_29(vec3(bitcast(_e1985), bitcast(_e1990), bitcast(_e1995)), vec4(bitcast(_e2001), bitcast(_e2006), bitcast(_e2011), bitcast(_e2016)), vec3(bitcast(_e2022), bitcast(_e2027), bitcast(_e2032))); + phi_2399_ = type_29(vec3(bitcast(_e1985), bitcast(_e1990), bitcast(_e1995)), vec4(bitcast(_e2001), bitcast(_e2006), bitcast(_e2011), bitcast(_e2016)), vec3(bitcast(_e2022), bitcast(_e2027), bitcast(_e2032))); } else { - phi_2375_ = type_29(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); + phi_2399_ = type_29(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); } - let _e2037 = phi_2375_; + let _e2037 = phi_2399_; let _e2045 = (_e2037.member_1.x + _e2037.member_1.x); let _e2046 = (_e2037.member_1.y + _e2037.member_1.y); let _e2047 = (_e2037.member_1.z + _e2037.member_1.z); @@ -1779,11 +1779,11 @@ fn function() { switch bitcast(_e1976.member) { case 0: { if _e295 { - phi_5194_ = (_e1976.member_1 <= (_e110 - 8u)); + phi_5967_ = (_e1976.member_1 <= (_e110 - 8u)); } else { - phi_5194_ = false; + phi_5967_ = false; } - let _e2572 = phi_5194_; + let _e2572 = phi_5967_; if _e2572 { let _e2575 = global.member[_e1976.member_1]; let _e2580 = global.member[(_e1976.member_1 + 1u)]; @@ -1793,21 +1793,21 @@ fn function() { let _e2601 = global.member[(_e1976.member_1 + 5u)]; let _e2606 = global.member[(_e1976.member_1 + 6u)]; let _e2612 = global.member[(_e1976.member_1 + 7u)]; - phi_2423_ = type_34(vec3(bitcast(_e2575), bitcast(_e2580), bitcast(_e2585)), vec4(bitcast(_e2591), bitcast(_e2596), bitcast(_e2601), bitcast(_e2606)), bitcast(_e2612)); + phi_2447_ = type_34(vec3(bitcast(_e2575), bitcast(_e2580), bitcast(_e2585)), vec4(bitcast(_e2591), bitcast(_e2596), bitcast(_e2601), bitcast(_e2606)), bitcast(_e2612)); } else { - phi_2423_ = type_34(vec3(0f, -1f, 0f), vec4(1f, 1f, 1f, 1f), 1f); + phi_2447_ = type_34(vec3(0f, -1f, 0f), vec4(1f, 1f, 1f, 1f), 1f); } - let _e2616 = phi_2423_; + let _e2616 = phi_2447_; let _e2638 = fma(_e2076.x, _e2616.member.z, fma(_e2074.x, _e2616.member.y, (_e2072.x * _e2616.member.x))); let _e2639 = fma(_e2076.y, _e2616.member.z, fma(_e2074.y, _e2616.member.y, (_e2072.y * _e2616.member.x))); let _e2640 = fma(_e2076.z, _e2616.member.z, fma(_e2074.z, _e2616.member.y, (_e2072.z * _e2616.member.x))); let _e2645 = sqrt(fma(_e2640, _e2640, fma(_e2638, _e2638, (_e2639 * _e2639)))); if (_e2645 == 0f) { - phi_5242_ = vec3(0f, 0f, 0f); + phi_6014_ = vec3(0f, 0f, 0f); } else { - phi_5242_ = (vec3(_e2638, _e2639, _e2640) * (1f / _e2645)); + phi_6014_ = (vec3(_e2638, _e2639, _e2640) * (1f / _e2645)); } - let _e2650 = phi_5242_; + let _e2650 = phi_6014_; let _e2652 = -(_e2650.x); let _e2654 = -(_e2650.y); let _e2656 = -(_e2650.z); @@ -1819,11 +1819,11 @@ fn function() { let _e2673 = (_e1916 + vec3(_e2652, _e2654, _e2656)); let _e2680 = sqrt(fma(_e2673.z, _e2673.z, fma(_e2673.x, _e2673.x, (_e2673.y * _e2673.y)))); if (_e2680 == 0f) { - phi_5277_ = vec3(0f, 0f, 0f); + phi_6049_ = vec3(0f, 0f, 0f); } else { - phi_5277_ = (_e2673 * (1f / _e2680)); + phi_6049_ = (_e2673 * (1f / _e2680)); } - let _e2685 = phi_5277_; + let _e2685 = phi_6049_; let _e2686 = (_e1373 * _e1373); let _e2697 = max(fma(_e1912.z, _e2685.z, fma(_e1912.x, _e2685.x, (_e1912.y * _e2685.y))), 0f); let _e2710 = max(fma(_e1912.z, _e1916.z, fma(_e1912.x, _e1916.x, (_e1912.y * _e1916.y))), 0f); @@ -1841,17 +1841,17 @@ fn function() { let _e2750 = (((_e2686 * _e2686) / (pow(fma((_e2697 * _e2697), fma(_e2686, _e2686, -1f), 1f), 2f) * 3.1415927f)) * ((_e2710 / fma(_e2710, _e2722, _e2720)) * (_e2717 / fma(_e2717, _e2722, _e2720)))); let _e2757 = max(fma(_e1912.z, _e2656, fma(_e1912.x, _e2652, (_e1912.y * _e2654))), 0f); let _e2759 = fma((4f * _e2710), _e2757, 0.0001f); - phi_3124_ = vec3(fma((fma((((1f - _e2741) * _e2659) * _e1364), 0.31830987f, ((_e2750 * _e2741) / _e2759)) * (_e2616.member_1.x * _e2616.member_2)), _e2757, _e1921.x), fma((fma((((1f - _e2742) * _e2659) * _e1366), 0.31830987f, ((_e2750 * _e2742) / _e2759)) * (_e2616.member_1.y * _e2616.member_2)), _e2757, _e1921.y), fma((fma((((1f - _e2743) * _e2659) * _e1368), 0.31830987f, ((_e2750 * _e2743) / _e2759)) * (_e2616.member_1.z * _e2616.member_2)), _e2757, _e1921.z)); - phi_3125_ = true; + phi_3164_ = vec3(fma((fma((((1f - _e2741) * _e2659) * _e1364), 0.31830987f, ((_e2750 * _e2741) / _e2759)) * (_e2616.member_1.x * _e2616.member_2)), _e2757, _e1921.x), fma((fma((((1f - _e2742) * _e2659) * _e1366), 0.31830987f, ((_e2750 * _e2742) / _e2759)) * (_e2616.member_1.y * _e2616.member_2)), _e2757, _e1921.y), fma((fma((((1f - _e2743) * _e2659) * _e1368), 0.31830987f, ((_e2750 * _e2743) / _e2759)) * (_e2616.member_1.z * _e2616.member_2)), _e2757, _e1921.z)); + phi_3165_ = true; break; } case 1: { if _e295 { - phi_5369_ = (_e1976.member_1 <= (_e110 - 8u)); + phi_5793_ = (_e1976.member_1 <= (_e110 - 8u)); } else { - phi_5369_ = false; + phi_5793_ = false; } - let _e2361 = phi_5369_; + let _e2361 = phi_5793_; if _e2361 { let _e2364 = global.member[_e1976.member_1]; let _e2369 = global.member[(_e1976.member_1 + 1u)]; @@ -1861,23 +1861,23 @@ fn function() { let _e2390 = global.member[(_e1976.member_1 + 5u)]; let _e2395 = global.member[(_e1976.member_1 + 6u)]; let _e2401 = global.member[(_e1976.member_1 + 7u)]; - phi_2626_ = type_34(vec3(bitcast(_e2364), bitcast(_e2369), bitcast(_e2374)), vec4(bitcast(_e2380), bitcast(_e2385), bitcast(_e2390), bitcast(_e2395)), bitcast(_e2401)); + phi_2654_ = type_34(vec3(bitcast(_e2364), bitcast(_e2369), bitcast(_e2374)), vec4(bitcast(_e2380), bitcast(_e2385), bitcast(_e2390), bitcast(_e2395)), bitcast(_e2401)); } else { - phi_2626_ = type_34(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), 1f); + phi_2654_ = type_34(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), 1f); } - let _e2405 = phi_2626_; + let _e2405 = phi_2654_; let _e2434 = (vec3((_e2037.member.x + fma(_e2076.x, _e2405.member.z, fma(_e2074.x, _e2405.member.y, (_e2072.x * _e2405.member.x)))), (_e2037.member.y + fma(_e2076.y, _e2405.member.z, fma(_e2074.y, _e2405.member.y, (_e2072.y * _e2405.member.x)))), (_e2037.member.z + fma(_e2076.z, _e2405.member.z, fma(_e2074.z, _e2405.member.y, (_e2072.z * _e2405.member.x))))) - _e118); let _e2441 = sqrt(fma(_e2434.z, _e2434.z, fma(_e2434.x, _e2434.x, (_e2434.y * _e2434.y)))); let _e2442 = (_e2441 == 0f); if _e2442 { - phi_2812_ = vec3(); + phi_2844_ = vec3(); } else { if _e2442 { - phi_5415_ = vec3(0f, 0f, 0f); + phi_5840_ = vec3(0f, 0f, 0f); } else { - phi_5415_ = (_e2434 * (1f / _e2441)); + phi_5840_ = (_e2434 * (1f / _e2441)); } - let _e2446 = phi_5415_; + let _e2446 = phi_5840_; let _e2448 = (_e2405.member_2 / (_e2441 * _e2441)); let _e2450 = fma(-(_e680.z), _e289.member_3, 1f); let _e2454 = fma(0.4f, _e2450, (_e1364 * _e1376)); @@ -1886,11 +1886,11 @@ fn function() { let _e2463 = (_e1916 + _e2446); let _e2470 = sqrt(fma(_e2463.z, _e2463.z, fma(_e2463.x, _e2463.x, (_e2463.y * _e2463.y)))); if (_e2470 == 0f) { - phi_5450_ = vec3(0f, 0f, 0f); + phi_5875_ = vec3(0f, 0f, 0f); } else { - phi_5450_ = (_e2463 * (1f / _e2470)); + phi_5875_ = (_e2463 * (1f / _e2470)); } - let _e2475 = phi_5450_; + let _e2475 = phi_5875_; let _e2476 = (_e1373 * _e1373); let _e2487 = max(fma(_e1912.z, _e2475.z, fma(_e1912.x, _e2475.x, (_e1912.y * _e2475.y))), 0f); let _e2500 = max(fma(_e1912.z, _e1916.z, fma(_e1912.x, _e1916.x, (_e1912.y * _e1916.y))), 0f); @@ -1907,20 +1907,20 @@ fn function() { let _e2533 = fma((1f - _e2456), _e2530, _e2456); let _e2540 = (((_e2476 * _e2476) / (pow(fma((_e2487 * _e2487), fma(_e2476, _e2476, -1f), 1f), 2f) * 3.1415927f)) * ((_e2500 / fma(_e2500, _e2512, _e2510)) * (_e2507 / fma(_e2507, _e2512, _e2510)))); let _e2545 = fma((4f * _e2500), _e2507, 0.0001f); - phi_2812_ = vec3(fma((fma((((1f - _e2531) * _e2450) * _e1364), 0.31830987f, ((_e2540 * _e2531) / _e2545)) * (_e2405.member_1.x * _e2448)), _e2507, _e1921.x), fma((fma((((1f - _e2532) * _e2450) * _e1366), 0.31830987f, ((_e2540 * _e2532) / _e2545)) * (_e2405.member_1.y * _e2448)), _e2507, _e1921.y), fma((fma((((1f - _e2533) * _e2450) * _e1368), 0.31830987f, ((_e2540 * _e2533) / _e2545)) * (_e2405.member_1.z * _e2448)), _e2507, _e1921.z)); + phi_2844_ = vec3(fma((fma((((1f - _e2531) * _e2450) * _e1364), 0.31830987f, ((_e2540 * _e2531) / _e2545)) * (_e2405.member_1.x * _e2448)), _e2507, _e1921.x), fma((fma((((1f - _e2532) * _e2450) * _e1366), 0.31830987f, ((_e2540 * _e2532) / _e2545)) * (_e2405.member_1.y * _e2448)), _e2507, _e1921.y), fma((fma((((1f - _e2533) * _e2450) * _e1368), 0.31830987f, ((_e2540 * _e2533) / _e2545)) * (_e2405.member_1.z * _e2448)), _e2507, _e1921.z)); } - let _e2566 = phi_2812_; - phi_3124_ = _e2566; - phi_3125_ = select(true, false, _e2442); + let _e2566 = phi_2844_; + phi_3164_ = _e2566; + phi_3165_ = select(true, false, _e2442); break; } case 2: { if (_e110 >= 13u) { - phi_5542_ = (_e1976.member_1 <= (_e110 - 13u)); + phi_5581_ = (_e1976.member_1 <= (_e110 - 13u)); } else { - phi_5542_ = false; + phi_5581_ = false; } - let _e2087 = phi_5542_; + let _e2087 = phi_5581_; if _e2087 { let _e2090 = global.member[_e1976.member_1]; let _e2095 = global.member[(_e1976.member_1 + 1u)]; @@ -1935,33 +1935,33 @@ fn function() { let _e2142 = global.member[(_e1976.member_1 + 10u)]; let _e2147 = global.member[(_e1976.member_1 + 11u)]; let _e2153 = global.member[(_e1976.member_1 + 12u)]; - phi_2875_ = type_35(vec3(bitcast(_e2090), bitcast(_e2095), bitcast(_e2100)), vec3(bitcast(_e2106), bitcast(_e2111), bitcast(_e2116)), bitcast(_e2122), bitcast(_e2127), vec4(bitcast(_e2132), bitcast(_e2137), bitcast(_e2142), bitcast(_e2147)), bitcast(_e2153)); + phi_2907_ = type_35(vec3(bitcast(_e2090), bitcast(_e2095), bitcast(_e2100)), vec3(bitcast(_e2106), bitcast(_e2111), bitcast(_e2116)), bitcast(_e2122), bitcast(_e2127), vec4(bitcast(_e2132), bitcast(_e2137), bitcast(_e2142), bitcast(_e2147)), bitcast(_e2153)); } else { - phi_2875_ = type_35(vec3(0f, 0f, 0f), vec3(0f, -1f, 0f), 1.0471976f, 1.5707964f, vec4(1f, 1f, 1f, 1f), 1f); + phi_2907_ = type_35(vec3(0f, 0f, 0f), vec3(0f, -1f, 0f), 1.0471976f, 1.5707964f, vec4(1f, 1f, 1f, 1f), 1f); } - let _e2157 = phi_2875_; + let _e2157 = phi_2907_; let _e2189 = (vec3((_e2037.member.x + fma(_e2076.x, _e2157.member.z, fma(_e2074.x, _e2157.member.y, (_e2072.x * _e2157.member.x)))), (_e2037.member.y + fma(_e2076.y, _e2157.member.z, fma(_e2074.y, _e2157.member.y, (_e2072.y * _e2157.member.x)))), (_e2037.member.z + fma(_e2076.z, _e2157.member.z, fma(_e2074.z, _e2157.member.y, (_e2072.z * _e2157.member.x))))) - _e118); let _e2196 = sqrt(fma(_e2189.z, _e2189.z, fma(_e2189.x, _e2189.x, (_e2189.y * _e2189.y)))); let _e2197 = (_e2196 == 0f); if _e2197 { - phi_3122_ = vec3(); + phi_3162_ = vec3(); } else { if _e2197 { - phi_5592_ = vec3(0f, 0f, 0f); + phi_5631_ = vec3(0f, 0f, 0f); } else { - phi_5592_ = (_e2189 * (1f / _e2196)); + phi_5631_ = (_e2189 * (1f / _e2196)); } - let _e2201 = phi_5592_; + let _e2201 = phi_5631_; let _e2211 = fma(_e2076.x, _e2157.member_1.z, fma(_e2074.x, _e2157.member_1.y, (_e2072.x * _e2157.member_1.x))); let _e2212 = fma(_e2076.y, _e2157.member_1.z, fma(_e2074.y, _e2157.member_1.y, (_e2072.y * _e2157.member_1.x))); let _e2213 = fma(_e2076.z, _e2157.member_1.z, fma(_e2074.z, _e2157.member_1.y, (_e2072.z * _e2157.member_1.x))); let _e2218 = sqrt(fma(_e2213, _e2213, fma(_e2211, _e2211, (_e2212 * _e2212)))); if (_e2218 == 0f) { - phi_5627_ = vec3(0f, 0f, 0f); + phi_5666_ = vec3(0f, 0f, 0f); } else { - phi_5627_ = (vec3(_e2211, _e2212, _e2213) * (1f / _e2218)); + phi_5666_ = (vec3(_e2211, _e2212, _e2213) * (1f / _e2218)); } - let _e2223 = phi_5627_; + let _e2223 = phi_5666_; let _e2235 = ((fma(_e2201.z, _e2223.z, fma(_e2201.x, _e2223.x, (_e2201.y * _e2223.y))) - _e2157.member_3) / (_e2157.member_2 - _e2157.member_3)); let _e2237 = select(_e2235, 0f, (_e2235 < 0f)); let _e2240 = (_e2157.member_5 * select(_e2237, 1f, (_e2237 > 1f))); @@ -1972,11 +1972,11 @@ fn function() { let _e2255 = (_e1916 + _e2201); let _e2262 = sqrt(fma(_e2255.z, _e2255.z, fma(_e2255.x, _e2255.x, (_e2255.y * _e2255.y)))); if (_e2262 == 0f) { - phi_5662_ = vec3(0f, 0f, 0f); + phi_5701_ = vec3(0f, 0f, 0f); } else { - phi_5662_ = (_e2255 * (1f / _e2262)); + phi_5701_ = (_e2255 * (1f / _e2262)); } - let _e2267 = phi_5662_; + let _e2267 = phi_5701_; let _e2268 = (_e1373 * _e1373); let _e2279 = max(fma(_e1912.z, _e2267.z, fma(_e1912.x, _e2267.x, (_e1912.y * _e2267.y))), 0f); let _e2292 = max(fma(_e1912.z, _e1916.z, fma(_e1912.x, _e1916.x, (_e1912.y * _e1916.y))), 0f); @@ -1993,40 +1993,40 @@ fn function() { let _e2322 = fma((1f - _e2248), _e2319, _e2248); let _e2329 = (((_e2268 * _e2268) / (pow(fma((_e2279 * _e2279), fma(_e2268, _e2268, -1f), 1f), 2f) * 3.1415927f)) * ((_e2292 / fma(_e2292, _e2301, _e2299)) * (_e2296 / fma(_e2296, _e2301, _e2299)))); let _e2334 = fma((4f * _e2292), _e2296, 0.0001f); - phi_3122_ = vec3(fma((fma((((1f - _e2320) * _e2242) * _e1364), 0.31830987f, ((_e2329 * _e2320) / _e2334)) * (_e2157.member_4.x * _e2240)), _e2296, _e1921.x), fma((fma((((1f - _e2321) * _e2242) * _e1366), 0.31830987f, ((_e2329 * _e2321) / _e2334)) * (_e2157.member_4.y * _e2240)), _e2296, _e1921.y), fma((fma((((1f - _e2322) * _e2242) * _e1368), 0.31830987f, ((_e2329 * _e2322) / _e2334)) * (_e2157.member_4.z * _e2240)), _e2296, _e1921.z)); + phi_3162_ = vec3(fma((fma((((1f - _e2320) * _e2242) * _e1364), 0.31830987f, ((_e2329 * _e2320) / _e2334)) * (_e2157.member_4.x * _e2240)), _e2296, _e1921.x), fma((fma((((1f - _e2321) * _e2242) * _e1366), 0.31830987f, ((_e2329 * _e2321) / _e2334)) * (_e2157.member_4.y * _e2240)), _e2296, _e1921.y), fma((fma((((1f - _e2322) * _e2242) * _e1368), 0.31830987f, ((_e2329 * _e2322) / _e2334)) * (_e2157.member_4.z * _e2240)), _e2296, _e1921.z)); } - let _e2355 = phi_3122_; - phi_3124_ = _e2355; - phi_3125_ = select(true, false, _e2197); + let _e2355 = phi_3162_; + phi_3164_ = _e2355; + phi_3165_ = select(true, false, _e2197); break; } default: { - phi_3124_ = vec3(); - phi_3125_ = bool(); + phi_3164_ = vec3(); + phi_3165_ = bool(); break; } } - let _e2780 = phi_3124_; - let _e2782 = phi_3125_; - phi_3134_ = select(_e2780, _e1921, vec3(select(true, false, _e2782))); + let _e2780 = phi_3164_; + let _e2782 = phi_3165_; + phi_3174_ = select(_e2780, _e1921, vec3(select(true, false, _e2782))); } - let _e2787 = phi_3134_; - phi_2267_ = _e2787; - phi_3136_ = select(true, false, _e1954); + let _e2787 = phi_3174_; + phi_2283_ = _e2787; + phi_3176_ = select(true, false, _e1954); break; } default: { - phi_2267_ = vec3(); - phi_3136_ = bool(); + phi_2283_ = vec3(); + phi_3176_ = bool(); break; } } - let _e2790 = phi_2267_; - let _e2792 = phi_3136_; + let _e2790 = phi_2283_; + let _e2792 = phi_3176_; continue; continuing { - phi_2263_ = _e1934; - phi_2266_ = _e2790; + phi_2279_ = _e1934; + phi_2282_ = _e2790; break if !(_e2792); } } @@ -2044,43 +2044,43 @@ fn function() { let _e2848 = local_2; let _e2852 = local_3; let _e2856 = local_4; - phi_3249_ = vec4(fma(_e1386, _e289.member_1, fma(fma(((1f - _e2826) * _e2795), (_e1395.x * _e1364), (_e1727.x * fma(_e2826, _e1743.x, _e1743.y))), _e1380, _e2848.x)), fma(_e1388, _e289.member_1, fma(fma(((1f - _e2827) * _e2795), (_e1395.y * _e1366), (_e1727.y * fma(_e2827, _e1743.x, _e1743.y))), _e1380, _e2852.y)), fma(_e1390, _e289.member_1, fma(fma(((1f - _e2828) * _e2795), (_e1395.z * _e1368), (_e1727.z * fma(_e2828, _e1743.x, _e1743.y))), _e1380, _e2856.z)), 1f); + phi_3293_ = vec4(fma(_e1386, _e289.member_1, fma(fma(((1f - _e2826) * _e2795), (_e1395.x * _e1364), (_e1727.x * fma(_e2826, _e1743.x, _e1743.y))), _e1380, _e2848.x)), fma(_e1388, _e289.member_1, fma(fma(((1f - _e2827) * _e2795), (_e1395.y * _e1366), (_e1727.y * fma(_e2827, _e1743.x, _e1743.y))), _e1380, _e2852.y)), fma(_e1390, _e289.member_1, fma(fma(((1f - _e2828) * _e2795), (_e1395.z * _e1368), (_e1727.z * fma(_e2828, _e1743.x, _e1743.y))), _e1380, _e2856.z)), 1f); } else { - phi_3249_ = (vec4((_e112.x * _e486.x), (_e112.y * _e486.y), (_e112.z * _e486.z), (_e112.w * _e486.w)) * _e289.member_2); + phi_3293_ = (vec4((_e112.x * _e486.x), (_e112.y * _e486.y), (_e112.z * _e486.z), (_e112.w * _e486.w)) * _e289.member_2); } - let _e2864 = phi_3249_; + let _e2864 = phi_3293_; global_17 = _e2864; break; } case 1: { let _e1885 = sqrt(fma(_e113.x, _e113.x, (_e113.y * _e113.y))); if (_e1885 == 0f) { - phi_5781_ = vec3(0f, 0f, 0f); + phi_5329_ = vec3(0f, 0f, 0f); } else { - phi_5781_ = (vec3(_e113.x, _e113.y, 0f) * (1f / _e1885)); + phi_5329_ = (vec3(_e113.x, _e113.y, 0f) * (1f / _e1885)); } - let _e1890 = phi_5781_; + let _e1890 = phi_5329_; global_17 = vec4(((_e1890.x + 1f) * 0.5f), ((_e1890.y + 1f) * 0.5f), ((_e1890.z + 1f) * 0.5f), 1f); break; } case 2: { let _e1864 = sqrt(fma(_e114.x, _e114.x, (_e114.y * _e114.y))); if (_e1864 == 0f) { - phi_5830_ = vec3(0f, 0f, 0f); + phi_5280_ = vec3(0f, 0f, 0f); } else { - phi_5830_ = (vec3(_e114.x, _e114.y, 0f) * (1f / _e1864)); + phi_5280_ = (vec3(_e114.x, _e114.y, 0f) * (1f / _e1864)); } - let _e1869 = phi_5830_; + let _e1869 = phi_5280_; global_17 = vec4(((_e1869.x + 1f) * 0.5f), ((_e1869.y + 1f) * 0.5f), ((_e1869.z + 1f) * 0.5f), 1f); break; } case 3: { if _e1706 { - phi_5879_ = vec3(0f, 0f, 0f); + phi_5231_ = vec3(0f, 0f, 0f); } else { - phi_5879_ = (_e1349 * (1f / _e1705)); + phi_5231_ = (_e1349 * (1f / _e1705)); } - let _e1848 = phi_5879_; + let _e1848 = phi_5231_; global_17 = vec4(((_e1848.x + 1f) * 0.5f), ((_e1848.y + 1f) * 0.5f), ((_e1848.z + 1f) * 0.5f), 1f); break; } @@ -2091,44 +2091,44 @@ fn function() { case 5: { let _e1829 = sqrt(fma(_e115.z, _e115.z, fma(_e115.x, _e115.x, (_e115.y * _e115.y)))); if (_e1829 == 0f) { - phi_5928_ = vec3(0f, 0f, 0f); + phi_5182_ = vec3(0f, 0f, 0f); } else { - phi_5928_ = (_e115 * (1f / _e1829)); + phi_5182_ = (_e115 * (1f / _e1829)); } - let _e1834 = phi_5928_; + let _e1834 = phi_5182_; global_17 = vec4(((_e1834.x + 1f) * 0.5f), ((_e1834.y + 1f) * 0.5f), ((_e1834.z + 1f) * 0.5f), 1f); break; } case 6: { let _e1807 = sqrt(fma(_e1347.z, _e1347.z, fma(_e1347.x, _e1347.x, (_e1347.y * _e1347.y)))); if (_e1807 == 0f) { - phi_5977_ = vec3(0f, 0f, 0f); + phi_5133_ = vec3(0f, 0f, 0f); } else { - phi_5977_ = (_e1347 * (1f / _e1807)); + phi_5133_ = (_e1347 * (1f / _e1807)); } - let _e1812 = phi_5977_; + let _e1812 = phi_5133_; global_17 = vec4(((_e1812.x + 1f) * 0.5f), ((_e1812.y + 1f) * 0.5f), ((_e1812.z + 1f) * 0.5f), 1f); break; } case 7: { let _e1785 = sqrt(fma(_e116.z, _e116.z, fma(_e116.x, _e116.x, (_e116.y * _e116.y)))); if (_e1785 == 0f) { - phi_6026_ = vec3(0f, 0f, 0f); + phi_5084_ = vec3(0f, 0f, 0f); } else { - phi_6026_ = (_e116 * (1f / _e1785)); + phi_5084_ = (_e116 * (1f / _e1785)); } - let _e1790 = phi_6026_; + let _e1790 = phi_5084_; global_17 = vec4(((_e1790.x + 1f) * 0.5f), ((_e1790.y + 1f) * 0.5f), ((_e1790.z + 1f) * 0.5f), 1f); break; } case 8: { let _e1763 = sqrt(fma(_e117.z, _e117.z, fma(_e117.x, _e117.x, (_e117.y * _e117.y)))); if (_e1763 == 0f) { - phi_6075_ = vec3(0f, 0f, 0f); + phi_5035_ = vec3(0f, 0f, 0f); } else { - phi_6075_ = (_e117 * (1f / _e1763)); + phi_5035_ = (_e117 * (1f / _e1763)); } - let _e1768 = phi_6075_; + let _e1768 = phi_5035_; global_17 = vec4(((_e1768.x + 1f) * 0.5f), ((_e1768.y + 1f) * 0.5f), ((_e1768.z + 1f) * 0.5f), 1f); break; } diff --git a/crates/renderling/shaders/stage-renderlet_vertex.spv b/crates/renderling/shaders/stage-renderlet_vertex.spv index 0f24ad1f..4c7b2b49 100644 Binary files a/crates/renderling/shaders/stage-renderlet_vertex.spv and b/crates/renderling/shaders/stage-renderlet_vertex.spv differ diff --git a/crates/renderling/shaders/stage-renderlet_vertex.wgsl b/crates/renderling/shaders/stage-renderlet_vertex.wgsl index 4d9508db..8b8cf8fa 100644 --- a/crates/renderling/shaders/stage-renderlet_vertex.wgsl +++ b/crates/renderling/shaders/stage-renderlet_vertex.wgsl @@ -89,131 +89,131 @@ fn function() { var local_4: array; var local_5: array; var phi_743_: u32; - var phi_2848_: bool; + var phi_2896_: bool; var phi_750_: u32; var phi_751_: u32; var phi_761_: u32; var phi_843_: type_24; var phi_844_: type_24; - var phi_859_: type_24; - var phi_872_: bool; - var phi_878_: type_24; - var phi_879_: type_24; - var phi_894_: type_24; - var phi_908_: bool; - var phi_914_: type_24; - var phi_917_: type_30; - var phi_915_: type_24; - var phi_932_: type_24; - var phi_949_: u32; - var phi_2878_: bool; - var phi_967_: type_24; - var phi_2904_: u32; - var phi_2923_: bool; - var phi_1017_: type_33; - var phi_1027_: u32; - var phi_2945_: bool; - var phi_1035_: f32; - var phi_918_: type_30; - var phi_1088_: bool; + var phi_867_: type_24; + var phi_880_: bool; + var phi_886_: type_24; + var phi_887_: type_24; + var phi_910_: type_24; + var phi_924_: bool; + var phi_930_: type_24; + var phi_933_: type_30; + var phi_931_: type_24; + var phi_956_: type_24; + var phi_973_: u32; + var phi_2926_: bool; + var phi_991_: type_24; + var phi_2952_: u32; + var phi_2971_: bool; + var phi_1041_: type_33; + var phi_1051_: u32; + var phi_2993_: bool; + var phi_1059_: f32; + var phi_934_: type_30; + var phi_1112_: bool; var local_6: type_30; var local_7: type_30; var local_8: type_30; - var phi_2968_: bool; - var phi_1212_: type_34; + var phi_3016_: bool; + var phi_1236_: type_34; var local_9: type_30; - var phi_1215_: type_24; - var phi_1218_: type_20; - var phi_1216_: type_24; - var phi_1233_: type_24; + var phi_1239_: type_24; + var phi_1242_: type_20; + var phi_1240_: type_24; + var phi_1265_: type_24; var local_10: type_30; - var phi_1257_: u32; - var phi_3002_: bool; - var phi_1266_: u32; - var phi_3026_: bool; - var phi_1315_: type_27; - var phi_1325_: u32; - var phi_3051_: bool; - var phi_1398_: type_20; - var phi_1219_: type_20; - var phi_1635_: bool; - var phi_3867_: bool; + var phi_1289_: u32; + var phi_3050_: bool; + var phi_1298_: u32; + var phi_3074_: bool; + var phi_1347_: type_27; + var phi_1357_: u32; + var phi_3099_: bool; + var phi_1430_: type_20; + var phi_1243_: type_20; + var phi_1667_: bool; + var phi_3915_: bool; var local_11: type_20; var local_12: type_20; var local_13: type_20; var local_14: type_20; - var phi_1662_: bool; - var phi_1664_: bool; - var phi_1665_: bool; - var phi_1666_: bool; - var phi_1667_: bool; + var phi_1694_: bool; + var phi_1696_: bool; + var phi_1697_: bool; + var phi_1698_: bool; + var phi_1699_: bool; var local_15: type_20; var local_16: type_20; var local_17: type_20; var local_18: type_20; - var phi_1701_: bool; - var phi_1703_: bool; - var phi_1704_: bool; - var phi_1705_: bool; - var phi_1706_: bool; + var phi_1733_: bool; + var phi_1735_: bool; + var phi_1736_: bool; + var phi_1737_: bool; + var phi_1738_: bool; var local_19: type_20; var local_20: type_20; var local_21: type_20; var local_22: type_20; - var phi_1740_: bool; - var phi_1742_: bool; - var phi_1743_: bool; - var phi_1744_: bool; - var phi_1745_: bool; + var phi_1772_: bool; + var phi_1774_: bool; + var phi_1775_: bool; + var phi_1776_: bool; + var phi_1777_: bool; var local_23: type_20; var local_24: type_20; var local_25: type_20; var local_26: type_20; - var phi_1779_: bool; - var phi_1781_: bool; - var phi_1782_: bool; - var phi_1783_: bool; - var phi_1784_: bool; - var phi_1789_: bool; - var phi_1791_: bool; - var phi_1792_: bool; - var phi_1793_: bool; - var phi_1794_: bool; - var phi_1802_: type_20; - var phi_3188_: bool; - var phi_3251_: vec4; - var phi_3281_: vec4; - var phi_3283_: vec4; - var phi_3294_: type_27; - var phi_3295_: type_27; - var phi_3298_: type_27; - var phi_3299_: type_27; - var phi_3300_: bool; - var phi_3304_: type_27; - var phi_1804_: type_27; - var phi_1806_: type_27; - var phi_1807_: bool; - var phi_3398_: bool; - var phi_1860_: type_27; - var phi_1861_: type_27; + var phi_1811_: bool; + var phi_1813_: bool; + var phi_1814_: bool; + var phi_1815_: bool; + var phi_1816_: bool; + var phi_1821_: bool; + var phi_1823_: bool; + var phi_1824_: bool; + var phi_1825_: bool; + var phi_1826_: bool; + var phi_1834_: type_20; + var phi_3234_: bool; + var phi_3299_: vec4; + var phi_3329_: vec4; + var phi_3331_: vec4; + var phi_3340_: type_27; + var phi_3341_: type_27; + var phi_3346_: type_27; + var phi_3347_: type_27; + var phi_3348_: bool; + var phi_3352_: type_27; + var phi_1836_: type_27; + var phi_1838_: type_27; + var phi_1839_: bool; + var phi_3446_: bool; + var phi_1892_: type_27; + var phi_1893_: type_27; var local_27: type_30; - var phi_1905_: vec3; + var phi_1937_: vec3; var local_28: type_30; - var phi_3442_: vec3; - var phi_3524_: vec3; - var phi_3559_: vec3; + var phi_3490_: vec3; + var phi_3572_: vec3; + var phi_3607_: vec3; var local_29: type_30; var local_30: type_30; - var phi_3572_: bool; - var phi_2229_: type_24; - var phi_2230_: type_24; - var phi_2245_: type_24; - var phi_2272_: bool; - var phi_2278_: type_24; - var phi_2279_: type_24; - var phi_2294_: type_24; - var phi_2317_: bool; - var phi_2325_: type_22; + var phi_3620_: bool; + var phi_2261_: type_24; + var phi_2262_: type_24; + var phi_2285_: type_24; + var phi_2312_: bool; + var phi_2318_: type_24; + var phi_2319_: type_24; + var phi_2342_: type_24; + var phi_2365_: bool; + var phi_2373_: type_22; var local_31: type_20; switch bitcast(0u) { @@ -246,11 +246,11 @@ fn function() { } let _e155 = phi_743_; if (_e98 >= 1u) { - phi_2848_ = (_e155 <= (_e98 - 1u)); + phi_2896_ = (_e155 <= (_e98 - 1u)); } else { - phi_2848_ = false; + phi_2896_ = false; } - let _e160 = phi_2848_; + let _e160 = phi_2896_; if _e160 { let _e163 = global_2.member[_e155]; phi_750_ = _e163; @@ -291,30 +291,30 @@ fn function() { let _e270 = phi_843_; if (_e270.member < _e270.member_1) { phi_844_ = type_24((_e270.member + 1u), _e270.member_1); - phi_859_ = type_24(1u, _e270.member); + phi_867_ = type_24(1u, _e270.member); } else { phi_844_ = _e270; - phi_859_ = type_24(0u, type_24().member_1); + phi_867_ = type_24(0u, type_24().member_1); } let _e283 = phi_844_; - let _e285 = phi_859_; + let _e285 = phi_867_; switch bitcast(_e285.member) { case 0: { - phi_872_ = false; + phi_880_ = false; break; } case 1: { let _e292 = global_2.member[((_e172 + 18u) + _e285.member_1)]; local_5[_e285.member_1] = _e292; - phi_872_ = true; + phi_880_ = true; break; } default: { - phi_872_ = bool(); + phi_880_ = bool(); break; } } - let _e295 = phi_872_; + let _e295 = phi_880_; continue; continuing { phi_843_ = _e283; @@ -323,47 +323,47 @@ fn function() { } let _e297 = local_5; local_4 = array(0f, 0f, 0f, 0f); - phi_878_ = type_24(0u, 4u); + phi_886_ = type_24(0u, 4u); loop { - let _e300 = phi_878_; + let _e300 = phi_886_; if (_e300.member < _e300.member_1) { - phi_879_ = type_24((_e300.member + 1u), _e300.member_1); - phi_894_ = type_24(1u, _e300.member); + phi_887_ = type_24((_e300.member + 1u), _e300.member_1); + phi_910_ = type_24(1u, _e300.member); } else { - phi_879_ = _e300; - phi_894_ = type_24(0u, type_24().member_1); + phi_887_ = _e300; + phi_910_ = type_24(0u, type_24().member_1); } - let _e313 = phi_879_; - let _e315 = phi_894_; + let _e313 = phi_887_; + let _e315 = phi_910_; switch bitcast(_e315.member) { case 0: { - phi_908_ = false; + phi_924_ = false; break; } case 1: { let _e322 = global_2.member[((_e172 + 22u) + _e315.member_1)]; local_4[_e315.member_1] = bitcast(_e322); - phi_908_ = true; + phi_924_ = true; break; } default: { - phi_908_ = bool(); + phi_924_ = bool(); break; } } - let _e326 = phi_908_; + let _e326 = phi_924_; continue; continuing { - phi_878_ = _e313; + phi_886_ = _e313; break if !(_e326); } } let _e328 = local_4; - phi_914_ = type_24(0u, _e138); - phi_917_ = type_30(vec3(bitcast(_e175), bitcast(_e180), bitcast(_e185)), vec4(bitcast(_e191), bitcast(_e196), bitcast(_e201), bitcast(_e206)), vec3(bitcast(_e234), bitcast(_e239), bitcast(_e244)), vec4(bitcast(_e250), bitcast(_e255), bitcast(_e260), bitcast(_e265)), _e297, _e328, vec2(bitcast(_e212), bitcast(_e217)), vec2(bitcast(_e223), bitcast(_e228))); + phi_930_ = type_24(0u, _e138); + phi_933_ = type_30(vec3(bitcast(_e175), bitcast(_e180), bitcast(_e185)), vec4(bitcast(_e191), bitcast(_e196), bitcast(_e201), bitcast(_e206)), vec3(bitcast(_e234), bitcast(_e239), bitcast(_e244)), vec4(bitcast(_e250), bitcast(_e255), bitcast(_e260), bitcast(_e265)), _e297, _e328, vec2(bitcast(_e212), bitcast(_e217)), vec2(bitcast(_e223), bitcast(_e228))); loop { - let _e332 = phi_914_; - let _e334 = phi_917_; + let _e332 = phi_930_; + let _e334 = phi_933_; local_6 = _e334; local_7 = _e334; local_8 = _e334; @@ -374,53 +374,53 @@ fn function() { local_29 = _e334; local_30 = _e334; if (_e332.member < _e332.member_1) { - phi_915_ = type_24((_e332.member + 1u), _e332.member_1); - phi_932_ = type_24(1u, _e332.member); + phi_931_ = type_24((_e332.member + 1u), _e332.member_1); + phi_956_ = type_24(1u, _e332.member); } else { - phi_915_ = _e332; - phi_932_ = type_24(0u, type_24().member_1); + phi_931_ = _e332; + phi_956_ = type_24(0u, type_24().member_1); } - let _e347 = phi_915_; - let _e349 = phi_932_; + let _e347 = phi_931_; + let _e349 = phi_956_; switch bitcast(_e349.member) { case 0: { - phi_918_ = type_30(); - phi_1088_ = false; + phi_934_ = type_30(); + phi_1112_ = false; break; } case 1: { if (_e349.member_1 >= _e138) { - phi_949_ = 4294967295u; + phi_973_ = 4294967295u; } else { - phi_949_ = (_e134 + (2u * _e349.member_1)); + phi_973_ = (_e134 + (2u * _e349.member_1)); } - let _e357 = phi_949_; + let _e357 = phi_973_; if (_e98 >= 2u) { - phi_2878_ = (_e357 <= (_e98 - 2u)); + phi_2926_ = (_e357 <= (_e98 - 2u)); } else { - phi_2878_ = false; + phi_2926_ = false; } - let _e362 = phi_2878_; + let _e362 = phi_2926_; if _e362 { let _e365 = global_2.member[_e357]; let _e369 = global_2.member[(_e357 + 1u)]; - phi_967_ = type_24(_e365, _e369); + phi_991_ = type_24(_e365, _e369); } else { - phi_967_ = type_24(4294967295u, 0u); + phi_991_ = type_24(4294967295u, 0u); } - let _e372 = phi_967_; + let _e372 = phi_991_; if (_e167 >= _e372.member_1) { - phi_2904_ = 4294967295u; + phi_2952_ = 4294967295u; } else { - phi_2904_ = (_e372.member + (9u * _e167)); + phi_2952_ = (_e372.member + (9u * _e167)); } - let _e379 = phi_2904_; + let _e379 = phi_2952_; if (_e98 >= 9u) { - phi_2923_ = (_e379 <= (_e98 - 9u)); + phi_2971_ = (_e379 <= (_e98 - 9u)); } else { - phi_2923_ = false; + phi_2971_ = false; } - let _e384 = phi_2923_; + let _e384 = phi_2971_; if _e384 { let _e387 = global_2.member[_e379]; let _e392 = global_2.member[(_e379 + 1u)]; @@ -431,48 +431,48 @@ fn function() { let _e419 = global_2.member[(_e379 + 6u)]; let _e424 = global_2.member[(_e379 + 7u)]; let _e429 = global_2.member[(_e379 + 8u)]; - phi_1017_ = type_33(vec3(bitcast(_e387), bitcast(_e392), bitcast(_e397)), vec3(bitcast(_e403), bitcast(_e408), bitcast(_e413)), vec3(bitcast(_e419), bitcast(_e424), bitcast(_e429))); + phi_1041_ = type_33(vec3(bitcast(_e387), bitcast(_e392), bitcast(_e397)), vec3(bitcast(_e403), bitcast(_e408), bitcast(_e413)), vec3(bitcast(_e419), bitcast(_e424), bitcast(_e429))); } else { - phi_1017_ = type_33(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); + phi_1041_ = type_33(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); } - let _e434 = phi_1017_; + let _e434 = phi_1041_; if (_e349.member_1 >= _e146) { - phi_1027_ = 4294967295u; + phi_1051_ = 4294967295u; } else { - phi_1027_ = (_e142 + _e349.member_1); + phi_1051_ = (_e142 + _e349.member_1); } - let _e438 = phi_1027_; + let _e438 = phi_1051_; if (_e98 >= 1u) { - phi_2945_ = (_e438 <= (_e98 - 1u)); + phi_2993_ = (_e438 <= (_e98 - 1u)); } else { - phi_2945_ = false; + phi_2993_ = false; } - let _e443 = phi_2945_; + let _e443 = phi_2993_; if _e443 { let _e446 = global_2.member[_e438]; - phi_1035_ = bitcast(_e446); + phi_1059_ = bitcast(_e446); } else { - phi_1035_ = 0f; + phi_1059_ = 0f; } - let _e449 = phi_1035_; + let _e449 = phi_1059_; let _e472 = type_30(vec3(fma(_e449, _e434.member.x, _e334.member.x), fma(_e449, _e434.member.y, _e334.member.y), fma(_e449, _e434.member.z, _e334.member.z)), _e334.member_1, _e334.member_2, _e334.member_3, _e334.member_4, _e334.member_5, _e334.member_6, _e334.member_7); let _e495 = type_30(_e472.member, _e472.member_1, vec3(fma(_e449, _e434.member_1.x, _e334.member_2.x), fma(_e449, _e434.member_1.y, _e334.member_2.y), fma(_e449, _e434.member_1.z, _e334.member_2.z)), _e472.member_3, _e472.member_4, _e472.member_5, _e472.member_6, _e472.member_7); - phi_918_ = type_30(_e495.member, _e495.member_1, _e495.member_2, vec4(fma(_e449, _e434.member_2.x, _e334.member_3.x), fma(_e449, _e434.member_2.y, _e334.member_3.y), fma(_e449, _e434.member_2.z, _e334.member_3.z), _e334.member_3.w), _e495.member_4, _e495.member_5, _e495.member_6, _e495.member_7); - phi_1088_ = true; + phi_934_ = type_30(_e495.member, _e495.member_1, _e495.member_2, vec4(fma(_e449, _e434.member_2.x, _e334.member_3.x), fma(_e449, _e434.member_2.y, _e334.member_3.y), fma(_e449, _e434.member_2.z, _e334.member_3.z), _e334.member_3.w), _e495.member_4, _e495.member_5, _e495.member_6, _e495.member_7); + phi_1112_ = true; break; } default: { - phi_918_ = type_30(); - phi_1088_ = bool(); + phi_934_ = type_30(); + phi_1112_ = bool(); break; } } - let _e522 = phi_918_; - let _e524 = phi_1088_; + let _e522 = phi_934_; + let _e524 = phi_1112_; continue; continuing { - phi_914_ = _e347; - phi_917_ = _e522; + phi_930_ = _e347; + phi_933_ = _e522; break if !(_e524); } } @@ -487,28 +487,28 @@ fn function() { let _e541 = ((_e130 == 4294967295u) != true); if _e541 { if (_e98 >= 4u) { - phi_2968_ = (_e130 <= (_e98 - 4u)); + phi_3016_ = (_e130 <= (_e98 - 4u)); } else { - phi_2968_ = false; + phi_3016_ = false; } - let _e546 = phi_2968_; + let _e546 = phi_3016_; if _e546 { let _e549 = global_2.member[_e130]; let _e553 = global_2.member[(_e130 + 1u)]; let _e557 = global_2.member[(_e130 + 2u)]; let _e561 = global_2.member[(_e130 + 3u)]; - phi_1212_ = type_34(type_24(_e549, _e553), type_24(_e557, _e561)); + phi_1236_ = type_34(type_24(_e549, _e553), type_24(_e557, _e561)); } else { - phi_1212_ = type_34(type_24(4294967295u, 0u), type_24(4294967295u, 0u)); + phi_1236_ = type_34(type_24(4294967295u, 0u), type_24(4294967295u, 0u)); } - let _e566 = phi_1212_; + let _e566 = phi_1236_; let _e568 = local_9; local = _e568.member_5; - phi_1215_ = type_24(0u, 4u); - phi_1218_ = type_20(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f)); + phi_1239_ = type_24(0u, 4u); + phi_1242_ = type_20(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f)); loop { - let _e571 = phi_1215_; - let _e573 = phi_1218_; + let _e571 = phi_1239_; + let _e573 = phi_1242_; local_11 = _e573; local_12 = _e573; local_13 = _e573; @@ -527,18 +527,18 @@ fn function() { local_26 = _e573; local_31 = _e573; if (_e571.member < _e571.member_1) { - phi_1216_ = type_24((_e571.member + 1u), _e571.member_1); - phi_1233_ = type_24(1u, _e571.member); + phi_1240_ = type_24((_e571.member + 1u), _e571.member_1); + phi_1265_ = type_24(1u, _e571.member); } else { - phi_1216_ = _e571; - phi_1233_ = type_24(0u, type_24().member_1); + phi_1240_ = _e571; + phi_1265_ = type_24(0u, type_24().member_1); } - let _e586 = phi_1216_; - let _e588 = phi_1233_; + let _e586 = phi_1240_; + let _e588 = phi_1265_; switch bitcast(_e588.member) { case 0: { - phi_1219_ = type_20(); - phi_1635_ = false; + phi_1243_ = type_20(); + phi_1667_ = false; break; } case 1: { @@ -547,35 +547,35 @@ fn function() { let _e595 = (_e588.member_1 < 4u); if _e595 { } else { - phi_3867_ = true; + phi_3915_ = true; break; } let _e597 = local_1[_e588.member_1]; if (_e597 >= _e566.member.member_1) { - phi_1257_ = 4294967295u; + phi_1289_ = 4294967295u; } else { - phi_1257_ = (_e566.member.member + _e597); + phi_1289_ = (_e566.member.member + _e597); } - let _e605 = phi_1257_; + let _e605 = phi_1289_; if (_e98 >= 1u) { - phi_3002_ = (_e605 <= (_e98 - 1u)); + phi_3050_ = (_e605 <= (_e98 - 1u)); } else { - phi_3002_ = false; + phi_3050_ = false; } - let _e610 = phi_3002_; + let _e610 = phi_3050_; if _e610 { let _e613 = global_2.member[_e605]; - phi_1266_ = _e613; + phi_1298_ = _e613; } else { - phi_1266_ = 4294967295u; + phi_1298_ = 4294967295u; } - let _e615 = phi_1266_; + let _e615 = phi_1298_; if (_e98 >= 10u) { - phi_3026_ = (_e615 <= (_e98 - 10u)); + phi_3074_ = (_e615 <= (_e98 - 10u)); } else { - phi_3026_ = false; + phi_3074_ = false; } - let _e620 = phi_3026_; + let _e620 = phi_3074_; if _e620 { let _e623 = global_2.member[_e615]; let _e628 = global_2.member[(_e615 + 1u)]; @@ -587,23 +587,23 @@ fn function() { let _e660 = global_2.member[(_e615 + 7u)]; let _e665 = global_2.member[(_e615 + 8u)]; let _e670 = global_2.member[(_e615 + 9u)]; - phi_1315_ = type_27(vec3(bitcast(_e623), bitcast(_e628), bitcast(_e633)), vec4(bitcast(_e639), bitcast(_e644), bitcast(_e649), bitcast(_e654)), vec3(bitcast(_e660), bitcast(_e665), bitcast(_e670))); + phi_1347_ = type_27(vec3(bitcast(_e623), bitcast(_e628), bitcast(_e633)), vec4(bitcast(_e639), bitcast(_e644), bitcast(_e649), bitcast(_e654)), vec3(bitcast(_e660), bitcast(_e665), bitcast(_e670))); } else { - phi_1315_ = type_27(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); + phi_1347_ = type_27(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); } - let _e675 = phi_1315_; + let _e675 = phi_1347_; if (_e597 >= _e566.member_1.member_1) { - phi_1325_ = 4294967295u; + phi_1357_ = 4294967295u; } else { - phi_1325_ = (_e566.member_1.member + (16u * _e597)); + phi_1357_ = (_e566.member_1.member + (16u * _e597)); } - let _e684 = phi_1325_; + let _e684 = phi_1357_; if (_e98 >= 16u) { - phi_3051_ = (_e684 <= (_e98 - 16u)); + phi_3099_ = (_e684 <= (_e98 - 16u)); } else { - phi_3051_ = false; + phi_3099_ = false; } - let _e689 = phi_3051_; + let _e689 = phi_3099_; if _e689 { let _e692 = global_2.member[_e684]; let _e697 = global_2.member[(_e684 + 1u)]; @@ -621,11 +621,11 @@ fn function() { let _e760 = global_2.member[(_e684 + 13u)]; let _e765 = global_2.member[(_e684 + 14u)]; let _e770 = global_2.member[(_e684 + 15u)]; - phi_1398_ = type_20(vec4(bitcast(_e692), bitcast(_e697), bitcast(_e702), bitcast(_e707)), vec4(bitcast(_e713), bitcast(_e718), bitcast(_e723), bitcast(_e728)), vec4(bitcast(_e734), bitcast(_e739), bitcast(_e744), bitcast(_e749)), vec4(bitcast(_e755), bitcast(_e760), bitcast(_e765), bitcast(_e770))); + phi_1430_ = type_20(vec4(bitcast(_e692), bitcast(_e697), bitcast(_e702), bitcast(_e707)), vec4(bitcast(_e713), bitcast(_e718), bitcast(_e723), bitcast(_e728)), vec4(bitcast(_e734), bitcast(_e739), bitcast(_e744), bitcast(_e749)), vec4(bitcast(_e755), bitcast(_e760), bitcast(_e765), bitcast(_e770))); } else { - phi_1398_ = type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)); + phi_1430_ = type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)); } - let _e775 = phi_1398_; + let _e775 = phi_1430_; let _e783 = (_e675.member_1.x + _e675.member_1.x); let _e784 = (_e675.member_1.y + _e675.member_1.y); let _e785 = (_e675.member_1.z + _e675.member_1.z); @@ -638,31 +638,31 @@ fn function() { let _e814 = (vec4(fma(_e675.member_1.x, _e785, _e789), fma(_e675.member_1.y, _e785, -(_e788)), (1f - fma(_e675.member_1.x, _e783, (_e675.member_1.y * _e784))), 0f) * _e675.member_2.z); if _e595 { } else { - phi_3867_ = true; + phi_3915_ = true; break; } let _e919 = local[_e588.member_1]; - phi_1219_ = type_20((_e573.member + (vec4(fma(_e675.member.x, _e775.member.w, fma(_e814.x, _e775.member.z, fma(_e810.x, _e775.member.x, (_e812.x * _e775.member.y)))), fma(_e675.member.y, _e775.member.w, fma(_e814.y, _e775.member.z, fma(_e810.y, _e775.member.x, (_e812.y * _e775.member.y)))), fma(_e675.member.z, _e775.member.w, fma(_e814.z, _e775.member.z, fma(_e810.z, _e775.member.x, (_e812.z * _e775.member.y)))), (fma(_e814.w, _e775.member.z, fma(_e810.w, _e775.member.x, (_e812.w * _e775.member.y))) + _e775.member.w)) * _e919)), (_e573.member_1 + (vec4(fma(_e675.member.x, _e775.member_1.w, fma(_e814.x, _e775.member_1.z, fma(_e810.x, _e775.member_1.x, (_e812.x * _e775.member_1.y)))), fma(_e675.member.y, _e775.member_1.w, fma(_e814.y, _e775.member_1.z, fma(_e810.y, _e775.member_1.x, (_e812.y * _e775.member_1.y)))), fma(_e675.member.z, _e775.member_1.w, fma(_e814.z, _e775.member_1.z, fma(_e810.z, _e775.member_1.x, (_e812.z * _e775.member_1.y)))), (fma(_e814.w, _e775.member_1.z, fma(_e810.w, _e775.member_1.x, (_e812.w * _e775.member_1.y))) + _e775.member_1.w)) * _e919)), (_e573.member_2 + (vec4(fma(_e675.member.x, _e775.member_2.w, fma(_e814.x, _e775.member_2.z, fma(_e810.x, _e775.member_2.x, (_e812.x * _e775.member_2.y)))), fma(_e675.member.y, _e775.member_2.w, fma(_e814.y, _e775.member_2.z, fma(_e810.y, _e775.member_2.x, (_e812.y * _e775.member_2.y)))), fma(_e675.member.z, _e775.member_2.w, fma(_e814.z, _e775.member_2.z, fma(_e810.z, _e775.member_2.x, (_e812.z * _e775.member_2.y)))), (fma(_e814.w, _e775.member_2.z, fma(_e810.w, _e775.member_2.x, (_e812.w * _e775.member_2.y))) + _e775.member_2.w)) * _e919)), (_e573.member_3 + (vec4(fma(_e675.member.x, _e775.member_3.w, fma(_e814.x, _e775.member_3.z, fma(_e810.x, _e775.member_3.x, (_e812.x * _e775.member_3.y)))), fma(_e675.member.y, _e775.member_3.w, fma(_e814.y, _e775.member_3.z, fma(_e810.y, _e775.member_3.x, (_e812.y * _e775.member_3.y)))), fma(_e675.member.z, _e775.member_3.w, fma(_e814.z, _e775.member_3.z, fma(_e810.z, _e775.member_3.x, (_e812.z * _e775.member_3.y)))), (fma(_e814.w, _e775.member_3.z, fma(_e810.w, _e775.member_3.x, (_e812.w * _e775.member_3.y))) + _e775.member_3.w)) * _e919))); - phi_1635_ = true; + phi_1243_ = type_20((_e573.member + (vec4(fma(_e675.member.x, _e775.member.w, fma(_e814.x, _e775.member.z, fma(_e810.x, _e775.member.x, (_e812.x * _e775.member.y)))), fma(_e675.member.y, _e775.member.w, fma(_e814.y, _e775.member.z, fma(_e810.y, _e775.member.x, (_e812.y * _e775.member.y)))), fma(_e675.member.z, _e775.member.w, fma(_e814.z, _e775.member.z, fma(_e810.z, _e775.member.x, (_e812.z * _e775.member.y)))), (fma(_e814.w, _e775.member.z, fma(_e810.w, _e775.member.x, (_e812.w * _e775.member.y))) + _e775.member.w)) * _e919)), (_e573.member_1 + (vec4(fma(_e675.member.x, _e775.member_1.w, fma(_e814.x, _e775.member_1.z, fma(_e810.x, _e775.member_1.x, (_e812.x * _e775.member_1.y)))), fma(_e675.member.y, _e775.member_1.w, fma(_e814.y, _e775.member_1.z, fma(_e810.y, _e775.member_1.x, (_e812.y * _e775.member_1.y)))), fma(_e675.member.z, _e775.member_1.w, fma(_e814.z, _e775.member_1.z, fma(_e810.z, _e775.member_1.x, (_e812.z * _e775.member_1.y)))), (fma(_e814.w, _e775.member_1.z, fma(_e810.w, _e775.member_1.x, (_e812.w * _e775.member_1.y))) + _e775.member_1.w)) * _e919)), (_e573.member_2 + (vec4(fma(_e675.member.x, _e775.member_2.w, fma(_e814.x, _e775.member_2.z, fma(_e810.x, _e775.member_2.x, (_e812.x * _e775.member_2.y)))), fma(_e675.member.y, _e775.member_2.w, fma(_e814.y, _e775.member_2.z, fma(_e810.y, _e775.member_2.x, (_e812.y * _e775.member_2.y)))), fma(_e675.member.z, _e775.member_2.w, fma(_e814.z, _e775.member_2.z, fma(_e810.z, _e775.member_2.x, (_e812.z * _e775.member_2.y)))), (fma(_e814.w, _e775.member_2.z, fma(_e810.w, _e775.member_2.x, (_e812.w * _e775.member_2.y))) + _e775.member_2.w)) * _e919)), (_e573.member_3 + (vec4(fma(_e675.member.x, _e775.member_3.w, fma(_e814.x, _e775.member_3.z, fma(_e810.x, _e775.member_3.x, (_e812.x * _e775.member_3.y)))), fma(_e675.member.y, _e775.member_3.w, fma(_e814.y, _e775.member_3.z, fma(_e810.y, _e775.member_3.x, (_e812.y * _e775.member_3.y)))), fma(_e675.member.z, _e775.member_3.w, fma(_e814.z, _e775.member_3.z, fma(_e810.z, _e775.member_3.x, (_e812.z * _e775.member_3.y)))), (fma(_e814.w, _e775.member_3.z, fma(_e810.w, _e775.member_3.x, (_e812.w * _e775.member_3.y))) + _e775.member_3.w)) * _e919))); + phi_1667_ = true; break; } default: { - phi_1219_ = type_20(); - phi_1635_ = bool(); + phi_1243_ = type_20(); + phi_1667_ = bool(); break; } } - let _e934 = phi_1219_; - let _e936 = phi_1635_; + let _e934 = phi_1243_; + let _e936 = phi_1667_; continue; continuing { - phi_1215_ = _e586; - phi_1218_ = _e934; - phi_3867_ = false; + phi_1239_ = _e586; + phi_1242_ = _e934; + phi_3915_ = false; break if !(_e936); } } - let _e939 = phi_3867_; + let _e939 = phi_3915_; if _e939 { break; } @@ -678,27 +678,27 @@ fn function() { if _e963 { let _e965 = local_14; let _e970 = global_8.member[3u]; - phi_1662_ = (_e965.member.w == _e970); + phi_1694_ = (_e965.member.w == _e970); } else { - phi_1662_ = bool(); + phi_1694_ = bool(); } - let _e973 = phi_1662_; - phi_1664_ = _e973; - phi_1665_ = select(true, false, _e963); + let _e973 = phi_1694_; + phi_1696_ = _e973; + phi_1697_ = select(true, false, _e963); } else { - phi_1664_ = bool(); - phi_1665_ = true; + phi_1696_ = bool(); + phi_1697_ = true; } - let _e976 = phi_1664_; - let _e978 = phi_1665_; - phi_1666_ = _e976; - phi_1667_ = _e978; + let _e976 = phi_1696_; + let _e978 = phi_1697_; + phi_1698_ = _e976; + phi_1699_ = _e978; } else { - phi_1666_ = bool(); - phi_1667_ = true; + phi_1698_ = bool(); + phi_1699_ = true; } - let _e980 = phi_1666_; - let _e982 = phi_1667_; + let _e980 = phi_1698_; + let _e982 = phi_1699_; if select(_e980, false, _e982) { let _e985 = local_15; let _e990 = global_8.member_1[0u]; @@ -712,27 +712,27 @@ fn function() { if _e1007 { let _e1009 = local_18; let _e1014 = global_8.member_1[3u]; - phi_1701_ = (_e1009.member_1.w == _e1014); + phi_1733_ = (_e1009.member_1.w == _e1014); } else { - phi_1701_ = bool(); + phi_1733_ = bool(); } - let _e1017 = phi_1701_; - phi_1703_ = _e1017; - phi_1704_ = select(true, false, _e1007); + let _e1017 = phi_1733_; + phi_1735_ = _e1017; + phi_1736_ = select(true, false, _e1007); } else { - phi_1703_ = bool(); - phi_1704_ = true; + phi_1735_ = bool(); + phi_1736_ = true; } - let _e1020 = phi_1703_; - let _e1022 = phi_1704_; - phi_1705_ = _e1020; - phi_1706_ = _e1022; + let _e1020 = phi_1735_; + let _e1022 = phi_1736_; + phi_1737_ = _e1020; + phi_1738_ = _e1022; } else { - phi_1705_ = bool(); - phi_1706_ = true; + phi_1737_ = bool(); + phi_1738_ = true; } - let _e1024 = phi_1705_; - let _e1026 = phi_1706_; + let _e1024 = phi_1737_; + let _e1026 = phi_1738_; if select(_e1024, false, _e1026) { let _e1029 = local_19; let _e1034 = global_8.member_2[0u]; @@ -746,27 +746,27 @@ fn function() { if _e1051 { let _e1053 = local_22; let _e1058 = global_8.member_2[3u]; - phi_1740_ = (_e1053.member_2.w == _e1058); + phi_1772_ = (_e1053.member_2.w == _e1058); } else { - phi_1740_ = bool(); + phi_1772_ = bool(); } - let _e1061 = phi_1740_; - phi_1742_ = _e1061; - phi_1743_ = select(true, false, _e1051); + let _e1061 = phi_1772_; + phi_1774_ = _e1061; + phi_1775_ = select(true, false, _e1051); } else { - phi_1742_ = bool(); - phi_1743_ = true; + phi_1774_ = bool(); + phi_1775_ = true; } - let _e1064 = phi_1742_; - let _e1066 = phi_1743_; - phi_1744_ = _e1064; - phi_1745_ = _e1066; + let _e1064 = phi_1774_; + let _e1066 = phi_1775_; + phi_1776_ = _e1064; + phi_1777_ = _e1066; } else { - phi_1744_ = bool(); - phi_1745_ = true; + phi_1776_ = bool(); + phi_1777_ = true; } - let _e1068 = phi_1744_; - let _e1070 = phi_1745_; + let _e1068 = phi_1776_; + let _e1070 = phi_1777_; let _e1071 = select(_e1068, false, _e1070); if _e1071 { let _e1073 = local_23; @@ -781,55 +781,55 @@ fn function() { if _e1095 { let _e1097 = local_26; let _e1102 = global_8.member_3[3u]; - phi_1779_ = (_e1097.member_3.w == _e1102); + phi_1811_ = (_e1097.member_3.w == _e1102); } else { - phi_1779_ = bool(); + phi_1811_ = bool(); } - let _e1105 = phi_1779_; - phi_1781_ = _e1105; - phi_1782_ = select(true, false, _e1095); + let _e1105 = phi_1811_; + phi_1813_ = _e1105; + phi_1814_ = select(true, false, _e1095); } else { - phi_1781_ = bool(); - phi_1782_ = true; + phi_1813_ = bool(); + phi_1814_ = true; } - let _e1108 = phi_1781_; - let _e1110 = phi_1782_; - phi_1783_ = _e1108; - phi_1784_ = _e1110; + let _e1108 = phi_1813_; + let _e1110 = phi_1814_; + phi_1815_ = _e1108; + phi_1816_ = _e1110; } else { - phi_1783_ = bool(); - phi_1784_ = true; + phi_1815_ = bool(); + phi_1816_ = true; } - let _e1112 = phi_1783_; - let _e1114 = phi_1784_; - phi_1789_ = select(_e1112, false, _e1114); + let _e1112 = phi_1815_; + let _e1114 = phi_1816_; + phi_1821_ = select(_e1112, false, _e1114); } else { - phi_1789_ = bool(); + phi_1821_ = bool(); } - let _e1117 = phi_1789_; - phi_1791_ = _e1117; - phi_1792_ = select(true, false, _e1071); + let _e1117 = phi_1821_; + phi_1823_ = _e1117; + phi_1824_ = select(true, false, _e1071); } else { - phi_1791_ = bool(); - phi_1792_ = true; + phi_1823_ = bool(); + phi_1824_ = true; } - let _e1120 = phi_1791_; - let _e1122 = phi_1792_; - phi_1793_ = _e1120; - phi_1794_ = _e1122; + let _e1120 = phi_1823_; + let _e1122 = phi_1824_; + phi_1825_ = _e1120; + phi_1826_ = _e1122; } else { - phi_1793_ = bool(); - phi_1794_ = true; + phi_1825_ = bool(); + phi_1826_ = true; } - let _e1124 = phi_1793_; - let _e1126 = phi_1794_; + let _e1124 = phi_1825_; + let _e1126 = phi_1826_; if select(_e1124, false, _e1126) { - phi_1802_ = type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)); + phi_1834_ = type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)); } else { let _e2056 = local_31; - phi_1802_ = _e2056; + phi_1834_ = _e2056; } - let _e1129 = phi_1802_; + let _e1129 = phi_1834_; let _e1152 = fma(_e1129.member_2.z, _e1129.member_3.w, -((_e1129.member_2.w * _e1129.member_3.z))); let _e1155 = fma(_e1129.member_2.y, _e1129.member_3.w, -((_e1129.member_2.w * _e1129.member_3.y))); let _e1158 = fma(_e1129.member_2.y, _e1129.member_3.z, -((_e1129.member_2.z * _e1129.member_3.y))); @@ -838,19 +838,19 @@ fn function() { let _e1167 = fma(_e1129.member_2.x, _e1129.member_3.y, -((_e1129.member_2.y * _e1129.member_3.x))); let _e1189 = fma(-(_e1129.member.w), fma(_e1129.member_1.z, _e1167, fma(_e1129.member_1.x, _e1158, -((_e1129.member_1.y * _e1164)))), fma(_e1129.member.z, fma(_e1129.member_1.w, _e1167, fma(_e1129.member_1.x, _e1155, -((_e1129.member_1.y * _e1161)))), fma(_e1129.member.x, fma(_e1129.member_1.w, _e1158, fma(_e1129.member_1.y, _e1152, -((_e1129.member_1.z * _e1155)))), -((_e1129.member.y * fma(_e1129.member_1.w, _e1164, fma(_e1129.member_1.x, _e1152, -((_e1129.member_1.z * _e1161))))))))); if (_e1189 == 0f) { - phi_3298_ = type_27(vec3(1f, 1f, 1f), vec4(0f, 0f, 0f, 1f), vec3(0f, 0f, 0f)); - phi_3299_ = type_27(); - phi_3300_ = true; + phi_3346_ = type_27(vec3(1f, 1f, 1f), vec4(0f, 0f, 0f, 1f), vec3(0f, 0f, 0f)); + phi_3347_ = type_27(); + phi_3348_ = true; } else { let _e1198 = (sqrt(fma(_e1129.member.w, _e1129.member.w, fma(_e1129.member.z, _e1129.member.z, fma(_e1129.member.x, _e1129.member.x, (_e1129.member.y * _e1129.member.y))))) * select(-1f, 1f, (_e1189 >= 0f))); let _e1203 = sqrt(fma(_e1129.member_1.w, _e1129.member_1.w, fma(_e1129.member_1.z, _e1129.member_1.z, fma(_e1129.member_1.x, _e1129.member_1.x, (_e1129.member_1.y * _e1129.member_1.y))))); let _e1208 = sqrt(fma(_e1129.member_2.w, _e1129.member_2.w, fma(_e1129.member_2.z, _e1129.member_2.z, fma(_e1129.member_2.x, _e1129.member_2.x, (_e1129.member_2.y * _e1129.member_2.y))))); if (_e1198 != 0f) { - phi_3188_ = select(true, false, (_e1203 != 0f)); + phi_3234_ = select(true, false, (_e1203 != 0f)); } else { - phi_3188_ = true; + phi_3234_ = true; } - let _e1215 = phi_3188_; + let _e1215 = phi_3234_; let _e1216 = select((_e1208 != 0f), false, _e1215); if _e1216 { let _e1217 = (1f / _e1198); @@ -862,76 +862,76 @@ fn function() { let _e1223 = (_e1129.member_2.x * _e1219); let _e1224 = (_e1129.member_2.y * _e1219); if ((_e1129.member_2.z * _e1219) <= 0f) { - let _e1228 = fma(_e1129.member_1.y, _e1218, -(_e1220)); - let _e1230 = fma(-(_e1129.member_2.z), _e1219, 1f); - if (_e1228 <= 0f) { - let _e1232 = (_e1230 - _e1228); - let _e1234 = (0.5f / sqrt(_e1232)); - phi_3251_ = vec4((_e1232 * _e1234), (fma(_e1129.member.y, _e1217, _e1222) * _e1234), (fma(_e1129.member.z, _e1217, _e1223) * _e1234), (fma(_e1129.member_1.z, _e1218, -(_e1224)) * _e1234)); + let _e1259 = fma(_e1129.member_1.y, _e1218, -(_e1220)); + let _e1261 = fma(-(_e1129.member_2.z), _e1219, 1f); + if (_e1259 <= 0f) { + let _e1275 = (_e1261 - _e1259); + let _e1277 = (0.5f / sqrt(_e1275)); + phi_3329_ = vec4((_e1275 * _e1277), (fma(_e1129.member.y, _e1217, _e1222) * _e1277), (fma(_e1129.member.z, _e1217, _e1223) * _e1277), (fma(_e1129.member_1.z, _e1218, -(_e1224)) * _e1277)); } else { - let _e1244 = (_e1230 + _e1228); - let _e1246 = (0.5f / sqrt(_e1244)); - phi_3251_ = vec4((fma(_e1129.member.y, _e1217, _e1222) * _e1246), (_e1244 * _e1246), (fma(_e1129.member_1.z, _e1218, _e1224) * _e1246), (fma(_e1129.member_2.x, _e1219, -(_e1221)) * _e1246)); + let _e1263 = (_e1261 + _e1259); + let _e1265 = (0.5f / sqrt(_e1263)); + phi_3329_ = vec4((fma(_e1129.member.y, _e1217, _e1222) * _e1265), (_e1263 * _e1265), (fma(_e1129.member_1.z, _e1218, _e1224) * _e1265), (fma(_e1129.member_2.x, _e1219, -(_e1221)) * _e1265)); } - let _e1257 = phi_3251_; - phi_3283_ = _e1257; + let _e1288 = phi_3329_; + phi_3331_ = _e1288; } else { - let _e1258 = fma(_e1129.member_1.y, _e1218, _e1220); - let _e1259 = fma(_e1129.member_2.z, _e1219, 1f); - if (_e1258 <= 0f) { - let _e1261 = (_e1259 - _e1258); - let _e1263 = (0.5f / sqrt(_e1261)); - phi_3281_ = vec4((fma(_e1129.member.z, _e1217, _e1223) * _e1263), (fma(_e1129.member_1.z, _e1218, _e1224) * _e1263), (_e1261 * _e1263), (fma(_e1129.member.y, _e1217, -(_e1222)) * _e1263)); + let _e1227 = fma(_e1129.member_1.y, _e1218, _e1220); + let _e1228 = fma(_e1129.member_2.z, _e1219, 1f); + if (_e1227 <= 0f) { + let _e1244 = (_e1228 - _e1227); + let _e1246 = (0.5f / sqrt(_e1244)); + phi_3299_ = vec4((fma(_e1129.member.z, _e1217, _e1223) * _e1246), (fma(_e1129.member_1.z, _e1218, _e1224) * _e1246), (_e1244 * _e1246), (fma(_e1129.member.y, _e1217, -(_e1222)) * _e1246)); } else { - let _e1273 = (_e1259 + _e1258); - let _e1275 = (0.5f / sqrt(_e1273)); - phi_3281_ = vec4((fma(_e1129.member_1.z, _e1218, -(_e1224)) * _e1275), (fma(_e1129.member_2.x, _e1219, -(_e1221)) * _e1275), (fma(_e1129.member.y, _e1217, -(_e1222)) * _e1275), (_e1273 * _e1275)); + let _e1230 = (_e1228 + _e1227); + let _e1232 = (0.5f / sqrt(_e1230)); + phi_3299_ = vec4((fma(_e1129.member_1.z, _e1218, -(_e1224)) * _e1232), (fma(_e1129.member_2.x, _e1219, -(_e1221)) * _e1232), (fma(_e1129.member.y, _e1217, -(_e1222)) * _e1232), (_e1230 * _e1232)); } - let _e1288 = phi_3281_; - phi_3283_ = _e1288; + let _e1257 = phi_3299_; + phi_3331_ = _e1257; } - let _e1290 = phi_3283_; - phi_3294_ = type_27(vec3(_e1198, _e1203, _e1208), _e1290, vec3(_e1129.member_3.x, _e1129.member_3.y, _e1129.member_3.z)); - phi_3295_ = type_27(); + let _e1290 = phi_3331_; + phi_3340_ = type_27(vec3(_e1198, _e1203, _e1208), _e1290, vec3(_e1129.member_3.x, _e1129.member_3.y, _e1129.member_3.z)); + phi_3341_ = type_27(); } else { - phi_3294_ = type_27(); - phi_3295_ = type_27(vec3(1f, 1f, 1f), vec4(0f, 0f, 0f, 1f), vec3(0f, 0f, 0f)); + phi_3340_ = type_27(); + phi_3341_ = type_27(vec3(1f, 1f, 1f), vec4(0f, 0f, 0f, 1f), vec3(0f, 0f, 0f)); } - let _e1294 = phi_3294_; - let _e1296 = phi_3295_; - phi_3298_ = _e1296; - phi_3299_ = _e1294; - phi_3300_ = select(true, false, _e1216); + let _e1294 = phi_3340_; + let _e1296 = phi_3341_; + phi_3346_ = _e1296; + phi_3347_ = _e1294; + phi_3348_ = select(true, false, _e1216); } - let _e1299 = phi_3298_; - let _e1301 = phi_3299_; - let _e1303 = phi_3300_; + let _e1299 = phi_3346_; + let _e1301 = phi_3347_; + let _e1303 = phi_3348_; if _e1303 { - phi_3304_ = _e1299; + phi_3352_ = _e1299; } else { - phi_3304_ = _e1301; + phi_3352_ = _e1301; } - let _e1305 = phi_3304_; - phi_1804_ = type_27(_e1305.member_2, _e1305.member_1, _e1305.member); + let _e1305 = phi_3352_; + phi_1836_ = type_27(_e1305.member_2, _e1305.member_1, _e1305.member); } else { - phi_1804_ = type_27(); + phi_1836_ = type_27(); } - let _e1311 = phi_1804_; - phi_1806_ = _e1311; - phi_1807_ = select(true, false, _e541); + let _e1311 = phi_1836_; + phi_1838_ = _e1311; + phi_1839_ = select(true, false, _e541); } else { - phi_1806_ = type_27(); - phi_1807_ = true; + phi_1838_ = type_27(); + phi_1839_ = true; } - let _e1314 = phi_1806_; - let _e1316 = phi_1807_; + let _e1314 = phi_1838_; + let _e1316 = phi_1839_; if _e1316 { if (_e98 >= 10u) { - phi_3398_ = (_e126 <= (_e98 - 10u)); + phi_3446_ = (_e126 <= (_e98 - 10u)); } else { - phi_3398_ = false; + phi_3446_ = false; } - let _e1321 = phi_3398_; + let _e1321 = phi_3446_; if _e1321 { let _e1324 = global_2.member[_e126]; let _e1329 = global_2.member[(_e126 + 1u)]; @@ -943,32 +943,32 @@ fn function() { let _e1361 = global_2.member[(_e126 + 7u)]; let _e1366 = global_2.member[(_e126 + 8u)]; let _e1371 = global_2.member[(_e126 + 9u)]; - phi_1860_ = type_27(vec3(bitcast(_e1324), bitcast(_e1329), bitcast(_e1334)), vec4(bitcast(_e1340), bitcast(_e1345), bitcast(_e1350), bitcast(_e1355)), vec3(bitcast(_e1361), bitcast(_e1366), bitcast(_e1371))); + phi_1892_ = type_27(vec3(bitcast(_e1324), bitcast(_e1329), bitcast(_e1334)), vec4(bitcast(_e1340), bitcast(_e1345), bitcast(_e1350), bitcast(_e1355)), vec3(bitcast(_e1361), bitcast(_e1366), bitcast(_e1371))); } else { - phi_1860_ = type_27(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); + phi_1892_ = type_27(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); } - let _e1376 = phi_1860_; - phi_1861_ = _e1376; + let _e1376 = phi_1892_; + phi_1893_ = _e1376; } else { - phi_1861_ = _e1314; + phi_1893_ = _e1314; } - let _e1378 = phi_1861_; + let _e1378 = phi_1893_; let _e1387 = local_27; let _e1395 = sqrt(fma(_e1387.member_2.z, _e1387.member_2.z, fma(_e1387.member_2.x, _e1387.member_2.x, (_e1387.member_2.y * _e1387.member_2.y)))); if (_e1395 == 0f) { - phi_1905_ = vec3(0f, 0f, 0f); + phi_1937_ = vec3(0f, 0f, 0f); } else { - phi_1905_ = (_e1387.member_2 * (1f / _e1395)); + phi_1937_ = (_e1387.member_2 * (1f / _e1395)); } - let _e1400 = phi_1905_; + let _e1400 = phi_1937_; let _e1402 = local_28; let _e1411 = sqrt(fma(_e1402.member_3.z, _e1402.member_3.z, fma(_e1402.member_3.x, _e1402.member_3.x, (_e1402.member_3.y * _e1402.member_3.y)))); if (_e1411 == 0f) { - phi_3442_ = vec3(0f, 0f, 0f); + phi_3490_ = vec3(0f, 0f, 0f); } else { - phi_3442_ = (vec3(_e1402.member_3.x, _e1402.member_3.y, _e1402.member_3.z) * (1f / _e1411)); + phi_3490_ = (vec3(_e1402.member_3.x, _e1402.member_3.y, _e1402.member_3.z) * (1f / _e1411)); } - let _e1416 = phi_3442_; + let _e1416 = phi_3490_; let _e1423 = (_e1378.member_1.x + _e1378.member_1.x); let _e1424 = (_e1378.member_1.y + _e1378.member_1.y); let _e1425 = (_e1378.member_1.z + _e1378.member_1.z); @@ -987,22 +987,22 @@ fn function() { let _e1478 = fma(_e1451.z, _e1460, fma(_e1449.z, _e1456, (_e1450.z * _e1458))); let _e1483 = sqrt(fma(_e1478, _e1478, fma(_e1476, _e1476, (_e1477 * _e1477)))); if (_e1483 == 0f) { - phi_3524_ = vec3(0f, 0f, 0f); + phi_3572_ = vec3(0f, 0f, 0f); } else { - phi_3524_ = (vec3(_e1476, _e1477, _e1478) * (1f / _e1483)); + phi_3572_ = (vec3(_e1476, _e1477, _e1478) * (1f / _e1483)); } - let _e1488 = phi_3524_; + let _e1488 = phi_3572_; global_9 = _e1488; let _e1498 = fma(_e1451.x, _e1416.z, fma(_e1449.x, _e1416.x, (_e1450.x * _e1416.y))); let _e1499 = fma(_e1451.y, _e1416.z, fma(_e1449.y, _e1416.x, (_e1450.y * _e1416.y))); let _e1500 = fma(_e1451.z, _e1416.z, fma(_e1449.z, _e1416.x, (_e1450.z * _e1416.y))); let _e1505 = sqrt(fma(_e1500, _e1500, fma(_e1498, _e1498, (_e1499 * _e1499)))); if (_e1505 == 0f) { - phi_3559_ = vec3(0f, 0f, 0f); + phi_3607_ = vec3(0f, 0f, 0f); } else { - phi_3559_ = (vec3(_e1498, _e1499, _e1500) * (1f / _e1505)); + phi_3607_ = (vec3(_e1498, _e1499, _e1500) * (1f / _e1505)); } - let _e1510 = phi_3559_; + let _e1510 = phi_3607_; global_10 = _e1510; let _e1527 = local_29; let _e1531 = select(-1f, 1f, (_e1527.member_3.w >= 0f)); @@ -1013,11 +1013,11 @@ fn function() { let _e1553 = (_e1378.member.z + fma(_e1451.z, _e1537.member.z, fma(_e1450.z, _e1537.member.y, (_e1449.z * _e1537.member.x)))); global_12 = vec3(_e1551, _e1552, _e1553); if (_e98 >= 83u) { - phi_3572_ = (_e122 <= (_e98 - 83u)); + phi_3620_ = (_e122 <= (_e98 - 83u)); } else { - phi_3572_ = false; + phi_3620_ = false; } - let _e1559 = phi_3572_; + let _e1559 = phi_3620_; if _e1559 { let _e1562 = global_2.member[_e122]; let _e1567 = global_2.member[(_e122 + 1u)]; @@ -1055,21 +1055,21 @@ fn function() { let _e1737 = global_2.member[(_e122 + 33u)]; let _e1742 = global_2.member[(_e122 + 34u)]; local_3 = array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f)); - phi_2229_ = type_24(0u, 6u); + phi_2261_ = type_24(0u, 6u); loop { - let _e1747 = phi_2229_; + let _e1747 = phi_2261_; if (_e1747.member < _e1747.member_1) { - phi_2230_ = type_24((_e1747.member + 1u), _e1747.member_1); - phi_2245_ = type_24(1u, _e1747.member); + phi_2262_ = type_24((_e1747.member + 1u), _e1747.member_1); + phi_2285_ = type_24(1u, _e1747.member); } else { - phi_2230_ = _e1747; - phi_2245_ = type_24(0u, type_24().member_1); + phi_2262_ = _e1747; + phi_2285_ = type_24(0u, type_24().member_1); } - let _e1760 = phi_2230_; - let _e1762 = phi_2245_; + let _e1760 = phi_2262_; + let _e1762 = phi_2285_; switch bitcast(_e1762.member) { case 0: { - phi_2272_ = false; + phi_2312_ = false; break; } case 1: { @@ -1079,38 +1079,38 @@ fn function() { let _e1780 = global_2.member[(_e1767 + 2u)]; let _e1785 = global_2.member[(_e1767 + 3u)]; local_3[_e1762.member_1] = vec4(bitcast(_e1770), bitcast(_e1775), bitcast(_e1780), bitcast(_e1785)); - phi_2272_ = true; + phi_2312_ = true; break; } default: { - phi_2272_ = bool(); + phi_2312_ = bool(); break; } } - let _e1790 = phi_2272_; + let _e1790 = phi_2312_; continue; continuing { - phi_2229_ = _e1760; + phi_2261_ = _e1760; break if !(_e1790); } } let _e1792 = local_3; local_2 = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_2278_ = type_24(0u, 8u); + phi_2318_ = type_24(0u, 8u); loop { - let _e1795 = phi_2278_; + let _e1795 = phi_2318_; if (_e1795.member < _e1795.member_1) { - phi_2279_ = type_24((_e1795.member + 1u), _e1795.member_1); - phi_2294_ = type_24(1u, _e1795.member); + phi_2319_ = type_24((_e1795.member + 1u), _e1795.member_1); + phi_2342_ = type_24(1u, _e1795.member); } else { - phi_2279_ = _e1795; - phi_2294_ = type_24(0u, type_24().member_1); + phi_2319_ = _e1795; + phi_2342_ = type_24(0u, type_24().member_1); } - let _e1808 = phi_2279_; - let _e1810 = phi_2294_; + let _e1808 = phi_2319_; + let _e1810 = phi_2342_; switch bitcast(_e1810.member) { case 0: { - phi_2317_ = false; + phi_2365_ = false; break; } case 1: { @@ -1119,27 +1119,27 @@ fn function() { let _e1823 = global_2.member[(_e1815 + 1u)]; let _e1828 = global_2.member[(_e1815 + 2u)]; local_2[_e1810.member_1] = vec3(bitcast(_e1818), bitcast(_e1823), bitcast(_e1828)); - phi_2317_ = true; + phi_2365_ = true; break; } default: { - phi_2317_ = bool(); + phi_2365_ = bool(); break; } } - let _e1833 = phi_2317_; + let _e1833 = phi_2365_; continue; continuing { - phi_2278_ = _e1808; + phi_2318_ = _e1808; break if !(_e1833); } } let _e1835 = local_2; - phi_2325_ = type_22(type_20(vec4(bitcast(_e1562), bitcast(_e1567), bitcast(_e1572), bitcast(_e1577)), vec4(bitcast(_e1583), bitcast(_e1588), bitcast(_e1593), bitcast(_e1598)), vec4(bitcast(_e1604), bitcast(_e1609), bitcast(_e1614), bitcast(_e1619)), vec4(bitcast(_e1625), bitcast(_e1630), bitcast(_e1635), bitcast(_e1640))), type_20(vec4(bitcast(_e1647), bitcast(_e1652), bitcast(_e1657), bitcast(_e1662)), vec4(bitcast(_e1668), bitcast(_e1673), bitcast(_e1678), bitcast(_e1683)), vec4(bitcast(_e1689), bitcast(_e1694), bitcast(_e1699), bitcast(_e1704)), vec4(bitcast(_e1710), bitcast(_e1715), bitcast(_e1720), bitcast(_e1725))), type_21(_e1835, _e1792), vec3(bitcast(_e1732), bitcast(_e1737), bitcast(_e1742))); + phi_2373_ = type_22(type_20(vec4(bitcast(_e1562), bitcast(_e1567), bitcast(_e1572), bitcast(_e1577)), vec4(bitcast(_e1583), bitcast(_e1588), bitcast(_e1593), bitcast(_e1598)), vec4(bitcast(_e1604), bitcast(_e1609), bitcast(_e1614), bitcast(_e1619)), vec4(bitcast(_e1625), bitcast(_e1630), bitcast(_e1635), bitcast(_e1640))), type_20(vec4(bitcast(_e1647), bitcast(_e1652), bitcast(_e1657), bitcast(_e1662)), vec4(bitcast(_e1668), bitcast(_e1673), bitcast(_e1678), bitcast(_e1683)), vec4(bitcast(_e1689), bitcast(_e1694), bitcast(_e1699), bitcast(_e1704)), vec4(bitcast(_e1710), bitcast(_e1715), bitcast(_e1720), bitcast(_e1725))), type_21(_e1835, _e1792), vec3(bitcast(_e1732), bitcast(_e1737), bitcast(_e1742))); } else { - phi_2325_ = type_22(type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_21(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_2373_ = type_22(type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_20(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_21(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e1839 = phi_2325_; + let _e1839 = phi_2373_; global_1 = vec4((fma(fma(_e1839.member.member_3.x, _e1839.member_1.member_2.w, fma(_e1839.member.member_2.x, _e1839.member_1.member_2.z, fma(_e1839.member.member.x, _e1839.member_1.member_2.x, (_e1839.member.member_1.x * _e1839.member_1.member_2.y)))), _e1553, fma(fma(_e1839.member.member_3.x, _e1839.member_1.member.w, fma(_e1839.member.member_2.x, _e1839.member_1.member.z, fma(_e1839.member.member.x, _e1839.member_1.member.x, (_e1839.member.member_1.x * _e1839.member_1.member.y)))), _e1551, (fma(_e1839.member.member_3.x, _e1839.member_1.member_1.w, fma(_e1839.member.member_2.x, _e1839.member_1.member_1.z, fma(_e1839.member.member.x, _e1839.member_1.member_1.x, (_e1839.member.member_1.x * _e1839.member_1.member_1.y)))) * _e1552))) + fma(_e1839.member.member_3.x, _e1839.member_1.member_3.w, fma(_e1839.member.member_2.x, _e1839.member_1.member_3.z, fma(_e1839.member.member.x, _e1839.member_1.member_3.x, (_e1839.member.member_1.x * _e1839.member_1.member_3.y))))), (fma(fma(_e1839.member.member_3.y, _e1839.member_1.member_2.w, fma(_e1839.member.member_2.y, _e1839.member_1.member_2.z, fma(_e1839.member.member.y, _e1839.member_1.member_2.x, (_e1839.member.member_1.y * _e1839.member_1.member_2.y)))), _e1553, fma(fma(_e1839.member.member_3.y, _e1839.member_1.member.w, fma(_e1839.member.member_2.y, _e1839.member_1.member.z, fma(_e1839.member.member.y, _e1839.member_1.member.x, (_e1839.member.member_1.y * _e1839.member_1.member.y)))), _e1551, (fma(_e1839.member.member_3.y, _e1839.member_1.member_1.w, fma(_e1839.member.member_2.y, _e1839.member_1.member_1.z, fma(_e1839.member.member.y, _e1839.member_1.member_1.x, (_e1839.member.member_1.y * _e1839.member_1.member_1.y)))) * _e1552))) + fma(_e1839.member.member_3.y, _e1839.member_1.member_3.w, fma(_e1839.member.member_2.y, _e1839.member_1.member_3.z, fma(_e1839.member.member.y, _e1839.member_1.member_3.x, (_e1839.member.member_1.y * _e1839.member_1.member_3.y))))), (fma(fma(_e1839.member.member_3.z, _e1839.member_1.member_2.w, fma(_e1839.member.member_2.z, _e1839.member_1.member_2.z, fma(_e1839.member.member.z, _e1839.member_1.member_2.x, (_e1839.member.member_1.z * _e1839.member_1.member_2.y)))), _e1553, fma(fma(_e1839.member.member_3.z, _e1839.member_1.member.w, fma(_e1839.member.member_2.z, _e1839.member_1.member.z, fma(_e1839.member.member.z, _e1839.member_1.member.x, (_e1839.member.member_1.z * _e1839.member_1.member.y)))), _e1551, (fma(_e1839.member.member_3.z, _e1839.member_1.member_1.w, fma(_e1839.member.member_2.z, _e1839.member_1.member_1.z, fma(_e1839.member.member.z, _e1839.member_1.member_1.x, (_e1839.member.member_1.z * _e1839.member_1.member_1.y)))) * _e1552))) + fma(_e1839.member.member_3.z, _e1839.member_1.member_3.w, fma(_e1839.member.member_2.z, _e1839.member_1.member_3.z, fma(_e1839.member.member.z, _e1839.member_1.member_3.x, (_e1839.member.member_1.z * _e1839.member_1.member_3.y))))), (fma(fma(_e1839.member.member_3.w, _e1839.member_1.member_2.w, fma(_e1839.member.member_2.w, _e1839.member_1.member_2.z, fma(_e1839.member.member.w, _e1839.member_1.member_2.x, (_e1839.member.member_1.w * _e1839.member_1.member_2.y)))), _e1553, fma(fma(_e1839.member.member_3.w, _e1839.member_1.member.w, fma(_e1839.member.member_2.w, _e1839.member_1.member.z, fma(_e1839.member.member.w, _e1839.member_1.member.x, (_e1839.member.member_1.w * _e1839.member_1.member.y)))), _e1551, (fma(_e1839.member.member_3.w, _e1839.member_1.member_1.w, fma(_e1839.member.member_2.w, _e1839.member_1.member_1.z, fma(_e1839.member.member.w, _e1839.member_1.member_1.x, (_e1839.member.member_1.w * _e1839.member_1.member_1.y)))) * _e1552))) + fma(_e1839.member.member_3.w, _e1839.member_1.member_3.w, fma(_e1839.member.member_2.w, _e1839.member_1.member_3.z, fma(_e1839.member.member.w, _e1839.member_1.member_3.x, (_e1839.member.member_1.w * _e1839.member_1.member_3.y)))))); } else { global_1 = vec4(10f, 10f, 10f, 1f); diff --git a/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.spv b/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.spv index bf7e54dc..203b6a85 100644 Binary files a/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.spv and b/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.spv differ diff --git a/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.wgsl b/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.wgsl index e6cb321e..af3719af 100644 --- a/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.wgsl +++ b/crates/renderling/shaders/tutorial-tutorial_slabbed_renderlet.wgsl @@ -61,28 +61,28 @@ fn function() { var local_2: array; var local_3: array; var phi_613_: u32; - var phi_1381_: bool; + var phi_1413_: bool; var phi_699_: type_22; var phi_700_: type_22; - var phi_715_: type_22; - var phi_728_: bool; - var phi_734_: type_22; - var phi_735_: type_22; - var phi_750_: type_22; - var phi_764_: bool; - var phi_768_: type_28; - var phi_1412_: bool; - var phi_819_: type_25; - var phi_1482_: bool; - var phi_980_: type_22; - var phi_981_: type_22; + var phi_723_: type_22; + var phi_736_: bool; + var phi_742_: type_22; + var phi_743_: type_22; + var phi_766_: type_22; + var phi_780_: bool; + var phi_784_: type_28; + var phi_1443_: bool; + var phi_835_: type_25; + var phi_1513_: bool; var phi_996_: type_22; - var phi_1023_: bool; - var phi_1029_: type_22; - var phi_1030_: type_22; - var phi_1045_: type_22; - var phi_1068_: bool; - var phi_1076_: type_20; + var phi_997_: type_22; + var phi_1020_: type_22; + var phi_1047_: bool; + var phi_1053_: type_22; + var phi_1054_: type_22; + var phi_1077_: type_22; + var phi_1100_: bool; + var phi_1108_: type_20; let _e76 = global_4; let _e77 = global; @@ -98,11 +98,11 @@ fn function() { } let _e100 = phi_613_; if (_e79 >= 26u) { - phi_1381_ = (_e100 <= (_e79 - 26u)); + phi_1413_ = (_e100 <= (_e79 - 26u)); } else { - phi_1381_ = false; + phi_1413_ = false; } - let _e105 = phi_1381_; + let _e105 = phi_1413_; if _e105 { let _e108 = global_1.member[_e100]; let _e113 = global_1.member[(_e100 + 1u)]; @@ -128,30 +128,30 @@ fn function() { let _e203 = phi_699_; if (_e203.member < _e203.member_1) { phi_700_ = type_22((_e203.member + 1u), _e203.member_1); - phi_715_ = type_22(1u, _e203.member); + phi_723_ = type_22(1u, _e203.member); } else { phi_700_ = _e203; - phi_715_ = type_22(0u, type_22().member_1); + phi_723_ = type_22(0u, type_22().member_1); } let _e216 = phi_700_; - let _e218 = phi_715_; + let _e218 = phi_723_; switch bitcast(_e218.member) { case 0: { - phi_728_ = false; + phi_736_ = false; break; } case 1: { let _e225 = global_1.member[((_e100 + 18u) + _e218.member_1)]; local_3[_e218.member_1] = _e225; - phi_728_ = true; + phi_736_ = true; break; } default: { - phi_728_ = bool(); + phi_736_ = bool(); break; } } - let _e228 = phi_728_; + let _e228 = phi_736_; continue; continuing { phi_699_ = _e216; @@ -160,54 +160,54 @@ fn function() { } let _e230 = local_3; local_2 = array(0f, 0f, 0f, 0f); - phi_734_ = type_22(0u, 4u); + phi_742_ = type_22(0u, 4u); loop { - let _e233 = phi_734_; + let _e233 = phi_742_; if (_e233.member < _e233.member_1) { - phi_735_ = type_22((_e233.member + 1u), _e233.member_1); - phi_750_ = type_22(1u, _e233.member); + phi_743_ = type_22((_e233.member + 1u), _e233.member_1); + phi_766_ = type_22(1u, _e233.member); } else { - phi_735_ = _e233; - phi_750_ = type_22(0u, type_22().member_1); + phi_743_ = _e233; + phi_766_ = type_22(0u, type_22().member_1); } - let _e246 = phi_735_; - let _e248 = phi_750_; + let _e246 = phi_743_; + let _e248 = phi_766_; switch bitcast(_e248.member) { case 0: { - phi_764_ = false; + phi_780_ = false; break; } case 1: { let _e255 = global_1.member[((_e100 + 22u) + _e248.member_1)]; local_2[_e248.member_1] = bitcast(_e255); - phi_764_ = true; + phi_780_ = true; break; } default: { - phi_764_ = bool(); + phi_780_ = bool(); break; } } - let _e259 = phi_764_; + let _e259 = phi_780_; continue; continuing { - phi_734_ = _e246; + phi_742_ = _e246; break if !(_e259); } } let _e261 = local_2; - phi_768_ = type_28(vec3(bitcast(_e108), bitcast(_e113), bitcast(_e118)), vec4(bitcast(_e124), bitcast(_e129), bitcast(_e134), bitcast(_e139)), vec3(bitcast(_e167), bitcast(_e172), bitcast(_e177)), vec4(bitcast(_e183), bitcast(_e188), bitcast(_e193), bitcast(_e198)), _e230, _e261, vec2(bitcast(_e145), bitcast(_e150)), vec2(bitcast(_e156), bitcast(_e161))); + phi_784_ = type_28(vec3(bitcast(_e108), bitcast(_e113), bitcast(_e118)), vec4(bitcast(_e124), bitcast(_e129), bitcast(_e134), bitcast(_e139)), vec3(bitcast(_e167), bitcast(_e172), bitcast(_e177)), vec4(bitcast(_e183), bitcast(_e188), bitcast(_e193), bitcast(_e198)), _e230, _e261, vec2(bitcast(_e145), bitcast(_e150)), vec2(bitcast(_e156), bitcast(_e161))); } else { - phi_768_ = type_28(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), vec3(0f, 0f, 1f), vec4(0f, 1f, 0f, 0f), array(0u, 0u, 0u, 0u), array(0f, 0f, 0f, 0f), vec2(0f, 0f), vec2(0f, 0f)); + phi_784_ = type_28(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), vec3(0f, 0f, 1f), vec4(0f, 1f, 0f, 0f), array(0u, 0u, 0u, 0u), array(0f, 0f, 0f, 0f), vec2(0f, 0f), vec2(0f, 0f)); } - let _e264 = phi_768_; + let _e264 = phi_784_; global_3 = _e264.member_1; if (_e79 >= 10u) { - phi_1412_ = (_e95 <= (_e79 - 10u)); + phi_1443_ = (_e95 <= (_e79 - 10u)); } else { - phi_1412_ = false; + phi_1443_ = false; } - let _e270 = phi_1412_; + let _e270 = phi_1443_; if _e270 { let _e273 = global_1.member[_e95]; let _e278 = global_1.member[(_e95 + 1u)]; @@ -219,11 +219,11 @@ fn function() { let _e310 = global_1.member[(_e95 + 7u)]; let _e315 = global_1.member[(_e95 + 8u)]; let _e320 = global_1.member[(_e95 + 9u)]; - phi_819_ = type_25(vec3(bitcast(_e273), bitcast(_e278), bitcast(_e283)), vec4(bitcast(_e289), bitcast(_e294), bitcast(_e299), bitcast(_e304)), vec3(bitcast(_e310), bitcast(_e315), bitcast(_e320))); + phi_835_ = type_25(vec3(bitcast(_e273), bitcast(_e278), bitcast(_e283)), vec4(bitcast(_e289), bitcast(_e294), bitcast(_e299), bitcast(_e304)), vec3(bitcast(_e310), bitcast(_e315), bitcast(_e320))); } else { - phi_819_ = type_25(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); + phi_835_ = type_25(vec3(0f, 0f, 0f), vec4(0f, 0f, 0f, 1f), vec3(1f, 1f, 1f)); } - let _e325 = phi_819_; + let _e325 = phi_835_; let _e333 = (_e325.member_1.x + _e325.member_1.x); let _e334 = (_e325.member_1.y + _e325.member_1.y); let _e335 = (_e325.member_1.z + _e325.member_1.z); @@ -235,11 +235,11 @@ fn function() { let _e362 = (vec4(fma(_e325.member_1.x, _e334, -(_e340)), (1f - fma(_e325.member_1.x, _e333, _e337)), fma(_e325.member_1.y, _e335, _e338), 0f) * _e325.member_2.y); let _e364 = (vec4(fma(_e325.member_1.x, _e335, _e339), fma(_e325.member_1.y, _e335, -(_e338)), (1f - fma(_e325.member_1.x, _e333, (_e325.member_1.y * _e334))), 0f) * _e325.member_2.z); if (_e79 >= 83u) { - phi_1482_ = (_e91 <= (_e79 - 83u)); + phi_1513_ = (_e91 <= (_e79 - 83u)); } else { - phi_1482_ = false; + phi_1513_ = false; } - let _e372 = phi_1482_; + let _e372 = phi_1513_; if _e372 { let _e375 = global_1.member[_e91]; let _e380 = global_1.member[(_e91 + 1u)]; @@ -277,21 +277,21 @@ fn function() { let _e550 = global_1.member[(_e91 + 33u)]; let _e555 = global_1.member[(_e91 + 34u)]; local_1 = array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f)); - phi_980_ = type_22(0u, 6u); + phi_996_ = type_22(0u, 6u); loop { - let _e560 = phi_980_; + let _e560 = phi_996_; if (_e560.member < _e560.member_1) { - phi_981_ = type_22((_e560.member + 1u), _e560.member_1); - phi_996_ = type_22(1u, _e560.member); + phi_997_ = type_22((_e560.member + 1u), _e560.member_1); + phi_1020_ = type_22(1u, _e560.member); } else { - phi_981_ = _e560; - phi_996_ = type_22(0u, type_22().member_1); + phi_997_ = _e560; + phi_1020_ = type_22(0u, type_22().member_1); } - let _e573 = phi_981_; - let _e575 = phi_996_; + let _e573 = phi_997_; + let _e575 = phi_1020_; switch bitcast(_e575.member) { case 0: { - phi_1023_ = false; + phi_1047_ = false; break; } case 1: { @@ -301,38 +301,38 @@ fn function() { let _e593 = global_1.member[(_e580 + 2u)]; let _e598 = global_1.member[(_e580 + 3u)]; local_1[_e575.member_1] = vec4(bitcast(_e583), bitcast(_e588), bitcast(_e593), bitcast(_e598)); - phi_1023_ = true; + phi_1047_ = true; break; } default: { - phi_1023_ = bool(); + phi_1047_ = bool(); break; } } - let _e603 = phi_1023_; + let _e603 = phi_1047_; continue; continuing { - phi_980_ = _e573; + phi_996_ = _e573; break if !(_e603); } } let _e605 = local_1; local = array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)); - phi_1029_ = type_22(0u, 8u); + phi_1053_ = type_22(0u, 8u); loop { - let _e608 = phi_1029_; + let _e608 = phi_1053_; if (_e608.member < _e608.member_1) { - phi_1030_ = type_22((_e608.member + 1u), _e608.member_1); - phi_1045_ = type_22(1u, _e608.member); + phi_1054_ = type_22((_e608.member + 1u), _e608.member_1); + phi_1077_ = type_22(1u, _e608.member); } else { - phi_1030_ = _e608; - phi_1045_ = type_22(0u, type_22().member_1); + phi_1054_ = _e608; + phi_1077_ = type_22(0u, type_22().member_1); } - let _e621 = phi_1030_; - let _e623 = phi_1045_; + let _e621 = phi_1054_; + let _e623 = phi_1077_; switch bitcast(_e623.member) { case 0: { - phi_1068_ = false; + phi_1100_ = false; break; } case 1: { @@ -341,27 +341,27 @@ fn function() { let _e636 = global_1.member[(_e628 + 1u)]; let _e641 = global_1.member[(_e628 + 2u)]; local[_e623.member_1] = vec3(bitcast(_e631), bitcast(_e636), bitcast(_e641)); - phi_1068_ = true; + phi_1100_ = true; break; } default: { - phi_1068_ = bool(); + phi_1100_ = bool(); break; } } - let _e646 = phi_1068_; + let _e646 = phi_1100_; continue; continuing { - phi_1029_ = _e621; + phi_1053_ = _e621; break if !(_e646); } } let _e648 = local; - phi_1076_ = type_20(type_18(vec4(bitcast(_e375), bitcast(_e380), bitcast(_e385), bitcast(_e390)), vec4(bitcast(_e396), bitcast(_e401), bitcast(_e406), bitcast(_e411)), vec4(bitcast(_e417), bitcast(_e422), bitcast(_e427), bitcast(_e432)), vec4(bitcast(_e438), bitcast(_e443), bitcast(_e448), bitcast(_e453))), type_18(vec4(bitcast(_e460), bitcast(_e465), bitcast(_e470), bitcast(_e475)), vec4(bitcast(_e481), bitcast(_e486), bitcast(_e491), bitcast(_e496)), vec4(bitcast(_e502), bitcast(_e507), bitcast(_e512), bitcast(_e517)), vec4(bitcast(_e523), bitcast(_e528), bitcast(_e533), bitcast(_e538))), type_19(_e648, _e605), vec3(bitcast(_e545), bitcast(_e550), bitcast(_e555))); + phi_1108_ = type_20(type_18(vec4(bitcast(_e375), bitcast(_e380), bitcast(_e385), bitcast(_e390)), vec4(bitcast(_e396), bitcast(_e401), bitcast(_e406), bitcast(_e411)), vec4(bitcast(_e417), bitcast(_e422), bitcast(_e427), bitcast(_e432)), vec4(bitcast(_e438), bitcast(_e443), bitcast(_e448), bitcast(_e453))), type_18(vec4(bitcast(_e460), bitcast(_e465), bitcast(_e470), bitcast(_e475)), vec4(bitcast(_e481), bitcast(_e486), bitcast(_e491), bitcast(_e496)), vec4(bitcast(_e502), bitcast(_e507), bitcast(_e512), bitcast(_e517)), vec4(bitcast(_e523), bitcast(_e528), bitcast(_e533), bitcast(_e538))), type_19(_e648, _e605), vec3(bitcast(_e545), bitcast(_e550), bitcast(_e555))); } else { - phi_1076_ = type_20(type_18(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_18(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_19(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); + phi_1108_ = type_20(type_18(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_18(vec4(1f, 0f, 0f, 0f), vec4(0f, 1f, 0f, 0f), vec4(0f, 0f, 1f, 0f), vec4(0f, 0f, 0f, 1f)), type_19(array, 8>(vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f), vec3(0f, 0f, 0f)), array, 6>(vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f), vec4(0f, 0f, 0f, 0f))), vec3(0f, 0f, 0f)); } - let _e652 = phi_1076_; + let _e652 = phi_1108_; let _e692 = fma(_e652.member.member_3.x, _e652.member_1.member.w, fma(_e652.member.member_2.x, _e652.member_1.member.z, fma(_e652.member.member.x, _e652.member_1.member.x, (_e652.member.member_1.x * _e652.member_1.member.y)))); let _e693 = fma(_e652.member.member_3.y, _e652.member_1.member.w, fma(_e652.member.member_2.y, _e652.member_1.member.z, fma(_e652.member.member.y, _e652.member_1.member.x, (_e652.member.member_1.y * _e652.member_1.member.y)))); let _e694 = fma(_e652.member.member_3.z, _e652.member_1.member.w, fma(_e652.member.member_2.z, _e652.member_1.member.z, fma(_e652.member.member.z, _e652.member_1.member.x, (_e652.member.member_1.z * _e652.member_1.member.y)))); diff --git a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.spv b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.spv index f33fafbc..c9e9a679 100644 Binary files a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.spv and b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.spv differ diff --git a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.wgsl b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.wgsl index 0582f04a..433cb757 100644 --- a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.wgsl +++ b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices.wgsl @@ -33,29 +33,29 @@ var global_4: u32; fn function() { var local: array; var local_1: array; - var phi_365_: bool; + var phi_381_: bool; var phi_148_: type_13; - var phi_391_: u32; - var phi_410_: bool; + var phi_407_: u32; + var phi_426_: bool; var phi_239_: type_13; var phi_240_: type_13; - var phi_255_: type_13; - var phi_268_: bool; - var phi_274_: type_13; - var phi_275_: type_13; - var phi_290_: type_13; - var phi_304_: bool; - var phi_308_: type_18; + var phi_263_: type_13; + var phi_276_: bool; + var phi_282_: type_13; + var phi_283_: type_13; + var phi_306_: type_13; + var phi_320_: bool; + var phi_324_: type_18; let _e45 = global_4; let _e46 = global; let _e48 = arrayLength((&global_1.member)); if (_e48 >= 2u) { - phi_365_ = (_e45 <= (_e48 - 2u)); + phi_381_ = (_e45 <= (_e48 - 2u)); } else { - phi_365_ = false; + phi_381_ = false; } - let _e53 = phi_365_; + let _e53 = phi_381_; if _e53 { let _e56 = global_1.member[_e45]; let _e60 = global_1.member[(_e45 + 1u)]; @@ -65,17 +65,17 @@ fn function() { } let _e63 = phi_148_; if (_e46 >= _e63.member_1) { - phi_391_ = 4294967295u; + phi_407_ = 4294967295u; } else { - phi_391_ = (_e63.member + (26u * _e46)); + phi_407_ = (_e63.member + (26u * _e46)); } - let _e70 = phi_391_; + let _e70 = phi_407_; if (_e48 >= 26u) { - phi_410_ = (_e70 <= (_e48 - 26u)); + phi_426_ = (_e70 <= (_e48 - 26u)); } else { - phi_410_ = false; + phi_426_ = false; } - let _e75 = phi_410_; + let _e75 = phi_426_; if _e75 { let _e78 = global_1.member[_e70]; let _e83 = global_1.member[(_e70 + 1u)]; @@ -101,30 +101,30 @@ fn function() { let _e173 = phi_239_; if (_e173.member < _e173.member_1) { phi_240_ = type_13((_e173.member + 1u), _e173.member_1); - phi_255_ = type_13(1u, _e173.member); + phi_263_ = type_13(1u, _e173.member); } else { phi_240_ = _e173; - phi_255_ = type_13(0u, type_13().member_1); + phi_263_ = type_13(0u, type_13().member_1); } let _e186 = phi_240_; - let _e188 = phi_255_; + let _e188 = phi_263_; switch bitcast(_e188.member) { case 0: { - phi_268_ = false; + phi_276_ = false; break; } case 1: { let _e195 = global_1.member[((_e70 + 18u) + _e188.member_1)]; local_1[_e188.member_1] = _e195; - phi_268_ = true; + phi_276_ = true; break; } default: { - phi_268_ = bool(); + phi_276_ = bool(); break; } } - let _e198 = phi_268_; + let _e198 = phi_276_; continue; continuing { phi_239_ = _e186; @@ -133,47 +133,47 @@ fn function() { } let _e200 = local_1; local = array(0f, 0f, 0f, 0f); - phi_274_ = type_13(0u, 4u); + phi_282_ = type_13(0u, 4u); loop { - let _e203 = phi_274_; + let _e203 = phi_282_; if (_e203.member < _e203.member_1) { - phi_275_ = type_13((_e203.member + 1u), _e203.member_1); - phi_290_ = type_13(1u, _e203.member); + phi_283_ = type_13((_e203.member + 1u), _e203.member_1); + phi_306_ = type_13(1u, _e203.member); } else { - phi_275_ = _e203; - phi_290_ = type_13(0u, type_13().member_1); + phi_283_ = _e203; + phi_306_ = type_13(0u, type_13().member_1); } - let _e216 = phi_275_; - let _e218 = phi_290_; + let _e216 = phi_283_; + let _e218 = phi_306_; switch bitcast(_e218.member) { case 0: { - phi_304_ = false; + phi_320_ = false; break; } case 1: { let _e225 = global_1.member[((_e70 + 22u) + _e218.member_1)]; local[_e218.member_1] = bitcast(_e225); - phi_304_ = true; + phi_320_ = true; break; } default: { - phi_304_ = bool(); + phi_320_ = bool(); break; } } - let _e229 = phi_304_; + let _e229 = phi_320_; continue; continuing { - phi_274_ = _e216; + phi_282_ = _e216; break if !(_e229); } } let _e231 = local; - phi_308_ = type_18(vec3(bitcast(_e78), bitcast(_e83), bitcast(_e88)), vec4(bitcast(_e94), bitcast(_e99), bitcast(_e104), bitcast(_e109)), vec3(bitcast(_e137), bitcast(_e142), bitcast(_e147)), vec4(bitcast(_e153), bitcast(_e158), bitcast(_e163), bitcast(_e168)), _e200, _e231, vec2(bitcast(_e115), bitcast(_e120)), vec2(bitcast(_e126), bitcast(_e131))); + phi_324_ = type_18(vec3(bitcast(_e78), bitcast(_e83), bitcast(_e88)), vec4(bitcast(_e94), bitcast(_e99), bitcast(_e104), bitcast(_e109)), vec3(bitcast(_e137), bitcast(_e142), bitcast(_e147)), vec4(bitcast(_e153), bitcast(_e158), bitcast(_e163), bitcast(_e168)), _e200, _e231, vec2(bitcast(_e115), bitcast(_e120)), vec2(bitcast(_e126), bitcast(_e131))); } else { - phi_308_ = type_18(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), vec3(0f, 0f, 1f), vec4(0f, 1f, 0f, 0f), array(0u, 0u, 0u, 0u), array(0f, 0f, 0f, 0f), vec2(0f, 0f), vec2(0f, 0f)); + phi_324_ = type_18(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), vec3(0f, 0f, 1f), vec4(0f, 1f, 0f, 0f), array(0u, 0u, 0u, 0u), array(0f, 0f, 0f, 0f), vec2(0f, 0f), vec2(0f, 0f)); } - let _e234 = phi_308_; + let _e234 = phi_324_; global_2 = vec4(_e234.member.x, _e234.member.y, _e234.member.z, 1f); global_3 = _e234.member_1; return; diff --git a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.spv b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.spv index 60ad158b..bba8dfb1 100644 Binary files a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.spv and b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.spv differ diff --git a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.wgsl b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.wgsl index fa14608c..49acbdde 100644 --- a/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.wgsl +++ b/crates/renderling/shaders/tutorial-tutorial_slabbed_vertices_no_instance.wgsl @@ -32,26 +32,26 @@ var global_3: vec4; fn function() { var local: array; var local_1: array; - var phi_296_: bool; - var phi_179_: type_13; + var phi_312_: bool; var phi_180_: type_13; - var phi_195_: type_13; - var phi_208_: bool; - var phi_214_: type_13; - var phi_215_: type_13; - var phi_230_: type_13; - var phi_244_: bool; - var phi_248_: type_18; + var phi_181_: type_13; + var phi_204_: type_13; + var phi_217_: bool; + var phi_223_: type_13; + var phi_224_: type_13; + var phi_247_: type_13; + var phi_261_: bool; + var phi_265_: type_18; let _e42 = global; let _e44 = arrayLength((&global_1.member)); let _e45 = (_e42 * 26u); if (_e44 >= 26u) { - phi_296_ = (_e45 <= (_e44 - 26u)); + phi_312_ = (_e45 <= (_e44 - 26u)); } else { - phi_296_ = false; + phi_312_ = false; } - let _e50 = phi_296_; + let _e50 = phi_312_; if _e50 { let _e53 = global_1.member[_e45]; let _e58 = global_1.member[(_e45 + 1u)]; @@ -72,84 +72,84 @@ fn function() { let _e138 = global_1.member[(_e45 + 16u)]; let _e143 = global_1.member[(_e45 + 17u)]; local_1 = array(0u, 0u, 0u, 0u); - phi_179_ = type_13(0u, 4u); + phi_180_ = type_13(0u, 4u); loop { - let _e148 = phi_179_; + let _e148 = phi_180_; if (_e148.member < _e148.member_1) { - phi_180_ = type_13((_e148.member + 1u), _e148.member_1); - phi_195_ = type_13(1u, _e148.member); + phi_181_ = type_13((_e148.member + 1u), _e148.member_1); + phi_204_ = type_13(1u, _e148.member); } else { - phi_180_ = _e148; - phi_195_ = type_13(0u, type_13().member_1); + phi_181_ = _e148; + phi_204_ = type_13(0u, type_13().member_1); } - let _e161 = phi_180_; - let _e163 = phi_195_; + let _e161 = phi_181_; + let _e163 = phi_204_; switch bitcast(_e163.member) { case 0: { - phi_208_ = false; + phi_217_ = false; break; } case 1: { let _e170 = global_1.member[((_e45 + 18u) + _e163.member_1)]; local_1[_e163.member_1] = _e170; - phi_208_ = true; + phi_217_ = true; break; } default: { - phi_208_ = bool(); + phi_217_ = bool(); break; } } - let _e173 = phi_208_; + let _e173 = phi_217_; continue; continuing { - phi_179_ = _e161; + phi_180_ = _e161; break if !(_e173); } } let _e175 = local_1; local = array(0f, 0f, 0f, 0f); - phi_214_ = type_13(0u, 4u); + phi_223_ = type_13(0u, 4u); loop { - let _e178 = phi_214_; + let _e178 = phi_223_; if (_e178.member < _e178.member_1) { - phi_215_ = type_13((_e178.member + 1u), _e178.member_1); - phi_230_ = type_13(1u, _e178.member); + phi_224_ = type_13((_e178.member + 1u), _e178.member_1); + phi_247_ = type_13(1u, _e178.member); } else { - phi_215_ = _e178; - phi_230_ = type_13(0u, type_13().member_1); + phi_224_ = _e178; + phi_247_ = type_13(0u, type_13().member_1); } - let _e191 = phi_215_; - let _e193 = phi_230_; + let _e191 = phi_224_; + let _e193 = phi_247_; switch bitcast(_e193.member) { case 0: { - phi_244_ = false; + phi_261_ = false; break; } case 1: { let _e200 = global_1.member[((_e45 + 22u) + _e193.member_1)]; local[_e193.member_1] = bitcast(_e200); - phi_244_ = true; + phi_261_ = true; break; } default: { - phi_244_ = bool(); + phi_261_ = bool(); break; } } - let _e204 = phi_244_; + let _e204 = phi_261_; continue; continuing { - phi_214_ = _e191; + phi_223_ = _e191; break if !(_e204); } } let _e206 = local; - phi_248_ = type_18(vec3(bitcast(_e53), bitcast(_e58), bitcast(_e63)), vec4(bitcast(_e69), bitcast(_e74), bitcast(_e79), bitcast(_e84)), vec3(bitcast(_e112), bitcast(_e117), bitcast(_e122)), vec4(bitcast(_e128), bitcast(_e133), bitcast(_e138), bitcast(_e143)), _e175, _e206, vec2(bitcast(_e90), bitcast(_e95)), vec2(bitcast(_e101), bitcast(_e106))); + phi_265_ = type_18(vec3(bitcast(_e53), bitcast(_e58), bitcast(_e63)), vec4(bitcast(_e69), bitcast(_e74), bitcast(_e79), bitcast(_e84)), vec3(bitcast(_e112), bitcast(_e117), bitcast(_e122)), vec4(bitcast(_e128), bitcast(_e133), bitcast(_e138), bitcast(_e143)), _e175, _e206, vec2(bitcast(_e90), bitcast(_e95)), vec2(bitcast(_e101), bitcast(_e106))); } else { - phi_248_ = type_18(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), vec3(0f, 0f, 1f), vec4(0f, 1f, 0f, 0f), array(0u, 0u, 0u, 0u), array(0f, 0f, 0f, 0f), vec2(0f, 0f), vec2(0f, 0f)); + phi_265_ = type_18(vec3(0f, 0f, 0f), vec4(1f, 1f, 1f, 1f), vec3(0f, 0f, 1f), vec4(0f, 1f, 0f, 0f), array(0u, 0u, 0u, 0u), array(0f, 0f, 0f, 0f), vec2(0f, 0f), vec2(0f, 0f)); } - let _e209 = phi_248_; + let _e209 = phi_265_; global_2 = vec4(_e209.member.x, _e209.member.y, _e209.member.z, 1f); global_3 = _e209.member_1; return; diff --git a/crates/renderling/src/atlas/atlas_image.rs b/crates/renderling/src/atlas/atlas_image.rs index 1b474a8f..a9515ed5 100644 --- a/crates/renderling/src/atlas/atlas_image.rs +++ b/crates/renderling/src/atlas/atlas_image.rs @@ -150,11 +150,12 @@ impl AtlasImage { let decoder = image::codecs::hdr::HdrDecoder::new(bytes).context(ImageSnafu)?; let width = decoder.metadata().width; let height = decoder.metadata().height; - let pixels = decoder.read_image_hdr().unwrap(); + let img = image::DynamicImage::from_decoder(decoder).unwrap(); + let pixels = img.into_rgb32f(); // Add alpha data. let mut pixel_data: Vec = Vec::new(); - for pixel in pixels { + for pixel in pixels.pixels() { pixel_data.push(pixel[0]); pixel_data.push(pixel[1]); pixel_data.push(pixel[2]); @@ -181,14 +182,6 @@ impl AtlasImage { } } -pub fn u16_to_u8(c: u16) -> u8 { - ((c as f32 / 65535.0) * 255.0) as u8 -} - -pub fn f32_to_u8(c: f32) -> u8 { - (c / 255.0) as u8 -} - /// Interpret/convert the pixel data into rgba8 pixels. /// /// This applies the linear transfer function if `apply_linear_transfer` is @@ -290,6 +283,7 @@ pub fn convert_to_rgba8_bytes( .chunks_exact(4) .flat_map(|p| { if let [r, g, b, a] = p { + todo!("f32_to_u8 erroneously used, use f16_to_u8 instead"); [f32_to_u8(*r), f32_to_u8(*g), f32_to_u8(*b), f32_to_u8(*a)] } else { unreachable!() diff --git a/crates/renderling/src/build.rs b/crates/renderling/src/build.rs index c11bbd31..f2ae999e 100644 --- a/crates/renderling/src/build.rs +++ b/crates/renderling/src/build.rs @@ -1,163 +1,12 @@ -//! Generates linkage for shaders. -#![allow(unexpected_cfgs)] -use quote::quote; - -#[derive(Debug, serde::Deserialize)] -struct Linkage { - source_path: std::path::PathBuf, - entry_point: String, - wgsl_entry_point: String, -} - -impl core::fmt::Display for Linkage { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let spv_source_path = self.source_path.clone(); - let spv_source_filename = spv_source_path.file_name().unwrap().to_str().unwrap(); - let spv_include_source_path = format!("../../shaders/{spv_source_filename}"); - - let wgsl_source_path = self.source_path.with_extension("wgsl"); - let wgsl_source_filename = wgsl_source_path.file_name().unwrap().to_str().unwrap(); - let wgsl_include_source_path = format!("../../shaders/{wgsl_source_filename}"); - - let Linkage { - source_path: _, - entry_point, - wgsl_entry_point, - } = self; - - let fn_name = self.fn_name(); - - let quote = quote! { - use crate::linkage::ShaderLinkage; - - #[cfg(not(target_arch = "wasm32"))] - mod target { - pub const ENTRY_POINT: &str = #entry_point; - - pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { - wgpu::include_spirv!(#spv_include_source_path) - } - - pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", #fn_name); - super::ShaderLinkage { - entry_point: ENTRY_POINT, - module: device.create_shader_module(descriptor()).into() - } - } - } - #[cfg(target_arch = "wasm32")] - mod target { - pub const ENTRY_POINT: &str = #wgsl_entry_point; - - pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { - wgpu::include_wgsl!(#wgsl_include_source_path) - } - - pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", #fn_name); - super::ShaderLinkage { - entry_point: ENTRY_POINT, - module: device.create_shader_module(descriptor()).into() - } - } - } - - pub fn linkage(device: &wgpu::Device) -> ShaderLinkage { - target::linkage(device) - } - }; - - f.write_fmt(format_args!( - r#"#![allow(dead_code)] - //! Automatically generated by Renderling's `build.rs`. - {quote} - "#, - )) - } -} - -impl Linkage { - pub fn fn_name(&self) -> &str { - self.entry_point.split("::").last().unwrap() - } -} - -fn wgsl(spv_filepath: impl AsRef, destination: impl AsRef) { - let bytes = std::fs::read(spv_filepath.as_ref()).unwrap_or_else(|e| { - panic!( - "could not read spv filepath '{}' while attempting to translate to wgsl: {e}", - spv_filepath.as_ref().display() - ); - }); - let opts = naga::front::spv::Options::default(); - let module = naga::front::spv::parse_u8_slice(&bytes, &opts).unwrap(); - let mut validator = - naga::valid::Validator::new(Default::default(), naga::valid::Capabilities::empty()); - let info = validator.validate(&module).unwrap(); - let wgsl = - naga::back::wgsl::write_string(&module, &info, naga::back::wgsl::WriterFlags::empty()) - .unwrap(); - let destination = destination.as_ref().with_extension("wgsl"); - std::fs::write(destination, wgsl).unwrap(); -} - -/// Generate linkage (Rust source) files for each shader in the manifest. -fn generate_linkage() { - println!("{:#?}", std::env::vars().collect::>()); - let cargo_manifest_dir = std::path::PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); - let shader_dir = cargo_manifest_dir.join("shaders"); - assert!( - shader_dir.is_dir(), - "missing directory '{}', you must first compile the shaders", - shader_dir.display() - ); - println!("cargo:rerun-if-changed={}", shader_dir.display()); - - let shader_manifest = cargo_manifest_dir.join("shaders/manifest.json"); - assert!( - shader_manifest.is_file(), - "missing file '{}', you must first compile the shaders", - shader_manifest.display() - ); - let linkage_dir = cargo_manifest_dir.join("src/linkage"); - assert!( - linkage_dir.is_dir(), - "missing crates/renderling/src/linkage" - ); - - println!("cwd: {:?}", std::env::current_dir().unwrap()); - - let manifest_file = std::fs::File::open(&shader_manifest).unwrap(); - let manifest: Vec = serde_json::from_reader(manifest_file).unwrap(); - let mut set = std::collections::HashSet::new(); - for linkage in manifest.into_iter() { - println!("linkage: {linkage:#?}"); - let fn_name = linkage.fn_name(); - - if set.contains(fn_name) { - panic!("Shader name '{fn_name}' is used for two or more shaders, aborting!"); - } - set.insert(fn_name.to_string()); - - let absolute_source_path = shader_dir.join(linkage.source_path.file_name().unwrap()); - let wgsl_source_path = linkage.source_path.with_extension("wgsl"); - let absolute_wgsl_source_path = shader_dir.join(wgsl_source_path.file_name().unwrap()); - wgsl(absolute_source_path, absolute_wgsl_source_path); - - let filepath = linkage_dir.join(fn_name).with_extension("rs"); - println!("filepath: {}", filepath.display()); - let contents = linkage.to_string(); - std::fs::write(&filepath, contents).unwrap(); - std::process::Command::new("rustfmt") - .args([&format!("{}", filepath.display())]) - .output() - .expect("could not format generated code"); - } -} +//! Generates linkage for shaders and sets up cfg aliases. fn main() { if std::env::var("CARGO_CFG_TARGET_ARCH").as_deref() != Ok("spirv") { - generate_linkage(); + renderling_build::generate_linkage(); + } + + cfg_aliases::cfg_aliases! { + cpu: { not(target_arch = "spirv") }, + gpu: { target_arch = "spirv" }, } } diff --git a/crates/renderling/src/color.rs b/crates/renderling/src/color.rs index 666929e5..574fc9bc 100644 --- a/crates/renderling/src/color.rs +++ b/crates/renderling/src/color.rs @@ -17,11 +17,24 @@ pub fn linear_xfer_u16(c: &mut u16) { } #[cfg(not(target_arch = "spirv"))] -pub fn linear_xfer_f16(c: &mut u16) { - let mut f = half::f16::from_bits(*c).to_f32(); - linear_xfer_f32(&mut f); - *c = half::f16::from_f32(f).to_bits(); +mod cpu { + pub fn linear_xfer_f16(c: &mut u16) { + let mut f = half::f16::from_bits(*c).to_f32(); + super::linear_xfer_f32(&mut f); + *c = half::f16::from_f32(f).to_bits(); + } + + pub fn u16_to_u8(c: u16) -> u8 { + ((c as f32 / 65535.0) * 255.0) as u8 + } + + pub fn f32_to_u8(c: f32) -> u8 { + // TODO: figure out if this is the correct impl of f32_to_u8 + (c / 255.0) as u8 + } } +#[cfg(not(target_arch = "spirv"))] +pub use cpu::*; pub fn linear_xfer_f32(c: &mut f32) { *c = c.powf(2.2); diff --git a/crates/renderling/src/cull/cpu.rs b/crates/renderling/src/cull/cpu.rs index 41924b13..5c369db9 100644 --- a/crates/renderling/src/cull/cpu.rs +++ b/crates/renderling/src/cull/cpu.rs @@ -294,30 +294,30 @@ impl DepthPyramid { pub async fn read_images( &self, ctx: &crate::Context, - ) -> Result, Vec>>, CullingError> { + ) -> Result, CullingError> { let size = self.size(); let slab_data = self.slab.read(ctx, Self::LABEL, 0..).await?; let mut images = vec![]; let mut min = f32::MAX; let mut max = f32::MIN; for (i, mip) in self.mip_data.iter().enumerate() { - let depth_data: Vec = slab_data + let depth_data: Vec = slab_data .read_vec(mip.array()) .into_iter() - .inspect(|&depth| { + .map(|depth: f32| { if i == 0 { min = min.min(depth); max = max.max(depth); } + crate::color::f32_to_u8(depth) }) .collect(); log::info!("min: {min}"); log::info!("max: {max}"); let width = size.x >> i; let height = size.y >> i; - let image: image::ImageBuffer, Vec> = - image::ImageBuffer::from_raw(width, height, depth_data) - .context(ReadMipSnafu { index: i })?; + let image = image::GrayImage::from_raw(width, height, depth_data) + .context(ReadMipSnafu { index: i })?; images.push(image); } Ok(images) @@ -991,24 +991,7 @@ mod test { // save the normalized depth image let mut depth_img = stage.get_depth_texture().read_image().unwrap(); - let mut max = Vec3::MIN; - let mut min = Vec3::MAX; - depth_img.as_rgb32f().unwrap().pixels().for_each(|c| { - let v = Vec3::from(c.0); - max = max.max(v); - min = min.min(v); - }); - let total = max.x - min.x; - depth_img - .as_mut_rgb32f() - .unwrap() - .pixels_mut() - .for_each(|c| { - let comps = c.0.map(|u| (u - min.x) / total); - c.0 = comps; - }); - log::info!("min: {min}"); - log::info!("max: {max}"); + img_diff::normalize_gray_img(&mut depth_img); img_diff::save("cull/debugging_4_depth.png", depth_img); // save the normalized pyramid images @@ -1024,9 +1007,7 @@ mod test { ) .unwrap(); for (i, mut img) in pyramid_images.into_iter().enumerate() { - img.pixels_mut().for_each(|p| { - p.0[0] = (p.0[0] - min.x) / total; - }); + img_diff::normalize_gray_img(&mut img); img_diff::save(&format!("cull/debugging_pyramid_mip_{i}.png"), img); } diff --git a/crates/renderling/src/draw/cpu.rs b/crates/renderling/src/draw/cpu.rs index ddc574e8..4f131776 100644 --- a/crates/renderling/src/draw/cpu.rs +++ b/crates/renderling/src/draw/cpu.rs @@ -110,7 +110,7 @@ impl IndirectDraws { pub async fn read_hzb_images( &self, ctx: &crate::Context, - ) -> Result, Vec>>, CullingError> { + ) -> Result, CullingError> { self.compute_culling .compute_depth_pyramid .depth_pyramid diff --git a/crates/renderling/src/linkage/bloom_downsample_fragment.rs b/crates/renderling/src/linkage/bloom_downsample_fragment.rs index 2b09fdae..124add10 100644 --- a/crates/renderling/src/linkage/bloom_downsample_fragment.rs +++ b/crates/renderling/src/linkage/bloom_downsample_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/bloom-bloom_downsample_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "bloom_downsample_fragment" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/bloom-bloom_downsample_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "bloom_downsample_fragment"); + log::debug!("creating web linkage for {}", "bloom_downsample_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/bloom_mix_fragment.rs b/crates/renderling/src/linkage/bloom_mix_fragment.rs index a1691afe..9bcd9325 100644 --- a/crates/renderling/src/linkage/bloom_mix_fragment.rs +++ b/crates/renderling/src/linkage/bloom_mix_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/bloom-bloom_mix_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "bloom_mix_fragment"); + log::debug!("creating native linkage for {}", "bloom_mix_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/bloom-bloom_mix_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "bloom_mix_fragment"); + log::debug!("creating web linkage for {}", "bloom_mix_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/bloom_upsample_fragment.rs b/crates/renderling/src/linkage/bloom_upsample_fragment.rs index b564d3ab..5884452b 100644 --- a/crates/renderling/src/linkage/bloom_upsample_fragment.rs +++ b/crates/renderling/src/linkage/bloom_upsample_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/bloom-bloom_upsample_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "bloom_upsample_fragment"); + log::debug!("creating native linkage for {}", "bloom_upsample_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/bloom-bloom_upsample_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "bloom_upsample_fragment"); + log::debug!("creating web linkage for {}", "bloom_upsample_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/bloom_vertex.rs b/crates/renderling/src/linkage/bloom_vertex.rs index 788c68d7..20417c46 100644 --- a/crates/renderling/src/linkage/bloom_vertex.rs +++ b/crates/renderling/src/linkage/bloom_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/bloom-bloom_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "bloom_vertex"); + log::debug!("creating native linkage for {}", "bloom_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/bloom-bloom_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "bloom_vertex"); + log::debug!("creating web linkage for {}", "bloom_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/brdf_lut_convolution_fragment.rs b/crates/renderling/src/linkage/brdf_lut_convolution_fragment.rs index 70616eda..47cf8a95 100644 --- a/crates/renderling/src/linkage/brdf_lut_convolution_fragment.rs +++ b/crates/renderling/src/linkage/brdf_lut_convolution_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/convolution-brdf_lut_convolution_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "brdf_lut_convolution_fragment" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/convolution-brdf_lut_convolution_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "brdf_lut_convolution_fragment" ); diff --git a/crates/renderling/src/linkage/brdf_lut_convolution_vertex.rs b/crates/renderling/src/linkage/brdf_lut_convolution_vertex.rs index 9b568294..2ada2506 100644 --- a/crates/renderling/src/linkage/brdf_lut_convolution_vertex.rs +++ b/crates/renderling/src/linkage/brdf_lut_convolution_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/convolution-brdf_lut_convolution_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "brdf_lut_convolution_vertex" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/convolution-brdf_lut_convolution_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "brdf_lut_convolution_vertex"); + log::debug!("creating web linkage for {}", "brdf_lut_convolution_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/compute_copy_depth_to_pyramid.rs b/crates/renderling/src/linkage/compute_copy_depth_to_pyramid.rs index 54ddddda..fa419158 100644 --- a/crates/renderling/src/linkage/compute_copy_depth_to_pyramid.rs +++ b/crates/renderling/src/linkage/compute_copy_depth_to_pyramid.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/cull-compute_copy_depth_to_pyramid.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "compute_copy_depth_to_pyramid" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/cull-compute_copy_depth_to_pyramid.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "compute_copy_depth_to_pyramid" ); diff --git a/crates/renderling/src/linkage/compute_copy_depth_to_pyramid_multisampled.rs b/crates/renderling/src/linkage/compute_copy_depth_to_pyramid_multisampled.rs index 7d544ce3..707b4fc0 100644 --- a/crates/renderling/src/linkage/compute_copy_depth_to_pyramid_multisampled.rs +++ b/crates/renderling/src/linkage/compute_copy_depth_to_pyramid_multisampled.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/cull-compute_copy_depth_to_pyramid_multisampled.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "compute_copy_depth_to_pyramid_multisampled" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/cull-compute_copy_depth_to_pyramid_multisampled.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "compute_copy_depth_to_pyramid_multisampled" ); diff --git a/crates/renderling/src/linkage/compute_culling.rs b/crates/renderling/src/linkage/compute_culling.rs index 1a44979a..09a45604 100644 --- a/crates/renderling/src/linkage/compute_culling.rs +++ b/crates/renderling/src/linkage/compute_culling.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/cull-compute_culling.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "compute_culling"); + log::debug!("creating native linkage for {}", "compute_culling"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/cull-compute_culling.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "compute_culling"); + log::debug!("creating web linkage for {}", "compute_culling"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/compute_downsample_depth_pyramid.rs b/crates/renderling/src/linkage/compute_downsample_depth_pyramid.rs index 2a7066ae..4c65701f 100644 --- a/crates/renderling/src/linkage/compute_downsample_depth_pyramid.rs +++ b/crates/renderling/src/linkage/compute_downsample_depth_pyramid.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/cull-compute_downsample_depth_pyramid.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "compute_downsample_depth_pyramid" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/cull-compute_downsample_depth_pyramid.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "compute_downsample_depth_pyramid" ); diff --git a/crates/renderling/src/linkage/debug_overlay_fragment.rs b/crates/renderling/src/linkage/debug_overlay_fragment.rs index 2120094a..f365ed3d 100644 --- a/crates/renderling/src/linkage/debug_overlay_fragment.rs +++ b/crates/renderling/src/linkage/debug_overlay_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/debug-debug_overlay_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "debug_overlay_fragment"); + log::debug!("creating native linkage for {}", "debug_overlay_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/debug-debug_overlay_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "debug_overlay_fragment"); + log::debug!("creating web linkage for {}", "debug_overlay_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/debug_overlay_vertex.rs b/crates/renderling/src/linkage/debug_overlay_vertex.rs index 78dc2c60..b6e66b69 100644 --- a/crates/renderling/src/linkage/debug_overlay_vertex.rs +++ b/crates/renderling/src/linkage/debug_overlay_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/debug-debug_overlay_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "debug_overlay_vertex"); + log::debug!("creating native linkage for {}", "debug_overlay_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/debug-debug_overlay_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "debug_overlay_vertex"); + log::debug!("creating web linkage for {}", "debug_overlay_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/di_convolution_fragment.rs b/crates/renderling/src/linkage/di_convolution_fragment.rs index 3f7a0ad0..8d26d94f 100644 --- a/crates/renderling/src/linkage/di_convolution_fragment.rs +++ b/crates/renderling/src/linkage/di_convolution_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/ibl-diffuse_irradiance-di_convolution_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "di_convolution_fragment"); + log::debug!("creating native linkage for {}", "di_convolution_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/ibl-diffuse_irradiance-di_convolution_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "di_convolution_fragment"); + log::debug!("creating web linkage for {}", "di_convolution_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/generate_mipmap_fragment.rs b/crates/renderling/src/linkage/generate_mipmap_fragment.rs index 339c5ccd..eec4a4ae 100644 --- a/crates/renderling/src/linkage/generate_mipmap_fragment.rs +++ b/crates/renderling/src/linkage/generate_mipmap_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/convolution-generate_mipmap_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "generate_mipmap_fragment"); + log::debug!("creating native linkage for {}", "generate_mipmap_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/convolution-generate_mipmap_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "generate_mipmap_fragment"); + log::debug!("creating web linkage for {}", "generate_mipmap_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/generate_mipmap_vertex.rs b/crates/renderling/src/linkage/generate_mipmap_vertex.rs index 355550d8..cdeab9dd 100644 --- a/crates/renderling/src/linkage/generate_mipmap_vertex.rs +++ b/crates/renderling/src/linkage/generate_mipmap_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/convolution-generate_mipmap_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "generate_mipmap_vertex"); + log::debug!("creating native linkage for {}", "generate_mipmap_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/convolution-generate_mipmap_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "generate_mipmap_vertex"); + log::debug!("creating web linkage for {}", "generate_mipmap_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/prefilter_environment_cubemap_fragment.rs b/crates/renderling/src/linkage/prefilter_environment_cubemap_fragment.rs index e91964ec..0cc0ce40 100644 --- a/crates/renderling/src/linkage/prefilter_environment_cubemap_fragment.rs +++ b/crates/renderling/src/linkage/prefilter_environment_cubemap_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/convolution-prefilter_environment_cubemap_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "prefilter_environment_cubemap_fragment" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/convolution-prefilter_environment_cubemap_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "prefilter_environment_cubemap_fragment" ); diff --git a/crates/renderling/src/linkage/prefilter_environment_cubemap_vertex.rs b/crates/renderling/src/linkage/prefilter_environment_cubemap_vertex.rs index f5bd22ca..31878097 100644 --- a/crates/renderling/src/linkage/prefilter_environment_cubemap_vertex.rs +++ b/crates/renderling/src/linkage/prefilter_environment_cubemap_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/convolution-prefilter_environment_cubemap_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "prefilter_environment_cubemap_vertex" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/convolution-prefilter_environment_cubemap_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "prefilter_environment_cubemap_vertex" ); diff --git a/crates/renderling/src/linkage/renderlet_fragment.rs b/crates/renderling/src/linkage/renderlet_fragment.rs index 9f261f3e..5984c350 100644 --- a/crates/renderling/src/linkage/renderlet_fragment.rs +++ b/crates/renderling/src/linkage/renderlet_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/stage-renderlet_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "renderlet_fragment"); + log::debug!("creating native linkage for {}", "renderlet_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/stage-renderlet_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "renderlet_fragment"); + log::debug!("creating web linkage for {}", "renderlet_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/renderlet_vertex.rs b/crates/renderling/src/linkage/renderlet_vertex.rs index e0715022..11af60ab 100644 --- a/crates/renderling/src/linkage/renderlet_vertex.rs +++ b/crates/renderling/src/linkage/renderlet_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/stage-renderlet_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "renderlet_vertex"); + log::debug!("creating native linkage for {}", "renderlet_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/stage-renderlet_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "renderlet_vertex"); + log::debug!("creating web linkage for {}", "renderlet_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/skybox_cubemap_fragment.rs b/crates/renderling/src/linkage/skybox_cubemap_fragment.rs index 1ecf4602..611d7cbb 100644 --- a/crates/renderling/src/linkage/skybox_cubemap_fragment.rs +++ b/crates/renderling/src/linkage/skybox_cubemap_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/skybox-skybox_cubemap_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "skybox_cubemap_fragment"); + log::debug!("creating native linkage for {}", "skybox_cubemap_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/skybox-skybox_cubemap_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "skybox_cubemap_fragment"); + log::debug!("creating web linkage for {}", "skybox_cubemap_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/skybox_cubemap_vertex.rs b/crates/renderling/src/linkage/skybox_cubemap_vertex.rs index 2f792fe2..f6e073c0 100644 --- a/crates/renderling/src/linkage/skybox_cubemap_vertex.rs +++ b/crates/renderling/src/linkage/skybox_cubemap_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/skybox-skybox_cubemap_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "skybox_cubemap_vertex"); + log::debug!("creating native linkage for {}", "skybox_cubemap_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/skybox-skybox_cubemap_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "skybox_cubemap_vertex"); + log::debug!("creating web linkage for {}", "skybox_cubemap_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/skybox_equirectangular_fragment.rs b/crates/renderling/src/linkage/skybox_equirectangular_fragment.rs index 9ef6fc56..55d579c7 100644 --- a/crates/renderling/src/linkage/skybox_equirectangular_fragment.rs +++ b/crates/renderling/src/linkage/skybox_equirectangular_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/skybox-skybox_equirectangular_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "skybox_equirectangular_fragment" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/skybox-skybox_equirectangular_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "skybox_equirectangular_fragment" ); diff --git a/crates/renderling/src/linkage/skybox_vertex.rs b/crates/renderling/src/linkage/skybox_vertex.rs index a7acf011..97f15663 100644 --- a/crates/renderling/src/linkage/skybox_vertex.rs +++ b/crates/renderling/src/linkage/skybox_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/skybox-skybox_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "skybox_vertex"); + log::debug!("creating native linkage for {}", "skybox_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/skybox-skybox_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "skybox_vertex"); + log::debug!("creating web linkage for {}", "skybox_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/tonemapping_fragment.rs b/crates/renderling/src/linkage/tonemapping_fragment.rs index 29ae25d4..396ca926 100644 --- a/crates/renderling/src/linkage/tonemapping_fragment.rs +++ b/crates/renderling/src/linkage/tonemapping_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tonemapping-tonemapping_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "tonemapping_fragment"); + log::debug!("creating native linkage for {}", "tonemapping_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tonemapping-tonemapping_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "tonemapping_fragment"); + log::debug!("creating web linkage for {}", "tonemapping_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/tonemapping_vertex.rs b/crates/renderling/src/linkage/tonemapping_vertex.rs index dad930fc..0ac39bb4 100644 --- a/crates/renderling/src/linkage/tonemapping_vertex.rs +++ b/crates/renderling/src/linkage/tonemapping_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tonemapping-tonemapping_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating native linkage for {}", "tonemapping_vertex"); + log::debug!("creating native linkage for {}", "tonemapping_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), @@ -22,7 +22,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tonemapping-tonemapping_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "tonemapping_vertex"); + log::debug!("creating web linkage for {}", "tonemapping_vertex"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/tutorial_implicit_isosceles_vertex.rs b/crates/renderling/src/linkage/tutorial_implicit_isosceles_vertex.rs index cc679ff2..ff5f3764 100644 --- a/crates/renderling/src/linkage/tutorial_implicit_isosceles_vertex.rs +++ b/crates/renderling/src/linkage/tutorial_implicit_isosceles_vertex.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tutorial-tutorial_implicit_isosceles_vertex.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "tutorial_implicit_isosceles_vertex" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tutorial-tutorial_implicit_isosceles_vertex.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "tutorial_implicit_isosceles_vertex" ); diff --git a/crates/renderling/src/linkage/tutorial_passthru_fragment.rs b/crates/renderling/src/linkage/tutorial_passthru_fragment.rs index 30e6172a..004def95 100644 --- a/crates/renderling/src/linkage/tutorial_passthru_fragment.rs +++ b/crates/renderling/src/linkage/tutorial_passthru_fragment.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tutorial-tutorial_passthru_fragment.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "tutorial_passthru_fragment" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tutorial-tutorial_passthru_fragment.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "tutorial_passthru_fragment"); + log::debug!("creating web linkage for {}", "tutorial_passthru_fragment"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/tutorial_slabbed_renderlet.rs b/crates/renderling/src/linkage/tutorial_slabbed_renderlet.rs index a2cf0d9f..548d00ba 100644 --- a/crates/renderling/src/linkage/tutorial_slabbed_renderlet.rs +++ b/crates/renderling/src/linkage/tutorial_slabbed_renderlet.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tutorial-tutorial_slabbed_renderlet.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "tutorial_slabbed_renderlet" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tutorial-tutorial_slabbed_renderlet.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "tutorial_slabbed_renderlet"); + log::debug!("creating web linkage for {}", "tutorial_slabbed_renderlet"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/tutorial_slabbed_vertices.rs b/crates/renderling/src/linkage/tutorial_slabbed_vertices.rs index a1a9f95a..db08ec19 100644 --- a/crates/renderling/src/linkage/tutorial_slabbed_vertices.rs +++ b/crates/renderling/src/linkage/tutorial_slabbed_vertices.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tutorial-tutorial_slabbed_vertices.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "tutorial_slabbed_vertices" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tutorial-tutorial_slabbed_vertices.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!("creating web linkage for {}", "tutorial_slabbed_vertices"); + log::debug!("creating web linkage for {}", "tutorial_slabbed_vertices"); super::ShaderLinkage { entry_point: ENTRY_POINT, module: device.create_shader_module(descriptor()).into(), diff --git a/crates/renderling/src/linkage/tutorial_slabbed_vertices_no_instance.rs b/crates/renderling/src/linkage/tutorial_slabbed_vertices_no_instance.rs index b6e0d949..42f3aeec 100644 --- a/crates/renderling/src/linkage/tutorial_slabbed_vertices_no_instance.rs +++ b/crates/renderling/src/linkage/tutorial_slabbed_vertices_no_instance.rs @@ -8,7 +8,7 @@ mod target { wgpu::include_spirv!("../../shaders/tutorial-tutorial_slabbed_vertices_no_instance.spv") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating native linkage for {}", "tutorial_slabbed_vertices_no_instance" ); @@ -25,7 +25,7 @@ mod target { wgpu::include_wgsl!("../../shaders/tutorial-tutorial_slabbed_vertices_no_instance.wgsl") } pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { - log::info!( + log::debug!( "creating web linkage for {}", "tutorial_slabbed_vertices_no_instance" ); diff --git a/crates/renderling/src/stage/cpu.rs b/crates/renderling/src/stage/cpu.rs index aee5d958..9030a999 100644 --- a/crates/renderling/src/stage/cpu.rs +++ b/crates/renderling/src/stage/cpu.rs @@ -731,7 +731,7 @@ impl Stage { DepthTexture { device: self.device.clone(), queue: self.queue.clone(), - texture: self.depth_texture.read().unwrap().clone(), + texture: self.depth_texture.read().unwrap().texture.clone(), } } diff --git a/crates/renderling/src/texture.rs b/crates/renderling/src/texture.rs index 8f254799..5f2c10fc 100644 --- a/crates/renderling/src/texture.rs +++ b/crates/renderling/src/texture.rs @@ -3,8 +3,8 @@ use std::{ops::Deref, sync::Arc}; use glam::UVec2; use image::{ - load_from_memory, ColorType, DynamicImage, GenericImage, GenericImageView, ImageBuffer, - ImageError, PixelWithColorType, Rgba32FImage, + load_from_memory, DynamicImage, GenericImage, GenericImageView, ImageBuffer, ImageError, + PixelWithColorType, Rgba32FImage, }; use mips::MipMapGenerator; use snafu::prelude::*; @@ -21,7 +21,7 @@ pub enum TextureError { #[snafu(display("Image buffer '{}' unsupported color type: {:?}", label, color_type))] UnsupportedColorType { - color_type: ColorType, + color_type: image::ExtendedColorType, label: String, }, @@ -374,7 +374,7 @@ impl Texture { dimension: wgpu::TextureDimension::D2, format: { ensure!( - P::COLOR_TYPE == ColorType::Rgba8, + P::COLOR_TYPE == image::ExtendedColorType::Rgba8, UnsupportedColorTypeSnafu { color_type: P::COLOR_TYPE, label: label @@ -671,15 +671,36 @@ impl Texture { } } +pub fn read_depth_texture_to_image( + device: &wgpu::Device, + queue: &wgpu::Queue, + width: usize, + height: usize, + texture: &wgpu::Texture, +) -> Option { + let depth_copied_buffer = Texture::read(texture, device, queue, width, height, 1, 4); + let pixels = depth_copied_buffer.pixels(device); + let pixels = bytemuck::cast_slice::(&pixels) + .iter() + .copied() + .map(|f| { + // Depth texture is stored as Depth32Float, but the values are normalized 0.0-1.0 + (255.0 * f) as u8 + }) + .collect::>(); + let img_buffer = image::GrayImage::from_raw(width as u32, height as u32, pixels)?; + Some(img_buffer) +} + /// A depth texture. pub struct DepthTexture { pub(crate) device: Arc, pub(crate) queue: Arc, - pub(crate) texture: Texture, + pub(crate) texture: Arc, } impl Deref for DepthTexture { - type Target = Texture; + type Target = wgpu::Texture; fn deref(&self) -> &Self::Target { &self.texture @@ -687,12 +708,13 @@ impl Deref for DepthTexture { } impl DepthTexture { - pub fn width(&self) -> u32 { - self.texture.texture.width() - } - - pub fn height(&self) -> u32 { - self.texture.texture.height() + pub fn new(ctx: &crate::Context, texture: impl Into>) -> Self { + let (device, queue) = ctx.get_device_and_queue_owned(); + Self { + device, + queue, + texture: texture.into(), + } } /// Converts the depth texture into an image. @@ -700,23 +722,15 @@ impl DepthTexture { /// Assumes the format is single channel 32bit. /// /// ## Panics - /// This may panic if the depth texture has a multisample count greater than - /// 1. - pub fn read_image(&self) -> Option { - let depth_copied_buffer = Texture::read( - &self.texture.texture, + /// This may panic if the depth texture has a multisample count greater than 1. + pub fn read_image(&self) -> Option { + read_depth_texture_to_image( &self.device, &self.queue, self.width() as usize, self.height() as usize, - 1, - 4, - ); - let pixels = depth_copied_buffer.pixels(&self.device); - let pixels: Vec = bytemuck::cast_slice(&pixels).to_vec(); - let img_buffer: image::ImageBuffer, Vec> = - image::ImageBuffer::from_raw(self.width(), self.height(), pixels)?; - Some(image::DynamicImage::from(img_buffer)) + &self.texture, + ) } } diff --git a/crates/xtask/Cargo.toml b/crates/xtask/Cargo.toml new file mode 100644 index 00000000..45ea47ea --- /dev/null +++ b/crates/xtask/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "xtask" +version = "0.1.0" +edition = "2021" + +[dependencies] +clap.workspace = true +env_logger.workspace = true +log.workspace = true +renderling_build = { path = "../renderling-build" } diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs new file mode 100644 index 00000000..be0be3f5 --- /dev/null +++ b/crates/xtask/src/main.rs @@ -0,0 +1,46 @@ +//! A build helper for the `renderling` project. +use clap::{Parser, Subcommand}; + +#[derive(Subcommand)] +enum Command { + /// Compile the `renderling` library into multiple SPIR-V shader entry points. + CompileShaders, + /// Generate Rust files linking `wgpu` shaders from SPIR-V shader entry points. + GenerateLinkage, +} + +#[derive(Parser)] +#[clap(author, version, about)] +struct Cli { + #[clap(subcommand)] + /// The subcommand to run + subcommand: Command, +} + +fn main() { + env_logger::builder().init(); + + let cli = Cli::parse(); + match cli.subcommand { + Command::CompileShaders => { + let paths = renderling_build::RenderlingPaths::default(); + + log::info!( + "Calling `cargo gpu toml {}", + paths.renderling_crate.display() + ); + + std::process::Command::new("cargo") + .args(["gpu", "toml"]) + .arg(&paths.renderling_crate) + .stdout(std::process::Stdio::inherit()) + .stderr(std::process::Stdio::inherit()) + .output() + .unwrap(); + } + Command::GenerateLinkage => { + log::info!("Generating linkage for shaders"); + renderling_build::generate_linkage() + } + } +}