├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── app ├── Cargo.toml └── src │ ├── gui.rs │ └── main.rs ├── nannou-ray-tracer-screenshot.png ├── rust-toolchain ├── shader ├── Cargo.toml └── src │ └── lib.rs └── shared ├── Cargo.toml └── src └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ab_glyph_rasterizer" 7 | version = "0.1.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff" 10 | 11 | [[package]] 12 | name = "adler" 13 | version = "1.0.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 16 | 17 | [[package]] 18 | name = "adler32" 19 | version = "1.2.0" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" 22 | 23 | [[package]] 24 | name = "ahash" 25 | version = "0.4.7" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" 28 | 29 | [[package]] 30 | name = "ahash" 31 | version = "0.7.4" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" 34 | dependencies = [ 35 | "getrandom 0.2.5", 36 | "once_cell", 37 | "version_check", 38 | ] 39 | 40 | [[package]] 41 | name = "andrew" 42 | version = "0.2.1" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" 45 | dependencies = [ 46 | "bitflags", 47 | "line_drawing", 48 | "rusttype 0.7.9", 49 | "walkdir", 50 | "xdg", 51 | "xml-rs", 52 | ] 53 | 54 | [[package]] 55 | name = "andrew" 56 | version = "0.3.1" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" 59 | dependencies = [ 60 | "bitflags", 61 | "rusttype 0.9.2", 62 | "walkdir", 63 | "xdg", 64 | "xml-rs", 65 | ] 66 | 67 | [[package]] 68 | name = "approx" 69 | version = "0.3.2" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" 72 | dependencies = [ 73 | "num-traits 0.2.14", 74 | ] 75 | 76 | [[package]] 77 | name = "ar" 78 | version = "0.9.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "d67af77d68a931ecd5cbd8a3b5987d63a1d1d1278f7f6a60ae33db485cdebb69" 81 | 82 | [[package]] 83 | name = "arrayvec" 84 | version = "0.5.2" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 87 | 88 | [[package]] 89 | name = "ash" 90 | version = "0.32.1" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "06063a002a77d2734631db74e8f4ce7148b77fe522e6bca46f2ae7774fd48112" 93 | dependencies = [ 94 | "libloading 0.7.0", 95 | ] 96 | 97 | [[package]] 98 | name = "autocfg" 99 | version = "0.1.7" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 102 | 103 | [[package]] 104 | name = "autocfg" 105 | version = "1.0.1" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 108 | 109 | [[package]] 110 | name = "bimap" 111 | version = "0.6.1" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "50ae17cabbc8a38a1e3e4c1a6a664e9a09672dc14d0896fa8d865d3a5a446b07" 114 | 115 | [[package]] 116 | name = "bit-set" 117 | version = "0.5.2" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" 120 | dependencies = [ 121 | "bit-vec", 122 | ] 123 | 124 | [[package]] 125 | name = "bit-vec" 126 | version = "0.6.3" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 129 | 130 | [[package]] 131 | name = "bitflags" 132 | version = "1.2.1" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 135 | 136 | [[package]] 137 | name = "block" 138 | version = "0.1.6" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 141 | 142 | [[package]] 143 | name = "bumpalo" 144 | version = "3.7.0" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" 147 | 148 | [[package]] 149 | name = "bytemuck" 150 | version = "1.5.1" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "bed57e2090563b83ba8f83366628ce535a7584c9afa4c9fc0612a03925c6df58" 153 | 154 | [[package]] 155 | name = "byteorder" 156 | version = "1.4.3" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 159 | 160 | [[package]] 161 | name = "calloop" 162 | version = "0.6.5" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" 165 | dependencies = [ 166 | "log", 167 | "nix 0.18.0", 168 | ] 169 | 170 | [[package]] 171 | name = "cc" 172 | version = "1.0.68" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" 175 | dependencies = [ 176 | "jobserver", 177 | ] 178 | 179 | [[package]] 180 | name = "cfg-if" 181 | version = "0.1.10" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 184 | 185 | [[package]] 186 | name = "cfg-if" 187 | version = "1.0.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 190 | 191 | [[package]] 192 | name = "cfg_aliases" 193 | version = "0.1.1" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 196 | 197 | [[package]] 198 | name = "cgmath" 199 | version = "0.17.0" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "283944cdecc44bf0b8dd010ec9af888d3b4f142844fdbe026c20ef68148d6fe7" 202 | dependencies = [ 203 | "approx", 204 | "num-traits 0.2.14", 205 | "rand 0.6.5", 206 | "serde", 207 | ] 208 | 209 | [[package]] 210 | name = "clipboard-win" 211 | version = "2.2.0" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "e3a093d6fed558e5fe24c3dfc85a68bb68f1c824f440d3ba5aca189e2998786b" 214 | dependencies = [ 215 | "winapi 0.3.9", 216 | ] 217 | 218 | [[package]] 219 | name = "cloudabi" 220 | version = "0.0.3" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 223 | dependencies = [ 224 | "bitflags", 225 | ] 226 | 227 | [[package]] 228 | name = "cocoa" 229 | version = "0.24.0" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" 232 | dependencies = [ 233 | "bitflags", 234 | "block", 235 | "cocoa-foundation", 236 | "core-foundation 0.9.1", 237 | "core-graphics 0.22.2", 238 | "foreign-types", 239 | "libc", 240 | "objc", 241 | ] 242 | 243 | [[package]] 244 | name = "cocoa-foundation" 245 | version = "0.1.0" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" 248 | dependencies = [ 249 | "bitflags", 250 | "block", 251 | "core-foundation 0.9.1", 252 | "core-graphics-types", 253 | "foreign-types", 254 | "libc", 255 | "objc", 256 | ] 257 | 258 | [[package]] 259 | name = "codespan-reporting" 260 | version = "0.11.1" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 263 | dependencies = [ 264 | "termcolor", 265 | "unicode-width", 266 | ] 267 | 268 | [[package]] 269 | name = "color_quant" 270 | version = "1.1.0" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 273 | 274 | [[package]] 275 | name = "conrod_core" 276 | version = "0.73.0" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "c1a496f6e5d0beceab817e680e469c7097272ee96eff9bee939dd68db6c1a899" 279 | dependencies = [ 280 | "conrod_derive", 281 | "copypasta", 282 | "daggy 0.5.0", 283 | "fnv", 284 | "instant", 285 | "num", 286 | "pistoncore-input", 287 | "rusttype 0.8.3", 288 | ] 289 | 290 | [[package]] 291 | name = "conrod_derive" 292 | version = "0.73.0" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "e2e4b6ee97fd71a0da09a7d9811a9e49cd773013b52894ae0a7f08440abd8cb7" 295 | dependencies = [ 296 | "proc-macro2 1.0.27", 297 | "quote 1.0.9", 298 | "syn", 299 | ] 300 | 301 | [[package]] 302 | name = "conrod_wgpu" 303 | version = "0.73.0" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "7c2638d7e5698027d7aeffaa2b41a6762687ecc40e88ade261257ebaa74c1e04" 306 | dependencies = [ 307 | "conrod_core", 308 | "wgpu", 309 | ] 310 | 311 | [[package]] 312 | name = "conrod_winit" 313 | version = "0.72.0" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "d1454c16d44a020db7592351d52d255242d21897587a813d89b91c52e603f2f9" 316 | 317 | [[package]] 318 | name = "copyless" 319 | version = "0.1.5" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" 322 | 323 | [[package]] 324 | name = "copypasta" 325 | version = "0.6.3" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "865e9675691e2a7dfc806b16ef2dd5dd536e26ea9b8046519767d79be03aeb6a" 328 | dependencies = [ 329 | "clipboard-win", 330 | "objc", 331 | "objc-foundation", 332 | "objc_id", 333 | "smithay-clipboard", 334 | "wayland-client 0.23.6", 335 | "x11-clipboard", 336 | ] 337 | 338 | [[package]] 339 | name = "core-foundation" 340 | version = "0.7.0" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" 343 | dependencies = [ 344 | "core-foundation-sys 0.7.0", 345 | "libc", 346 | ] 347 | 348 | [[package]] 349 | name = "core-foundation" 350 | version = "0.9.1" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" 353 | dependencies = [ 354 | "core-foundation-sys 0.8.2", 355 | "libc", 356 | ] 357 | 358 | [[package]] 359 | name = "core-foundation-sys" 360 | version = "0.7.0" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" 363 | 364 | [[package]] 365 | name = "core-foundation-sys" 366 | version = "0.8.2" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" 369 | 370 | [[package]] 371 | name = "core-graphics" 372 | version = "0.19.2" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" 375 | dependencies = [ 376 | "bitflags", 377 | "core-foundation 0.7.0", 378 | "foreign-types", 379 | "libc", 380 | ] 381 | 382 | [[package]] 383 | name = "core-graphics" 384 | version = "0.22.2" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" 387 | dependencies = [ 388 | "bitflags", 389 | "core-foundation 0.9.1", 390 | "core-graphics-types", 391 | "foreign-types", 392 | "libc", 393 | ] 394 | 395 | [[package]] 396 | name = "core-graphics-types" 397 | version = "0.1.1" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" 400 | dependencies = [ 401 | "bitflags", 402 | "core-foundation 0.9.1", 403 | "foreign-types", 404 | "libc", 405 | ] 406 | 407 | [[package]] 408 | name = "core-video-sys" 409 | version = "0.1.4" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" 412 | dependencies = [ 413 | "cfg-if 0.1.10", 414 | "core-foundation-sys 0.7.0", 415 | "core-graphics 0.19.2", 416 | "libc", 417 | "objc", 418 | ] 419 | 420 | [[package]] 421 | name = "crc32fast" 422 | version = "1.2.1" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" 425 | dependencies = [ 426 | "cfg-if 1.0.0", 427 | ] 428 | 429 | [[package]] 430 | name = "crossbeam-channel" 431 | version = "0.5.1" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" 434 | dependencies = [ 435 | "cfg-if 1.0.0", 436 | "crossbeam-utils 0.8.5", 437 | ] 438 | 439 | [[package]] 440 | name = "crossbeam-deque" 441 | version = "0.7.3" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" 444 | dependencies = [ 445 | "crossbeam-epoch 0.8.2", 446 | "crossbeam-utils 0.7.2", 447 | "maybe-uninit", 448 | ] 449 | 450 | [[package]] 451 | name = "crossbeam-deque" 452 | version = "0.8.0" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" 455 | dependencies = [ 456 | "cfg-if 1.0.0", 457 | "crossbeam-epoch 0.9.5", 458 | "crossbeam-utils 0.8.5", 459 | ] 460 | 461 | [[package]] 462 | name = "crossbeam-epoch" 463 | version = "0.8.2" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" 466 | dependencies = [ 467 | "autocfg 1.0.1", 468 | "cfg-if 0.1.10", 469 | "crossbeam-utils 0.7.2", 470 | "lazy_static", 471 | "maybe-uninit", 472 | "memoffset 0.5.6", 473 | "scopeguard", 474 | ] 475 | 476 | [[package]] 477 | name = "crossbeam-epoch" 478 | version = "0.9.5" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" 481 | dependencies = [ 482 | "cfg-if 1.0.0", 483 | "crossbeam-utils 0.8.5", 484 | "lazy_static", 485 | "memoffset 0.6.4", 486 | "scopeguard", 487 | ] 488 | 489 | [[package]] 490 | name = "crossbeam-utils" 491 | version = "0.7.2" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" 494 | dependencies = [ 495 | "autocfg 1.0.1", 496 | "cfg-if 0.1.10", 497 | "lazy_static", 498 | ] 499 | 500 | [[package]] 501 | name = "crossbeam-utils" 502 | version = "0.8.5" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" 505 | dependencies = [ 506 | "cfg-if 1.0.0", 507 | "lazy_static", 508 | ] 509 | 510 | [[package]] 511 | name = "d3d12" 512 | version = "0.4.0" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | checksum = "091ed1b25fe47c7ff129fc440c23650b6114f36aa00bc7212cc8041879294428" 515 | dependencies = [ 516 | "bitflags", 517 | "libloading 0.7.0", 518 | "winapi 0.3.9", 519 | ] 520 | 521 | [[package]] 522 | name = "daggy" 523 | version = "0.5.0" 524 | source = "registry+https://github.com/rust-lang/crates.io-index" 525 | checksum = "9293a0da7d1bc1f30090ece4d9f9de79a07be7302ddb00e5eb1fefb6ee6409e2" 526 | dependencies = [ 527 | "petgraph 0.4.13", 528 | ] 529 | 530 | [[package]] 531 | name = "daggy" 532 | version = "0.6.0" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "e2099ef075418d7b252af69583c831cde749af9423c2a212dea8895e8ea78841" 535 | dependencies = [ 536 | "petgraph 0.4.13", 537 | ] 538 | 539 | [[package]] 540 | name = "darling" 541 | version = "0.10.2" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" 544 | dependencies = [ 545 | "darling_core", 546 | "darling_macro", 547 | ] 548 | 549 | [[package]] 550 | name = "darling_core" 551 | version = "0.10.2" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" 554 | dependencies = [ 555 | "fnv", 556 | "ident_case", 557 | "proc-macro2 1.0.27", 558 | "quote 1.0.9", 559 | "strsim", 560 | "syn", 561 | ] 562 | 563 | [[package]] 564 | name = "darling_macro" 565 | version = "0.10.2" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" 568 | dependencies = [ 569 | "darling_core", 570 | "quote 1.0.9", 571 | "syn", 572 | ] 573 | 574 | [[package]] 575 | name = "deflate" 576 | version = "0.7.20" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" 579 | dependencies = [ 580 | "adler32", 581 | "byteorder", 582 | ] 583 | 584 | [[package]] 585 | name = "deflate" 586 | version = "0.8.6" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" 589 | dependencies = [ 590 | "adler32", 591 | "byteorder", 592 | ] 593 | 594 | [[package]] 595 | name = "derivative" 596 | version = "2.2.0" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 599 | dependencies = [ 600 | "proc-macro2 1.0.27", 601 | "quote 1.0.9", 602 | "syn", 603 | ] 604 | 605 | [[package]] 606 | name = "dispatch" 607 | version = "0.2.0" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 610 | 611 | [[package]] 612 | name = "dlib" 613 | version = "0.4.2" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" 616 | dependencies = [ 617 | "libloading 0.6.7", 618 | ] 619 | 620 | [[package]] 621 | name = "dlib" 622 | version = "0.5.0" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" 625 | dependencies = [ 626 | "libloading 0.7.0", 627 | ] 628 | 629 | [[package]] 630 | name = "downcast-rs" 631 | version = "1.2.0" 632 | source = "registry+https://github.com/rust-lang/crates.io-index" 633 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 634 | 635 | [[package]] 636 | name = "either" 637 | version = "1.6.1" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 640 | 641 | [[package]] 642 | name = "enum_primitive" 643 | version = "0.1.1" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" 646 | dependencies = [ 647 | "num-traits 0.1.43", 648 | ] 649 | 650 | [[package]] 651 | name = "euclid" 652 | version = "0.20.14" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad" 655 | dependencies = [ 656 | "num-traits 0.2.14", 657 | ] 658 | 659 | [[package]] 660 | name = "find_folder" 661 | version = "0.3.0" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "9f6d018fb95a0b59f854aed68ecd96ce2b80af7911b92b1fed3c4b1fa516b91b" 664 | 665 | [[package]] 666 | name = "fixedbitset" 667 | version = "0.1.9" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" 670 | 671 | [[package]] 672 | name = "fixedbitset" 673 | version = "0.2.0" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" 676 | 677 | [[package]] 678 | name = "fnv" 679 | version = "1.0.7" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 682 | 683 | [[package]] 684 | name = "foreign-types" 685 | version = "0.3.2" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 688 | dependencies = [ 689 | "foreign-types-shared", 690 | ] 691 | 692 | [[package]] 693 | name = "foreign-types-shared" 694 | version = "0.1.1" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 697 | 698 | [[package]] 699 | name = "fps_ticker" 700 | version = "1.0.0" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "fe164905ff69757d4bdc4c61d7df2930e47e2f5b4a132895a8f995990b2b9219" 703 | 704 | [[package]] 705 | name = "fuchsia-cprng" 706 | version = "0.1.1" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 709 | 710 | [[package]] 711 | name = "fuchsia-zircon" 712 | version = "0.3.3" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 715 | dependencies = [ 716 | "bitflags", 717 | "fuchsia-zircon-sys", 718 | ] 719 | 720 | [[package]] 721 | name = "fuchsia-zircon-sys" 722 | version = "0.3.3" 723 | source = "registry+https://github.com/rust-lang/crates.io-index" 724 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 725 | 726 | [[package]] 727 | name = "futures" 728 | version = "0.3.15" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" 731 | dependencies = [ 732 | "futures-channel", 733 | "futures-core", 734 | "futures-executor", 735 | "futures-io", 736 | "futures-sink", 737 | "futures-task", 738 | "futures-util", 739 | ] 740 | 741 | [[package]] 742 | name = "futures-channel" 743 | version = "0.3.15" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" 746 | dependencies = [ 747 | "futures-core", 748 | "futures-sink", 749 | ] 750 | 751 | [[package]] 752 | name = "futures-core" 753 | version = "0.3.15" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" 756 | 757 | [[package]] 758 | name = "futures-executor" 759 | version = "0.3.15" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" 762 | dependencies = [ 763 | "futures-core", 764 | "futures-task", 765 | "futures-util", 766 | "num_cpus", 767 | ] 768 | 769 | [[package]] 770 | name = "futures-io" 771 | version = "0.3.15" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" 774 | 775 | [[package]] 776 | name = "futures-macro" 777 | version = "0.3.15" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" 780 | dependencies = [ 781 | "autocfg 1.0.1", 782 | "proc-macro-hack", 783 | "proc-macro2 1.0.27", 784 | "quote 1.0.9", 785 | "syn", 786 | ] 787 | 788 | [[package]] 789 | name = "futures-sink" 790 | version = "0.3.15" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" 793 | 794 | [[package]] 795 | name = "futures-task" 796 | version = "0.3.15" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" 799 | 800 | [[package]] 801 | name = "futures-util" 802 | version = "0.3.15" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" 805 | dependencies = [ 806 | "autocfg 1.0.1", 807 | "futures-channel", 808 | "futures-core", 809 | "futures-io", 810 | "futures-macro", 811 | "futures-sink", 812 | "futures-task", 813 | "memchr", 814 | "pin-project-lite", 815 | "pin-utils", 816 | "proc-macro-hack", 817 | "proc-macro-nested", 818 | "slab", 819 | ] 820 | 821 | [[package]] 822 | name = "fxhash" 823 | version = "0.2.1" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 826 | dependencies = [ 827 | "byteorder", 828 | ] 829 | 830 | [[package]] 831 | name = "getrandom" 832 | version = "0.1.16" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 835 | dependencies = [ 836 | "cfg-if 1.0.0", 837 | "libc", 838 | "wasi 0.9.0+wasi-snapshot-preview1", 839 | ] 840 | 841 | [[package]] 842 | name = "getrandom" 843 | version = "0.2.5" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" 846 | dependencies = [ 847 | "cfg-if 1.0.0", 848 | "libc", 849 | "wasi 0.10.2+wasi-snapshot-preview1", 850 | ] 851 | 852 | [[package]] 853 | name = "gfx-auxil" 854 | version = "0.9.0" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "9ccf8711c9994dfa34337466bee3ae1462e172874c432ce4eb120ab2e98d39cf" 857 | dependencies = [ 858 | "fxhash", 859 | "gfx-hal", 860 | "spirv_cross", 861 | ] 862 | 863 | [[package]] 864 | name = "gfx-backend-dx11" 865 | version = "0.8.0" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "6f839f27f8c8a6dc553ccca7f5b35a42009432bc25db9688bba7061cd394161f" 868 | dependencies = [ 869 | "arrayvec", 870 | "bitflags", 871 | "gfx-auxil", 872 | "gfx-hal", 873 | "libloading 0.7.0", 874 | "log", 875 | "parking_lot", 876 | "range-alloc", 877 | "raw-window-handle", 878 | "smallvec", 879 | "spirv_cross", 880 | "thunderdome", 881 | "winapi 0.3.9", 882 | "wio", 883 | ] 884 | 885 | [[package]] 886 | name = "gfx-backend-dx12" 887 | version = "0.8.0" 888 | source = "registry+https://github.com/rust-lang/crates.io-index" 889 | checksum = "3937738b0da5839bba4e33980d29f9a06dbce184d04a3a08c9a949e7953700e3" 890 | dependencies = [ 891 | "arrayvec", 892 | "bit-set", 893 | "bitflags", 894 | "d3d12", 895 | "gfx-auxil", 896 | "gfx-hal", 897 | "log", 898 | "parking_lot", 899 | "range-alloc", 900 | "raw-window-handle", 901 | "smallvec", 902 | "spirv_cross", 903 | "thunderdome", 904 | "winapi 0.3.9", 905 | ] 906 | 907 | [[package]] 908 | name = "gfx-backend-empty" 909 | version = "0.8.0" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "2ac55ada4bfcd35479b3421eea324d36d7da5f724e2f66ecb36d4efdb7041a5e" 912 | dependencies = [ 913 | "gfx-hal", 914 | "log", 915 | "raw-window-handle", 916 | ] 917 | 918 | [[package]] 919 | name = "gfx-backend-gl" 920 | version = "0.8.1" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "0caa03d6e0b7b4f202aea1f20c3f3288cfa06d92d24cea9d69c9a7627967244a" 923 | dependencies = [ 924 | "arrayvec", 925 | "bitflags", 926 | "fxhash", 927 | "gfx-hal", 928 | "glow", 929 | "js-sys", 930 | "khronos-egl", 931 | "libloading 0.7.0", 932 | "log", 933 | "naga", 934 | "parking_lot", 935 | "raw-window-handle", 936 | "wasm-bindgen", 937 | "web-sys", 938 | ] 939 | 940 | [[package]] 941 | name = "gfx-backend-metal" 942 | version = "0.8.2" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "340895ad544ba46433acb3bdabece0ef16f2dbedc030adbd7c9eaf2839fbed41" 945 | dependencies = [ 946 | "arrayvec", 947 | "bitflags", 948 | "block", 949 | "cocoa-foundation", 950 | "copyless", 951 | "foreign-types", 952 | "fxhash", 953 | "gfx-hal", 954 | "log", 955 | "metal", 956 | "naga", 957 | "objc", 958 | "parking_lot", 959 | "profiling", 960 | "range-alloc", 961 | "raw-window-handle", 962 | "storage-map", 963 | ] 964 | 965 | [[package]] 966 | name = "gfx-backend-vulkan" 967 | version = "0.8.0" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | checksum = "a353fc6fdb42ec646de49bbb74e4870e37a7e680caf33f3ac0615c30b1146d94" 970 | dependencies = [ 971 | "arrayvec", 972 | "ash", 973 | "byteorder", 974 | "core-graphics-types", 975 | "gfx-hal", 976 | "inplace_it", 977 | "log", 978 | "naga", 979 | "objc", 980 | "parking_lot", 981 | "raw-window-handle", 982 | "smallvec", 983 | "winapi 0.3.9", 984 | ] 985 | 986 | [[package]] 987 | name = "gfx-hal" 988 | version = "0.8.0" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | checksum = "6d285bfd566f6b9134af908446ca350c0a1047495dfb9bbd826e701e8ee1d259" 991 | dependencies = [ 992 | "bitflags", 993 | "naga", 994 | "raw-window-handle", 995 | "thiserror", 996 | ] 997 | 998 | [[package]] 999 | name = "gif" 1000 | version = "0.9.2" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "e2e41945ba23db3bf51b24756d73d81acb4f28d85c3dccc32c6fae904438c25f" 1003 | dependencies = [ 1004 | "color_quant", 1005 | "lzw", 1006 | ] 1007 | 1008 | [[package]] 1009 | name = "gif" 1010 | version = "0.11.2" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "5a668f699973d0f573d15749b7002a9ac9e1f9c6b220e7b165601334c173d8de" 1013 | dependencies = [ 1014 | "color_quant", 1015 | "weezl", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "glam" 1020 | version = "0.17.3" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" 1023 | dependencies = [ 1024 | "num-traits 0.2.14", 1025 | ] 1026 | 1027 | [[package]] 1028 | name = "glow" 1029 | version = "0.9.0" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "4b80b98efaa8a34fce11d60dd2ce2760d5d83c373cbcc73bb87c2a3a84a54108" 1032 | dependencies = [ 1033 | "js-sys", 1034 | "slotmap", 1035 | "wasm-bindgen", 1036 | "web-sys", 1037 | ] 1038 | 1039 | [[package]] 1040 | name = "gpu-alloc" 1041 | version = "0.4.7" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "cbc1b6ca374e81862526786d9cb42357ce03706ed1b8761730caafd02ab91f3a" 1044 | dependencies = [ 1045 | "bitflags", 1046 | "gpu-alloc-types", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "gpu-alloc-types" 1051 | version = "0.2.0" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" 1054 | dependencies = [ 1055 | "bitflags", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "gpu-descriptor" 1060 | version = "0.1.1" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "e8a70f1e87a3840ed6a3e99e02c2b861e4dbdf26f0d07e38f42ea5aff46cfce2" 1063 | dependencies = [ 1064 | "bitflags", 1065 | "gpu-descriptor-types", 1066 | "hashbrown 0.9.1", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "gpu-descriptor-types" 1071 | version = "0.1.1" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" 1074 | dependencies = [ 1075 | "bitflags", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "hashbrown" 1080 | version = "0.9.1" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 1083 | dependencies = [ 1084 | "ahash 0.4.7", 1085 | ] 1086 | 1087 | [[package]] 1088 | name = "hashbrown" 1089 | version = "0.11.2" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 1092 | dependencies = [ 1093 | "ahash 0.7.4", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "hermit-abi" 1098 | version = "0.1.18" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" 1101 | dependencies = [ 1102 | "libc", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "ident_case" 1107 | version = "1.0.1" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1110 | 1111 | [[package]] 1112 | name = "image" 1113 | version = "0.18.0" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "545f000e8aa4e569e93f49c446987133452e0091c2494ac3efd3606aa3d309f2" 1116 | dependencies = [ 1117 | "byteorder", 1118 | "enum_primitive", 1119 | "gif 0.9.2", 1120 | "jpeg-decoder", 1121 | "num-iter", 1122 | "num-rational 0.1.42", 1123 | "num-traits 0.1.43", 1124 | "png 0.11.0", 1125 | "scoped_threadpool", 1126 | ] 1127 | 1128 | [[package]] 1129 | name = "image" 1130 | version = "0.23.14" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" 1133 | dependencies = [ 1134 | "bytemuck", 1135 | "byteorder", 1136 | "color_quant", 1137 | "gif 0.11.2", 1138 | "jpeg-decoder", 1139 | "num-iter", 1140 | "num-rational 0.3.2", 1141 | "num-traits 0.2.14", 1142 | "png 0.16.8", 1143 | "scoped_threadpool", 1144 | "tiff", 1145 | ] 1146 | 1147 | [[package]] 1148 | name = "indexmap" 1149 | version = "1.6.2" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" 1152 | dependencies = [ 1153 | "autocfg 1.0.1", 1154 | "hashbrown 0.9.1", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "inflate" 1159 | version = "0.3.4" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "f5f9f47468e9a76a6452271efadc88fe865a82be91fe75e6c0c57b87ccea59d4" 1162 | dependencies = [ 1163 | "adler32", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "inplace_it" 1168 | version = "0.3.3" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "90953f308a79fe6d62a4643e51f848fbfddcd05975a38e69fdf4ab86a7baf7ca" 1171 | 1172 | [[package]] 1173 | name = "instant" 1174 | version = "0.1.9" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" 1177 | dependencies = [ 1178 | "cfg-if 1.0.0", 1179 | ] 1180 | 1181 | [[package]] 1182 | name = "iovec" 1183 | version = "0.1.4" 1184 | source = "registry+https://github.com/rust-lang/crates.io-index" 1185 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 1186 | dependencies = [ 1187 | "libc", 1188 | ] 1189 | 1190 | [[package]] 1191 | name = "itoa" 1192 | version = "0.4.7" 1193 | source = "registry+https://github.com/rust-lang/crates.io-index" 1194 | checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" 1195 | 1196 | [[package]] 1197 | name = "jni-sys" 1198 | version = "0.3.0" 1199 | source = "registry+https://github.com/rust-lang/crates.io-index" 1200 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1201 | 1202 | [[package]] 1203 | name = "jobserver" 1204 | version = "0.1.22" 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" 1206 | checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd" 1207 | dependencies = [ 1208 | "libc", 1209 | ] 1210 | 1211 | [[package]] 1212 | name = "jpeg-decoder" 1213 | version = "0.1.22" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" 1216 | dependencies = [ 1217 | "rayon", 1218 | ] 1219 | 1220 | [[package]] 1221 | name = "js-sys" 1222 | version = "0.3.51" 1223 | source = "registry+https://github.com/rust-lang/crates.io-index" 1224 | checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" 1225 | dependencies = [ 1226 | "wasm-bindgen", 1227 | ] 1228 | 1229 | [[package]] 1230 | name = "kernel32-sys" 1231 | version = "0.2.2" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1234 | dependencies = [ 1235 | "winapi 0.2.8", 1236 | "winapi-build", 1237 | ] 1238 | 1239 | [[package]] 1240 | name = "khronos-egl" 1241 | version = "4.1.0" 1242 | source = "registry+https://github.com/rust-lang/crates.io-index" 1243 | checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" 1244 | dependencies = [ 1245 | "libc", 1246 | "libloading 0.7.0", 1247 | ] 1248 | 1249 | [[package]] 1250 | name = "lazy_static" 1251 | version = "1.4.0" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1254 | 1255 | [[package]] 1256 | name = "lazycell" 1257 | version = "1.3.0" 1258 | source = "registry+https://github.com/rust-lang/crates.io-index" 1259 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 1260 | 1261 | [[package]] 1262 | name = "libc" 1263 | version = "0.2.95" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36" 1266 | 1267 | [[package]] 1268 | name = "libloading" 1269 | version = "0.6.7" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" 1272 | dependencies = [ 1273 | "cfg-if 1.0.0", 1274 | "winapi 0.3.9", 1275 | ] 1276 | 1277 | [[package]] 1278 | name = "libloading" 1279 | version = "0.7.0" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" 1282 | dependencies = [ 1283 | "cfg-if 1.0.0", 1284 | "winapi 0.3.9", 1285 | ] 1286 | 1287 | [[package]] 1288 | name = "libm" 1289 | version = "0.2.1" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" 1292 | 1293 | [[package]] 1294 | name = "line_drawing" 1295 | version = "0.7.0" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" 1298 | dependencies = [ 1299 | "num-traits 0.2.14", 1300 | ] 1301 | 1302 | [[package]] 1303 | name = "linked-hash-map" 1304 | version = "0.5.4" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" 1307 | 1308 | [[package]] 1309 | name = "lock_api" 1310 | version = "0.4.4" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" 1313 | dependencies = [ 1314 | "scopeguard", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "log" 1319 | version = "0.4.14" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 1322 | dependencies = [ 1323 | "cfg-if 1.0.0", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "lyon" 1328 | version = "0.15.9" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "ed142d912ddc611081d50acd84ce1b8612da909aa4cf369642ba92cf51f09b40" 1331 | dependencies = [ 1332 | "lyon_algorithms", 1333 | "lyon_tessellation", 1334 | ] 1335 | 1336 | [[package]] 1337 | name = "lyon_algorithms" 1338 | version = "0.15.1" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "ef5d79947342462427efed6f49b1361d700c0f5dad97a1bac96a5f84d2d1abb1" 1341 | dependencies = [ 1342 | "lyon_path", 1343 | "sid", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "lyon_geom" 1348 | version = "0.15.3" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "9962a2ba81382716b87d7d358493cb71844c1f9165ddad763cd9f4d3f5474df2" 1351 | dependencies = [ 1352 | "arrayvec", 1353 | "euclid", 1354 | "num-traits 0.2.14", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "lyon_path" 1359 | version = "0.15.2" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "c81a044414965c051b7b4785770820d23146480a2d8573cd825f03a00a5b8dd8" 1362 | dependencies = [ 1363 | "lyon_geom", 1364 | ] 1365 | 1366 | [[package]] 1367 | name = "lyon_tessellation" 1368 | version = "0.15.9" 1369 | source = "registry+https://github.com/rust-lang/crates.io-index" 1370 | checksum = "71c45e7eb8cf9cba513aa72efd59894f861a91acabc9a100caeb0fe6e6315b71" 1371 | dependencies = [ 1372 | "arrayvec", 1373 | "lyon_path", 1374 | "sid", 1375 | ] 1376 | 1377 | [[package]] 1378 | name = "lzw" 1379 | version = "0.10.0" 1380 | source = "registry+https://github.com/rust-lang/crates.io-index" 1381 | checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" 1382 | 1383 | [[package]] 1384 | name = "malloc_buf" 1385 | version = "0.0.6" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1388 | dependencies = [ 1389 | "libc", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "maybe-uninit" 1394 | version = "2.0.0" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" 1397 | 1398 | [[package]] 1399 | name = "memchr" 1400 | version = "2.4.0" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" 1403 | 1404 | [[package]] 1405 | name = "memmap" 1406 | version = "0.7.0" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" 1409 | dependencies = [ 1410 | "libc", 1411 | "winapi 0.3.9", 1412 | ] 1413 | 1414 | [[package]] 1415 | name = "memmap2" 1416 | version = "0.1.0" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" 1419 | dependencies = [ 1420 | "libc", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "memoffset" 1425 | version = "0.5.6" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" 1428 | dependencies = [ 1429 | "autocfg 1.0.1", 1430 | ] 1431 | 1432 | [[package]] 1433 | name = "memoffset" 1434 | version = "0.6.4" 1435 | source = "registry+https://github.com/rust-lang/crates.io-index" 1436 | checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" 1437 | dependencies = [ 1438 | "autocfg 1.0.1", 1439 | ] 1440 | 1441 | [[package]] 1442 | name = "metal" 1443 | version = "0.22.0" 1444 | source = "registry+https://github.com/rust-lang/crates.io-index" 1445 | checksum = "1c12e48c737ee9a55e8bb2352bcde588f79ae308d3529ee888f7cc0f469b5777" 1446 | dependencies = [ 1447 | "bitflags", 1448 | "block", 1449 | "cocoa-foundation", 1450 | "foreign-types", 1451 | "log", 1452 | "objc", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "miniz_oxide" 1457 | version = "0.3.7" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" 1460 | dependencies = [ 1461 | "adler32", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "miniz_oxide" 1466 | version = "0.4.4" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" 1469 | dependencies = [ 1470 | "adler", 1471 | "autocfg 1.0.1", 1472 | ] 1473 | 1474 | [[package]] 1475 | name = "mio" 1476 | version = "0.6.23" 1477 | source = "registry+https://github.com/rust-lang/crates.io-index" 1478 | checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" 1479 | dependencies = [ 1480 | "cfg-if 0.1.10", 1481 | "fuchsia-zircon", 1482 | "fuchsia-zircon-sys", 1483 | "iovec", 1484 | "kernel32-sys", 1485 | "libc", 1486 | "log", 1487 | "miow", 1488 | "net2", 1489 | "slab", 1490 | "winapi 0.2.8", 1491 | ] 1492 | 1493 | [[package]] 1494 | name = "mio-extras" 1495 | version = "2.0.6" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" 1498 | dependencies = [ 1499 | "lazycell", 1500 | "log", 1501 | "mio", 1502 | "slab", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "miow" 1507 | version = "0.2.2" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" 1510 | dependencies = [ 1511 | "kernel32-sys", 1512 | "net2", 1513 | "winapi 0.2.8", 1514 | "ws2_32-sys", 1515 | ] 1516 | 1517 | [[package]] 1518 | name = "naga" 1519 | version = "0.4.2" 1520 | source = "registry+https://github.com/rust-lang/crates.io-index" 1521 | checksum = "c8d74f2c7ace793a760165ac0679d6830809ad4e85f6886f72e4f8c4aa4291c5" 1522 | dependencies = [ 1523 | "bit-set", 1524 | "bitflags", 1525 | "codespan-reporting", 1526 | "fxhash", 1527 | "log", 1528 | "num-traits 0.2.14", 1529 | "petgraph 0.5.1", 1530 | "spirv_headers", 1531 | "thiserror", 1532 | ] 1533 | 1534 | [[package]] 1535 | name = "nannou" 1536 | version = "0.16.0" 1537 | source = "git+https://github.com/nannou-org/nannou?rev=81ce490420f9b72e6fe5094c601c47f062bb0f76#81ce490420f9b72e6fe5094c601c47f062bb0f76" 1538 | dependencies = [ 1539 | "cgmath", 1540 | "conrod_core", 1541 | "conrod_wgpu", 1542 | "conrod_winit", 1543 | "daggy 0.6.0", 1544 | "find_folder", 1545 | "futures", 1546 | "image 0.23.14", 1547 | "instant", 1548 | "lyon", 1549 | "noise", 1550 | "notosans", 1551 | "num_cpus", 1552 | "palette", 1553 | "pennereq", 1554 | "rand 0.7.3", 1555 | "rusttype 0.8.3", 1556 | "serde", 1557 | "serde_derive", 1558 | "serde_json", 1559 | "toml", 1560 | "walkdir", 1561 | "wgpu", 1562 | "winit", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "nannou-raytracer-app" 1567 | version = "0.1.0" 1568 | dependencies = [ 1569 | "fps_ticker", 1570 | "nannou", 1571 | "nannou-raytracer-shared", 1572 | "spirv-builder", 1573 | ] 1574 | 1575 | [[package]] 1576 | name = "nannou-raytracer-shader" 1577 | version = "0.1.0" 1578 | dependencies = [ 1579 | "nannou-raytracer-shared", 1580 | "spirv-std", 1581 | ] 1582 | 1583 | [[package]] 1584 | name = "nannou-raytracer-shared" 1585 | version = "0.1.0" 1586 | dependencies = [ 1587 | "spirv-std", 1588 | ] 1589 | 1590 | [[package]] 1591 | name = "ndk" 1592 | version = "0.2.1" 1593 | source = "registry+https://github.com/rust-lang/crates.io-index" 1594 | checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73" 1595 | dependencies = [ 1596 | "jni-sys", 1597 | "ndk-sys", 1598 | "num_enum", 1599 | "thiserror", 1600 | ] 1601 | 1602 | [[package]] 1603 | name = "ndk-glue" 1604 | version = "0.2.1" 1605 | source = "registry+https://github.com/rust-lang/crates.io-index" 1606 | checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241" 1607 | dependencies = [ 1608 | "lazy_static", 1609 | "libc", 1610 | "log", 1611 | "ndk", 1612 | "ndk-macro", 1613 | "ndk-sys", 1614 | ] 1615 | 1616 | [[package]] 1617 | name = "ndk-macro" 1618 | version = "0.2.0" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" 1621 | dependencies = [ 1622 | "darling", 1623 | "proc-macro-crate", 1624 | "proc-macro2 1.0.27", 1625 | "quote 1.0.9", 1626 | "syn", 1627 | ] 1628 | 1629 | [[package]] 1630 | name = "ndk-sys" 1631 | version = "0.2.1" 1632 | source = "registry+https://github.com/rust-lang/crates.io-index" 1633 | checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" 1634 | 1635 | [[package]] 1636 | name = "net2" 1637 | version = "0.2.37" 1638 | source = "registry+https://github.com/rust-lang/crates.io-index" 1639 | checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" 1640 | dependencies = [ 1641 | "cfg-if 0.1.10", 1642 | "libc", 1643 | "winapi 0.3.9", 1644 | ] 1645 | 1646 | [[package]] 1647 | name = "nix" 1648 | version = "0.14.1" 1649 | source = "registry+https://github.com/rust-lang/crates.io-index" 1650 | checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" 1651 | dependencies = [ 1652 | "bitflags", 1653 | "cc", 1654 | "cfg-if 0.1.10", 1655 | "libc", 1656 | "void", 1657 | ] 1658 | 1659 | [[package]] 1660 | name = "nix" 1661 | version = "0.18.0" 1662 | source = "registry+https://github.com/rust-lang/crates.io-index" 1663 | checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" 1664 | dependencies = [ 1665 | "bitflags", 1666 | "cc", 1667 | "cfg-if 0.1.10", 1668 | "libc", 1669 | ] 1670 | 1671 | [[package]] 1672 | name = "nix" 1673 | version = "0.20.0" 1674 | source = "registry+https://github.com/rust-lang/crates.io-index" 1675 | checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" 1676 | dependencies = [ 1677 | "bitflags", 1678 | "cc", 1679 | "cfg-if 1.0.0", 1680 | "libc", 1681 | ] 1682 | 1683 | [[package]] 1684 | name = "noise" 1685 | version = "0.6.0" 1686 | source = "registry+https://github.com/rust-lang/crates.io-index" 1687 | checksum = "337525774dd8a197b613a01ea88058ef0ed023e5ed1e4b7e93de478e1f2bf770" 1688 | dependencies = [ 1689 | "image 0.18.0", 1690 | "rand 0.5.6", 1691 | ] 1692 | 1693 | [[package]] 1694 | name = "nom" 1695 | version = "6.1.2" 1696 | source = "registry+https://github.com/rust-lang/crates.io-index" 1697 | checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" 1698 | dependencies = [ 1699 | "memchr", 1700 | "version_check", 1701 | ] 1702 | 1703 | [[package]] 1704 | name = "notosans" 1705 | version = "0.1.0" 1706 | source = "registry+https://github.com/rust-lang/crates.io-index" 1707 | checksum = "004d578bbfc8a6bdd4690576a8381af234ef051dd4cc358604e1784821e8205c" 1708 | 1709 | [[package]] 1710 | name = "num" 1711 | version = "0.3.1" 1712 | source = "registry+https://github.com/rust-lang/crates.io-index" 1713 | checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" 1714 | dependencies = [ 1715 | "num-bigint", 1716 | "num-complex", 1717 | "num-integer", 1718 | "num-iter", 1719 | "num-rational 0.3.2", 1720 | "num-traits 0.2.14", 1721 | ] 1722 | 1723 | [[package]] 1724 | name = "num-bigint" 1725 | version = "0.3.2" 1726 | source = "registry+https://github.com/rust-lang/crates.io-index" 1727 | checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" 1728 | dependencies = [ 1729 | "autocfg 1.0.1", 1730 | "num-integer", 1731 | "num-traits 0.2.14", 1732 | ] 1733 | 1734 | [[package]] 1735 | name = "num-complex" 1736 | version = "0.3.1" 1737 | source = "registry+https://github.com/rust-lang/crates.io-index" 1738 | checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" 1739 | dependencies = [ 1740 | "num-traits 0.2.14", 1741 | ] 1742 | 1743 | [[package]] 1744 | name = "num-integer" 1745 | version = "0.1.44" 1746 | source = "registry+https://github.com/rust-lang/crates.io-index" 1747 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 1748 | dependencies = [ 1749 | "autocfg 1.0.1", 1750 | "num-traits 0.2.14", 1751 | ] 1752 | 1753 | [[package]] 1754 | name = "num-iter" 1755 | version = "0.1.42" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" 1758 | dependencies = [ 1759 | "autocfg 1.0.1", 1760 | "num-integer", 1761 | "num-traits 0.2.14", 1762 | ] 1763 | 1764 | [[package]] 1765 | name = "num-rational" 1766 | version = "0.1.42" 1767 | source = "registry+https://github.com/rust-lang/crates.io-index" 1768 | checksum = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" 1769 | dependencies = [ 1770 | "num-integer", 1771 | "num-traits 0.2.14", 1772 | ] 1773 | 1774 | [[package]] 1775 | name = "num-rational" 1776 | version = "0.3.2" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" 1779 | dependencies = [ 1780 | "autocfg 1.0.1", 1781 | "num-bigint", 1782 | "num-integer", 1783 | "num-traits 0.2.14", 1784 | ] 1785 | 1786 | [[package]] 1787 | name = "num-traits" 1788 | version = "0.1.43" 1789 | source = "registry+https://github.com/rust-lang/crates.io-index" 1790 | checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 1791 | dependencies = [ 1792 | "num-traits 0.2.14", 1793 | ] 1794 | 1795 | [[package]] 1796 | name = "num-traits" 1797 | version = "0.2.14" 1798 | source = "registry+https://github.com/rust-lang/crates.io-index" 1799 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1800 | dependencies = [ 1801 | "autocfg 1.0.1", 1802 | "libm", 1803 | ] 1804 | 1805 | [[package]] 1806 | name = "num_cpus" 1807 | version = "1.13.0" 1808 | source = "registry+https://github.com/rust-lang/crates.io-index" 1809 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 1810 | dependencies = [ 1811 | "hermit-abi", 1812 | "libc", 1813 | ] 1814 | 1815 | [[package]] 1816 | name = "num_enum" 1817 | version = "0.4.3" 1818 | source = "registry+https://github.com/rust-lang/crates.io-index" 1819 | checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" 1820 | dependencies = [ 1821 | "derivative", 1822 | "num_enum_derive", 1823 | ] 1824 | 1825 | [[package]] 1826 | name = "num_enum_derive" 1827 | version = "0.4.3" 1828 | source = "registry+https://github.com/rust-lang/crates.io-index" 1829 | checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" 1830 | dependencies = [ 1831 | "proc-macro-crate", 1832 | "proc-macro2 1.0.27", 1833 | "quote 1.0.9", 1834 | "syn", 1835 | ] 1836 | 1837 | [[package]] 1838 | name = "objc" 1839 | version = "0.2.7" 1840 | source = "registry+https://github.com/rust-lang/crates.io-index" 1841 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1842 | dependencies = [ 1843 | "malloc_buf", 1844 | "objc_exception", 1845 | ] 1846 | 1847 | [[package]] 1848 | name = "objc-foundation" 1849 | version = "0.1.1" 1850 | source = "registry+https://github.com/rust-lang/crates.io-index" 1851 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1852 | dependencies = [ 1853 | "block", 1854 | "objc", 1855 | "objc_id", 1856 | ] 1857 | 1858 | [[package]] 1859 | name = "objc_exception" 1860 | version = "0.1.2" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" 1863 | dependencies = [ 1864 | "cc", 1865 | ] 1866 | 1867 | [[package]] 1868 | name = "objc_id" 1869 | version = "0.1.1" 1870 | source = "registry+https://github.com/rust-lang/crates.io-index" 1871 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1872 | dependencies = [ 1873 | "objc", 1874 | ] 1875 | 1876 | [[package]] 1877 | name = "once_cell" 1878 | version = "1.7.2" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" 1881 | 1882 | [[package]] 1883 | name = "ordered-float" 1884 | version = "1.1.1" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" 1887 | dependencies = [ 1888 | "num-traits 0.2.14", 1889 | ] 1890 | 1891 | [[package]] 1892 | name = "owned_ttf_parser" 1893 | version = "0.6.0" 1894 | source = "registry+https://github.com/rust-lang/crates.io-index" 1895 | checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" 1896 | dependencies = [ 1897 | "ttf-parser", 1898 | ] 1899 | 1900 | [[package]] 1901 | name = "palette" 1902 | version = "0.5.0" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "a05c0334468e62a4dfbda34b29110aa7d70d58c7fdb2c9857b5874dd9827cc59" 1905 | dependencies = [ 1906 | "approx", 1907 | "num-traits 0.2.14", 1908 | "palette_derive", 1909 | "phf", 1910 | "phf_codegen", 1911 | ] 1912 | 1913 | [[package]] 1914 | name = "palette_derive" 1915 | version = "0.5.0" 1916 | source = "registry+https://github.com/rust-lang/crates.io-index" 1917 | checksum = "0b4b5f600e60dd3a147fb57b4547033d382d1979eb087af310e91cb45a63b1f4" 1918 | dependencies = [ 1919 | "proc-macro2 1.0.27", 1920 | "quote 1.0.9", 1921 | "syn", 1922 | ] 1923 | 1924 | [[package]] 1925 | name = "parking_lot" 1926 | version = "0.11.1" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" 1929 | dependencies = [ 1930 | "instant", 1931 | "lock_api", 1932 | "parking_lot_core", 1933 | ] 1934 | 1935 | [[package]] 1936 | name = "parking_lot_core" 1937 | version = "0.8.3" 1938 | source = "registry+https://github.com/rust-lang/crates.io-index" 1939 | checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" 1940 | dependencies = [ 1941 | "cfg-if 1.0.0", 1942 | "instant", 1943 | "libc", 1944 | "redox_syscall", 1945 | "smallvec", 1946 | "winapi 0.3.9", 1947 | ] 1948 | 1949 | [[package]] 1950 | name = "pennereq" 1951 | version = "0.3.1" 1952 | source = "registry+https://github.com/rust-lang/crates.io-index" 1953 | checksum = "2174a8f4566f0f8cdce1af08dc29d78fc93880f70962a1e49385831b9550dc8b" 1954 | dependencies = [ 1955 | "num-traits 0.2.14", 1956 | ] 1957 | 1958 | [[package]] 1959 | name = "percent-encoding" 1960 | version = "2.1.0" 1961 | source = "registry+https://github.com/rust-lang/crates.io-index" 1962 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1963 | 1964 | [[package]] 1965 | name = "petgraph" 1966 | version = "0.4.13" 1967 | source = "registry+https://github.com/rust-lang/crates.io-index" 1968 | checksum = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" 1969 | dependencies = [ 1970 | "fixedbitset 0.1.9", 1971 | ] 1972 | 1973 | [[package]] 1974 | name = "petgraph" 1975 | version = "0.5.1" 1976 | source = "registry+https://github.com/rust-lang/crates.io-index" 1977 | checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" 1978 | dependencies = [ 1979 | "fixedbitset 0.2.0", 1980 | "indexmap", 1981 | ] 1982 | 1983 | [[package]] 1984 | name = "phf" 1985 | version = "0.8.0" 1986 | source = "registry+https://github.com/rust-lang/crates.io-index" 1987 | checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" 1988 | dependencies = [ 1989 | "phf_shared", 1990 | ] 1991 | 1992 | [[package]] 1993 | name = "phf_codegen" 1994 | version = "0.8.0" 1995 | source = "registry+https://github.com/rust-lang/crates.io-index" 1996 | checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" 1997 | dependencies = [ 1998 | "phf_generator", 1999 | "phf_shared", 2000 | ] 2001 | 2002 | [[package]] 2003 | name = "phf_generator" 2004 | version = "0.8.0" 2005 | source = "registry+https://github.com/rust-lang/crates.io-index" 2006 | checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" 2007 | dependencies = [ 2008 | "phf_shared", 2009 | "rand 0.7.3", 2010 | ] 2011 | 2012 | [[package]] 2013 | name = "phf_shared" 2014 | version = "0.8.0" 2015 | source = "registry+https://github.com/rust-lang/crates.io-index" 2016 | checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" 2017 | dependencies = [ 2018 | "siphasher", 2019 | ] 2020 | 2021 | [[package]] 2022 | name = "pin-project-lite" 2023 | version = "0.2.6" 2024 | source = "registry+https://github.com/rust-lang/crates.io-index" 2025 | checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" 2026 | 2027 | [[package]] 2028 | name = "pin-utils" 2029 | version = "0.1.0" 2030 | source = "registry+https://github.com/rust-lang/crates.io-index" 2031 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 2032 | 2033 | [[package]] 2034 | name = "piston-float" 2035 | version = "1.0.0" 2036 | source = "registry+https://github.com/rust-lang/crates.io-index" 2037 | checksum = "f900be47e312e126cc71d35548e8e31edd3901b92ab82d1c4c4757e6b5526564" 2038 | 2039 | [[package]] 2040 | name = "piston-viewport" 2041 | version = "1.0.0" 2042 | source = "registry+https://github.com/rust-lang/crates.io-index" 2043 | checksum = "01abb19b781051290d0837b9294c26d419cc4156907c21ffe86705e219446798" 2044 | dependencies = [ 2045 | "piston-float", 2046 | ] 2047 | 2048 | [[package]] 2049 | name = "pistoncore-input" 2050 | version = "1.0.0" 2051 | source = "registry+https://github.com/rust-lang/crates.io-index" 2052 | checksum = "44bb41e7bdd8213f06b2da31e67ae9469f83094d0e45122ead52158915d9af30" 2053 | dependencies = [ 2054 | "bitflags", 2055 | "piston-viewport", 2056 | "serde", 2057 | "serde_derive", 2058 | ] 2059 | 2060 | [[package]] 2061 | name = "pkg-config" 2062 | version = "0.3.19" 2063 | source = "registry+https://github.com/rust-lang/crates.io-index" 2064 | checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" 2065 | 2066 | [[package]] 2067 | name = "png" 2068 | version = "0.11.0" 2069 | source = "registry+https://github.com/rust-lang/crates.io-index" 2070 | checksum = "f0b0cabbbd20c2d7f06dbf015e06aad59b6ca3d9ed14848783e98af9aaf19925" 2071 | dependencies = [ 2072 | "bitflags", 2073 | "deflate 0.7.20", 2074 | "inflate", 2075 | "num-iter", 2076 | ] 2077 | 2078 | [[package]] 2079 | name = "png" 2080 | version = "0.16.8" 2081 | source = "registry+https://github.com/rust-lang/crates.io-index" 2082 | checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" 2083 | dependencies = [ 2084 | "bitflags", 2085 | "crc32fast", 2086 | "deflate 0.8.6", 2087 | "miniz_oxide 0.3.7", 2088 | ] 2089 | 2090 | [[package]] 2091 | name = "ppv-lite86" 2092 | version = "0.2.10" 2093 | source = "registry+https://github.com/rust-lang/crates.io-index" 2094 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" 2095 | 2096 | [[package]] 2097 | name = "proc-macro-crate" 2098 | version = "0.1.5" 2099 | source = "registry+https://github.com/rust-lang/crates.io-index" 2100 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 2101 | dependencies = [ 2102 | "toml", 2103 | ] 2104 | 2105 | [[package]] 2106 | name = "proc-macro-hack" 2107 | version = "0.5.19" 2108 | source = "registry+https://github.com/rust-lang/crates.io-index" 2109 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 2110 | 2111 | [[package]] 2112 | name = "proc-macro-nested" 2113 | version = "0.1.7" 2114 | source = "registry+https://github.com/rust-lang/crates.io-index" 2115 | checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" 2116 | 2117 | [[package]] 2118 | name = "proc-macro2" 2119 | version = "0.4.30" 2120 | source = "registry+https://github.com/rust-lang/crates.io-index" 2121 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 2122 | dependencies = [ 2123 | "unicode-xid 0.1.0", 2124 | ] 2125 | 2126 | [[package]] 2127 | name = "proc-macro2" 2128 | version = "1.0.27" 2129 | source = "registry+https://github.com/rust-lang/crates.io-index" 2130 | checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" 2131 | dependencies = [ 2132 | "unicode-xid 0.2.2", 2133 | ] 2134 | 2135 | [[package]] 2136 | name = "profiling" 2137 | version = "1.0.1" 2138 | source = "registry+https://github.com/rust-lang/crates.io-index" 2139 | checksum = "c3a66d5e88679f2720126c11ee29da07a08f094eac52306b066edd7d393752d6" 2140 | 2141 | [[package]] 2142 | name = "quote" 2143 | version = "0.6.13" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 2146 | dependencies = [ 2147 | "proc-macro2 0.4.30", 2148 | ] 2149 | 2150 | [[package]] 2151 | name = "quote" 2152 | version = "1.0.9" 2153 | source = "registry+https://github.com/rust-lang/crates.io-index" 2154 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 2155 | dependencies = [ 2156 | "proc-macro2 1.0.27", 2157 | ] 2158 | 2159 | [[package]] 2160 | name = "rand" 2161 | version = "0.5.6" 2162 | source = "registry+https://github.com/rust-lang/crates.io-index" 2163 | checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" 2164 | dependencies = [ 2165 | "cloudabi", 2166 | "fuchsia-cprng", 2167 | "libc", 2168 | "rand_core 0.3.1", 2169 | "winapi 0.3.9", 2170 | ] 2171 | 2172 | [[package]] 2173 | name = "rand" 2174 | version = "0.6.5" 2175 | source = "registry+https://github.com/rust-lang/crates.io-index" 2176 | checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 2177 | dependencies = [ 2178 | "autocfg 0.1.7", 2179 | "libc", 2180 | "rand_chacha 0.1.1", 2181 | "rand_core 0.4.2", 2182 | "rand_hc 0.1.0", 2183 | "rand_isaac", 2184 | "rand_jitter", 2185 | "rand_os", 2186 | "rand_pcg 0.1.2", 2187 | "rand_xorshift", 2188 | "winapi 0.3.9", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "rand" 2193 | version = "0.7.3" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 2196 | dependencies = [ 2197 | "getrandom 0.1.16", 2198 | "libc", 2199 | "rand_chacha 0.2.2", 2200 | "rand_core 0.5.1", 2201 | "rand_hc 0.2.0", 2202 | "rand_pcg 0.2.1", 2203 | ] 2204 | 2205 | [[package]] 2206 | name = "rand" 2207 | version = "0.8.5" 2208 | source = "registry+https://github.com/rust-lang/crates.io-index" 2209 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2210 | dependencies = [ 2211 | "libc", 2212 | "rand_chacha 0.3.1", 2213 | "rand_core 0.6.3", 2214 | ] 2215 | 2216 | [[package]] 2217 | name = "rand_chacha" 2218 | version = "0.1.1" 2219 | source = "registry+https://github.com/rust-lang/crates.io-index" 2220 | checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 2221 | dependencies = [ 2222 | "autocfg 0.1.7", 2223 | "rand_core 0.3.1", 2224 | ] 2225 | 2226 | [[package]] 2227 | name = "rand_chacha" 2228 | version = "0.2.2" 2229 | source = "registry+https://github.com/rust-lang/crates.io-index" 2230 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 2231 | dependencies = [ 2232 | "ppv-lite86", 2233 | "rand_core 0.5.1", 2234 | ] 2235 | 2236 | [[package]] 2237 | name = "rand_chacha" 2238 | version = "0.3.1" 2239 | source = "registry+https://github.com/rust-lang/crates.io-index" 2240 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2241 | dependencies = [ 2242 | "ppv-lite86", 2243 | "rand_core 0.6.3", 2244 | ] 2245 | 2246 | [[package]] 2247 | name = "rand_core" 2248 | version = "0.3.1" 2249 | source = "registry+https://github.com/rust-lang/crates.io-index" 2250 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 2251 | dependencies = [ 2252 | "rand_core 0.4.2", 2253 | ] 2254 | 2255 | [[package]] 2256 | name = "rand_core" 2257 | version = "0.4.2" 2258 | source = "registry+https://github.com/rust-lang/crates.io-index" 2259 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 2260 | 2261 | [[package]] 2262 | name = "rand_core" 2263 | version = "0.5.1" 2264 | source = "registry+https://github.com/rust-lang/crates.io-index" 2265 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 2266 | dependencies = [ 2267 | "getrandom 0.1.16", 2268 | ] 2269 | 2270 | [[package]] 2271 | name = "rand_core" 2272 | version = "0.6.3" 2273 | source = "registry+https://github.com/rust-lang/crates.io-index" 2274 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 2275 | dependencies = [ 2276 | "getrandom 0.2.5", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "rand_hc" 2281 | version = "0.1.0" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 2284 | dependencies = [ 2285 | "rand_core 0.3.1", 2286 | ] 2287 | 2288 | [[package]] 2289 | name = "rand_hc" 2290 | version = "0.2.0" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 2293 | dependencies = [ 2294 | "rand_core 0.5.1", 2295 | ] 2296 | 2297 | [[package]] 2298 | name = "rand_isaac" 2299 | version = "0.1.1" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 2302 | dependencies = [ 2303 | "rand_core 0.3.1", 2304 | ] 2305 | 2306 | [[package]] 2307 | name = "rand_jitter" 2308 | version = "0.1.4" 2309 | source = "registry+https://github.com/rust-lang/crates.io-index" 2310 | checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" 2311 | dependencies = [ 2312 | "libc", 2313 | "rand_core 0.4.2", 2314 | "winapi 0.3.9", 2315 | ] 2316 | 2317 | [[package]] 2318 | name = "rand_os" 2319 | version = "0.1.3" 2320 | source = "registry+https://github.com/rust-lang/crates.io-index" 2321 | checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" 2322 | dependencies = [ 2323 | "cloudabi", 2324 | "fuchsia-cprng", 2325 | "libc", 2326 | "rand_core 0.4.2", 2327 | "rdrand", 2328 | "winapi 0.3.9", 2329 | ] 2330 | 2331 | [[package]] 2332 | name = "rand_pcg" 2333 | version = "0.1.2" 2334 | source = "registry+https://github.com/rust-lang/crates.io-index" 2335 | checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 2336 | dependencies = [ 2337 | "autocfg 0.1.7", 2338 | "rand_core 0.4.2", 2339 | ] 2340 | 2341 | [[package]] 2342 | name = "rand_pcg" 2343 | version = "0.2.1" 2344 | source = "registry+https://github.com/rust-lang/crates.io-index" 2345 | checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" 2346 | dependencies = [ 2347 | "rand_core 0.5.1", 2348 | ] 2349 | 2350 | [[package]] 2351 | name = "rand_xorshift" 2352 | version = "0.1.1" 2353 | source = "registry+https://github.com/rust-lang/crates.io-index" 2354 | checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 2355 | dependencies = [ 2356 | "rand_core 0.3.1", 2357 | ] 2358 | 2359 | [[package]] 2360 | name = "range-alloc" 2361 | version = "0.1.2" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" 2364 | 2365 | [[package]] 2366 | name = "raw-string" 2367 | version = "0.3.5" 2368 | source = "registry+https://github.com/rust-lang/crates.io-index" 2369 | checksum = "e0501e134c6905fee1f10fed25b0a7e1261bf676cffac9543a7d0730dec01af2" 2370 | 2371 | [[package]] 2372 | name = "raw-window-handle" 2373 | version = "0.3.3" 2374 | source = "registry+https://github.com/rust-lang/crates.io-index" 2375 | checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" 2376 | dependencies = [ 2377 | "libc", 2378 | ] 2379 | 2380 | [[package]] 2381 | name = "rayon" 2382 | version = "1.5.1" 2383 | source = "registry+https://github.com/rust-lang/crates.io-index" 2384 | checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" 2385 | dependencies = [ 2386 | "autocfg 1.0.1", 2387 | "crossbeam-deque 0.8.0", 2388 | "either", 2389 | "rayon-core", 2390 | ] 2391 | 2392 | [[package]] 2393 | name = "rayon-core" 2394 | version = "1.9.1" 2395 | source = "registry+https://github.com/rust-lang/crates.io-index" 2396 | checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" 2397 | dependencies = [ 2398 | "crossbeam-channel", 2399 | "crossbeam-deque 0.8.0", 2400 | "crossbeam-utils 0.8.5", 2401 | "lazy_static", 2402 | "num_cpus", 2403 | ] 2404 | 2405 | [[package]] 2406 | name = "rdrand" 2407 | version = "0.4.0" 2408 | source = "registry+https://github.com/rust-lang/crates.io-index" 2409 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 2410 | dependencies = [ 2411 | "rand_core 0.3.1", 2412 | ] 2413 | 2414 | [[package]] 2415 | name = "redox_syscall" 2416 | version = "0.2.8" 2417 | source = "registry+https://github.com/rust-lang/crates.io-index" 2418 | checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" 2419 | dependencies = [ 2420 | "bitflags", 2421 | ] 2422 | 2423 | [[package]] 2424 | name = "regex" 2425 | version = "1.5.4" 2426 | source = "registry+https://github.com/rust-lang/crates.io-index" 2427 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 2428 | dependencies = [ 2429 | "regex-syntax", 2430 | ] 2431 | 2432 | [[package]] 2433 | name = "regex-syntax" 2434 | version = "0.6.25" 2435 | source = "registry+https://github.com/rust-lang/crates.io-index" 2436 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 2437 | 2438 | [[package]] 2439 | name = "remove_dir_all" 2440 | version = "0.5.3" 2441 | source = "registry+https://github.com/rust-lang/crates.io-index" 2442 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 2443 | dependencies = [ 2444 | "winapi 0.3.9", 2445 | ] 2446 | 2447 | [[package]] 2448 | name = "rspirv" 2449 | version = "0.11.0+1.5.4" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "1503993b59ca9ae4127365c3293517576d7ce56be9f3d8abb1625c85ddc583ba" 2452 | dependencies = [ 2453 | "fxhash", 2454 | "num-traits 0.2.14", 2455 | "spirv", 2456 | ] 2457 | 2458 | [[package]] 2459 | name = "rustc-demangle" 2460 | version = "0.1.21" 2461 | source = "registry+https://github.com/rust-lang/crates.io-index" 2462 | checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" 2463 | 2464 | [[package]] 2465 | name = "rustc-hash" 2466 | version = "1.1.0" 2467 | source = "registry+https://github.com/rust-lang/crates.io-index" 2468 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 2469 | 2470 | [[package]] 2471 | name = "rustc_codegen_spirv" 2472 | version = "0.4.0-alpha.12" 2473 | source = "git+https://github.com/EmbarkStudios/rust-gpu#a435c933178bf150dca1624983d674a8d4b9de2a" 2474 | dependencies = [ 2475 | "ar", 2476 | "bimap", 2477 | "hashbrown 0.11.2", 2478 | "indexmap", 2479 | "libc", 2480 | "num-traits 0.2.14", 2481 | "rspirv", 2482 | "rustc-demangle", 2483 | "rustc_codegen_spirv-types", 2484 | "sanitize-filename", 2485 | "serde", 2486 | "serde_json", 2487 | "smallvec", 2488 | "spirv-tools", 2489 | "syn", 2490 | ] 2491 | 2492 | [[package]] 2493 | name = "rustc_codegen_spirv-types" 2494 | version = "0.4.0-alpha.12" 2495 | source = "git+https://github.com/EmbarkStudios/rust-gpu#a435c933178bf150dca1624983d674a8d4b9de2a" 2496 | dependencies = [ 2497 | "rspirv", 2498 | "serde", 2499 | ] 2500 | 2501 | [[package]] 2502 | name = "rusttype" 2503 | version = "0.7.9" 2504 | source = "registry+https://github.com/rust-lang/crates.io-index" 2505 | checksum = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" 2506 | dependencies = [ 2507 | "rusttype 0.8.3", 2508 | ] 2509 | 2510 | [[package]] 2511 | name = "rusttype" 2512 | version = "0.8.3" 2513 | source = "registry+https://github.com/rust-lang/crates.io-index" 2514 | checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" 2515 | dependencies = [ 2516 | "approx", 2517 | "crossbeam-deque 0.7.3", 2518 | "crossbeam-utils 0.7.2", 2519 | "linked-hash-map", 2520 | "num_cpus", 2521 | "ordered-float", 2522 | "rustc-hash", 2523 | "stb_truetype", 2524 | ] 2525 | 2526 | [[package]] 2527 | name = "rusttype" 2528 | version = "0.9.2" 2529 | source = "registry+https://github.com/rust-lang/crates.io-index" 2530 | checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" 2531 | dependencies = [ 2532 | "ab_glyph_rasterizer", 2533 | "owned_ttf_parser", 2534 | ] 2535 | 2536 | [[package]] 2537 | name = "ryu" 2538 | version = "1.0.5" 2539 | source = "registry+https://github.com/rust-lang/crates.io-index" 2540 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 2541 | 2542 | [[package]] 2543 | name = "same-file" 2544 | version = "1.0.6" 2545 | source = "registry+https://github.com/rust-lang/crates.io-index" 2546 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2547 | dependencies = [ 2548 | "winapi-util", 2549 | ] 2550 | 2551 | [[package]] 2552 | name = "sanitize-filename" 2553 | version = "0.3.0" 2554 | source = "registry+https://github.com/rust-lang/crates.io-index" 2555 | checksum = "bf18934a12018228c5b55a6dae9df5d0641e3566b3630cb46cc55564068e7c2f" 2556 | dependencies = [ 2557 | "lazy_static", 2558 | "regex", 2559 | ] 2560 | 2561 | [[package]] 2562 | name = "scoped-tls" 2563 | version = "1.0.0" 2564 | source = "registry+https://github.com/rust-lang/crates.io-index" 2565 | checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" 2566 | 2567 | [[package]] 2568 | name = "scoped_threadpool" 2569 | version = "0.1.9" 2570 | source = "registry+https://github.com/rust-lang/crates.io-index" 2571 | checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" 2572 | 2573 | [[package]] 2574 | name = "scopeguard" 2575 | version = "1.1.0" 2576 | source = "registry+https://github.com/rust-lang/crates.io-index" 2577 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2578 | 2579 | [[package]] 2580 | name = "serde" 2581 | version = "1.0.126" 2582 | source = "registry+https://github.com/rust-lang/crates.io-index" 2583 | checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" 2584 | dependencies = [ 2585 | "serde_derive", 2586 | ] 2587 | 2588 | [[package]] 2589 | name = "serde_derive" 2590 | version = "1.0.126" 2591 | source = "registry+https://github.com/rust-lang/crates.io-index" 2592 | checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" 2593 | dependencies = [ 2594 | "proc-macro2 1.0.27", 2595 | "quote 1.0.9", 2596 | "syn", 2597 | ] 2598 | 2599 | [[package]] 2600 | name = "serde_json" 2601 | version = "1.0.64" 2602 | source = "registry+https://github.com/rust-lang/crates.io-index" 2603 | checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" 2604 | dependencies = [ 2605 | "itoa", 2606 | "ryu", 2607 | "serde", 2608 | ] 2609 | 2610 | [[package]] 2611 | name = "sid" 2612 | version = "0.6.1" 2613 | source = "registry+https://github.com/rust-lang/crates.io-index" 2614 | checksum = "bd5ac56c121948b4879bba9e519852c211bcdd8f014efff766441deff0b91bdb" 2615 | dependencies = [ 2616 | "num-traits 0.2.14", 2617 | ] 2618 | 2619 | [[package]] 2620 | name = "siphasher" 2621 | version = "0.3.5" 2622 | source = "registry+https://github.com/rust-lang/crates.io-index" 2623 | checksum = "cbce6d4507c7e4a3962091436e56e95290cb71fa302d0d270e32130b75fbff27" 2624 | 2625 | [[package]] 2626 | name = "slab" 2627 | version = "0.4.3" 2628 | source = "registry+https://github.com/rust-lang/crates.io-index" 2629 | checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" 2630 | 2631 | [[package]] 2632 | name = "slotmap" 2633 | version = "0.4.0" 2634 | source = "registry+https://github.com/rust-lang/crates.io-index" 2635 | checksum = "c46a3482db8f247956e464d783693ece164ca056e6e67563ee5505bdb86452cd" 2636 | 2637 | [[package]] 2638 | name = "smallvec" 2639 | version = "1.6.1" 2640 | source = "registry+https://github.com/rust-lang/crates.io-index" 2641 | checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" 2642 | 2643 | [[package]] 2644 | name = "smithay-client-toolkit" 2645 | version = "0.6.6" 2646 | source = "registry+https://github.com/rust-lang/crates.io-index" 2647 | checksum = "421c8dc7acf5cb205b88160f8b4cc2c5cfabe210e43b2f80f009f4c1ef910f1d" 2648 | dependencies = [ 2649 | "andrew 0.2.1", 2650 | "bitflags", 2651 | "dlib 0.4.2", 2652 | "lazy_static", 2653 | "memmap", 2654 | "nix 0.14.1", 2655 | "wayland-client 0.23.6", 2656 | "wayland-protocols 0.23.6", 2657 | ] 2658 | 2659 | [[package]] 2660 | name = "smithay-client-toolkit" 2661 | version = "0.12.3" 2662 | source = "registry+https://github.com/rust-lang/crates.io-index" 2663 | checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" 2664 | dependencies = [ 2665 | "andrew 0.3.1", 2666 | "bitflags", 2667 | "calloop", 2668 | "dlib 0.4.2", 2669 | "lazy_static", 2670 | "log", 2671 | "memmap2", 2672 | "nix 0.18.0", 2673 | "wayland-client 0.28.5", 2674 | "wayland-cursor", 2675 | "wayland-protocols 0.28.5", 2676 | ] 2677 | 2678 | [[package]] 2679 | name = "smithay-clipboard" 2680 | version = "0.4.0" 2681 | source = "registry+https://github.com/rust-lang/crates.io-index" 2682 | checksum = "917e8ec7f535cd1a6cbf749c8866c24d67c548a80ac48c8e88a182eab5c07bd1" 2683 | dependencies = [ 2684 | "nix 0.14.1", 2685 | "smithay-client-toolkit 0.6.6", 2686 | ] 2687 | 2688 | [[package]] 2689 | name = "spirv" 2690 | version = "0.2.0+1.5.4" 2691 | source = "registry+https://github.com/rust-lang/crates.io-index" 2692 | checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" 2693 | dependencies = [ 2694 | "bitflags", 2695 | "num-traits 0.2.14", 2696 | ] 2697 | 2698 | [[package]] 2699 | name = "spirv-builder" 2700 | version = "0.4.0-alpha.12" 2701 | source = "git+https://github.com/EmbarkStudios/rust-gpu#a435c933178bf150dca1624983d674a8d4b9de2a" 2702 | dependencies = [ 2703 | "memchr", 2704 | "raw-string", 2705 | "rustc_codegen_spirv", 2706 | "rustc_codegen_spirv-types", 2707 | "serde", 2708 | "serde_json", 2709 | ] 2710 | 2711 | [[package]] 2712 | name = "spirv-std" 2713 | version = "0.4.0-alpha.12" 2714 | source = "git+https://github.com/EmbarkStudios/rust-gpu#a435c933178bf150dca1624983d674a8d4b9de2a" 2715 | dependencies = [ 2716 | "bitflags", 2717 | "glam", 2718 | "num-traits 0.2.14", 2719 | "spirv-std-macros", 2720 | "spirv-types", 2721 | ] 2722 | 2723 | [[package]] 2724 | name = "spirv-std-macros" 2725 | version = "0.4.0-alpha.12" 2726 | source = "git+https://github.com/EmbarkStudios/rust-gpu#a435c933178bf150dca1624983d674a8d4b9de2a" 2727 | dependencies = [ 2728 | "proc-macro2 1.0.27", 2729 | "quote 1.0.9", 2730 | "spirv-types", 2731 | "syn", 2732 | ] 2733 | 2734 | [[package]] 2735 | name = "spirv-tools" 2736 | version = "0.8.0" 2737 | source = "registry+https://github.com/rust-lang/crates.io-index" 2738 | checksum = "ca7f0f689581589b0a31000317fa31257cb24d040227708718ebd9fedf5cdd2b" 2739 | dependencies = [ 2740 | "memchr", 2741 | "spirv-tools-sys", 2742 | "tempfile", 2743 | ] 2744 | 2745 | [[package]] 2746 | name = "spirv-tools-sys" 2747 | version = "0.6.0" 2748 | source = "registry+https://github.com/rust-lang/crates.io-index" 2749 | checksum = "2980b0b4b2a9b5edfeb1dc8a35e84aac07b9c6dcd2339cce004d9355fb62a59d" 2750 | dependencies = [ 2751 | "cc", 2752 | ] 2753 | 2754 | [[package]] 2755 | name = "spirv-types" 2756 | version = "0.4.0-alpha.12" 2757 | source = "git+https://github.com/EmbarkStudios/rust-gpu#a435c933178bf150dca1624983d674a8d4b9de2a" 2758 | 2759 | [[package]] 2760 | name = "spirv_cross" 2761 | version = "0.23.1" 2762 | source = "registry+https://github.com/rust-lang/crates.io-index" 2763 | checksum = "60647fadbf83c4a72f0d7ea67a7ca3a81835cf442b8deae5c134c3e0055b2e14" 2764 | dependencies = [ 2765 | "cc", 2766 | "js-sys", 2767 | "wasm-bindgen", 2768 | ] 2769 | 2770 | [[package]] 2771 | name = "spirv_headers" 2772 | version = "1.5.0" 2773 | source = "registry+https://github.com/rust-lang/crates.io-index" 2774 | checksum = "1f5b132530b1ac069df335577e3581765995cba5a13995cdbbdbc8fb057c532c" 2775 | dependencies = [ 2776 | "bitflags", 2777 | "num-traits 0.2.14", 2778 | ] 2779 | 2780 | [[package]] 2781 | name = "stb_truetype" 2782 | version = "0.3.1" 2783 | source = "registry+https://github.com/rust-lang/crates.io-index" 2784 | checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" 2785 | dependencies = [ 2786 | "byteorder", 2787 | ] 2788 | 2789 | [[package]] 2790 | name = "storage-map" 2791 | version = "0.3.0" 2792 | source = "registry+https://github.com/rust-lang/crates.io-index" 2793 | checksum = "418bb14643aa55a7841d5303f72cf512cfb323b8cc221d51580500a1ca75206c" 2794 | dependencies = [ 2795 | "lock_api", 2796 | ] 2797 | 2798 | [[package]] 2799 | name = "strsim" 2800 | version = "0.9.3" 2801 | source = "registry+https://github.com/rust-lang/crates.io-index" 2802 | checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" 2803 | 2804 | [[package]] 2805 | name = "syn" 2806 | version = "1.0.72" 2807 | source = "registry+https://github.com/rust-lang/crates.io-index" 2808 | checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" 2809 | dependencies = [ 2810 | "proc-macro2 1.0.27", 2811 | "quote 1.0.9", 2812 | "unicode-xid 0.2.2", 2813 | ] 2814 | 2815 | [[package]] 2816 | name = "tempfile" 2817 | version = "3.2.0" 2818 | source = "registry+https://github.com/rust-lang/crates.io-index" 2819 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 2820 | dependencies = [ 2821 | "cfg-if 1.0.0", 2822 | "libc", 2823 | "rand 0.8.5", 2824 | "redox_syscall", 2825 | "remove_dir_all", 2826 | "winapi 0.3.9", 2827 | ] 2828 | 2829 | [[package]] 2830 | name = "termcolor" 2831 | version = "1.1.2" 2832 | source = "registry+https://github.com/rust-lang/crates.io-index" 2833 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 2834 | dependencies = [ 2835 | "winapi-util", 2836 | ] 2837 | 2838 | [[package]] 2839 | name = "thiserror" 2840 | version = "1.0.25" 2841 | source = "registry+https://github.com/rust-lang/crates.io-index" 2842 | checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" 2843 | dependencies = [ 2844 | "thiserror-impl", 2845 | ] 2846 | 2847 | [[package]] 2848 | name = "thiserror-impl" 2849 | version = "1.0.25" 2850 | source = "registry+https://github.com/rust-lang/crates.io-index" 2851 | checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" 2852 | dependencies = [ 2853 | "proc-macro2 1.0.27", 2854 | "quote 1.0.9", 2855 | "syn", 2856 | ] 2857 | 2858 | [[package]] 2859 | name = "thunderdome" 2860 | version = "0.4.1" 2861 | source = "registry+https://github.com/rust-lang/crates.io-index" 2862 | checksum = "87b4947742c93ece24a0032141d9caa3d853752e694a57e35029dd2bd08673e0" 2863 | 2864 | [[package]] 2865 | name = "tiff" 2866 | version = "0.6.1" 2867 | source = "registry+https://github.com/rust-lang/crates.io-index" 2868 | checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" 2869 | dependencies = [ 2870 | "jpeg-decoder", 2871 | "miniz_oxide 0.4.4", 2872 | "weezl", 2873 | ] 2874 | 2875 | [[package]] 2876 | name = "toml" 2877 | version = "0.5.8" 2878 | source = "registry+https://github.com/rust-lang/crates.io-index" 2879 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 2880 | dependencies = [ 2881 | "serde", 2882 | ] 2883 | 2884 | [[package]] 2885 | name = "ttf-parser" 2886 | version = "0.6.2" 2887 | source = "registry+https://github.com/rust-lang/crates.io-index" 2888 | checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" 2889 | 2890 | [[package]] 2891 | name = "unicode-width" 2892 | version = "0.1.8" 2893 | source = "registry+https://github.com/rust-lang/crates.io-index" 2894 | checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" 2895 | 2896 | [[package]] 2897 | name = "unicode-xid" 2898 | version = "0.1.0" 2899 | source = "registry+https://github.com/rust-lang/crates.io-index" 2900 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 2901 | 2902 | [[package]] 2903 | name = "unicode-xid" 2904 | version = "0.2.2" 2905 | source = "registry+https://github.com/rust-lang/crates.io-index" 2906 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 2907 | 2908 | [[package]] 2909 | name = "version_check" 2910 | version = "0.9.3" 2911 | source = "registry+https://github.com/rust-lang/crates.io-index" 2912 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 2913 | 2914 | [[package]] 2915 | name = "void" 2916 | version = "1.0.2" 2917 | source = "registry+https://github.com/rust-lang/crates.io-index" 2918 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 2919 | 2920 | [[package]] 2921 | name = "walkdir" 2922 | version = "2.3.2" 2923 | source = "registry+https://github.com/rust-lang/crates.io-index" 2924 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 2925 | dependencies = [ 2926 | "same-file", 2927 | "winapi 0.3.9", 2928 | "winapi-util", 2929 | ] 2930 | 2931 | [[package]] 2932 | name = "wasi" 2933 | version = "0.9.0+wasi-snapshot-preview1" 2934 | source = "registry+https://github.com/rust-lang/crates.io-index" 2935 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2936 | 2937 | [[package]] 2938 | name = "wasi" 2939 | version = "0.10.2+wasi-snapshot-preview1" 2940 | source = "registry+https://github.com/rust-lang/crates.io-index" 2941 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 2942 | 2943 | [[package]] 2944 | name = "wasm-bindgen" 2945 | version = "0.2.74" 2946 | source = "registry+https://github.com/rust-lang/crates.io-index" 2947 | checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" 2948 | dependencies = [ 2949 | "cfg-if 1.0.0", 2950 | "wasm-bindgen-macro", 2951 | ] 2952 | 2953 | [[package]] 2954 | name = "wasm-bindgen-backend" 2955 | version = "0.2.74" 2956 | source = "registry+https://github.com/rust-lang/crates.io-index" 2957 | checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" 2958 | dependencies = [ 2959 | "bumpalo", 2960 | "lazy_static", 2961 | "log", 2962 | "proc-macro2 1.0.27", 2963 | "quote 1.0.9", 2964 | "syn", 2965 | "wasm-bindgen-shared", 2966 | ] 2967 | 2968 | [[package]] 2969 | name = "wasm-bindgen-futures" 2970 | version = "0.4.24" 2971 | source = "registry+https://github.com/rust-lang/crates.io-index" 2972 | checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1" 2973 | dependencies = [ 2974 | "cfg-if 1.0.0", 2975 | "js-sys", 2976 | "wasm-bindgen", 2977 | "web-sys", 2978 | ] 2979 | 2980 | [[package]] 2981 | name = "wasm-bindgen-macro" 2982 | version = "0.2.74" 2983 | source = "registry+https://github.com/rust-lang/crates.io-index" 2984 | checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" 2985 | dependencies = [ 2986 | "quote 1.0.9", 2987 | "wasm-bindgen-macro-support", 2988 | ] 2989 | 2990 | [[package]] 2991 | name = "wasm-bindgen-macro-support" 2992 | version = "0.2.74" 2993 | source = "registry+https://github.com/rust-lang/crates.io-index" 2994 | checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" 2995 | dependencies = [ 2996 | "proc-macro2 1.0.27", 2997 | "quote 1.0.9", 2998 | "syn", 2999 | "wasm-bindgen-backend", 3000 | "wasm-bindgen-shared", 3001 | ] 3002 | 3003 | [[package]] 3004 | name = "wasm-bindgen-shared" 3005 | version = "0.2.74" 3006 | source = "registry+https://github.com/rust-lang/crates.io-index" 3007 | checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" 3008 | 3009 | [[package]] 3010 | name = "wayland-client" 3011 | version = "0.23.6" 3012 | source = "registry+https://github.com/rust-lang/crates.io-index" 3013 | checksum = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" 3014 | dependencies = [ 3015 | "bitflags", 3016 | "downcast-rs", 3017 | "libc", 3018 | "nix 0.14.1", 3019 | "wayland-commons 0.23.6", 3020 | "wayland-scanner 0.23.6", 3021 | "wayland-sys 0.23.6", 3022 | ] 3023 | 3024 | [[package]] 3025 | name = "wayland-client" 3026 | version = "0.28.5" 3027 | source = "registry+https://github.com/rust-lang/crates.io-index" 3028 | checksum = "06ca44d86554b85cf449f1557edc6cc7da935cc748c8e4bf1c507cbd43bae02c" 3029 | dependencies = [ 3030 | "bitflags", 3031 | "downcast-rs", 3032 | "libc", 3033 | "nix 0.20.0", 3034 | "scoped-tls", 3035 | "wayland-commons 0.28.5", 3036 | "wayland-scanner 0.28.5", 3037 | "wayland-sys 0.28.5", 3038 | ] 3039 | 3040 | [[package]] 3041 | name = "wayland-commons" 3042 | version = "0.23.6" 3043 | source = "registry+https://github.com/rust-lang/crates.io-index" 3044 | checksum = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" 3045 | dependencies = [ 3046 | "nix 0.14.1", 3047 | "wayland-sys 0.23.6", 3048 | ] 3049 | 3050 | [[package]] 3051 | name = "wayland-commons" 3052 | version = "0.28.5" 3053 | source = "registry+https://github.com/rust-lang/crates.io-index" 3054 | checksum = "8bd75ae380325dbcff2707f0cd9869827ea1d2d6d534cff076858d3f0460fd5a" 3055 | dependencies = [ 3056 | "nix 0.20.0", 3057 | "once_cell", 3058 | "smallvec", 3059 | "wayland-sys 0.28.5", 3060 | ] 3061 | 3062 | [[package]] 3063 | name = "wayland-cursor" 3064 | version = "0.28.5" 3065 | source = "registry+https://github.com/rust-lang/crates.io-index" 3066 | checksum = "b37e5455ec72f5de555ec39b5c3704036ac07c2ecd50d0bffe02d5fe2d4e65ab" 3067 | dependencies = [ 3068 | "nix 0.20.0", 3069 | "wayland-client 0.28.5", 3070 | "xcursor", 3071 | ] 3072 | 3073 | [[package]] 3074 | name = "wayland-protocols" 3075 | version = "0.23.6" 3076 | source = "registry+https://github.com/rust-lang/crates.io-index" 3077 | checksum = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" 3078 | dependencies = [ 3079 | "bitflags", 3080 | "wayland-client 0.23.6", 3081 | "wayland-commons 0.23.6", 3082 | "wayland-scanner 0.23.6", 3083 | ] 3084 | 3085 | [[package]] 3086 | name = "wayland-protocols" 3087 | version = "0.28.5" 3088 | source = "registry+https://github.com/rust-lang/crates.io-index" 3089 | checksum = "95df3317872bcf9eec096c864b69aa4769a1d5d6291a5b513f8ba0af0efbd52c" 3090 | dependencies = [ 3091 | "bitflags", 3092 | "wayland-client 0.28.5", 3093 | "wayland-commons 0.28.5", 3094 | "wayland-scanner 0.28.5", 3095 | ] 3096 | 3097 | [[package]] 3098 | name = "wayland-scanner" 3099 | version = "0.23.6" 3100 | source = "registry+https://github.com/rust-lang/crates.io-index" 3101 | checksum = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" 3102 | dependencies = [ 3103 | "proc-macro2 0.4.30", 3104 | "quote 0.6.13", 3105 | "xml-rs", 3106 | ] 3107 | 3108 | [[package]] 3109 | name = "wayland-scanner" 3110 | version = "0.28.5" 3111 | source = "registry+https://github.com/rust-lang/crates.io-index" 3112 | checksum = "389d680d7bd67512dc9c37f39560224327038deb0f0e8d33f870900441b68720" 3113 | dependencies = [ 3114 | "proc-macro2 1.0.27", 3115 | "quote 1.0.9", 3116 | "xml-rs", 3117 | ] 3118 | 3119 | [[package]] 3120 | name = "wayland-sys" 3121 | version = "0.23.6" 3122 | source = "registry+https://github.com/rust-lang/crates.io-index" 3123 | checksum = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" 3124 | dependencies = [ 3125 | "dlib 0.4.2", 3126 | "lazy_static", 3127 | ] 3128 | 3129 | [[package]] 3130 | name = "wayland-sys" 3131 | version = "0.28.5" 3132 | source = "registry+https://github.com/rust-lang/crates.io-index" 3133 | checksum = "2907bd297eef464a95ba9349ea771611771aa285b932526c633dc94d5400a8e2" 3134 | dependencies = [ 3135 | "dlib 0.5.0", 3136 | "lazy_static", 3137 | "pkg-config", 3138 | ] 3139 | 3140 | [[package]] 3141 | name = "web-sys" 3142 | version = "0.3.50" 3143 | source = "registry+https://github.com/rust-lang/crates.io-index" 3144 | checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" 3145 | dependencies = [ 3146 | "js-sys", 3147 | "wasm-bindgen", 3148 | ] 3149 | 3150 | [[package]] 3151 | name = "weezl" 3152 | version = "0.1.5" 3153 | source = "registry+https://github.com/rust-lang/crates.io-index" 3154 | checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e" 3155 | 3156 | [[package]] 3157 | name = "wgpu" 3158 | version = "0.8.1" 3159 | source = "registry+https://github.com/rust-lang/crates.io-index" 3160 | checksum = "215fd50e66f794bd16683e7e0e0b9b53be265eb10fdf02276caf5de3e5743fcf" 3161 | dependencies = [ 3162 | "arrayvec", 3163 | "js-sys", 3164 | "log", 3165 | "naga", 3166 | "parking_lot", 3167 | "raw-window-handle", 3168 | "smallvec", 3169 | "wasm-bindgen", 3170 | "wasm-bindgen-futures", 3171 | "web-sys", 3172 | "wgpu-core", 3173 | "wgpu-types", 3174 | ] 3175 | 3176 | [[package]] 3177 | name = "wgpu-core" 3178 | version = "0.8.1" 3179 | source = "registry+https://github.com/rust-lang/crates.io-index" 3180 | checksum = "1d56c368fc0e6f3927c711d2b55a51ad4321218efc0239c4acf69e456ab70399" 3181 | dependencies = [ 3182 | "arrayvec", 3183 | "bitflags", 3184 | "cfg_aliases", 3185 | "copyless", 3186 | "fxhash", 3187 | "gfx-backend-dx11", 3188 | "gfx-backend-dx12", 3189 | "gfx-backend-empty", 3190 | "gfx-backend-gl", 3191 | "gfx-backend-metal", 3192 | "gfx-backend-vulkan", 3193 | "gfx-hal", 3194 | "gpu-alloc", 3195 | "gpu-descriptor", 3196 | "log", 3197 | "naga", 3198 | "parking_lot", 3199 | "profiling", 3200 | "raw-window-handle", 3201 | "smallvec", 3202 | "thiserror", 3203 | "wgpu-types", 3204 | ] 3205 | 3206 | [[package]] 3207 | name = "wgpu-types" 3208 | version = "0.8.0" 3209 | source = "registry+https://github.com/rust-lang/crates.io-index" 3210 | checksum = "aa248d90c8e6832269b8955bf800e8241f942c25e18a235b7752226804d21556" 3211 | dependencies = [ 3212 | "bitflags", 3213 | ] 3214 | 3215 | [[package]] 3216 | name = "winapi" 3217 | version = "0.2.8" 3218 | source = "registry+https://github.com/rust-lang/crates.io-index" 3219 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 3220 | 3221 | [[package]] 3222 | name = "winapi" 3223 | version = "0.3.9" 3224 | source = "registry+https://github.com/rust-lang/crates.io-index" 3225 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3226 | dependencies = [ 3227 | "winapi-i686-pc-windows-gnu", 3228 | "winapi-x86_64-pc-windows-gnu", 3229 | ] 3230 | 3231 | [[package]] 3232 | name = "winapi-build" 3233 | version = "0.1.1" 3234 | source = "registry+https://github.com/rust-lang/crates.io-index" 3235 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 3236 | 3237 | [[package]] 3238 | name = "winapi-i686-pc-windows-gnu" 3239 | version = "0.4.0" 3240 | source = "registry+https://github.com/rust-lang/crates.io-index" 3241 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3242 | 3243 | [[package]] 3244 | name = "winapi-util" 3245 | version = "0.1.5" 3246 | source = "registry+https://github.com/rust-lang/crates.io-index" 3247 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 3248 | dependencies = [ 3249 | "winapi 0.3.9", 3250 | ] 3251 | 3252 | [[package]] 3253 | name = "winapi-x86_64-pc-windows-gnu" 3254 | version = "0.4.0" 3255 | source = "registry+https://github.com/rust-lang/crates.io-index" 3256 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3257 | 3258 | [[package]] 3259 | name = "winit" 3260 | version = "0.24.0" 3261 | source = "registry+https://github.com/rust-lang/crates.io-index" 3262 | checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597" 3263 | dependencies = [ 3264 | "bitflags", 3265 | "cocoa", 3266 | "core-foundation 0.9.1", 3267 | "core-graphics 0.22.2", 3268 | "core-video-sys", 3269 | "dispatch", 3270 | "instant", 3271 | "lazy_static", 3272 | "libc", 3273 | "log", 3274 | "mio", 3275 | "mio-extras", 3276 | "ndk", 3277 | "ndk-glue", 3278 | "ndk-sys", 3279 | "objc", 3280 | "parking_lot", 3281 | "percent-encoding", 3282 | "raw-window-handle", 3283 | "smithay-client-toolkit 0.12.3", 3284 | "wayland-client 0.28.5", 3285 | "winapi 0.3.9", 3286 | "x11-dl", 3287 | ] 3288 | 3289 | [[package]] 3290 | name = "wio" 3291 | version = "0.2.2" 3292 | source = "registry+https://github.com/rust-lang/crates.io-index" 3293 | checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" 3294 | dependencies = [ 3295 | "winapi 0.3.9", 3296 | ] 3297 | 3298 | [[package]] 3299 | name = "ws2_32-sys" 3300 | version = "0.2.1" 3301 | source = "registry+https://github.com/rust-lang/crates.io-index" 3302 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 3303 | dependencies = [ 3304 | "winapi 0.2.8", 3305 | "winapi-build", 3306 | ] 3307 | 3308 | [[package]] 3309 | name = "x11-clipboard" 3310 | version = "0.5.2" 3311 | source = "registry+https://github.com/rust-lang/crates.io-index" 3312 | checksum = "b397ace6e980510de59a4fe3d4c758dffab231d6d747ce9fa1aba6b6035d5f32" 3313 | dependencies = [ 3314 | "xcb", 3315 | ] 3316 | 3317 | [[package]] 3318 | name = "x11-dl" 3319 | version = "2.18.5" 3320 | source = "registry+https://github.com/rust-lang/crates.io-index" 3321 | checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" 3322 | dependencies = [ 3323 | "lazy_static", 3324 | "libc", 3325 | "maybe-uninit", 3326 | "pkg-config", 3327 | ] 3328 | 3329 | [[package]] 3330 | name = "xcb" 3331 | version = "0.9.0" 3332 | source = "registry+https://github.com/rust-lang/crates.io-index" 3333 | checksum = "62056f63138b39116f82a540c983cc11f1c90cd70b3d492a70c25eaa50bd22a6" 3334 | dependencies = [ 3335 | "libc", 3336 | "log", 3337 | ] 3338 | 3339 | [[package]] 3340 | name = "xcursor" 3341 | version = "0.3.3" 3342 | source = "registry+https://github.com/rust-lang/crates.io-index" 3343 | checksum = "3a9a231574ae78801646617cefd13bfe94be907c0e4fa979cfd8b770aa3c5d08" 3344 | dependencies = [ 3345 | "nom", 3346 | ] 3347 | 3348 | [[package]] 3349 | name = "xdg" 3350 | version = "2.2.0" 3351 | source = "registry+https://github.com/rust-lang/crates.io-index" 3352 | checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" 3353 | 3354 | [[package]] 3355 | name = "xml-rs" 3356 | version = "0.8.3" 3357 | source = "registry+https://github.com/rust-lang/crates.io-index" 3358 | checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" 3359 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["app", "shader", "shared"] 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Real-time Ray Tracing with `nannou` & `rust-gpu` 2 | 3 | An attempt at a real-time implementation of "Ray Tracing in One Weekend" by 4 | Peter Shirley. This was a personal experiment to learn more about rust-gpu, 5 | ray tracing, and what limitations there are around ray tracing in real-time. 6 | 7 | ![screenshot](./nannou-ray-tracer-screenshot.png) 8 | 9 | ## Performance 10 | 11 | A small GUI was developed to tweak the most performance intensive parameters to 12 | better understand what affects performance. E.g. on my XPS 13 with integrated 13 | GPU the render above was taken with 20 rays per pixel and runs at around 3 FPS, 14 | however running the same scene with 2 rays per pixel yields ~25 FPS but with a 15 | much noisier result. 16 | 17 | ## Build Requirements 18 | 19 | - Use `rustup` to install nightly Rust and include the `llvm-tools-preview`, 20 | `rustc-dev` and `rust-src` components. These are necessary for the rust-gpu 21 | spir-v builder to function. 22 | - `nannou` is used to provide the event loop, wgpu graphics pipeline and a small 23 | GUI for tweaking performance. Take a look at the platform-specific 24 | requirements for nannou projects [here](https://guide.nannou.cc/getting_started/platform-specific_setup.html). 25 | 26 | ## Running 27 | 28 | To run the project, use: 29 | 30 | ``` 31 | cargo run --release -p nannou-raytracer-app 32 | ``` 33 | 34 | ## Code Structure 35 | 36 | There are 3 crates in this repo: 37 | 38 | - `app` is the main application that provides the GUI, builds the Rust shader 39 | via `SpirvBuilder` and sets up the WGPU pipeline. 40 | - `shader` is the crate containing both the fragment shader and vertex shader 41 | entrypoints (`main_fs` and `main_vs`). 42 | - `shared` contains code shared between both `app` and `shader`. It declares 43 | and implements most of the ray-tracing abstractions and logic. By implementing 44 | most stuff in a shared crate, I could more easily debug certain functions on 45 | the CPU in the `app` if necessary. 46 | 47 | ## rust-gpu 48 | 49 | `rust-gpu` is still very rough around the edges but is already approaching a 50 | dream-come-true. 51 | 52 | Being able to share code between the CPU and GPU was especially helpful for 53 | debugging. I had a few bugs (poor RNG, tracing an infinite loop, etc) that would 54 | normally be a nightmare to debug in a shader, however in this case I could just 55 | call the same function on the CPU, add some `dbg!`s and work out what the 56 | issue was in no time. 57 | 58 | I especially look forward to support for ADTs (enums with data) as this would 59 | make looping over `Material`s and `Hittable` objects much easier (the current 60 | workaround uses IDs and indices in a rather hacky manner). Support for trait 61 | objects would be equally nice, though it looks like this would require changes 62 | to the Vulkan specification itself. 63 | -------------------------------------------------------------------------------- /app/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nannou-raytracer-app" 3 | version = "0.1.0" 4 | edition = "2018" 5 | publish = false 6 | 7 | [features] 8 | default = ["use-compiled-tools"] 9 | use-installed-tools = ["spirv-builder/use-installed-tools"] 10 | use-compiled-tools = ["spirv-builder/use-compiled-tools"] 11 | 12 | [dependencies] 13 | fps_ticker = "1" 14 | nannou = { git = "https://github.com/nannou-org/nannou", rev = "81ce490420f9b72e6fe5094c601c47f062bb0f76" } 15 | nannou-raytracer-shared = { path = "../shared" } 16 | spirv-builder = { git = "https://github.com/EmbarkStudios/rust-gpu", default-features = false } 17 | -------------------------------------------------------------------------------- /app/src/gui.rs: -------------------------------------------------------------------------------- 1 | use crate::Config; 2 | use fps_ticker::Fps; 3 | use nannou::prelude::*; 4 | use nannou::ui::prelude::*; 5 | use shared::ShaderConstants; 6 | 7 | pub const WIN_W: u32 = 280; 8 | pub const WIN_X: i32 = PAD as i32; 9 | pub const PAD: Scalar = 20.0; 10 | const COL_W: Scalar = WIN_W as Scalar - PAD * 2.0; 11 | const LABEL_FONT_SIZE: u32 = 12; 12 | const DEFAULT_WIDGET_H: Scalar = 30.0; 13 | 14 | widget_ids! { 15 | pub struct Ids { 16 | background, 17 | title_text, 18 | scene_fps_text, 19 | scene_fps_avg_text, 20 | scene_fps_min_text, 21 | scene_fps_max_text, 22 | render_text, 23 | render_scale_slider, 24 | rays_per_pixel_slider, 25 | ray_bounce_limit_slider, 26 | seed_rng_with_time_button, 27 | camera_text, 28 | camera_vfov_slider, 29 | camera_aperture_slider, 30 | camera_focus_dist_slider, 31 | } 32 | } 33 | 34 | /// Update the user interface. 35 | pub fn update( 36 | ref mut ui: UiCell, 37 | ids: &Ids, 38 | scene_fps: &Fps, 39 | config: &mut Config, 40 | push_constants: &mut ShaderConstants, 41 | ) { 42 | widget::Canvas::new() 43 | .border(0.0) 44 | .rgb(0.1, 0.1, 0.1) 45 | .pad(PAD) 46 | .set(ids.background, ui); 47 | 48 | // Title 49 | 50 | text("NANNOU RAYTRACER") 51 | .mid_top_of(ids.background) 52 | .set(ids.title_text, ui); 53 | 54 | // Scene FPS 55 | 56 | fn fps_to_rgb(fps: f64) -> (f32, f32, f32) { 57 | let r = clamp(map_range(fps, 0.0, 60.0, 1.0, 0.0), 0.0, 1.0); 58 | let g = clamp(map_range(fps, 0.0, 60.0, 0.0, 1.0), 0.0, 1.0); 59 | let b = 0.5; 60 | (r, g, b) 61 | } 62 | 63 | widget::Text::new("Scene Performance") 64 | .mid_left_of(ids.background) 65 | .down(PAD * 1.5) 66 | .font_size(16) 67 | .color(color::WHITE) 68 | .set(ids.scene_fps_text, ui); 69 | 70 | let label = format!("{:.2} AVG FPS", scene_fps.avg()); 71 | let (r, g, b) = fps_to_rgb(scene_fps.avg()); 72 | widget::Text::new(&label) 73 | .down(PAD) 74 | .font_size(14) 75 | .rgb(r, g, b) 76 | .set(ids.scene_fps_avg_text, ui); 77 | 78 | let label = format!("{:.2} MIN FPS", scene_fps.min()); 79 | let (r, g, b) = fps_to_rgb(scene_fps.min()); 80 | widget::Text::new(&label) 81 | .down(PAD * 0.5) 82 | .font_size(14) 83 | .rgb(r, g, b) 84 | .set(ids.scene_fps_min_text, ui); 85 | 86 | let label = format!("{:.2} MAX FPS", scene_fps.max()); 87 | let (r, g, b) = fps_to_rgb(scene_fps.max()); 88 | widget::Text::new(&label) 89 | .down(PAD * 0.5) 90 | .font_size(14) 91 | .rgb(r, g, b) 92 | .set(ids.scene_fps_max_text, ui); 93 | 94 | // Render 95 | 96 | widget::Text::new("Render Control") 97 | .mid_left_of(ids.background) 98 | .down(PAD * 1.5) 99 | .font_size(16) 100 | .color(color::WHITE) 101 | .set(ids.render_text, ui); 102 | 103 | let min = 0.025; 104 | let max = 1.0; 105 | let label = format!("Render scale: {:.2}", config.render_scale); 106 | for scale in slider(config.render_scale, min, max) 107 | .label(&label) 108 | .down(PAD) 109 | .set(ids.render_scale_slider, ui) 110 | { 111 | config.render_scale = scale; 112 | } 113 | 114 | let min = 1.0; 115 | let max = 100.0; 116 | let label = format!("Rays per pixel: {}", push_constants.rays_per_pixel); 117 | for rays in slider(push_constants.rays_per_pixel as f32, min, max) 118 | .label(&label) 119 | .mid_left_of(ids.background) 120 | .skew(2.0) 121 | .down(PAD * 0.5) 122 | .set(ids.rays_per_pixel_slider, ui) 123 | { 124 | push_constants.rays_per_pixel = rays.round() as u32; 125 | } 126 | 127 | let min = 1.0; 128 | let max = 50.0; 129 | let label = format!("Ray bounce limit: {}", push_constants.ray_bounce_limit); 130 | for limit in slider(push_constants.ray_bounce_limit as f32, min, max) 131 | .label(&label) 132 | .down(PAD * 0.5) 133 | .set(ids.ray_bounce_limit_slider, ui) 134 | { 135 | push_constants.ray_bounce_limit = limit.round() as u32; 136 | } 137 | 138 | let (label, color) = match config.seed_rng_with_time { 139 | true => ("ON", ui::color::BLUE), 140 | false => ("OFF", ui::color::DARK_CHARCOAL), 141 | }; 142 | let label = format!("Animate Noise: {}", label); 143 | for _click in button() 144 | .label(&label) 145 | .color(color) 146 | .down(PAD * 0.5) 147 | .set(ids.seed_rng_with_time_button, ui) 148 | { 149 | config.seed_rng_with_time = !config.seed_rng_with_time; 150 | } 151 | 152 | // Camera 153 | 154 | widget::Text::new("Camera") 155 | .mid_left_of(ids.background) 156 | .down(PAD * 1.5) 157 | .font_size(16) 158 | .color(color::WHITE) 159 | .set(ids.camera_text, ui); 160 | 161 | let pi = core::f32::consts::PI; 162 | let min = pi * 0.16; 163 | let max = pi - min; 164 | let label = format!("Field of View: {:.3} radians", push_constants.vfov); 165 | for vfov in slider(push_constants.vfov, min, max) 166 | .label(&label) 167 | .down(PAD) 168 | .set(ids.camera_vfov_slider, ui) 169 | { 170 | push_constants.vfov = vfov; 171 | } 172 | 173 | let min = 0.0; 174 | let max = 4.0; 175 | let label = format!("Aperture: {:.3}", push_constants.aperture); 176 | for value in slider(push_constants.aperture, min, max) 177 | .label(&label) 178 | .down(PAD * 0.5) 179 | .skew(2.0) 180 | .set(ids.camera_aperture_slider, ui) 181 | { 182 | push_constants.aperture = value; 183 | } 184 | 185 | } 186 | 187 | fn text(s: &str) -> widget::Text { 188 | widget::Text::new(s).color(color::WHITE) 189 | } 190 | 191 | fn button() -> widget::Button<'static, widget::button::Flat> { 192 | widget::Button::new() 193 | .w_h(COL_W, DEFAULT_WIDGET_H) 194 | .label_font_size(LABEL_FONT_SIZE) 195 | .color(color::DARK_CHARCOAL) 196 | .label_color(color::WHITE) 197 | .border(0.0) 198 | } 199 | 200 | fn slider(val: f32, min: f32, max: f32) -> widget::Slider<'static, f32> { 201 | widget::Slider::new(val, min, max) 202 | .w_h(COL_W, DEFAULT_WIDGET_H) 203 | .label_font_size(LABEL_FONT_SIZE) 204 | .color(color::DARK_CHARCOAL) 205 | .label_color(color::WHITE) 206 | .border(0.0) 207 | } 208 | -------------------------------------------------------------------------------- /app/src/main.rs: -------------------------------------------------------------------------------- 1 | use fps_ticker::Fps; 2 | use nannou::prelude::*; 3 | use nannou::ui::prelude::*; 4 | use shared::ShaderConstants; 5 | use spirv_builder::{Capability, MetadataPrintout, SpirvBuilder}; 6 | use std::borrow::Cow; 7 | use std::path::PathBuf; 8 | 9 | mod gui; 10 | mod shaders { 11 | #[allow(non_upper_case_globals)] 12 | pub const main_fs: &str = "main_fs"; 13 | #[allow(non_upper_case_globals)] 14 | pub const main_vs: &str = "main_vs"; 15 | } 16 | 17 | fn main() { 18 | nannou::app(model).update(update).run(); 19 | } 20 | 21 | struct Model { 22 | gui_window: window::Id, 23 | scene_window: window::Id, 24 | push_constants: ShaderConstants, 25 | shader_mod: wgpu::ShaderModule, 26 | graphics: Graphics, 27 | config: Config, 28 | scene_fps: Fps, 29 | ui: Ui, 30 | ids: gui::Ids, 31 | } 32 | 33 | pub struct Config { 34 | pub render_scale: f32, 35 | pub seed_rng_with_time: bool, 36 | } 37 | 38 | struct Graphics { 39 | pipeline_layout: wgpu::PipelineLayout, 40 | pipeline: wgpu::RenderPipeline, 41 | // The scaled texture to which the raytraced scene is rendered. 42 | scaled_texture: wgpu::Texture, 43 | // Reshapes the scene texture to the swap chain image texture. 44 | texture_reshaper: wgpu::TextureReshaper, 45 | } 46 | 47 | const WIN_H: u32 = 640; 48 | const SCENE_WIN_W: u32 = WIN_H * 21 / 9; 49 | const WIN_Y: i32 = gui::PAD as i32; 50 | const SCENE_WIN_X: i32 = gui::WIN_X + gui::WIN_W as i32 + gui::PAD as i32; 51 | 52 | impl Default for Config { 53 | fn default() -> Self { 54 | Self { 55 | render_scale: 0.5, 56 | seed_rng_with_time: true, 57 | } 58 | } 59 | } 60 | 61 | fn model(app: &App) -> Model { 62 | let gui_window = app 63 | .new_window() 64 | .title("raytracer controls") 65 | .size(gui::WIN_W, WIN_H) 66 | .view(view_ui) 67 | .build() 68 | .unwrap(); 69 | 70 | // We need a window backed by a wgpu device that supports push constants. 71 | let device_desc = wgpu::DeviceDescriptor { 72 | label: Some("nannou-raytracer-device"), 73 | features: wgpu::Features::PUSH_CONSTANTS, 74 | limits: wgpu::Limits { 75 | max_push_constant_size: 256, 76 | ..Default::default() 77 | }, 78 | }; 79 | 80 | let scene_window = app 81 | .new_window() 82 | .title("nannou + rust-gpu raytracer") 83 | .device_descriptor(device_desc) 84 | .size(SCENE_WIN_W, WIN_H) 85 | .view(view_scene) 86 | .build() 87 | .unwrap(); 88 | 89 | let w = app.window(gui_window).expect("UI window closed unexpectedly"); 90 | let scale = w.scale_factor(); 91 | let y = (WIN_Y as f32 * scale) as i32; 92 | let x = (gui::WIN_X as f32 * scale) as i32; 93 | w.set_outer_position_pixels(x, y); 94 | 95 | { 96 | let w = app.window(scene_window) 97 | .expect("scene window closed unexpectedly"); 98 | let x = (SCENE_WIN_X as f32 * scale) as i32; 99 | w.set_outer_position_pixels(x, WIN_Y); 100 | } 101 | 102 | // Initialise UI. 103 | let mut ui = app 104 | .new_ui() 105 | .window(gui_window) 106 | .build() 107 | .expect("failed to build `Ui` for GUI window"); 108 | let ids = gui::Ids::new(ui.widget_id_generator()); 109 | 110 | // Load the rust-gpu shader. 111 | let scene_win = app.window(scene_window).unwrap(); 112 | let device = scene_win.swap_chain_device(); 113 | let shader_mod_desc = load_shader_module_desc(); 114 | let shader_mod = device.create_shader_module(&shader_mod_desc); 115 | 116 | let scene_fps = Fps::default(); 117 | let config = Config::default(); 118 | let push_constants = ShaderConstants { 119 | rays_per_pixel: 2, 120 | ray_bounce_limit: 8, 121 | vfov: core::f32::consts::PI * 0.5, 122 | aperture: 0.0, 123 | ..Default::default() 124 | }; 125 | let msaa_samples = scene_win.msaa_samples(); 126 | let format = Frame::TEXTURE_FORMAT; 127 | let (w_px, h_px) = scene_win.inner_size_pixels(); 128 | let scaled_texture_size = scaled_texture_size([w_px, h_px], config.render_scale); 129 | let graphics = create_graphics(device, &shader_mod, format, msaa_samples, scaled_texture_size); 130 | 131 | Model { 132 | gui_window, 133 | scene_window, 134 | shader_mod, 135 | graphics, 136 | scene_fps, 137 | config, 138 | push_constants, 139 | ui, 140 | ids, 141 | } 142 | } 143 | 144 | fn update(app: &App, model: &mut Model, _: Update) { 145 | { 146 | let ui = model.ui.set_widgets(); 147 | gui::update( 148 | ui, 149 | &model.ids, 150 | &model.scene_fps, 151 | &mut model.config, 152 | &mut model.push_constants, 153 | ); 154 | } 155 | 156 | // Recreate scaled texture and reshaper if scale changed. 157 | let win = app.window(model.scene_window).unwrap(); 158 | let (win_w_px, win_h_px) = win.inner_size_pixels(); 159 | let scaled_texture_size = scaled_texture_size([win_w_px, win_h_px], model.config.render_scale); 160 | if scaled_texture_size != model.graphics.scaled_texture.size() { 161 | let device = win.swap_chain_device(); 162 | let msaa_samples = win.msaa_samples(); 163 | let format = Frame::TEXTURE_FORMAT; 164 | model.graphics = create_graphics(device, &model.shader_mod, format, msaa_samples, scaled_texture_size); 165 | } 166 | 167 | let pc = &mut model.push_constants; 168 | 169 | pc.time = app.time; 170 | pc.rng_seed_offset = if model.config.seed_rng_with_time { 171 | app.time 172 | } else { 173 | 0.0 174 | }; 175 | 176 | let [w_px, h_px] = model.graphics.scaled_texture.size(); 177 | pc.view_size_pixels = [w_px, h_px]; 178 | 179 | let win = app.window(model.scene_window).unwrap(); 180 | let win_rect = win.rect(); 181 | let m = app.mouse.position(); 182 | let mouse_x = map_range(m.x, win_rect.left(), win_rect.right(), 0.0, w_px as f32); 183 | let mouse_y = map_range(m.y, win_rect.top(), win_rect.bottom(), 0.0, h_px as f32); 184 | pc.mouse_pixels = [mouse_x, mouse_y]; 185 | } 186 | 187 | fn view_ui(app: &App, model: &Model, frame: Frame) { 188 | frame.clear(BLACK); 189 | model 190 | .ui 191 | .draw_to_frame(app, &frame) 192 | .expect("failed to draw `Ui` to `Frame`"); 193 | } 194 | 195 | fn view_scene(_app: &App, model: &Model, frame: Frame) { 196 | frame.clear(BLACK); 197 | 198 | // Encode the commands for rendering to the scaled texture. 199 | let mut encoder = frame.command_encoder(); 200 | { 201 | let texture_view = model.graphics.scaled_texture.view().build(); 202 | let mut render_pass = wgpu::RenderPassBuilder::new() 203 | .color_attachment(&texture_view, |color| color.load_op(wgpu::LoadOp::Load)) 204 | .begin(&mut encoder); 205 | render_pass.set_pipeline(&model.graphics.pipeline); 206 | let pc_bytes = unsafe { any_as_u8_slice(&model.push_constants) }; 207 | render_pass.set_push_constants(wgpu::ShaderStage::all(), 0, pc_bytes); 208 | let vertex_range = 0..3; 209 | let instance_range = 0..1; 210 | render_pass.draw(vertex_range, instance_range); 211 | } 212 | 213 | // Draw the scaled texture to the frame. 214 | model 215 | .graphics 216 | .texture_reshaper 217 | .encode_render_pass(frame.texture_view(), &mut *encoder); 218 | 219 | model.scene_fps.tick(); 220 | } 221 | 222 | fn scaled_texture_size(win_size_px: [u32; 2], scale: f32) -> [u32; 2] { 223 | let [w, h] = win_size_px; 224 | [(w as f32 * scale) as u32, (h as f32 * scale) as u32] 225 | } 226 | 227 | fn create_graphics( 228 | device: &wgpu::Device, 229 | shader_mod: &wgpu::ShaderModule, 230 | dst_format: wgpu::TextureFormat, 231 | sample_count: u32, 232 | scaled_texture_size: [u32; 2], 233 | ) -> Graphics { 234 | let scaled_texture_sample_count = 1; 235 | let scaled_texture_format = wgpu::TextureFormat::Rgba16Float; 236 | 237 | // Create our custom texture. 238 | let scaled_texture = wgpu::TextureBuilder::new() 239 | .size(scaled_texture_size) 240 | // Our texture will be used as the RENDER_ATTACHMENT for our `Draw` render pass. 241 | // It will also be SAMPLED by the `TextureCapturer` and `TextureResizer`. 242 | .usage(wgpu::TextureUsage::RENDER_ATTACHMENT | wgpu::TextureUsage::SAMPLED) 243 | // Use nannou's default multisampling sample count. 244 | .sample_count(scaled_texture_sample_count) 245 | // Use a spacious 16-bit linear sRGBA format suitable for high quality drawing. 246 | .format(scaled_texture_format) 247 | // Build it! 248 | .build(device); 249 | 250 | // Create the texture reshaper. 251 | let texture_view = scaled_texture.view().build(); 252 | let texture_sample_type = scaled_texture.sample_type(); 253 | let texture_reshaper = wgpu::TextureReshaper::new( 254 | device, 255 | &texture_view, 256 | scaled_texture_sample_count, 257 | texture_sample_type, 258 | sample_count, 259 | dst_format, 260 | ); 261 | 262 | let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { 263 | label: Some("nannou-raytracer-pipeline-layout"), 264 | bind_group_layouts: &[], 265 | push_constant_ranges: &[wgpu::PushConstantRange { 266 | stages: wgpu::ShaderStage::all(), 267 | range: 0..std::mem::size_of::() as u32, 268 | }], 269 | }); 270 | 271 | let pipeline = wgpu::RenderPipelineBuilder::from_layout(&pipeline_layout, &shader_mod) 272 | .fragment_shader(&shader_mod) 273 | .vertex_entry_point(shaders::main_vs) 274 | .fragment_entry_point(shaders::main_fs) 275 | .color_format(scaled_texture_format) 276 | .color_blend(wgpu::BlendComponent::OVER) 277 | .alpha_blend(wgpu::BlendComponent::REPLACE) 278 | .sample_count(scaled_texture_sample_count) 279 | .build(device); 280 | 281 | Graphics { 282 | pipeline_layout, 283 | pipeline, 284 | scaled_texture, 285 | texture_reshaper, 286 | } 287 | } 288 | 289 | fn load_shader_module_desc() -> wgpu::ShaderModuleDescriptor<'static> { 290 | let manifest_dir = env!("CARGO_MANIFEST_DIR"); 291 | let crate_path = [manifest_dir, "..", "shader"] 292 | .iter() 293 | .copied() 294 | .collect::(); 295 | let compile_result = SpirvBuilder::new(crate_path, "spirv-unknown-vulkan1.1") 296 | .print_metadata(MetadataPrintout::None) 297 | // Seems to be needed to handle conditions within functions? 298 | // Error was confusing but adding this worked. 299 | .capability(Capability::Int8) 300 | .build() 301 | .unwrap(); 302 | let module_path = compile_result.module.unwrap_single(); 303 | let data = std::fs::read(module_path).unwrap(); 304 | let spirv = wgpu::util::make_spirv(&data); 305 | let spirv = match spirv { 306 | wgpu::ShaderSource::Wgsl(cow) => wgpu::ShaderSource::Wgsl(Cow::Owned(cow.into_owned())), 307 | wgpu::ShaderSource::SpirV(cow) => { 308 | wgpu::ShaderSource::SpirV(Cow::Owned(cow.into_owned())) 309 | } 310 | }; 311 | wgpu::ShaderModuleDescriptor { 312 | label: Some("nannou-raytracer-shader"), 313 | source: spirv, 314 | flags: wgpu::ShaderFlags::default(), 315 | } 316 | } 317 | 318 | // NOTE: Super unsafe for general use, OK for this case. 319 | unsafe fn any_as_u8_slice(p: &T) -> &[u8] { 320 | std::slice::from_raw_parts((p as *const T) as *const u8, std::mem::size_of::()) 321 | } 322 | -------------------------------------------------------------------------------- /nannou-ray-tracer-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchmindtree/nannou-rustgpu-raytracer/4ae64e1cb4ad2205b17379434e7e8d67ce184090/nannou-ray-tracer-screenshot.png -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "nightly-2022-04-11" 3 | components = ["rust-src", "rustc-dev", "llvm-tools-preview"] 4 | -------------------------------------------------------------------------------- /shader/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nannou-raytracer-shader" 3 | version = "0.1.0" 4 | edition = "2018" 5 | publish = false 6 | 7 | [lib] 8 | crate-type = ["dylib"] 9 | 10 | [dependencies] 11 | nannou-raytracer-shared = { path = "../shared" } 12 | spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu", features = ["glam"] } 13 | -------------------------------------------------------------------------------- /shader/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr( 2 | target_arch = "spirv", 3 | no_std, 4 | feature(register_attr), 5 | register_attr(spirv) 6 | )] 7 | 8 | use shared::{color, Camera, Dielectric, Lambertian, MaterialInfo, MaterialKind, Materials, Metal, Rng, ShaderConstants, Sphere}; 9 | use spirv_std::glam::{vec2, vec3, vec4, Vec2, Vec4}; 10 | 11 | // Note: This cfg is incorrect on its surface, it really should be "are we compiling with std", but 12 | // we tie #[no_std] above to the same condition, so it's fine. 13 | #[cfg(target_arch = "spirv")] 14 | use spirv_std::num_traits::Float; 15 | #[cfg(not(target_arch = "spirv"))] 16 | use spirv_std::macros::spirv; 17 | 18 | #[spirv(fragment)] 19 | pub fn main_fs( 20 | #[spirv(frag_coord)] 21 | in_frag_coord: Vec4, 22 | #[spirv(push_constant)] 23 | constants: &ShaderConstants, 24 | output: &mut Vec4, 25 | ) { 26 | // Calc uv coords (i.e. left 0.0, right 1.0, bottom 0.0, top 1.0); 27 | let frag_coord = vec2(in_frag_coord.x, in_frag_coord.y); 28 | let [w_px, h_px] = constants.view_size_pixels; 29 | 30 | let time = constants.time; 31 | let vfov = constants.vfov; 32 | let aperture = constants.aperture; 33 | let aspect = w_px as f32 / h_px as f32; 34 | let from = vec3((time * 0.77).cos() * 0.125 + 0.125, 1.0 + time.sin() * 0.125 + 0.125, 0.0); 35 | let to = vec3(0.0, 1.0, -3.0); 36 | let vup = vec3(0.0, 1.0, 0.0); 37 | let focus_dist = (from - to).length() - 0.25; // subtract a little to get sphere surface. 38 | let cam = Camera::new(from, to, vup, vfov, aspect, aperture, focus_dist); 39 | 40 | let seed = frag_coord + Vec2::splat(constants.rng_seed_offset); 41 | let mut rng = Rng { seed }; 42 | 43 | let materials = Materials { 44 | lambertian: [ 45 | Lambertian::new(vec3(0.8 + (constants.time * 1.7).sin() + 0.5, 0.3, 0.3)), 46 | Lambertian::new(vec3(1.0, 0.1, 0.1)), 47 | Lambertian::new(vec3(0.1, 1.0, 0.1)), 48 | Lambertian::new(vec3(0.9, 0.9, 0.9)), 49 | Lambertian::new(vec3(5.0, 5.0, 5.0)), 50 | ], 51 | metal: [ 52 | Metal::new(vec3(0.8, 0.6, 0.2), 0.0), 53 | Metal::new(vec3(0.8, 0.6, 0.2), 0.05), 54 | Metal::new(vec3(0.2, 0.6, 0.8), 0.05), 55 | Metal::new(vec3(0.9, 0.9, 0.9), 0.5), 56 | ], 57 | dielectric: [ 58 | Dielectric::new(1.5) 59 | ], 60 | }; 61 | 62 | let world = [ 63 | Sphere { 64 | center: to, 65 | radius: 0.5, 66 | material: MaterialInfo { 67 | kind: MaterialKind::Metal, 68 | index: 0, 69 | }, 70 | }, 71 | Sphere { 72 | center: vec3(to.x - 1.0, 0.0, to.z + 1.0), 73 | radius: 0.5, 74 | material: MaterialInfo { 75 | kind: MaterialKind::Dielectric, 76 | index: 0, 77 | } 78 | }, 79 | Sphere { 80 | center: vec3(1.0, 0.0, -1.0 + (constants.time * 1.32).cos()), 81 | radius: 0.5, 82 | material: MaterialInfo { 83 | kind: MaterialKind::Metal, 84 | index: 2, 85 | }, 86 | }, 87 | 88 | // Light 89 | Sphere { 90 | center: to + vec3( 91 | (constants.time * 0.67).sin(), 92 | (constants.time * 0.33).cos(), 93 | (constants.time * 0.57).cos(), 94 | ), 95 | radius: 0.1, 96 | material: MaterialInfo { 97 | kind: MaterialKind::Lambertian, 98 | index: 3, 99 | } 100 | }, 101 | 102 | // Floor 103 | Sphere { 104 | center: vec3(0.0, -1000.5, -1.0), 105 | radius: 1000.0, 106 | material: MaterialInfo { 107 | kind: MaterialKind::Lambertian, 108 | index: 3, 109 | }, 110 | }, 111 | 112 | // Left wall. 113 | Sphere { 114 | center: vec3(-22.0, 0.0, -1.0), 115 | radius: 20.0, 116 | material: MaterialInfo { 117 | kind: MaterialKind::Lambertian, 118 | index: 1, 119 | }, 120 | }, 121 | 122 | // Right wall. 123 | Sphere { 124 | center: vec3(22.0, 0.0, -1.0), 125 | radius: 20.0, 126 | material: MaterialInfo { 127 | kind: MaterialKind::Lambertian, 128 | index: 2, 129 | }, 130 | }, 131 | 132 | // Back wall. 133 | Sphere { 134 | center: vec3(0.0, 0.0, -24.0), 135 | radius: 20.0, 136 | material: MaterialInfo { 137 | kind: MaterialKind::Lambertian, 138 | index: 3, 139 | }, 140 | }, 141 | ]; 142 | 143 | // Cast some rays and average their result. 144 | let mut col = vec3(0.0, 0.0, 0.0); 145 | for _ in 0..constants.rays_per_pixel { 146 | let uv = vec2( 147 | (frag_coord.x + rng.gen()) / w_px as f32, 148 | ((h_px as f32 - frag_coord.y) + rng.gen()) / h_px as f32, 149 | ); 150 | let ray = cam.ray(&mut rng, uv); 151 | col += color(constants.ray_bounce_limit, &mut rng, ray, world, &materials); 152 | } 153 | col /= constants.rays_per_pixel as f32; 154 | 155 | // Write the result. 156 | *output = vec4(col.x, col.y, col.z, 1.0); 157 | } 158 | 159 | #[spirv(vertex)] 160 | pub fn main_vs( 161 | #[spirv(vertex_index)] 162 | vert_idx: i32, 163 | #[spirv(position)] 164 | builtin_pos: &mut Vec4, 165 | ) { 166 | // Create a "full screen triangle" by mapping the vertex index. 167 | // ported from https://www.saschawillems.de/blog/2016/08/13/vulkan-tutorial-on-rendering-a-fullscreen-quad-without-buffers/ 168 | let uv = vec2(((vert_idx << 1) & 2) as f32, (vert_idx & 2) as f32); 169 | let pos = 2.0 * uv - Vec2::ONE; 170 | *builtin_pos = pos.extend(0.0).extend(1.0); 171 | } 172 | -------------------------------------------------------------------------------- /shared/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nannou-raytracer-shared" 3 | version = "0.1.0" 4 | edition = "2018" 5 | publish = false 6 | 7 | [lib] 8 | name = "shared" 9 | path = "./src/lib.rs" 10 | 11 | [dependencies] 12 | spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu", features = ["glam"] } 13 | -------------------------------------------------------------------------------- /shared/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Code shared between shader and app. 2 | 3 | #![no_std] 4 | 5 | use spirv_std::{ 6 | glam::{vec2, vec3, Vec2, Vec3}, 7 | num_traits::Float, 8 | }; 9 | 10 | /// Types that may be hit by a ray. 11 | pub trait Hit { 12 | /// Whether or not the Ray hits the object along with the associated hit data. 13 | fn hit(self, r: &Ray, t_min: f32, t_max: f32, data: &mut HitData) -> bool; 14 | } 15 | 16 | /// Used to describe the surface of different materials. 17 | pub trait Material { 18 | /// Produce a scattered ray (or say it absorved the incident ray). 19 | /// 20 | /// If scattered, describes how much the ray should be attenuated. 21 | fn scatter( 22 | self, 23 | r_in: &Ray, 24 | hit: &HitData, 25 | rng: &mut Rng, 26 | attenuation: &mut Vec3, 27 | r_out: &mut Ray, 28 | ) -> bool; 29 | } 30 | 31 | #[derive(Copy, Clone, Default)] 32 | #[repr(C)] 33 | pub struct HitData { 34 | pub t: f32, 35 | pub p: Vec3, 36 | pub normal: Vec3, 37 | pub material: MaterialInfo, 38 | } 39 | 40 | #[derive(Copy, Clone)] 41 | #[repr(C)] 42 | pub enum MaterialKind { 43 | Lambertian, 44 | Metal, 45 | Dielectric, 46 | } 47 | 48 | #[derive(Copy, Clone)] 49 | #[repr(C)] 50 | pub struct MaterialInfo { 51 | pub kind: MaterialKind, 52 | pub index: usize, 53 | } 54 | 55 | /// All materials in the world. 56 | // TODO: Not a portable way of storing materials for a world... Need ADTs or trait objects. 57 | #[derive(Copy, Clone)] 58 | #[repr(C)] 59 | pub struct Materials { 60 | pub lambertian: [Lambertian; NL], 61 | pub metal: [Metal; NM], 62 | pub dielectric: [Dielectric; ND], 63 | } 64 | 65 | #[derive(Copy, Clone)] 66 | #[repr(C)] 67 | pub struct Lambertian { 68 | pub albedo: Vec3, 69 | } 70 | 71 | #[derive(Copy, Clone)] 72 | #[repr(C)] 73 | pub struct Dielectric { 74 | // TODO: This should just be a float, but for some reason results in this error if it isn't a 75 | // Vec3. 76 | // 77 | // error: Cannot cast between pointer types 78 | // --> shared/./src/lib.rs:207:6 79 | // | 80 | // 207 | } 81 | // | ^ 82 | // | 83 | // = note: from: *struct Dielectric { ref_idx: f32 } 84 | // = note: to: *u32 85 | pub ref_idx: Vec3, 86 | } 87 | 88 | #[derive(Copy, Clone)] 89 | #[repr(C)] 90 | pub struct Metal { 91 | pub albedo: Vec3, 92 | pub fuzz: f32, 93 | } 94 | 95 | #[derive(Copy, Clone, Default)] 96 | #[repr(C)] 97 | pub struct ShaderConstants { 98 | pub view_size_pixels: [u32; 2], 99 | pub mouse_pixels: [f32; 2], 100 | pub time: f32, 101 | pub rng_seed_offset: f32, 102 | 103 | // Rendering 104 | pub rays_per_pixel: u32, 105 | pub ray_bounce_limit: u32, 106 | 107 | // Camera 108 | pub vfov: f32, 109 | pub aperture: f32, 110 | //pub focus_dist: f32, 111 | 112 | // TODO: This would be awesome for automatically improving scene quality when the camera 113 | // reaches a resting state. 114 | // pub time_since_camera_move: f32, 115 | } 116 | 117 | #[derive(Copy, Clone)] 118 | #[repr(C)] 119 | pub struct Ray { 120 | pub a: Vec3, 121 | pub b: Vec3, 122 | } 123 | 124 | #[derive(Copy, Clone)] 125 | #[repr(C)] 126 | pub struct Sphere { 127 | pub center: Vec3, 128 | pub radius: f32, 129 | pub material: MaterialInfo, 130 | } 131 | 132 | #[derive(Clone, Default)] 133 | pub struct Rng { 134 | pub seed: Vec2, 135 | } 136 | 137 | #[derive(Clone)] 138 | pub struct Camera { 139 | pub origin: Vec3, 140 | pub lower_left_corner: Vec3, 141 | pub horizontal: Vec3, 142 | pub vertical: Vec3, 143 | 144 | pub u: Vec3, 145 | pub v: Vec3, 146 | pub w: Vec3, 147 | pub lens_radius: f32, 148 | } 149 | 150 | impl Camera { 151 | // pub fn new(window_size_px: Vec2) -> Self { 152 | // let w_px = window_size_px.x; 153 | // let h_px = window_size_px.y; 154 | // let min_side_px = w_px.min(h_px); 155 | 156 | /// Vertical field of view in radians and aspect ratio. 157 | pub fn new( 158 | from: Vec3, 159 | to: Vec3, 160 | vup: Vec3, 161 | vfov: f32, 162 | aspect: f32, 163 | aperture: f32, 164 | focus_dist: f32, 165 | ) -> Self { 166 | let lens_radius = aperture * 0.5; 167 | 168 | let half_h = (vfov * 0.5).tan(); 169 | let half_w = aspect * half_h; 170 | 171 | let origin = from; 172 | let w = unit_vector(from - to); 173 | let u = unit_vector(vup.cross(w)); 174 | let v = w.cross(u); 175 | 176 | let lower_left_corner = origin 177 | - half_w * focus_dist * u 178 | - half_h * focus_dist * v 179 | - focus_dist * w; 180 | let horizontal = u * 2.0 * half_w * focus_dist; 181 | let vertical = v * 2.0 * half_h * focus_dist; 182 | 183 | Self { 184 | lower_left_corner, 185 | origin, 186 | horizontal, 187 | vertical, 188 | u, 189 | v, 190 | w, 191 | lens_radius, 192 | } 193 | } 194 | 195 | pub fn ray(&self, rng: &mut Rng, uv: Vec2) -> Ray { 196 | let rd = self.lens_radius * random_in_unit_disk(rng); 197 | let offset = self.u * rd.x + self.v * rd.y; 198 | Ray { 199 | a: self.origin + offset, 200 | b: self.lower_left_corner + uv.x * self.horizontal + uv.y * self.vertical - self.origin - offset, 201 | } 202 | } 203 | } 204 | 205 | impl Ray { 206 | pub fn new(a: Vec3, b: Vec3) -> Self { 207 | Ray { a, b } 208 | } 209 | 210 | pub fn origin(&self) -> Vec3 { 211 | self.a 212 | } 213 | 214 | pub fn direction(&self) -> Vec3 { 215 | self.b 216 | } 217 | 218 | pub fn point_at_parameter(&self, t: f32) -> Vec3 { 219 | self.a + self.b * t 220 | } 221 | } 222 | 223 | impl Rng { 224 | pub fn gen_signed(&mut self) -> f32 { 225 | let res = (self.seed.dot(vec2(12.9898, 78.233)).sin() * 43758.5453).fract(); 226 | self.seed = vec2( 227 | (self.seed.x + res + 17.825) % 3718.0, 228 | (self.seed.y + res + 72.7859) % 1739.0, 229 | ); 230 | res 231 | } 232 | 233 | pub fn gen(&mut self) -> f32 { 234 | self.gen_signed() * 0.5 + 0.5 235 | } 236 | } 237 | 238 | impl Lambertian { 239 | pub fn new(albedo: Vec3) -> Self { 240 | Self { albedo } 241 | } 242 | 243 | pub fn scatter_ray( 244 | &self, 245 | hit: &HitData, 246 | rng: &mut Rng, 247 | attenuation: &mut Vec3, 248 | r_out: &mut Ray, 249 | ) { 250 | let target = hit.p + hit.normal + random_in_unit_sphere(rng); 251 | *r_out = Ray::new(hit.p, target - hit.p); 252 | *attenuation = self.albedo; 253 | } 254 | } 255 | 256 | impl Metal { 257 | pub fn new(albedo: Vec3, fuzz: f32) -> Self { 258 | Self { albedo, fuzz } 259 | } 260 | } 261 | 262 | impl Dielectric { 263 | pub fn new(ref_idx: f32) -> Self { 264 | Self { ref_idx: Vec3::splat(ref_idx) } 265 | } 266 | } 267 | 268 | impl Hit for [T; N] { 269 | fn hit(self, r: &Ray, t_min: f32, t_max: f32, hit: &mut HitData) -> bool { 270 | let mut did_hit = false; 271 | let mut closest_t = t_max; 272 | let mut temp_hit = HitData::default(); 273 | for i in 0..N { 274 | if self[i].hit(r, t_min, closest_t, &mut temp_hit) { 275 | did_hit = true; 276 | closest_t = temp_hit.t; 277 | *hit = temp_hit; 278 | } 279 | } 280 | did_hit 281 | } 282 | } 283 | 284 | impl Hit for Sphere { 285 | fn hit(self, r: &Ray, t_min: f32, t_max: f32, hit: &mut HitData) -> bool { 286 | (&self).hit(r, t_min, t_max, hit) 287 | } 288 | } 289 | 290 | impl<'a> Hit for &'a Sphere { 291 | fn hit(self, r: &Ray, t_min: f32, t_max: f32, hit: &mut HitData) -> bool { 292 | let Sphere { center, radius, material } = *self; 293 | let origin = r.origin(); 294 | let direction = r.direction(); 295 | let oc = origin - center; 296 | let a = direction.dot(direction); 297 | let b = oc.dot(direction); 298 | let c = oc.dot(oc) - radius * radius; 299 | let discriminant = b * b - a * c; 300 | if discriminant > 0.0 { 301 | let mut temp = (-b - (b * b - a * c).sqrt()) / a; 302 | if temp < t_max && temp > t_min { 303 | hit.t = temp; 304 | hit.p = r.point_at_parameter(hit.t); 305 | hit.normal = (hit.p - center) / radius; 306 | hit.material = material; 307 | return true; 308 | } 309 | temp = (-b + (b * b - a * c).sqrt()) / a; 310 | if temp < t_max && temp > t_min { 311 | hit.t = temp; 312 | hit.p = r.point_at_parameter(hit.t); 313 | hit.normal = (hit.p - center) / radius; 314 | hit.material = material; 315 | return true; 316 | } 317 | } 318 | false 319 | } 320 | } 321 | 322 | impl Material for Lambertian { 323 | fn scatter( 324 | self, 325 | _: &Ray, 326 | hit: &HitData, 327 | rng: &mut Rng, 328 | attenuation: &mut Vec3, 329 | ray_out: &mut Ray, 330 | ) -> bool { 331 | self.scatter_ray(hit, rng, attenuation, ray_out); 332 | true 333 | } 334 | } 335 | 336 | impl Material for Metal { 337 | fn scatter( 338 | self, 339 | ray_in: &Ray, 340 | hit: &HitData, 341 | rng: &mut Rng, 342 | attenuation: &mut Vec3, 343 | ray_out: &mut Ray, 344 | ) -> bool { 345 | let reflected = reflect(unit_vector(ray_in.direction()), hit.normal); 346 | *ray_out = Ray::new(hit.p, reflected + self.fuzz * random_in_unit_sphere(rng)); 347 | *attenuation = self.albedo; 348 | ray_out.direction().dot(hit.normal) > 0.0 349 | } 350 | } 351 | 352 | impl Material for Dielectric { 353 | fn scatter( 354 | self, 355 | ray_in: &Ray, 356 | hit: &HitData, 357 | rng: &mut Rng, 358 | attenuation: &mut Vec3, 359 | ray_out: &mut Ray, 360 | ) -> bool { 361 | let ray_in_dir = ray_in.direction(); 362 | let reflected = reflect(ray_in_dir, hit.normal); 363 | *attenuation = Vec3::ONE; 364 | let ray_in_dir_dot_normal = ray_in_dir.dot(hit.normal); 365 | let (outward_normal, ni_over_nt, cos) = if ray_in_dir_dot_normal > 0.0 { 366 | let cos = self.ref_idx.x * ray_in_dir_dot_normal / ray_in_dir.length(); 367 | (-hit.normal, self.ref_idx.x, cos) 368 | } else { 369 | let cos = -ray_in_dir_dot_normal / ray_in_dir.length(); 370 | (hit.normal, 1.0 / self.ref_idx.x, cos) 371 | }; 372 | let mut refracted = Vec3::ZERO; 373 | let reflect_prob = if refract(ray_in.direction(), outward_normal, ni_over_nt, &mut refracted) { 374 | schlick(cos, self.ref_idx.x) 375 | } else { 376 | 1.0 377 | }; 378 | if rng.gen() < reflect_prob { 379 | *ray_out = Ray::new(hit.p, reflected); 380 | } else { 381 | *ray_out = Ray::new(hit.p, refracted); 382 | } 383 | true 384 | } 385 | } 386 | 387 | impl<'a, const NL: usize, const NM: usize, const ND: usize> Material for &'a Materials { 388 | fn scatter( 389 | self, 390 | ray_in: &Ray, 391 | hit: &HitData, 392 | rng: &mut Rng, 393 | attenuation: &mut Vec3, 394 | ray_out: &mut Ray, 395 | ) -> bool { 396 | match hit.material.kind { 397 | MaterialKind::Lambertian => { 398 | self.lambertian[hit.material.index].scatter(ray_in, hit, rng, attenuation, ray_out) 399 | } 400 | MaterialKind::Metal => { 401 | self.metal[hit.material.index].scatter(ray_in, hit, rng, attenuation, ray_out) 402 | } 403 | MaterialKind::Dielectric => { 404 | self.dielectric[hit.material.index].scatter(ray_in, hit, rng, attenuation, ray_out) 405 | } 406 | } 407 | } 408 | } 409 | 410 | impl Default for MaterialInfo { 411 | fn default() -> Self { 412 | let kind = Default::default(); 413 | let index = 0; 414 | MaterialInfo { kind, index } 415 | } 416 | } 417 | 418 | impl Default for MaterialKind { 419 | fn default() -> Self { 420 | MaterialKind::Lambertian 421 | } 422 | } 423 | 424 | pub fn unit_vector(v: Vec3) -> Vec3 { 425 | v / v.length() 426 | } 427 | 428 | fn random_in_unit_sphere(rng: &mut Rng) -> Vec3 { 429 | let mut p; 430 | loop { 431 | let rv = vec3(rng.gen(), rng.gen(), rng.gen()); 432 | p = 2.0 * rv - Vec3::ONE; 433 | let p_len2 = p.length_squared(); 434 | if p_len2 < 1.0 { 435 | break p; 436 | } 437 | } 438 | } 439 | 440 | fn random_in_unit_disk(rng: &mut Rng) -> Vec3 { 441 | let mut p; 442 | loop { 443 | let rv = vec3(rng.gen(), rng.gen(), 0.0); 444 | p = 2.0 * rv - vec3(1.0, 1.0, 0.0); 445 | if p.dot(p) < 1.0 { 446 | break p; 447 | } 448 | } 449 | } 450 | 451 | pub fn reflect(v: Vec3, n: Vec3) -> Vec3 { 452 | v - 2.0 * v.dot(n) * n 453 | } 454 | 455 | pub fn refract(v: Vec3, n: Vec3, ni_over_nt: f32, refracted: &mut Vec3) -> bool { 456 | let uv = unit_vector(v); 457 | let dt = uv.dot(n); 458 | let discriminant = 1.0 - ni_over_nt * ni_over_nt * (1.0 - dt * dt); 459 | if discriminant > 0.0 { 460 | *refracted = ni_over_nt * (uv - n * dt) - n * discriminant.sqrt(); 461 | true 462 | } else { 463 | false 464 | } 465 | } 466 | 467 | pub fn schlick(cos: f32, ref_idx: f32) -> f32 { 468 | let mut r0 = (1.0 - ref_idx) / (1.0 + ref_idx); 469 | r0 = r0 * r0; 470 | r0 + (1.0 - r0) * (1.0 - cos).powf(5.0) 471 | } 472 | 473 | pub fn color( 474 | ray_bounce_limit: u32, 475 | rng: &mut Rng, 476 | mut ray: Ray, 477 | world: impl Copy + Hit, 478 | materials: impl Copy + Material, 479 | ) -> Vec3 { 480 | let mut hit = HitData::default(); 481 | let mut scattered = Ray::new(Vec3::ZERO, Vec3::ONE); // placeholder to initialise. 482 | let mut attenuation = Vec3::default(); 483 | 484 | let min_f = 0.001; 485 | let max_f = core::f32::MAX; 486 | let mut color = Vec3::ONE; 487 | let mut bounces = 0; 488 | while world.hit(&ray, min_f, max_f, &mut hit) { 489 | if bounces < ray_bounce_limit && materials.scatter(&ray, &hit, rng, &mut attenuation, &mut scattered) { 490 | color *= attenuation; 491 | ray = scattered; 492 | } else { 493 | color = Vec3::ZERO; 494 | break; 495 | } 496 | bounces += 1; 497 | } 498 | 499 | let sky = color_sky(&ray); 500 | sky * color 501 | } 502 | 503 | fn color_sky(ray: &Ray) -> Vec3 { 504 | let unit_direction = unit_vector(ray.direction()) * 2.0; 505 | let t = 0.5 * (unit_direction.y + 1.0); 506 | (1.0 - t) * vec3(1.0, 1.0, 1.0) + t * vec3(0.5, 0.7, 1.0) 507 | } 508 | --------------------------------------------------------------------------------