tutorial-9-models
This commit is contained in:
parent
9e2877b657
commit
d441747c9a
12 changed files with 1475 additions and 312 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/target
|
||||
*.spv
|
||||
|
|
366
Cargo.lock
generated
366
Cargo.lock
generated
|
@ -1,26 +1,20 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
|
||||
|
||||
[[package]]
|
||||
name = "adler32"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "andrew"
|
||||
version = "0.2.1"
|
||||
|
@ -41,6 +35,12 @@ version = "0.1.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e"
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1fd36ffbb1fb7c834eac128ea8d0e310c5aeb635548f9d58861e1308d46e71c"
|
||||
|
||||
[[package]]
|
||||
name = "approx"
|
||||
version = "0.3.2"
|
||||
|
@ -67,9 +67,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "atom"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c86699c3f02778ec07158376991c8f783dd1f2f95c579ffaf0738dc984b2fe2"
|
||||
checksum = "c9ff149ed9780025acfdb36862d35b28856bb693ceb451259a7164442f22fdc3"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
|
@ -77,20 +88,6 @@ version = "1.0.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.50"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"miniz_oxide 0.4.1",
|
||||
"object",
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
|
@ -134,9 +131,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.59"
|
||||
version = "1.0.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381"
|
||||
checksum = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
]
|
||||
|
@ -197,7 +194,7 @@ checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318"
|
|||
dependencies = [
|
||||
"bitflags",
|
||||
"block",
|
||||
"core-foundation 0.9.0",
|
||||
"core-foundation 0.9.1",
|
||||
"core-graphics-types",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
|
@ -228,11 +225,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b5ed8e7e76c45974e15e41bfa8d5b0483cd90191639e01d8f5f1e606299d3fb"
|
||||
checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.8.0",
|
||||
"core-foundation-sys 0.8.1",
|
||||
"libc",
|
||||
]
|
||||
|
||||
|
@ -244,9 +241,9 @@ checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
|
|||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a21fa21941700a3cd8fcb4091f361a6a712fac632f85d9f487cc892045d55c6"
|
||||
checksum = "c0af3b5e4601de3837c9332e29e0aae47a0d46ebfa246d12b82f564bac233393"
|
||||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
|
@ -262,12 +259,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "core-graphics-types"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e92f5d519093a4178296707dbaa3880eae85a5ef5386675f361a1cf25376e93c"
|
||||
checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"core-foundation 0.9.0",
|
||||
"core-foundation 0.9.1",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
]
|
||||
|
@ -368,7 +365,7 @@ version = "2.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
]
|
||||
|
@ -396,30 +393,21 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
|
|||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.6.0"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f"
|
||||
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
|
||||
[[package]]
|
||||
name = "failure"
|
||||
version = "0.1.8"
|
||||
name = "env_logger"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
|
||||
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"failure_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure_derive"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
"synstructure",
|
||||
"atty",
|
||||
"humantime",
|
||||
"log",
|
||||
"regex",
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -437,6 +425,12 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||
|
||||
[[package]]
|
||||
name = "fs_extra"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
|
||||
|
||||
[[package]]
|
||||
name = "fuchsia-zircon"
|
||||
version = "0.3.3"
|
||||
|
@ -455,9 +449,9 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
|||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613"
|
||||
checksum = "5d8e3078b7b2a8a671cb7a3d17b4760e4181ea243227776ba83fd043b4ca034e"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
|
@ -470,9 +464,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5"
|
||||
checksum = "a7a4d35f7401e948629c9c3d6638fb9bf94e0b2121e96c3b428cc4e631f3eb74"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
|
@ -480,15 +474,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399"
|
||||
checksum = "d674eaa0056896d5ada519900dbf97ead2e46a7b6621e8160d79e2f2e1e2784b"
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314"
|
||||
checksum = "cc709ca1da6f66143b8c9bec8e6260181869893714e9b5a490b169b0414144ab"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
|
@ -497,42 +491,42 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789"
|
||||
checksum = "5fc94b64bb39543b4e432f1790b6bf18e3ee3b74653c5449f63310e9a74b123c"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"
|
||||
checksum = "f57ed14da4603b2554682e9f2ff3c65d7567b53188db96cb71538217fc64581b"
|
||||
dependencies = [
|
||||
"proc-macro-hack",
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc"
|
||||
checksum = "0d8764258ed64ebc5d9ed185cf86a95db5cac810269c5d20ececb32e0088abbd"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626"
|
||||
checksum = "4dd26820a9f3637f1302da8bceba3ff33adbe53464b54ca24d4e2d4f1db30f94"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6"
|
||||
checksum = "8a894a0acddba51a2d49a6f4263b1e64b8c579ece8af50fa86503d52cd1eea34"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
|
@ -610,10 +604,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gfx-backend-dx12"
|
||||
version = "0.6.3"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bfc194d9a1540073f181bae94087ffc9d84a5586b71962cd1b46b86e5a6d697"
|
||||
checksum = "3173338bc209dab8b83f6c02ba6ab26e31a9428993458e8d474a964b9170d639"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
"d3d12",
|
||||
"gfx-auxil",
|
||||
|
@ -639,9 +634,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gfx-backend-metal"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6b2b1e2510c8a283beac1e680cd152edc05d138c00dfabc0e3f636e143ffd66"
|
||||
checksum = "c9a5278b173f1008ad38f2bd38ca51e18a5e5d23a87195824bee468fcc390dce"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
|
@ -665,9 +660,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gfx-backend-vulkan"
|
||||
version = "0.6.1"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a84bda4200a82e1912d575801e2bb76ae19c6256359afbc0adfbbaec02fcadc6"
|
||||
checksum = "70aad11a5760d216e3899beac0356560765402f30d2c1eaa79687276c8e006f7"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"ash",
|
||||
|
@ -721,25 +716,25 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gif"
|
||||
version = "0.10.3"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af"
|
||||
checksum = "02efba560f227847cb41463a7395c514d127d4f74fff12ef0137fff1b84b96c4"
|
||||
dependencies = [
|
||||
"color_quant",
|
||||
"lzw",
|
||||
"weezl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gimli"
|
||||
version = "0.22.0"
|
||||
name = "glob"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"
|
||||
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.15"
|
||||
version = "0.1.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"
|
||||
checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
@ -754,10 +749,19 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.23.9"
|
||||
name = "humantime"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "974e194911d1f7efe3cd8a8f9db3b767e43536327e899e8bc9a12ef5711b74d2"
|
||||
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
|
||||
dependencies = [
|
||||
"quick-error",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.23.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "985fc06b1304d19c28d5c562ed78ef5316183f2b0053b46763a0b94862373c34"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
|
@ -779,9 +783,12 @@ checksum = "dd01a2a73f2f399df96b22dc88ea687ef4d76226284e7531ae3c7ee1dc5cb534"
|
|||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.6"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485"
|
||||
checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iovec"
|
||||
|
@ -850,9 +857,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.77"
|
||||
version = "0.2.79"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
|
||||
checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
@ -948,9 +955,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.5"
|
||||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f"
|
||||
checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
@ -978,15 +985,6 @@ dependencies = [
|
|||
"adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722"
|
||||
dependencies = [
|
||||
"adler",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.6.22"
|
||||
|
@ -1218,7 +1216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
]
|
||||
|
@ -1242,12 +1240,6 @@ dependencies = [
|
|||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.4.1"
|
||||
|
@ -1340,24 +1332,30 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
|
|||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "0.4.23"
|
||||
version = "0.4.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa"
|
||||
checksum = "13fbdfd6bdee3dc9be46452f86af4a4072975899cf8592466668620bebfbcc17"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "0.4.23"
|
||||
version = "0.4.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f"
|
||||
checksum = "c82fb1329f632c3552cf352d14427d57a511b1cf41db93b3a7d77906a82dcc8e"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e555d9e657502182ac97b539fb3dae8b79cda19e3e4f8ffb5e8de4f18df93c95"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
version = "0.1.0"
|
||||
|
@ -1379,7 +1377,7 @@ dependencies = [
|
|||
"bitflags",
|
||||
"crc32fast",
|
||||
"deflate",
|
||||
"miniz_oxide 0.3.7",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1420,13 +1418,19 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.21"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c"
|
||||
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
|
||||
dependencies = [
|
||||
"unicode-xid 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "1.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.13"
|
||||
|
@ -1442,7 +1446,7 @@ version = "1.0.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1518,9 +1522,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.4.0"
|
||||
version = "1.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270"
|
||||
checksum = "dcf6960dc9a5b4ee8d3e4c5787b4a112a8818e0290a42ff664ad60692fdf2032"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"crossbeam-deque",
|
||||
|
@ -1530,9 +1534,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.8.0"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0"
|
||||
checksum = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"crossbeam-deque",
|
||||
|
@ -1548,10 +1552,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.16"
|
||||
name = "regex"
|
||||
version = "1.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
|
||||
checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
"thread_local",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
|
||||
|
||||
[[package]]
|
||||
name = "rusttype"
|
||||
|
@ -1622,9 +1638,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "simba"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1585d831b5c904e42c4df7a4fcfa03e4b56a8cfa445aff0a04f4effe397ecac9"
|
||||
checksum = "cdec3fb717e5504ecbef1cf4223c334a215f95323092afeae57125ec40e4995b"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"num-complex",
|
||||
|
@ -1701,47 +1717,53 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.40"
|
||||
version = "1.0.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350"
|
||||
checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"unicode-xid 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "synstructure"
|
||||
version = "0.12.4"
|
||||
name = "termcolor"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
||||
checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
"unicode-xid 0.2.1",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.20"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08"
|
||||
checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.20"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"
|
||||
checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tiff"
|
||||
version = "0.5.0"
|
||||
|
@ -1750,9 +1772,15 @@ checksum = "3f3b8a87c4da944c3f27e5943289171ac71a6150a79ff6bacfff06d159dfff2f"
|
|||
dependencies = [
|
||||
"byteorder",
|
||||
"lzw",
|
||||
"miniz_oxide 0.3.7",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tobj"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6172100cd5b17cdd085c94f261e31101ca31886c86a2337a6687dac6d2fb3cf1"
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.6"
|
||||
|
@ -1764,19 +1792,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.19"
|
||||
version = "0.1.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c"
|
||||
checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"pin-project-lite",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.16"
|
||||
version = "0.1.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bcf46c1f1f06aeea2d6b81f3c863d0930a596c86ad1920d4e5bad6dd1d7119a"
|
||||
checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
@ -1847,7 +1876,7 @@ dependencies = [
|
|||
"bumpalo",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
|
@ -1881,7 +1910,7 @@ version = "0.2.68"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.21",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
|
@ -1964,6 +1993,12 @@ dependencies = [
|
|||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "weezl"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0e26e7a4d998e3d7949c69444b8b4916bac810da0d3a82ae612c89e952782f4"
|
||||
|
||||
[[package]]
|
||||
name = "wgpu"
|
||||
version = "0.6.0"
|
||||
|
@ -1989,9 +2024,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "0.6.3"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "317d19c2876fc26d5bc15fe986a0d2d28958337e639323fcaded23a7cf8865b9"
|
||||
checksum = "8c266a580d5cc13410797edc1bd71518033792945c25bc071a8d3bbdc46710de"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
|
@ -2018,12 +2053,17 @@ dependencies = [
|
|||
name = "wgpu-tutorial"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytemuck",
|
||||
"failure",
|
||||
"env_logger",
|
||||
"fs_extra",
|
||||
"futures",
|
||||
"glob",
|
||||
"image",
|
||||
"log",
|
||||
"nalgebra-glm",
|
||||
"shaderc",
|
||||
"tobj",
|
||||
"wgpu",
|
||||
"winit",
|
||||
]
|
||||
|
|
12
Cargo.toml
12
Cargo.toml
|
@ -11,7 +11,15 @@ wgpu = "0.6.0"
|
|||
winit = "0.22.2"
|
||||
image = "0.23.9"
|
||||
futures = "0.3.5"
|
||||
shaderc = "0.6.2"
|
||||
bytemuck = "1.4.1"
|
||||
failure = "0.1.8"
|
||||
anyhow = "1.0.33"
|
||||
nalgebra-glm = "0.8.0"
|
||||
env_logger = "0.7.1"
|
||||
log = "0.4.11"
|
||||
tobj = "2.0.2"
|
||||
|
||||
[build-dependencies]
|
||||
shaderc = "0.6.2"
|
||||
fs_extra = "1.2"
|
||||
anyhow = "1.0.33"
|
||||
glob = "0.3.0"
|
||||
|
|
78
build.rs
Normal file
78
build.rs
Normal file
|
@ -0,0 +1,78 @@
|
|||
use anyhow::*;
|
||||
use fs_extra::{copy_items, dir::CopyOptions};
|
||||
use glob::glob;
|
||||
use std::path::PathBuf;
|
||||
use std::{
|
||||
env,
|
||||
fs::{read_to_string, write},
|
||||
};
|
||||
|
||||
struct ShaderData {
|
||||
src: String,
|
||||
src_path: PathBuf,
|
||||
spv_path: PathBuf,
|
||||
kind: shaderc::ShaderKind,
|
||||
}
|
||||
|
||||
impl ShaderData {
|
||||
pub fn load(src_path: PathBuf) -> Result<Self> {
|
||||
let ext = src_path
|
||||
.extension()
|
||||
.context("File has no extension")?
|
||||
.to_str()
|
||||
.context("Extension cannot be converted to &str")?;
|
||||
let kind = match ext {
|
||||
"vert" => shaderc::ShaderKind::Vertex,
|
||||
"frag" => shaderc::ShaderKind::Fragment,
|
||||
"comp" => shaderc::ShaderKind::Compute,
|
||||
_ => bail!("Unsupported shader: {}", src_path.display()),
|
||||
};
|
||||
|
||||
let src = read_to_string(&src_path)?;
|
||||
let spv_path = src_path.with_extension(format!("{}.spv", ext));
|
||||
|
||||
Ok(Self {
|
||||
src,
|
||||
src_path,
|
||||
spv_path,
|
||||
kind,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
println!("cargo:rerun-if-changed=src/*");
|
||||
|
||||
let mut shader_paths = [
|
||||
glob("./src/**/*.vert")?,
|
||||
glob("./src/**/*.frag")?,
|
||||
glob("./src/**/*.comp")?,
|
||||
];
|
||||
|
||||
let shaders: Result<Vec<_>> = shader_paths
|
||||
.iter_mut()
|
||||
.flatten()
|
||||
.map(|glob_result| ShaderData::load(glob_result?))
|
||||
.collect();
|
||||
|
||||
let mut compiler = shaderc::Compiler::new().context("Unable to create shader compiler")?;
|
||||
|
||||
for shader in shaders? {
|
||||
let compiled = compiler.compile_into_spirv(
|
||||
&shader.src,
|
||||
shader.kind,
|
||||
&shader.src_path.to_str().unwrap(),
|
||||
"main",
|
||||
None,
|
||||
)?;
|
||||
write(shader.spv_path, compiled.as_binary_u8())?;
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-changed=res/*");
|
||||
let out_dir = env::var("OUT_DIR")?;
|
||||
let mut copy_options = CopyOptions::new();
|
||||
copy_options.overwrite = true;
|
||||
copy_items(&vec!["res/"], out_dir, ©_options)?;
|
||||
|
||||
Ok(())
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
# doing the wgpu-rs tutorial
|
||||
|
||||
[current chapter](https://sotrh.github.io/learn-wgpu/beginner/tutorial9-models/#accessing-files-in-the-res-folder)
|
||||
[current chapter](https://sotrh.github.io/learn-wgpu/intermediate/tutorial10-lighting/#ray-path-tracing)
|
||||
|
|
BIN
res/cube-diffuse.jpg
Normal file
BIN
res/cube-diffuse.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
res/cube-normal.png
Normal file
BIN
res/cube-normal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
14
res/cube.mtl
Normal file
14
res/cube.mtl
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Blender MTL File: 'cube.blend'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Material.001
|
||||
Ns 323.999994
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Bump cube-normal.png
|
||||
map_Kd cube-diffuse.jpg
|
933
res/cube.obj
Normal file
933
res/cube.obj
Normal file
|
@ -0,0 +1,933 @@
|
|||
# Blender v2.82 (sub 7) OBJ File: 'cube.blend'
|
||||
# www.blender.org
|
||||
mtllib cube.mtl
|
||||
o Cube_Finished_Cube.001
|
||||
v 0.900000 0.900000 -1.000000
|
||||
v 0.900000 1.000000 -0.900000
|
||||
v 1.000000 0.900000 -0.900000
|
||||
v 0.900000 0.930907 -0.995104
|
||||
v 0.900000 0.958769 -0.980909
|
||||
v 0.930907 0.900000 -0.995104
|
||||
v 0.931727 0.931906 -0.989305
|
||||
v 0.930693 0.957414 -0.975905
|
||||
v 0.958769 0.900000 -0.980909
|
||||
v 0.957466 0.930772 -0.975834
|
||||
v 0.952912 0.952912 -0.966338
|
||||
v 0.930907 0.995104 -0.900000
|
||||
v 0.958769 0.980909 -0.900000
|
||||
v 0.900000 0.995104 -0.930907
|
||||
v 0.931906 0.989305 -0.931727
|
||||
v 0.957414 0.975905 -0.930693
|
||||
v 0.900000 0.980909 -0.958769
|
||||
v 0.930772 0.975834 -0.957466
|
||||
v 0.952912 0.966338 -0.952912
|
||||
v 0.995104 0.900000 -0.930907
|
||||
v 0.980909 0.900000 -0.958769
|
||||
v 0.995104 0.930907 -0.900000
|
||||
v 0.989305 0.931727 -0.931906
|
||||
v 0.975905 0.930693 -0.957414
|
||||
v 0.980909 0.958769 -0.900000
|
||||
v 0.975834 0.957466 -0.930772
|
||||
v 0.966338 0.952912 -0.952912
|
||||
v 0.900000 -1.000000 -0.900000
|
||||
v 0.900000 -0.900000 -1.000000
|
||||
v 1.000000 -0.900000 -0.900000
|
||||
v 0.900000 -0.995104 -0.930907
|
||||
v 0.900000 -0.980909 -0.958769
|
||||
v 0.930907 -0.995104 -0.900000
|
||||
v 0.931727 -0.989305 -0.931906
|
||||
v 0.930693 -0.975905 -0.957414
|
||||
v 0.958769 -0.980909 -0.900000
|
||||
v 0.957466 -0.975834 -0.930772
|
||||
v 0.952912 -0.966338 -0.952912
|
||||
v 0.930907 -0.900000 -0.995104
|
||||
v 0.958769 -0.900000 -0.980909
|
||||
v 0.900000 -0.930907 -0.995104
|
||||
v 0.931906 -0.931727 -0.989305
|
||||
v 0.957414 -0.930693 -0.975905
|
||||
v 0.900000 -0.958769 -0.980909
|
||||
v 0.930772 -0.957466 -0.975834
|
||||
v 0.952912 -0.952912 -0.966338
|
||||
v 0.995104 -0.930907 -0.900000
|
||||
v 0.980909 -0.958769 -0.900000
|
||||
v 0.995104 -0.900000 -0.930907
|
||||
v 0.989305 -0.931906 -0.931727
|
||||
v 0.975905 -0.957414 -0.930693
|
||||
v 0.980909 -0.900000 -0.958769
|
||||
v 0.975834 -0.930772 -0.957466
|
||||
v 0.966338 -0.952912 -0.952912
|
||||
v 1.000000 0.900000 0.900000
|
||||
v 0.900000 1.000000 0.900000
|
||||
v 0.900000 0.900000 1.000000
|
||||
v 0.995104 0.930907 0.900000
|
||||
v 0.980909 0.958769 0.900000
|
||||
v 0.995104 0.900000 0.930907
|
||||
v 0.989305 0.931906 0.931727
|
||||
v 0.975905 0.957414 0.930693
|
||||
v 0.980909 0.900000 0.958769
|
||||
v 0.975834 0.930772 0.957466
|
||||
v 0.966338 0.952912 0.952912
|
||||
v 0.900000 0.995104 0.930907
|
||||
v 0.900000 0.980909 0.958769
|
||||
v 0.930907 0.995104 0.900000
|
||||
v 0.931727 0.989305 0.931906
|
||||
v 0.930693 0.975905 0.957414
|
||||
v 0.958769 0.980909 0.900000
|
||||
v 0.957466 0.975834 0.930772
|
||||
v 0.952912 0.966338 0.952912
|
||||
v 0.930907 0.900000 0.995104
|
||||
v 0.958769 0.900000 0.980909
|
||||
v 0.900000 0.930907 0.995104
|
||||
v 0.931906 0.931727 0.989305
|
||||
v 0.957414 0.930693 0.975905
|
||||
v 0.900000 0.958769 0.980909
|
||||
v 0.930772 0.957466 0.975834
|
||||
v 0.952912 0.952912 0.966338
|
||||
v 1.000000 -0.900000 0.900000
|
||||
v 0.900000 -0.900000 1.000000
|
||||
v 0.900000 -1.000000 0.900000
|
||||
v 0.995104 -0.900000 0.930907
|
||||
v 0.980909 -0.900000 0.958769
|
||||
v 0.995104 -0.930907 0.900000
|
||||
v 0.989305 -0.931727 0.931906
|
||||
v 0.975905 -0.930693 0.957414
|
||||
v 0.980909 -0.958769 0.900000
|
||||
v 0.975834 -0.957466 0.930772
|
||||
v 0.966338 -0.952912 0.952912
|
||||
v 0.900000 -0.930907 0.995104
|
||||
v 0.900000 -0.958769 0.980909
|
||||
v 0.930907 -0.900000 0.995104
|
||||
v 0.931727 -0.931906 0.989305
|
||||
v 0.930693 -0.957414 0.975905
|
||||
v 0.958769 -0.900000 0.980909
|
||||
v 0.957466 -0.930772 0.975834
|
||||
v 0.952912 -0.952912 0.966338
|
||||
v 0.930907 -0.995104 0.900000
|
||||
v 0.958769 -0.980909 0.900000
|
||||
v 0.900000 -0.995104 0.930907
|
||||
v 0.931906 -0.989305 0.931727
|
||||
v 0.957414 -0.975905 0.930693
|
||||
v 0.900000 -0.980909 0.958769
|
||||
v 0.930772 -0.975834 0.957466
|
||||
v 0.952912 -0.966338 0.952912
|
||||
v -0.900000 0.900000 -1.000000
|
||||
v -1.000000 0.900000 -0.900000
|
||||
v -0.900000 1.000000 -0.900000
|
||||
v -0.930907 0.900000 -0.995104
|
||||
v -0.958769 0.900000 -0.980909
|
||||
v -0.900000 0.930907 -0.995104
|
||||
v -0.931906 0.931727 -0.989305
|
||||
v -0.957414 0.930693 -0.975905
|
||||
v -0.900000 0.958769 -0.980909
|
||||
v -0.930772 0.957466 -0.975834
|
||||
v -0.952912 0.952912 -0.966338
|
||||
v -0.995104 0.930907 -0.900000
|
||||
v -0.980909 0.958769 -0.900000
|
||||
v -0.995104 0.900000 -0.930907
|
||||
v -0.989305 0.931906 -0.931727
|
||||
v -0.975905 0.957414 -0.930693
|
||||
v -0.980909 0.900000 -0.958769
|
||||
v -0.975834 0.930772 -0.957466
|
||||
v -0.966338 0.952912 -0.952912
|
||||
v -0.900000 0.995104 -0.930907
|
||||
v -0.900000 0.980909 -0.958769
|
||||
v -0.930907 0.995104 -0.900000
|
||||
v -0.931727 0.989305 -0.931906
|
||||
v -0.930693 0.975905 -0.957414
|
||||
v -0.958769 0.980909 -0.900000
|
||||
v -0.957466 0.975834 -0.930772
|
||||
v -0.952912 0.966338 -0.952912
|
||||
v -1.000000 -0.900000 -0.900000
|
||||
v -0.900000 -0.900000 -1.000000
|
||||
v -0.900000 -1.000000 -0.900000
|
||||
v -0.995104 -0.900000 -0.930907
|
||||
v -0.980909 -0.900000 -0.958769
|
||||
v -0.995104 -0.930907 -0.900000
|
||||
v -0.989305 -0.931727 -0.931906
|
||||
v -0.975905 -0.930693 -0.957414
|
||||
v -0.980909 -0.958769 -0.900000
|
||||
v -0.975834 -0.957466 -0.930772
|
||||
v -0.966338 -0.952912 -0.952912
|
||||
v -0.900000 -0.930907 -0.995104
|
||||
v -0.900000 -0.958769 -0.980909
|
||||
v -0.930907 -0.900000 -0.995104
|
||||
v -0.931727 -0.931906 -0.989305
|
||||
v -0.930693 -0.957414 -0.975905
|
||||
v -0.958769 -0.900000 -0.980909
|
||||
v -0.957466 -0.930772 -0.975834
|
||||
v -0.952912 -0.952912 -0.966338
|
||||
v -0.930907 -0.995104 -0.900000
|
||||
v -0.958769 -0.980909 -0.900000
|
||||
v -0.900000 -0.995104 -0.930907
|
||||
v -0.931906 -0.989305 -0.931727
|
||||
v -0.957414 -0.975905 -0.930693
|
||||
v -0.900000 -0.980909 -0.958769
|
||||
v -0.930772 -0.975834 -0.957466
|
||||
v -0.952912 -0.966338 -0.952912
|
||||
v -1.000000 0.900000 0.900000
|
||||
v -0.900000 0.900000 1.000000
|
||||
v -0.900000 1.000000 0.900000
|
||||
v -0.995104 0.900000 0.930907
|
||||
v -0.980909 0.900000 0.958769
|
||||
v -0.995104 0.930907 0.900000
|
||||
v -0.989305 0.931727 0.931906
|
||||
v -0.975905 0.930693 0.957414
|
||||
v -0.980909 0.958769 0.900000
|
||||
v -0.975834 0.957466 0.930772
|
||||
v -0.966338 0.952912 0.952912
|
||||
v -0.900000 0.930907 0.995104
|
||||
v -0.900000 0.958769 0.980909
|
||||
v -0.930907 0.900000 0.995104
|
||||
v -0.931727 0.931906 0.989305
|
||||
v -0.930693 0.957414 0.975905
|
||||
v -0.958769 0.900000 0.980909
|
||||
v -0.957466 0.930772 0.975834
|
||||
v -0.952912 0.952912 0.966338
|
||||
v -0.930907 0.995104 0.900000
|
||||
v -0.958769 0.980909 0.900000
|
||||
v -0.900000 0.995104 0.930907
|
||||
v -0.931906 0.989305 0.931727
|
||||
v -0.957414 0.975905 0.930693
|
||||
v -0.900000 0.980909 0.958769
|
||||
v -0.930772 0.975834 0.957466
|
||||
v -0.952912 0.966338 0.952912
|
||||
v -0.900000 -1.000000 0.900000
|
||||
v -0.900000 -0.900000 1.000000
|
||||
v -1.000000 -0.900000 0.900000
|
||||
v -0.900000 -0.995104 0.930907
|
||||
v -0.900000 -0.980909 0.958769
|
||||
v -0.930907 -0.995104 0.900000
|
||||
v -0.931727 -0.989305 0.931906
|
||||
v -0.930693 -0.975905 0.957414
|
||||
v -0.958769 -0.980909 0.900000
|
||||
v -0.957466 -0.975834 0.930772
|
||||
v -0.952912 -0.966338 0.952912
|
||||
v -0.930907 -0.900000 0.995104
|
||||
v -0.958769 -0.900000 0.980909
|
||||
v -0.900000 -0.930907 0.995104
|
||||
v -0.931906 -0.931727 0.989305
|
||||
v -0.957414 -0.930693 0.975905
|
||||
v -0.900000 -0.958769 0.980909
|
||||
v -0.930772 -0.957466 0.975834
|
||||
v -0.952912 -0.952912 0.966338
|
||||
v -0.995104 -0.930907 0.900000
|
||||
v -0.980909 -0.958769 0.900000
|
||||
v -0.995104 -0.900000 0.930907
|
||||
v -0.989305 -0.931906 0.931727
|
||||
v -0.975905 -0.957414 0.930693
|
||||
v -0.980909 -0.900000 0.958769
|
||||
v -0.975834 -0.930772 0.957466
|
||||
v -0.966338 -0.952912 0.952912
|
||||
vt 0.137500 0.512500
|
||||
vt 0.362500 0.512500
|
||||
vt 0.362500 0.737500
|
||||
vt 0.137500 0.737500
|
||||
vt 0.387500 0.012500
|
||||
vt 0.612500 0.012500
|
||||
vt 0.612500 0.237500
|
||||
vt 0.387500 0.237500
|
||||
vt 0.387500 0.762500
|
||||
vt 0.612500 0.762500
|
||||
vt 0.612500 0.987500
|
||||
vt 0.387500 0.987500
|
||||
vt 0.637500 0.512500
|
||||
vt 0.862500 0.512500
|
||||
vt 0.862500 0.737500
|
||||
vt 0.637500 0.737500
|
||||
vt 0.387500 0.512500
|
||||
vt 0.612500 0.512500
|
||||
vt 0.612500 0.737500
|
||||
vt 0.387500 0.737500
|
||||
vt 0.612500 0.487500
|
||||
vt 0.616363 0.487500
|
||||
vt 0.616488 0.491466
|
||||
vt 0.612500 0.491363
|
||||
vt 0.619846 0.487500
|
||||
vt 0.619677 0.491337
|
||||
vt 0.625000 0.487500
|
||||
vt 0.625000 0.491347
|
||||
vt 0.616346 0.494683
|
||||
vt 0.612500 0.494846
|
||||
vt 0.619114 0.494114
|
||||
vt 0.625000 0.494114
|
||||
vt 0.633637 0.512500
|
||||
vt 0.633512 0.508534
|
||||
vt 0.637500 0.508637
|
||||
vt 0.630154 0.512500
|
||||
vt 0.630323 0.508663
|
||||
vt 0.619846 0.512500
|
||||
vt 0.619683 0.508653
|
||||
vt 0.633654 0.505317
|
||||
vt 0.637500 0.505154
|
||||
vt 0.630886 0.505886
|
||||
vt 0.619114 0.505886
|
||||
vt 0.612500 0.508637
|
||||
vt 0.616466 0.508512
|
||||
vt 0.616363 0.512500
|
||||
vt 0.612500 0.505154
|
||||
vt 0.616337 0.505323
|
||||
vt 0.619114 0.500000
|
||||
vt 0.362500 0.508637
|
||||
vt 0.366466 0.508512
|
||||
vt 0.366363 0.512500
|
||||
vt 0.362500 0.505154
|
||||
vt 0.366337 0.505323
|
||||
vt 0.362500 0.500000
|
||||
vt 0.366347 0.500000
|
||||
vt 0.369683 0.508653
|
||||
vt 0.369846 0.512500
|
||||
vt 0.369114 0.505886
|
||||
vt 0.369114 0.500000
|
||||
vt 0.387500 0.487500
|
||||
vt 0.387500 0.491363
|
||||
vt 0.383534 0.491488
|
||||
vt 0.383637 0.487500
|
||||
vt 0.387500 0.494846
|
||||
vt 0.383663 0.494677
|
||||
vt 0.387500 0.505154
|
||||
vt 0.383653 0.505317
|
||||
vt 0.380317 0.491346
|
||||
vt 0.380154 0.487500
|
||||
vt 0.380886 0.494114
|
||||
vt 0.380886 0.505886
|
||||
vt 0.383637 0.512500
|
||||
vt 0.383512 0.508534
|
||||
vt 0.387500 0.508637
|
||||
vt 0.380154 0.512500
|
||||
vt 0.380323 0.508663
|
||||
vt 0.375000 0.505886
|
||||
vt 0.616363 0.737500
|
||||
vt 0.616488 0.741466
|
||||
vt 0.612500 0.741363
|
||||
vt 0.619846 0.737500
|
||||
vt 0.619677 0.741337
|
||||
vt 0.630154 0.737500
|
||||
vt 0.630317 0.741346
|
||||
vt 0.616346 0.744683
|
||||
vt 0.612500 0.744846
|
||||
vt 0.619114 0.744114
|
||||
vt 0.630886 0.744114
|
||||
vt 0.637500 0.741363
|
||||
vt 0.633534 0.741488
|
||||
vt 0.633637 0.737500
|
||||
vt 0.637500 0.744846
|
||||
vt 0.633664 0.744677
|
||||
vt 0.637500 0.750000
|
||||
vt 0.633653 0.750000
|
||||
vt 0.630886 0.750000
|
||||
vt 0.612500 0.758637
|
||||
vt 0.616466 0.758512
|
||||
vt 0.616363 0.762500
|
||||
vt 0.612500 0.755154
|
||||
vt 0.616337 0.755323
|
||||
vt 0.619683 0.758653
|
||||
vt 0.619846 0.762500
|
||||
vt 0.619114 0.755886
|
||||
vt 0.625000 0.744114
|
||||
vt 0.619114 0.750000
|
||||
vt 0.387500 0.741363
|
||||
vt 0.383534 0.741488
|
||||
vt 0.383637 0.737500
|
||||
vt 0.387500 0.744846
|
||||
vt 0.383663 0.744677
|
||||
vt 0.387500 0.755154
|
||||
vt 0.383653 0.755317
|
||||
vt 0.380317 0.741346
|
||||
vt 0.380154 0.737500
|
||||
vt 0.380886 0.744114
|
||||
vt 0.380886 0.755886
|
||||
vt 0.383637 0.762500
|
||||
vt 0.383512 0.758534
|
||||
vt 0.387500 0.758637
|
||||
vt 0.380154 0.762500
|
||||
vt 0.380323 0.758663
|
||||
vt 0.375000 0.762500
|
||||
vt 0.375000 0.758654
|
||||
vt 0.375000 0.755886
|
||||
vt 0.366363 0.737500
|
||||
vt 0.366488 0.741466
|
||||
vt 0.362500 0.741363
|
||||
vt 0.369846 0.737500
|
||||
vt 0.369677 0.741337
|
||||
vt 0.366347 0.744683
|
||||
vt 0.362500 0.744846
|
||||
vt 0.369114 0.744114
|
||||
vt 0.380886 0.750000
|
||||
vt 0.375000 0.744114
|
||||
vt 0.612500 0.262500
|
||||
vt 0.612500 0.258637
|
||||
vt 0.616466 0.258512
|
||||
vt 0.616363 0.262500
|
||||
vt 0.612500 0.255154
|
||||
vt 0.616337 0.255323
|
||||
vt 0.612500 0.244846
|
||||
vt 0.616346 0.244683
|
||||
vt 0.619683 0.258653
|
||||
vt 0.619846 0.262500
|
||||
vt 0.619114 0.255886
|
||||
vt 0.619114 0.244114
|
||||
vt 0.616363 0.237500
|
||||
vt 0.616488 0.241466
|
||||
vt 0.612500 0.241363
|
||||
vt 0.619846 0.237500
|
||||
vt 0.619677 0.241337
|
||||
vt 0.625000 0.237500
|
||||
vt 0.625000 0.241347
|
||||
vt 0.625000 0.244114
|
||||
vt 0.862500 0.508637
|
||||
vt 0.866466 0.508512
|
||||
vt 0.866363 0.512500
|
||||
vt 0.862500 0.505154
|
||||
vt 0.866337 0.505323
|
||||
vt 0.862500 0.500000
|
||||
vt 0.866347 0.500000
|
||||
vt 0.869683 0.508653
|
||||
vt 0.869846 0.512500
|
||||
vt 0.869114 0.505886
|
||||
vt 0.869114 0.500000
|
||||
vt 0.619114 0.250000
|
||||
vt 0.625000 0.255886
|
||||
vt 0.387500 0.241363
|
||||
vt 0.383534 0.241488
|
||||
vt 0.383637 0.237500
|
||||
vt 0.387500 0.244846
|
||||
vt 0.383663 0.244677
|
||||
vt 0.387500 0.255154
|
||||
vt 0.383653 0.255317
|
||||
vt 0.380317 0.241346
|
||||
vt 0.380154 0.237500
|
||||
vt 0.380886 0.244114
|
||||
vt 0.380886 0.255886
|
||||
vt 0.387500 0.262500
|
||||
vt 0.383637 0.262500
|
||||
vt 0.383512 0.258534
|
||||
vt 0.387500 0.258637
|
||||
vt 0.380154 0.262500
|
||||
vt 0.380323 0.258663
|
||||
vt 0.375000 0.262500
|
||||
vt 0.375000 0.258653
|
||||
vt 0.375000 0.255886
|
||||
vt 0.133637 0.512500
|
||||
vt 0.133512 0.508534
|
||||
vt 0.137500 0.508637
|
||||
vt 0.130154 0.512500
|
||||
vt 0.130323 0.508663
|
||||
vt 0.125000 0.512500
|
||||
vt 0.125000 0.508654
|
||||
vt 0.133653 0.505317
|
||||
vt 0.137500 0.505154
|
||||
vt 0.130886 0.505886
|
||||
vt 0.125000 0.505886
|
||||
vt 0.380886 0.250000
|
||||
vt 0.375000 0.244114
|
||||
vt 0.612500 0.008637
|
||||
vt 0.616466 0.008512
|
||||
vt 0.616363 0.012500
|
||||
vt 0.612500 0.005154
|
||||
vt 0.616337 0.005323
|
||||
vt 0.612500 0.000000
|
||||
vt 0.616346 0.000000
|
||||
vt 0.619683 0.008654
|
||||
vt 0.619846 0.012500
|
||||
vt 0.619114 0.005886
|
||||
vt 0.619114 0.000000
|
||||
vt 0.616363 0.987500
|
||||
vt 0.616488 0.991466
|
||||
vt 0.612500 0.991363
|
||||
vt 0.619846 0.987500
|
||||
vt 0.619677 0.991337
|
||||
vt 0.625000 0.987500
|
||||
vt 0.625000 0.991346
|
||||
vt 0.616346 0.994683
|
||||
vt 0.612500 0.994846
|
||||
vt 0.619114 0.994114
|
||||
vt 0.625000 0.994114
|
||||
vt 0.866363 0.737500
|
||||
vt 0.866488 0.741466
|
||||
vt 0.862500 0.741363
|
||||
vt 0.869846 0.737500
|
||||
vt 0.869677 0.741337
|
||||
vt 0.875000 0.737500
|
||||
vt 0.875000 0.741347
|
||||
vt 0.866346 0.744683
|
||||
vt 0.862500 0.744846
|
||||
vt 0.869114 0.744114
|
||||
vt 0.875000 0.744114
|
||||
vt 0.625000 0.005886
|
||||
vt 0.137500 0.741363
|
||||
vt 0.133534 0.741488
|
||||
vt 0.133637 0.737500
|
||||
vt 0.137500 0.744846
|
||||
vt 0.133663 0.744677
|
||||
vt 0.137500 0.750000
|
||||
vt 0.133653 0.750000
|
||||
vt 0.130317 0.741346
|
||||
vt 0.130154 0.737500
|
||||
vt 0.130886 0.744114
|
||||
vt 0.130886 0.750000
|
||||
vt 0.387500 0.991363
|
||||
vt 0.383534 0.991488
|
||||
vt 0.383637 0.987500
|
||||
vt 0.387500 0.994846
|
||||
vt 0.383663 0.994677
|
||||
vt 0.387500 1.000000
|
||||
vt 0.383654 1.000000
|
||||
vt 0.380317 0.991346
|
||||
vt 0.380154 0.987500
|
||||
vt 0.380886 0.994114
|
||||
vt 0.380886 1.000000
|
||||
vt 0.383637 0.012500
|
||||
vt 0.383512 0.008534
|
||||
vt 0.387500 0.008637
|
||||
vt 0.380154 0.012500
|
||||
vt 0.380323 0.008663
|
||||
vt 0.375000 0.012500
|
||||
vt 0.375000 0.008653
|
||||
vt 0.383653 0.005317
|
||||
vt 0.387500 0.005154
|
||||
vt 0.380886 0.005886
|
||||
vt 0.375000 0.005886
|
||||
vt 0.125000 0.744114
|
||||
vt 0.125000 0.737500
|
||||
vt 0.137500 0.500000
|
||||
vt 0.612500 1.000000
|
||||
vt 0.862500 0.750000
|
||||
vt 0.362500 0.750000
|
||||
vt 0.875000 0.512500
|
||||
vt 0.637500 0.500000
|
||||
vn -0.0802 -0.9935 -0.0802
|
||||
vn 0.0802 -0.9935 -0.0802
|
||||
vn 0.0802 -0.9935 0.0802
|
||||
vn -0.0802 -0.9935 0.0802
|
||||
vn -0.9935 -0.0802 0.0802
|
||||
vn -0.9935 0.0802 0.0802
|
||||
vn -0.9935 0.0802 -0.0802
|
||||
vn -0.9935 -0.0802 -0.0802
|
||||
vn 0.0802 -0.0802 0.9935
|
||||
vn 0.0802 0.0802 0.9935
|
||||
vn -0.0802 0.0802 0.9935
|
||||
vn -0.0802 -0.0802 0.9935
|
||||
vn 0.0802 0.9935 -0.0802
|
||||
vn -0.0802 0.9935 -0.0802
|
||||
vn -0.0802 0.9935 0.0802
|
||||
vn 0.0802 0.9935 0.0802
|
||||
vn 0.9935 -0.0802 -0.0802
|
||||
vn 0.9935 0.0802 -0.0802
|
||||
vn 0.9935 0.0802 0.0802
|
||||
vn 0.9935 -0.0802 0.0802
|
||||
vn 0.0802 0.0802 -0.9935
|
||||
vn 0.0801 0.3083 -0.9479
|
||||
vn 0.3068 0.3077 -0.9006
|
||||
vn 0.3084 0.0804 -0.9478
|
||||
vn 0.0754 0.5855 -0.8071
|
||||
vn 0.2854 0.5696 -0.7707
|
||||
vn 0.0757 0.8072 -0.5853
|
||||
vn 0.2858 0.7704 -0.5698
|
||||
vn 0.5698 0.2858 -0.7704
|
||||
vn 0.5853 0.0757 -0.8072
|
||||
vn 0.5155 0.5155 -0.6844
|
||||
vn 0.5155 0.6844 -0.5155
|
||||
vn 0.3083 0.9479 -0.0801
|
||||
vn 0.3077 0.9006 -0.3068
|
||||
vn 0.0804 0.9478 -0.3084
|
||||
vn 0.5855 0.8071 -0.0754
|
||||
vn 0.5696 0.7707 -0.2854
|
||||
vn 0.8072 0.5853 -0.0757
|
||||
vn 0.7704 0.5698 -0.2858
|
||||
vn 0.6844 0.5155 -0.5155
|
||||
vn 0.9479 0.0801 -0.3083
|
||||
vn 0.9006 0.3068 -0.3077
|
||||
vn 0.9478 0.3084 -0.0804
|
||||
vn 0.8071 0.0754 -0.5855
|
||||
vn 0.7707 0.2854 -0.5696
|
||||
vn 0.0801 -0.9479 -0.3083
|
||||
vn 0.3068 -0.9006 -0.3077
|
||||
vn 0.3084 -0.9478 -0.0804
|
||||
vn 0.0754 -0.8071 -0.5855
|
||||
vn 0.2854 -0.7707 -0.5696
|
||||
vn 0.0757 -0.5853 -0.8072
|
||||
vn 0.2858 -0.5698 -0.7704
|
||||
vn 0.5698 -0.7704 -0.2858
|
||||
vn 0.5853 -0.8072 -0.0757
|
||||
vn 0.5155 -0.6844 -0.5155
|
||||
vn 0.5155 -0.5155 -0.6844
|
||||
vn 0.0802 -0.0802 -0.9935
|
||||
vn 0.3083 -0.0801 -0.9479
|
||||
vn 0.3077 -0.3068 -0.9006
|
||||
vn 0.0804 -0.3084 -0.9478
|
||||
vn 0.5855 -0.0754 -0.8071
|
||||
vn 0.5696 -0.2854 -0.7707
|
||||
vn 0.8072 -0.0757 -0.5853
|
||||
vn 0.7704 -0.2858 -0.5698
|
||||
vn 0.6844 -0.5155 -0.5155
|
||||
vn 0.9479 -0.3083 -0.0801
|
||||
vn 0.9006 -0.3077 -0.3068
|
||||
vn 0.9478 -0.0804 -0.3084
|
||||
vn 0.8071 -0.5855 -0.0754
|
||||
vn 0.7707 -0.5696 -0.2854
|
||||
vn 0.9479 0.3083 0.0801
|
||||
vn 0.9006 0.3077 0.3068
|
||||
vn 0.9478 0.0804 0.3084
|
||||
vn 0.8071 0.5855 0.0754
|
||||
vn 0.7707 0.5696 0.2854
|
||||
vn 0.5853 0.8072 0.0757
|
||||
vn 0.5698 0.7704 0.2858
|
||||
vn 0.7704 0.2858 0.5698
|
||||
vn 0.8072 0.0757 0.5853
|
||||
vn 0.6844 0.5155 0.5155
|
||||
vn 0.5155 0.6844 0.5155
|
||||
vn 0.0801 0.9479 0.3083
|
||||
vn 0.3068 0.9006 0.3077
|
||||
vn 0.3084 0.9478 0.0804
|
||||
vn 0.0754 0.8071 0.5855
|
||||
vn 0.2854 0.7707 0.5696
|
||||
vn 0.0757 0.5853 0.8072
|
||||
vn 0.2858 0.5698 0.7704
|
||||
vn 0.5155 0.5155 0.6844
|
||||
vn 0.3083 0.0801 0.9479
|
||||
vn 0.3077 0.3068 0.9006
|
||||
vn 0.0804 0.3084 0.9478
|
||||
vn 0.5855 0.0754 0.8071
|
||||
vn 0.5696 0.2854 0.7707
|
||||
vn 0.9479 -0.0801 0.3083
|
||||
vn 0.9006 -0.3068 0.3077
|
||||
vn 0.9478 -0.3084 0.0804
|
||||
vn 0.8071 -0.0754 0.5855
|
||||
vn 0.7707 -0.2854 0.5696
|
||||
vn 0.5853 -0.0757 0.8072
|
||||
vn 0.5698 -0.2858 0.7704
|
||||
vn 0.7704 -0.5698 0.2858
|
||||
vn 0.8072 -0.5853 0.0757
|
||||
vn 0.6844 -0.5155 0.5155
|
||||
vn 0.5155 -0.5155 0.6844
|
||||
vn 0.0801 -0.3083 0.9479
|
||||
vn 0.3068 -0.3077 0.9006
|
||||
vn 0.3084 -0.0804 0.9478
|
||||
vn 0.0754 -0.5855 0.8071
|
||||
vn 0.2854 -0.5696 0.7707
|
||||
vn 0.0757 -0.8072 0.5853
|
||||
vn 0.2858 -0.7704 0.5698
|
||||
vn 0.5155 -0.6844 0.5155
|
||||
vn 0.3083 -0.9479 0.0801
|
||||
vn 0.3077 -0.9006 0.3068
|
||||
vn 0.0804 -0.9478 0.3084
|
||||
vn 0.5855 -0.8071 0.0754
|
||||
vn 0.5696 -0.7707 0.2854
|
||||
vn -0.0802 0.0802 -0.9935
|
||||
vn -0.3083 0.0801 -0.9479
|
||||
vn -0.3077 0.3068 -0.9006
|
||||
vn -0.0804 0.3084 -0.9478
|
||||
vn -0.5855 0.0754 -0.8071
|
||||
vn -0.5696 0.2854 -0.7707
|
||||
vn -0.8072 0.0757 -0.5853
|
||||
vn -0.7704 0.2858 -0.5698
|
||||
vn -0.2858 0.5698 -0.7704
|
||||
vn -0.0757 0.5853 -0.8072
|
||||
vn -0.5155 0.5155 -0.6844
|
||||
vn -0.6844 0.5155 -0.5155
|
||||
vn -0.9479 0.3083 -0.0801
|
||||
vn -0.9006 0.3077 -0.3068
|
||||
vn -0.9478 0.0804 -0.3084
|
||||
vn -0.8071 0.5855 -0.0754
|
||||
vn -0.7707 0.5696 -0.2854
|
||||
vn -0.5853 0.8072 -0.0757
|
||||
vn -0.5698 0.7704 -0.2858
|
||||
vn -0.5155 0.6844 -0.5155
|
||||
vn -0.0801 0.9479 -0.3083
|
||||
vn -0.3068 0.9006 -0.3077
|
||||
vn -0.3084 0.9478 -0.0804
|
||||
vn -0.0754 0.8071 -0.5855
|
||||
vn -0.2854 0.7707 -0.5696
|
||||
vn -0.9479 -0.0801 -0.3083
|
||||
vn -0.9006 -0.3068 -0.3077
|
||||
vn -0.9478 -0.3084 -0.0804
|
||||
vn -0.8071 -0.0754 -0.5855
|
||||
vn -0.7707 -0.2854 -0.5696
|
||||
vn -0.5853 -0.0757 -0.8072
|
||||
vn -0.5698 -0.2858 -0.7704
|
||||
vn -0.7704 -0.5698 -0.2858
|
||||
vn -0.8072 -0.5853 -0.0757
|
||||
vn -0.6844 -0.5155 -0.5155
|
||||
vn -0.5155 -0.5155 -0.6844
|
||||
vn -0.0802 -0.0802 -0.9935
|
||||
vn -0.0801 -0.3083 -0.9479
|
||||
vn -0.3068 -0.3077 -0.9006
|
||||
vn -0.3084 -0.0804 -0.9478
|
||||
vn -0.0754 -0.5855 -0.8071
|
||||
vn -0.2854 -0.5696 -0.7707
|
||||
vn -0.0757 -0.8072 -0.5853
|
||||
vn -0.2858 -0.7704 -0.5698
|
||||
vn -0.5155 -0.6844 -0.5155
|
||||
vn -0.3083 -0.9479 -0.0801
|
||||
vn -0.3077 -0.9006 -0.3068
|
||||
vn -0.0804 -0.9478 -0.3084
|
||||
vn -0.5855 -0.8071 -0.0754
|
||||
vn -0.5696 -0.7707 -0.2854
|
||||
vn -0.9479 0.0801 0.3083
|
||||
vn -0.9006 0.3068 0.3077
|
||||
vn -0.9478 0.3084 0.0804
|
||||
vn -0.8071 0.0754 0.5855
|
||||
vn -0.7707 0.2854 0.5696
|
||||
vn -0.5853 0.0757 0.8072
|
||||
vn -0.5698 0.2858 0.7704
|
||||
vn -0.7704 0.5698 0.2858
|
||||
vn -0.8072 0.5853 0.0757
|
||||
vn -0.6844 0.5155 0.5155
|
||||
vn -0.5155 0.5155 0.6844
|
||||
vn -0.0801 0.3083 0.9479
|
||||
vn -0.3068 0.3077 0.9006
|
||||
vn -0.3084 0.0804 0.9478
|
||||
vn -0.0754 0.5855 0.8071
|
||||
vn -0.2854 0.5696 0.7707
|
||||
vn -0.0757 0.8072 0.5853
|
||||
vn -0.2858 0.7704 0.5698
|
||||
vn -0.5155 0.6844 0.5155
|
||||
vn -0.3083 0.9479 0.0801
|
||||
vn -0.3077 0.9006 0.3068
|
||||
vn -0.0804 0.9478 0.3084
|
||||
vn -0.5855 0.8071 0.0754
|
||||
vn -0.5696 0.7707 0.2854
|
||||
vn -0.0801 -0.9479 0.3083
|
||||
vn -0.3068 -0.9006 0.3077
|
||||
vn -0.3084 -0.9478 0.0804
|
||||
vn -0.0754 -0.8071 0.5855
|
||||
vn -0.2854 -0.7707 0.5696
|
||||
vn -0.0757 -0.5853 0.8072
|
||||
vn -0.2858 -0.5698 0.7704
|
||||
vn -0.5698 -0.7704 0.2858
|
||||
vn -0.5853 -0.8072 0.0757
|
||||
vn -0.5155 -0.6844 0.5155
|
||||
vn -0.5155 -0.5155 0.6844
|
||||
vn -0.3083 -0.0801 0.9479
|
||||
vn -0.3077 -0.3068 0.9006
|
||||
vn -0.0804 -0.3084 0.9478
|
||||
vn -0.5855 -0.0754 0.8071
|
||||
vn -0.5696 -0.2854 0.7707
|
||||
vn -0.8072 -0.0757 0.5853
|
||||
vn -0.7704 -0.2858 0.5698
|
||||
vn -0.6844 -0.5155 0.5155
|
||||
vn -0.9479 -0.3083 0.0801
|
||||
vn -0.9006 -0.3077 0.3068
|
||||
vn -0.9478 -0.0804 0.3084
|
||||
vn -0.8071 -0.5855 0.0754
|
||||
vn -0.7707 -0.5696 0.2854
|
||||
usemtl Material.001
|
||||
s 1
|
||||
f 138/1/1 28/2/2 84/3/3 190/4/4
|
||||
f 192/5/5 163/6/6 110/7/7 136/8/8
|
||||
f 83/9/9 57/10/10 164/11/11 191/12/12
|
||||
f 2/13/13 111/14/14 165/15/15 56/16/16
|
||||
f 30/17/17 3/18/18 55/19/19 82/20/20
|
||||
f 1/21/21 4/22/22 7/23/23 6/24/24
|
||||
f 4/22/22 5/25/25 8/26/26 7/23/23
|
||||
f 5/25/25 17/27/27 18/28/28 8/26/26
|
||||
f 6/24/24 7/23/23 10/29/29 9/30/30
|
||||
f 7/23/23 8/26/26 11/31/31 10/29/29
|
||||
f 8/26/26 18/28/28 19/32/32 11/31/31
|
||||
f 2/13/13 12/33/33 15/34/34 14/35/35
|
||||
f 12/33/33 13/36/36 16/37/37 15/34/34
|
||||
f 13/36/36 25/38/38 26/39/39 16/37/37
|
||||
f 14/35/35 15/34/34 18/40/28 17/41/27
|
||||
f 15/34/34 16/37/37 19/42/32 18/40/28
|
||||
f 16/37/37 26/39/39 27/43/40 19/42/32
|
||||
f 3/18/18 20/44/41 23/45/42 22/46/43
|
||||
f 20/44/41 21/47/44 24/48/45 23/45/42
|
||||
f 21/47/44 9/30/30 10/29/29 24/48/45
|
||||
f 22/46/43 23/45/42 26/39/39 25/38/38
|
||||
f 23/45/42 24/48/45 27/43/40 26/39/39
|
||||
f 24/48/45 10/29/29 11/31/31 27/43/40
|
||||
f 11/31/31 19/32/32 27/49/40
|
||||
f 28/2/2 31/50/46 34/51/47 33/52/48
|
||||
f 31/50/46 32/53/49 35/54/50 34/51/47
|
||||
f 32/53/49 44/55/51 45/56/52 35/54/50
|
||||
f 33/52/48 34/51/47 37/57/53 36/58/54
|
||||
f 34/51/47 35/54/50 38/59/55 37/57/53
|
||||
f 35/54/50 45/56/52 46/60/56 38/59/55
|
||||
f 29/61/57 39/62/58 42/63/59 41/64/60
|
||||
f 39/62/58 40/65/61 43/66/62 42/63/59
|
||||
f 40/65/61 52/67/63 53/68/64 43/66/62
|
||||
f 41/64/60 42/63/59 45/69/52 44/70/51
|
||||
f 42/63/59 43/66/62 46/71/56 45/69/52
|
||||
f 43/66/62 53/68/64 54/72/65 46/71/56
|
||||
f 30/17/17 47/73/66 50/74/67 49/75/68
|
||||
f 47/73/66 48/76/69 51/77/70 50/74/67
|
||||
f 48/76/69 36/58/54 37/57/53 51/77/70
|
||||
f 49/75/68 50/74/67 53/68/64 52/67/63
|
||||
f 50/74/67 51/77/70 54/72/65 53/68/64
|
||||
f 51/77/70 37/57/53 38/59/55 54/72/65
|
||||
f 38/59/55 46/60/56 54/78/65
|
||||
f 55/19/19 58/79/71 61/80/72 60/81/73
|
||||
f 58/79/71 59/82/74 62/83/75 61/80/72
|
||||
f 59/82/74 71/84/76 72/85/77 62/83/75
|
||||
f 60/81/73 61/80/72 64/86/78 63/87/79
|
||||
f 61/80/72 62/83/75 65/88/80 64/86/78
|
||||
f 62/83/75 72/85/77 73/89/81 65/88/80
|
||||
f 56/16/16 66/90/82 69/91/83 68/92/84
|
||||
f 66/90/82 67/93/85 70/94/86 69/91/83
|
||||
f 67/93/85 79/95/87 80/96/88 70/94/86
|
||||
f 68/92/84 69/91/83 72/85/77 71/84/76
|
||||
f 69/91/83 70/94/86 73/89/81 72/85/77
|
||||
f 70/94/86 80/96/88 81/97/89 73/89/81
|
||||
f 57/10/10 74/98/90 77/99/91 76/100/92
|
||||
f 74/98/90 75/101/93 78/102/94 77/99/91
|
||||
f 75/101/93 63/87/79 64/86/78 78/102/94
|
||||
f 76/100/92 77/99/91 80/103/88 79/104/87
|
||||
f 77/99/91 78/102/94 81/105/89 80/103/88
|
||||
f 78/102/94 64/86/78 65/88/80 81/105/89
|
||||
f 65/88/80 73/106/81 81/107/89
|
||||
f 82/20/20 85/108/95 88/109/96 87/110/97
|
||||
f 85/108/95 86/111/98 89/112/99 88/109/96
|
||||
f 86/111/98 98/113/100 99/114/101 89/112/99
|
||||
f 87/110/97 88/109/96 91/115/102 90/116/103
|
||||
f 88/109/96 89/112/99 92/117/104 91/115/102
|
||||
f 89/112/99 99/114/101 100/118/105 92/117/104
|
||||
f 83/9/9 93/119/106 96/120/107 95/121/108
|
||||
f 93/119/106 94/122/109 97/123/110 96/120/107
|
||||
f 94/122/109 106/124/111 107/125/112 97/123/110
|
||||
f 95/121/108 96/120/107 99/114/101 98/113/100
|
||||
f 96/120/107 97/123/110 100/118/105 99/114/101
|
||||
f 97/123/110 107/125/112 108/126/113 100/118/105
|
||||
f 84/3/3 101/127/114 104/128/115 103/129/116
|
||||
f 101/127/114 102/130/117 105/131/118 104/128/115
|
||||
f 102/130/117 90/116/103 91/115/102 105/131/118
|
||||
f 103/129/116 104/128/115 107/132/112 106/133/111
|
||||
f 104/128/115 105/131/118 108/134/113 107/132/112
|
||||
f 105/131/118 91/115/102 92/117/104 108/134/113
|
||||
f 92/117/104 100/135/105 108/136/113
|
||||
f 109/137/119 112/138/120 115/139/121 114/140/122
|
||||
f 112/138/120 113/141/123 116/142/124 115/139/121
|
||||
f 113/141/123 125/143/125 126/144/126 116/142/124
|
||||
f 114/140/122 115/139/121 118/145/127 117/146/128
|
||||
f 115/139/121 116/142/124 119/147/129 118/145/127
|
||||
f 116/142/124 126/144/126 127/148/130 119/147/129
|
||||
f 110/7/7 120/149/131 123/150/132 122/151/133
|
||||
f 120/149/131 121/152/134 124/153/135 123/150/132
|
||||
f 121/152/134 133/154/136 134/155/137 124/153/135
|
||||
f 122/151/133 123/150/132 126/144/126 125/143/125
|
||||
f 123/150/132 124/153/135 127/148/130 126/144/126
|
||||
f 124/153/135 134/155/137 135/156/138 127/148/130
|
||||
f 111/14/14 128/157/139 131/158/140 130/159/141
|
||||
f 128/157/139 129/160/142 132/161/143 131/158/140
|
||||
f 129/160/142 117/162/128 118/163/127 132/161/143
|
||||
f 130/159/141 131/158/140 134/164/137 133/165/136
|
||||
f 131/158/140 132/161/143 135/166/138 134/164/137
|
||||
f 132/161/143 118/163/127 119/167/129 135/166/138
|
||||
f 119/147/129 127/168/130 135/169/138
|
||||
f 136/8/8 139/170/144 142/171/145 141/172/146
|
||||
f 139/170/144 140/173/147 143/174/148 142/171/145
|
||||
f 140/173/147 152/175/149 153/176/150 143/174/148
|
||||
f 141/172/146 142/171/145 145/177/151 144/178/152
|
||||
f 142/171/145 143/174/148 146/179/153 145/177/151
|
||||
f 143/174/148 153/176/150 154/180/154 146/179/153
|
||||
f 137/181/155 147/182/156 150/183/157 149/184/158
|
||||
f 147/182/156 148/185/159 151/186/160 150/183/157
|
||||
f 148/185/159 160/187/161 161/188/162 151/186/160
|
||||
f 149/184/158 150/183/157 153/176/150 152/175/149
|
||||
f 150/183/157 151/186/160 154/180/154 153/176/150
|
||||
f 151/186/160 161/188/162 162/189/163 154/180/154
|
||||
f 138/1/1 155/190/164 158/191/165 157/192/166
|
||||
f 155/190/164 156/193/167 159/194/168 158/191/165
|
||||
f 156/193/167 144/195/152 145/196/151 159/194/168
|
||||
f 157/192/166 158/191/165 161/197/162 160/198/161
|
||||
f 158/191/165 159/194/168 162/199/163 161/197/162
|
||||
f 159/194/168 145/196/151 146/200/153 162/199/163
|
||||
f 146/179/153 154/201/154 162/202/163
|
||||
f 163/6/6 166/203/169 169/204/170 168/205/171
|
||||
f 166/203/169 167/206/172 170/207/173 169/204/170
|
||||
f 167/206/172 179/208/174 180/209/175 170/207/173
|
||||
f 168/205/171 169/204/170 172/210/176 171/211/177
|
||||
f 169/204/170 170/207/173 173/212/178 172/210/176
|
||||
f 170/207/173 180/209/175 181/213/179 173/212/178
|
||||
f 164/11/11 174/214/180 177/215/181 176/216/182
|
||||
f 174/214/180 175/217/183 178/218/184 177/215/181
|
||||
f 175/217/183 187/219/185 188/220/186 178/218/184
|
||||
f 176/216/182 177/215/181 180/221/175 179/222/174
|
||||
f 177/215/181 178/218/184 181/223/179 180/221/175
|
||||
f 178/218/184 188/220/186 189/224/187 181/223/179
|
||||
f 165/15/15 182/225/188 185/226/189 184/227/190
|
||||
f 182/225/188 183/228/191 186/229/192 185/226/189
|
||||
f 183/228/191 171/230/177 172/231/176 186/229/192
|
||||
f 184/227/190 185/226/189 188/232/186 187/233/185
|
||||
f 185/226/189 186/229/192 189/234/187 188/232/186
|
||||
f 186/229/192 172/231/176 173/235/178 189/234/187
|
||||
f 173/212/178 181/213/179 189/236/187
|
||||
f 190/4/4 193/237/193 196/238/194 195/239/195
|
||||
f 193/237/193 194/240/196 197/241/197 196/238/194
|
||||
f 194/240/196 206/242/198 207/243/199 197/241/197
|
||||
f 195/239/195 196/238/194 199/244/200 198/245/201
|
||||
f 196/238/194 197/241/197 200/246/202 199/244/200
|
||||
f 197/241/197 207/243/199 208/247/203 200/246/202
|
||||
f 191/12/12 201/248/204 204/249/205 203/250/206
|
||||
f 201/248/204 202/251/207 205/252/208 204/249/205
|
||||
f 202/251/207 214/253/209 215/254/210 205/252/208
|
||||
f 203/250/206 204/249/205 207/255/199 206/256/198
|
||||
f 204/249/205 205/252/208 208/257/203 207/255/199
|
||||
f 205/252/208 215/254/210 216/258/211 208/257/203
|
||||
f 192/5/5 209/259/212 212/260/213 211/261/214
|
||||
f 209/259/212 210/262/215 213/263/216 212/260/213
|
||||
f 210/262/215 198/264/201 199/265/200 213/263/216
|
||||
f 211/261/214 212/260/213 215/266/210 214/267/209
|
||||
f 212/260/213 213/263/216 216/268/211 215/266/210
|
||||
f 213/263/216 199/265/200 200/269/202 216/268/211
|
||||
f 200/246/202 208/247/203 216/270/211
|
||||
f 138/1/1 190/4/4 195/239/195 155/190/164
|
||||
f 155/190/164 195/239/195 198/245/201 156/193/167
|
||||
f 156/193/167 198/245/201 210/271/215 144/195/152
|
||||
f 144/178/152 210/262/215 209/259/212 141/172/146
|
||||
f 141/172/146 209/259/212 192/5/5 136/8/8
|
||||
f 28/2/2 138/1/1 157/192/166 31/50/46
|
||||
f 31/50/46 157/192/166 160/198/161 32/53/49
|
||||
f 32/53/49 160/198/161 148/272/159 44/55/51
|
||||
f 44/70/51 148/185/159 147/182/156 41/64/60
|
||||
f 41/64/60 147/182/156 137/181/155 29/61/57
|
||||
f 3/18/18 30/17/17 49/75/68 20/44/41
|
||||
f 20/44/41 49/75/68 52/67/63 21/47/44
|
||||
f 21/47/44 52/67/63 40/65/61 9/30/30
|
||||
f 9/30/30 40/65/61 39/62/58 6/24/24
|
||||
f 6/24/24 39/62/58 29/61/57 1/21/21
|
||||
f 191/12/12 164/11/11 176/216/182 201/248/204
|
||||
f 201/248/204 176/216/182 179/222/174 202/251/207
|
||||
f 202/251/207 179/222/174 167/273/172 214/253/209
|
||||
f 214/267/209 167/206/172 166/203/169 211/261/214
|
||||
f 211/261/214 166/203/169 163/6/6 192/5/5
|
||||
f 57/10/10 83/9/9 95/121/108 74/98/90
|
||||
f 74/98/90 95/121/108 98/113/100 75/101/93
|
||||
f 75/101/93 98/113/100 86/111/98 63/87/79
|
||||
f 63/87/79 86/111/98 85/108/95 60/81/73
|
||||
f 60/81/73 85/108/95 82/20/20 55/19/19
|
||||
f 109/137/119 137/181/155 149/184/158 112/138/120
|
||||
f 112/138/120 149/184/158 152/175/149 113/141/123
|
||||
f 113/141/123 152/175/149 140/173/147 125/143/125
|
||||
f 125/143/125 140/173/147 139/170/144 122/151/133
|
||||
f 122/151/133 139/170/144 136/8/8 110/7/7
|
||||
f 56/16/16 165/15/15 184/227/190 66/90/82
|
||||
f 66/90/82 184/227/190 187/233/185 67/93/85
|
||||
f 67/93/85 187/233/185 175/274/183 79/95/87
|
||||
f 79/104/87 175/217/183 174/214/180 76/100/92
|
||||
f 76/100/92 174/214/180 164/11/11 57/10/10
|
||||
f 2/13/13 56/16/16 68/92/84 12/33/33
|
||||
f 12/33/33 68/92/84 71/84/76 13/36/36
|
||||
f 13/36/36 71/84/76 59/82/74 25/38/38
|
||||
f 25/38/38 59/82/74 58/79/71 22/46/43
|
||||
f 22/46/43 58/79/71 55/19/19 3/18/18
|
||||
f 190/4/4 84/3/3 103/129/116 193/237/193
|
||||
f 193/237/193 103/129/116 106/133/111 194/240/196
|
||||
f 194/240/196 106/133/111 94/275/109 206/242/198
|
||||
f 206/256/198 94/122/109 93/119/106 203/250/206
|
||||
f 203/250/206 93/119/106 83/9/9 191/12/12
|
||||
f 165/15/15 111/14/14 130/159/141 182/225/188
|
||||
f 182/225/188 130/159/141 133/165/136 183/228/191
|
||||
f 183/228/191 133/165/136 121/276/134 171/230/177
|
||||
f 171/211/177 121/152/134 120/149/131 168/205/171
|
||||
f 168/205/171 120/149/131 110/7/7 163/6/6
|
||||
f 111/14/14 2/13/13 14/35/35 128/157/139
|
||||
f 128/157/139 14/35/35 17/41/27 129/160/142
|
||||
f 129/160/142 17/41/27 5/277/25 117/162/128
|
||||
f 117/146/128 5/25/25 4/22/22 114/140/122
|
||||
f 114/140/122 4/22/22 1/21/21 109/137/119
|
||||
f 84/3/3 28/2/2 33/52/48 101/127/114
|
||||
f 101/127/114 33/52/48 36/58/54 102/130/117
|
||||
f 102/130/117 36/58/54 48/76/69 90/116/103
|
||||
f 90/116/103 48/76/69 47/73/66 87/110/97
|
||||
f 87/110/97 47/73/66 30/17/17 82/20/20
|
||||
f 137/181/155 109/137/119 1/21/21 29/61/57
|
153
src/main.rs
153
src/main.rs
|
@ -1,3 +1,4 @@
|
|||
use model::{DrawModel, Model, Vertex};
|
||||
use wgpu::util::DeviceExt;
|
||||
use winit::{
|
||||
event::*,
|
||||
|
@ -7,26 +8,10 @@ use winit::{
|
|||
|
||||
use nalgebra_glm as glm;
|
||||
|
||||
mod model;
|
||||
mod texture;
|
||||
|
||||
#[rustfmt::skip]
|
||||
const VERTICES: &[Vertex] = &[
|
||||
Vertex { position: [-0.0868241, 0.49240386, 0.0], tex_coords: [0.4131759, 0.00759614], },
|
||||
Vertex { position: [-0.49513406, 0.06958647, 0.0], tex_coords: [0.0048659444, 0.43041354], },
|
||||
Vertex { position: [-0.21918549, -0.44939706, 0.0], tex_coords: [0.28081453, 0.949397057], },
|
||||
Vertex { position: [0.35966998, -0.3473291, 0.0], tex_coords: [0.85967, 0.84732911], },
|
||||
Vertex { position: [0.44147372, 0.2347359, 0.0], tex_coords: [0.9414737, 0.2652641], },
|
||||
];
|
||||
|
||||
#[rustfmt::skip]
|
||||
const INDICES: &[u16] = &[
|
||||
0, 1, 4,
|
||||
1, 2, 4,
|
||||
2, 3, 4
|
||||
];
|
||||
|
||||
const NUM_INSTANCES_PER_ROW: u32 = 10;
|
||||
const NUM_INSTANCES: u32 = NUM_INSTANCES_PER_ROW * NUM_INSTANCES_PER_ROW;
|
||||
const NUM_INSTANCES_PER_ROW: u32 = 11;
|
||||
|
||||
fn main() {
|
||||
let event_loop = EventLoop::new();
|
||||
|
@ -243,8 +228,6 @@ struct State {
|
|||
sc_desc: wgpu::SwapChainDescriptor,
|
||||
swap_chain: wgpu::SwapChain,
|
||||
|
||||
diffuse_texture: texture::Texture,
|
||||
diffuse_bind_group: wgpu::BindGroup,
|
||||
depth_texture: texture::Texture,
|
||||
|
||||
camera: Camera,
|
||||
|
@ -254,10 +237,7 @@ struct State {
|
|||
uniform_buffer: wgpu::Buffer,
|
||||
uniform_bind_group: wgpu::BindGroup,
|
||||
|
||||
vertex_buffer: wgpu::Buffer,
|
||||
index_buffer: wgpu::Buffer,
|
||||
num_indices: u32,
|
||||
|
||||
obj_model: Model,
|
||||
instances: Vec<Instance>,
|
||||
instance_buffer: wgpu::Buffer,
|
||||
|
||||
|
@ -303,12 +283,6 @@ impl State {
|
|||
|
||||
let swap_chain = device.create_swap_chain(&surface, &sc_desc);
|
||||
|
||||
// Load image
|
||||
let diffuse_bytes = include_bytes!("snubben.png");
|
||||
let (diffuse_texture, command) =
|
||||
texture::Texture::from_bytes(&device, diffuse_bytes, "diffuse_texture").unwrap();
|
||||
queue.submit(Some(command));
|
||||
|
||||
let texture_bind_group_layout =
|
||||
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||
label: Some("texture_bind_group_layout"),
|
||||
|
@ -332,21 +306,6 @@ impl State {
|
|||
],
|
||||
});
|
||||
|
||||
let diffuse_bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
|
||||
label: Some("diffuse_bind_group"),
|
||||
layout: &texture_bind_group_layout,
|
||||
entries: &[
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 0,
|
||||
resource: wgpu::BindingResource::TextureView(&diffuse_texture.view),
|
||||
},
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 1,
|
||||
resource: wgpu::BindingResource::Sampler(&diffuse_texture.sampler),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// Camera
|
||||
let camera = Camera {
|
||||
eye: glm::vec3(0.0, 1.0, 2.0),
|
||||
|
@ -360,28 +319,21 @@ impl State {
|
|||
|
||||
let camera_controller = CameraController::new(0.2);
|
||||
|
||||
// Setup buffers
|
||||
let vertex_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: Some("vertex_buffer"),
|
||||
contents: bytemuck::cast_slice(&VERTICES),
|
||||
usage: wgpu::BufferUsage::VERTEX,
|
||||
});
|
||||
let res_dir = std::path::Path::new(env!("OUT_DIR")).join("res");
|
||||
let obj_model = Model::load(
|
||||
&device, &queue, &texture_bind_group_layout,
|
||||
res_dir.join("cube.obj")
|
||||
).unwrap();
|
||||
|
||||
let index_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: Some("index_buffer"),
|
||||
contents: bytemuck::cast_slice(&INDICES),
|
||||
usage: wgpu::BufferUsage::INDEX,
|
||||
});
|
||||
let num_indices = INDICES.len() as u32;
|
||||
let instance_displacement = glm::vec3(
|
||||
NUM_INSTANCES_PER_ROW as f32 * 0.5,
|
||||
3.0 * NUM_INSTANCES_PER_ROW as f32 / 2.0,
|
||||
0.0,
|
||||
NUM_INSTANCES_PER_ROW as f32 * 0.5,
|
||||
3.0 * NUM_INSTANCES_PER_ROW as f32 / 2.0,
|
||||
);
|
||||
let instances: Vec<Instance> = (0..NUM_INSTANCES_PER_ROW)
|
||||
.flat_map(|z| {
|
||||
(0..NUM_INSTANCES_PER_ROW).map(move |x| {
|
||||
let position = glm::vec3(x as f32, 0.0, z as f32) - instance_displacement;
|
||||
let position = glm::vec3(x as f32 * 3.0, 0.0, z as f32 * 3.0) - instance_displacement;
|
||||
let rotation = if glm::zero::<glm::Vec3>() == position {
|
||||
glm::quat_angle_axis(0.0, &glm::vec3(0.0, 0.0, 1.0))
|
||||
} else {
|
||||
|
@ -456,35 +408,9 @@ impl State {
|
|||
],
|
||||
});
|
||||
|
||||
// Compile & load shaders
|
||||
let vs_src = include_str!("shader.vert");
|
||||
let fs_src = include_str!("shader.frag");
|
||||
|
||||
let mut compiler = shaderc::Compiler::new().unwrap();
|
||||
let vs_spriv = compiler
|
||||
.compile_into_spirv(
|
||||
vs_src,
|
||||
shaderc::ShaderKind::Vertex,
|
||||
"shader.vert",
|
||||
"main",
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let fs_spriv = compiler
|
||||
.compile_into_spirv(
|
||||
fs_src,
|
||||
shaderc::ShaderKind::Fragment,
|
||||
"shader.frag",
|
||||
"main",
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let vs_data = wgpu::util::make_spirv(vs_spriv.as_binary_u8());
|
||||
let fs_data = wgpu::util::make_spirv(fs_spriv.as_binary_u8());
|
||||
|
||||
let vs_module = device.create_shader_module(vs_data);
|
||||
let fs_module = device.create_shader_module(fs_data);
|
||||
// Load shaders
|
||||
let vs_module = device.create_shader_module(wgpu::include_spirv!("shader.vert.spv"));
|
||||
let fs_module = device.create_shader_module(wgpu::include_spirv!("shader.frag.spv"));
|
||||
|
||||
// Setup render pipeline
|
||||
let render_pipeline_layout =
|
||||
|
@ -527,8 +453,8 @@ impl State {
|
|||
stencil: wgpu::StencilStateDescriptor::default(),
|
||||
}),
|
||||
vertex_state: wgpu::VertexStateDescriptor {
|
||||
index_format: wgpu::IndexFormat::Uint16,
|
||||
vertex_buffers: &[Vertex::desc()],
|
||||
index_format: wgpu::IndexFormat::Uint32,
|
||||
vertex_buffers: &[model::ModelVertex::desc()],
|
||||
},
|
||||
sample_count: 1,
|
||||
sample_mask: !0,
|
||||
|
@ -543,17 +469,13 @@ impl State {
|
|||
queue,
|
||||
sc_desc,
|
||||
swap_chain,
|
||||
diffuse_texture,
|
||||
diffuse_bind_group,
|
||||
camera,
|
||||
camera_controller,
|
||||
depth_texture,
|
||||
uniforms,
|
||||
uniform_buffer,
|
||||
uniform_bind_group,
|
||||
vertex_buffer,
|
||||
index_buffer,
|
||||
num_indices,
|
||||
obj_model,
|
||||
instances,
|
||||
instance_buffer,
|
||||
render_pipeline,
|
||||
|
@ -641,46 +563,11 @@ impl State {
|
|||
});
|
||||
|
||||
render_pass.set_pipeline(&self.render_pipeline);
|
||||
render_pass.set_bind_group(0, &self.diffuse_bind_group, &[]);
|
||||
render_pass.set_bind_group(1, &self.uniform_bind_group, &[]);
|
||||
render_pass.set_vertex_buffer(0, self.vertex_buffer.slice(0..));
|
||||
render_pass.set_index_buffer(self.index_buffer.slice(0..));
|
||||
render_pass.draw_indexed(0..self.num_indices, 0, 0..self.instances.len() as _);
|
||||
|
||||
render_pass.draw_model_instanced(&self.obj_model, 0..self.instances.len() as u32, &self.uniform_bind_group);
|
||||
|
||||
drop(render_pass);
|
||||
|
||||
self.queue.submit(Some(encoder.finish()));
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
struct Vertex {
|
||||
position: [f32; 3],
|
||||
tex_coords: [f32; 2],
|
||||
}
|
||||
|
||||
unsafe impl bytemuck::Pod for Vertex {}
|
||||
unsafe impl bytemuck::Zeroable for Vertex {}
|
||||
|
||||
impl Vertex {
|
||||
fn desc<'a>() -> wgpu::VertexBufferDescriptor<'a> {
|
||||
use std::mem;
|
||||
wgpu::VertexBufferDescriptor {
|
||||
stride: mem::size_of::<Vertex>() as wgpu::BufferAddress,
|
||||
step_mode: wgpu::InputStepMode::Vertex,
|
||||
attributes: &[
|
||||
wgpu::VertexAttributeDescriptor {
|
||||
offset: 0,
|
||||
format: wgpu::VertexFormat::Float3,
|
||||
shader_location: 0,
|
||||
},
|
||||
wgpu::VertexAttributeDescriptor {
|
||||
offset: mem::size_of::<[f32; 3]>() as wgpu::BufferAddress,
|
||||
format: wgpu::VertexFormat::Float2,
|
||||
shader_location: 1,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
187
src/model.rs
Normal file
187
src/model.rs
Normal file
|
@ -0,0 +1,187 @@
|
|||
use std::{ops::Range, path::Path};
|
||||
|
||||
use crate::texture;
|
||||
use anyhow::*;
|
||||
use wgpu::{self, util::DeviceExt};
|
||||
|
||||
pub trait Vertex {
|
||||
fn desc<'a>() -> wgpu::VertexBufferDescriptor<'a>;
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct ModelVertex {
|
||||
position: [f32; 3],
|
||||
tex_coords: [f32; 2],
|
||||
normal: [f32; 3],
|
||||
}
|
||||
|
||||
impl Vertex for ModelVertex {
|
||||
fn desc<'a>() -> wgpu::VertexBufferDescriptor<'a> {
|
||||
use std::mem;
|
||||
wgpu::VertexBufferDescriptor {
|
||||
stride: mem::size_of::<ModelVertex>() as wgpu::BufferAddress,
|
||||
step_mode: wgpu::InputStepMode::Vertex,
|
||||
attributes: &[
|
||||
wgpu::VertexAttributeDescriptor {
|
||||
offset: 0,
|
||||
shader_location: 0,
|
||||
format: wgpu::VertexFormat::Float3,
|
||||
},
|
||||
wgpu::VertexAttributeDescriptor {
|
||||
offset: mem::size_of::<[f32; 3]>() as wgpu::BufferAddress,
|
||||
shader_location: 1,
|
||||
format: wgpu::VertexFormat::Float2,
|
||||
},
|
||||
wgpu::VertexAttributeDescriptor {
|
||||
offset: mem::size_of::<[f32; 5]>() as wgpu::BufferAddress,
|
||||
shader_location: 2,
|
||||
format: wgpu::VertexFormat::Float3,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl bytemuck::Pod for ModelVertex {}
|
||||
unsafe impl bytemuck::Zeroable for ModelVertex {}
|
||||
|
||||
pub struct Material {
|
||||
pub name: String,
|
||||
pub diffuse_texture: texture::Texture,
|
||||
pub bind_group: wgpu::BindGroup,
|
||||
}
|
||||
|
||||
pub struct Mesh {
|
||||
pub name: String,
|
||||
pub vertex_buffer: wgpu::Buffer,
|
||||
pub index_buffer: wgpu::Buffer,
|
||||
pub num_elements: u32,
|
||||
pub material: usize,
|
||||
}
|
||||
|
||||
pub struct Model {
|
||||
pub meshes: Vec<Mesh>,
|
||||
pub materials: Vec<Material>,
|
||||
}
|
||||
|
||||
impl Model {
|
||||
pub fn load<P: AsRef<Path>>(
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
layout: &wgpu::BindGroupLayout,
|
||||
path: P,
|
||||
) -> Result<Self> {
|
||||
let (obj_models, obj_materials) = tobj::load_obj(path.as_ref(), true)?;
|
||||
|
||||
let containing_folder = path.as_ref().parent()
|
||||
.context("Directory has no parent")?;
|
||||
|
||||
let materials: Result<Vec<_>> = obj_materials.into_iter().map(|mat| {
|
||||
let diffuse_texture = texture::Texture::load(device, queue, containing_folder.join(mat.diffuse_texture))?;
|
||||
|
||||
let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
|
||||
label: None,
|
||||
layout,
|
||||
entries: &[
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 0,
|
||||
resource: wgpu::BindingResource::TextureView(&diffuse_texture.view),
|
||||
},
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 1,
|
||||
resource: wgpu::BindingResource::Sampler(&diffuse_texture.sampler),
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
Ok(Material {
|
||||
name: mat.name,
|
||||
diffuse_texture,
|
||||
bind_group
|
||||
})
|
||||
}).collect();
|
||||
|
||||
let meshes: Result<Vec<_>> = obj_models.into_iter().map(|m| {
|
||||
let mut vertices = Vec::with_capacity(m.mesh.positions.len() / 3);
|
||||
for i in 0..m.mesh.positions.len() / 3 {
|
||||
vertices.push(ModelVertex {
|
||||
position: [
|
||||
m.mesh.positions[i * 3],
|
||||
m.mesh.positions[i * 3 + 1],
|
||||
m.mesh.positions[i * 3 + 2],
|
||||
],
|
||||
tex_coords: [
|
||||
m.mesh.texcoords[i * 2],
|
||||
m.mesh.texcoords[i * 2 + 1],
|
||||
],
|
||||
normal: [
|
||||
m.mesh.normals[i * 3],
|
||||
m.mesh.normals[i * 3 + 1],
|
||||
m.mesh.normals[i * 3 + 2],
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
let vertex_buffer = device.create_buffer_init(
|
||||
&wgpu::util::BufferInitDescriptor {
|
||||
label: Some(&format!("{:?} Vertex Buffer", path.as_ref())),
|
||||
contents: bytemuck::cast_slice(&vertices),
|
||||
usage: wgpu::BufferUsage::VERTEX,
|
||||
}
|
||||
);
|
||||
let index_buffer = device.create_buffer_init(
|
||||
&wgpu::util::BufferInitDescriptor {
|
||||
label: Some(&format!("{:?} Index Buffer", path.as_ref())),
|
||||
contents: bytemuck::cast_slice(&m.mesh.indices),
|
||||
usage: wgpu::BufferUsage::INDEX,
|
||||
}
|
||||
);
|
||||
|
||||
Ok(Mesh {
|
||||
name: m.name,
|
||||
vertex_buffer,
|
||||
index_buffer,
|
||||
num_elements: m.mesh.indices.len() as u32,
|
||||
material: m.mesh.material_id.unwrap_or(0),
|
||||
})
|
||||
}).collect();
|
||||
|
||||
Ok(Self {
|
||||
meshes: meshes?,
|
||||
materials: materials?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub trait DrawModel<'a, 'b> where 'b: 'a {
|
||||
fn draw_model(&mut self, model: &'b Model, uniforms: &'b wgpu::BindGroup);
|
||||
fn draw_model_instanced(&mut self, model: &'b Model, instances: Range<u32>, uniforms: &'b wgpu::BindGroup);
|
||||
fn draw_mesh(&mut self, mesh: &'b Mesh, material: &'b Material, uniforms: &'b wgpu::BindGroup);
|
||||
fn draw_mesh_instanced(&mut self, mesh: &'b Mesh, material: &'b Material, uniforms: &'b wgpu::BindGroup, instances: Range<u32>);
|
||||
}
|
||||
|
||||
impl<'a, 'b> DrawModel<'a, 'b> for wgpu::RenderPass<'a> where 'b: 'a {
|
||||
fn draw_mesh(&mut self, mesh: &'b Mesh, material: &'b Material, uniforms: &'b wgpu::BindGroup) {
|
||||
self.draw_mesh_instanced(mesh, material, uniforms, 0..1)
|
||||
}
|
||||
|
||||
fn draw_mesh_instanced(&mut self, mesh: &'b Mesh, material: &'b Material, uniforms: &'b wgpu::BindGroup, instances: Range<u32>) {
|
||||
self.set_vertex_buffer(0, mesh.vertex_buffer.slice(..));
|
||||
self.set_index_buffer(mesh.index_buffer.slice(..));
|
||||
self.set_bind_group(0, &material.bind_group, &[]);
|
||||
self.set_bind_group(1, uniforms, &[]);
|
||||
self.draw_indexed(0..mesh.num_elements, 0, instances);
|
||||
}
|
||||
|
||||
fn draw_model(&mut self, model: &'b Model, uniforms: &'b wgpu::BindGroup) {
|
||||
self.draw_model_instanced(model, 0..1, uniforms)
|
||||
}
|
||||
|
||||
fn draw_model_instanced(&mut self, model: &'b Model, instances: Range<u32>, uniforms: &'b wgpu::BindGroup) {
|
||||
for mesh in &model.meshes {
|
||||
let material = &model.materials[mesh.material];
|
||||
self.draw_mesh_instanced(mesh, material, uniforms, instances.clone());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
use anyhow::*;
|
||||
use image::GenericImageView;
|
||||
use std::path::Path;
|
||||
use wgpu::util::DeviceExt;
|
||||
|
||||
pub struct Texture {
|
||||
|
@ -10,22 +12,23 @@ pub struct Texture {
|
|||
impl Texture {
|
||||
pub fn from_bytes(
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
bytes: &[u8],
|
||||
label: &str,
|
||||
) -> Result<(Self, wgpu::CommandBuffer), failure::Error> {
|
||||
) -> Result<Self> {
|
||||
let img = image::load_from_memory(bytes)?;
|
||||
Self::from_image(device, &img, Some(label))
|
||||
Self::from_image(device, queue, &img, Some(label))
|
||||
}
|
||||
|
||||
pub fn from_image(
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
img: &image::DynamicImage,
|
||||
label: Option<&str>,
|
||||
) -> Result<(Self, wgpu::CommandBuffer), failure::Error> {
|
||||
let rgba = img.as_rgba8().unwrap();
|
||||
) -> Result<Self> {
|
||||
let rgba = img.to_rgba();
|
||||
|
||||
let (width, height) = img.dimensions();
|
||||
|
||||
let size = wgpu::Extent3d {
|
||||
width,
|
||||
height,
|
||||
|
@ -87,14 +90,13 @@ impl Texture {
|
|||
anisotropy_clamp: None,
|
||||
});
|
||||
|
||||
Ok((
|
||||
Texture {
|
||||
queue.submit(Some(command));
|
||||
|
||||
Ok(Texture {
|
||||
texture,
|
||||
view,
|
||||
sampler,
|
||||
},
|
||||
command,
|
||||
))
|
||||
})
|
||||
}
|
||||
|
||||
pub const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth32Float;
|
||||
|
@ -140,4 +142,17 @@ impl Texture {
|
|||
sampler,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn load<P: AsRef<Path>>(
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
path: P,
|
||||
) -> Result<Self> {
|
||||
// Needed to appease the borrow checker
|
||||
let path_copy = path.as_ref().to_path_buf();
|
||||
let label = path_copy.to_str();
|
||||
|
||||
let img = image::open(path)?;
|
||||
Self::from_image(device, queue, &img, label)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue