Compare commits
1305 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 425382f7d2 | |||
| b45f6c1321 | |||
| 56ebbecd3b | |||
| 5c0110769a | |||
| b37ba9279e | |||
| 9e04f0b054 | |||
| cc8afbc220 | |||
| 2d6257a390 | |||
| 0fcd6a194a | |||
| 79471af0c1 | |||
| 73842d9793 | |||
| 600ac568a9 | |||
| 9694446fca | |||
| 735b573705 | |||
| e5d03134bb | |||
| b73463a4b2 | |||
| 0a08d12f69 | |||
| 19f483a68f | |||
| 1d5e3d198d | |||
| e94e100431 | |||
| 198dddd2ce | |||
| 3434731c2a | |||
| 28bf60e62d | |||
| 4a4120864d | |||
| 283f26b95c | |||
| 13acf3c143 | |||
| 84201b346b | |||
| 49389ebb4e | |||
| 9b7e5be50e | |||
| 66862ea1cf | |||
| c6fa20abaa | |||
| 305d3a6496 | |||
| 2a5de178fa | |||
| 631ff14fc1 | |||
| 1e2d02d437 | |||
| fe9722c261 | |||
| 58e1396c15 | |||
| 8e72b1f326 | |||
| 6b10ebdc2c | |||
| c759b5fa24 | |||
| 573e99dd2d | |||
| b9849e2b5c | |||
| 6fecf1d58a | |||
| e860f969be | |||
| c8f57ea82b | |||
| 1414eb9852 | |||
| 497cd19fe5 | |||
| c6e121a777 | |||
| 1229b12d9a | |||
| cd964666e2 | |||
| c3162ca2cb | |||
| e2462c8151 | |||
| 7f7549d2f7 | |||
| c597c38705 | |||
| b00cab6388 | |||
| 0b492180df | |||
| e9ac02d416 | |||
| d1d14daa1e | |||
| bfa09e165a | |||
| c063afc5bc | |||
| babaa2680f | |||
| fbc5a061d9 | |||
| cf8c9f0982 | |||
| dd5b66386a | |||
| 8dab6f3370 | |||
| 5a2b46c6d2 | |||
| 58da950f62 | |||
| 75002ce45d | |||
| b40fea79ce | |||
| 001597284a | |||
| 6b658a5bc3 | |||
| bf4badd6b9 | |||
| 5f7075d2f7 | |||
| 5f19538455 | |||
| 6015514680 | |||
| 6b2380c5fa | |||
| 8080c21760 | |||
| 6e91e26dfe | |||
| a4350cdf3f | |||
| e17c68a5a0 | |||
| b70e65acb4 | |||
| 19817e4ad6 | |||
| d580667b97 | |||
| 301bf41fab | |||
| 2ad9c7f4d5 | |||
| c8eed098ba | |||
| 207c6a0cb5 | |||
| da203352fd | |||
| f817448839 | |||
| bf56ccaee9 | |||
| 5d578d9e92 | |||
| 7b9da3786d | |||
| 5690707c73 | |||
| 3b3be75d94 | |||
| 128321c655 | |||
| d2c35e8591 | |||
| 3c31b5bc1e | |||
| 81d62756fb | |||
| 18dc475f40 | |||
| e22f4a28bd | |||
| aba46cb2c6 | |||
| da5570e89f | |||
| c943b3a526 | |||
| 428a56af28 | |||
| eb825f516e | |||
| 371e16a857 | |||
| 750e4be1b9 | |||
| 382ac2c70b | |||
| d9aa123bce | |||
| c77b1c3ab2 | |||
| ed7f190778 | |||
| f983be6104 | |||
| 075c224022 | |||
| ba701eb4d3 | |||
| 93d9b9877c | |||
| 87b0cc705e | |||
| 6924042452 | |||
| be395304ec | |||
| fb4b0b2f75 | |||
| 596b61b23f | |||
| a8354720df | |||
| c9817b25a3 | |||
| e024897b7d | |||
| 262c536d7f | |||
| 8c0d89bc62 | |||
| 8f0cf3b8ef | |||
| 6857664f48 | |||
| e1c4bf5289 | |||
| f7f4c15e82 | |||
| 0a22d5ab4d | |||
| f050621e3e | |||
| dcadb11a20 | |||
| 2bc95a7af7 | |||
| 52f95de756 | |||
| 409c404a26 | |||
| d07a615c76 | |||
| 6113af2dc1 | |||
| a367d40913 | |||
| 1fa0159079 | |||
| 6c6938aa41 | |||
| 2a29b8e807 | |||
| c5f1cdc23d | |||
| 49eeb7bf9a | |||
| cb67fbcbd7 | |||
| 51ee3de689 | |||
| c69beae81a | |||
| d5f53572df | |||
| 9daddccbed | |||
| e0a488dec1 | |||
| 0bc98a5f18 | |||
| e834f2ec94 | |||
| 4087e9c291 | |||
| 31bce25c37 | |||
| 2d61e329cb | |||
| e7dc58c596 | |||
| 28ebfa597e | |||
| 1ca356c2f1 | |||
| b776242cc7 | |||
| 33ccdea761 | |||
| 7bc4de4e6b | |||
| 21d4242340 | |||
| 3a1dde0081 | |||
| cc01952059 | |||
| 12c9ae1490 | |||
| 9bbeec5105 | |||
| c26a806a35 | |||
| 91bfb29d33 | |||
| 749b743cf6 | |||
| 26ad61c1ce | |||
| 85ff553a72 | |||
| 19226dcf94 | |||
| 7311522328 | |||
| 27280bb7ff | |||
| 4683262cf3 | |||
| c452ffec8b | |||
| 09b3640116 | |||
| 1bc09fb962 | |||
| 21ed4a2371 | |||
| c1a5db616e | |||
| aef06656f0 | |||
| 05d191f491 | |||
| abb684aed2 | |||
| bbb0d36494 | |||
| c62575612b | |||
| d939421c82 | |||
| 060dd748a7 | |||
| a8b2358987 | |||
| b05b94c811 | |||
| 89462856e3 | |||
| 8795667e10 | |||
| a7af0be9bb | |||
| 2e183d77c8 | |||
| f1fde0542e | |||
| c42cc266f9 | |||
| e8d077bb84 | |||
| a4a6ea5ee6 | |||
| 83732dae97 | |||
| c9be8e2a41 | |||
| 25aa5bee85 | |||
| 545e59aba5 | |||
| fd30872f5e | |||
| 8353afa31c | |||
| 6eee25e04a | |||
| f7ea45b14d | |||
| 2f268cab70 | |||
| c844c6b7f0 | |||
| 34facd8769 | |||
| fc6dc9473c | |||
| ecace3d609 | |||
| 65fd975b1a | |||
| fd7e04fd8c | |||
| fc9aa5c184 | |||
| 5ebfa4452e | |||
| 653aaecaec | |||
| 3b9cca30bb | |||
| f64bad2c1e | |||
| ce7b11adfc | |||
| b80409c195 | |||
| 58547142c9 | |||
| b52acb31c2 | |||
| 74c4fb79f5 | |||
| 68eb8b9f21 | |||
| 6a4d9877e6 | |||
| 09737023a1 | |||
| 62dff3fa20 | |||
| e925af534e | |||
| 2ff6437a92 | |||
| ec412d9be0 | |||
| ca0fb8cf63 | |||
| a1745e25a1 | |||
| 50bf26337d | |||
| e6167e3e65 | |||
| 645e7cd9dc | |||
| 9fa40cbf09 | |||
| 942e7986be | |||
| 758f3c39ee | |||
| 73125013f0 | |||
| 776002c08c | |||
| f3f7d4a034 | |||
| 1864574a92 | |||
| 353315bb43 | |||
| 0dbcdc3217 | |||
| 046865ba00 | |||
| 1546d97b2f | |||
| cd4bd5efe0 | |||
| 838cb9f2ce | |||
| 24a5a4df45 | |||
| 2e395ff58e | |||
| b9506edc03 | |||
| 2941ccc93b | |||
| e4e568ae6a | |||
| dd655d8c8d | |||
| 3bffc927f6 | |||
| 6930139f9a | |||
| 499ef51875 | |||
| 0b3835f593 | |||
| 9ebf98ce77 | |||
| 22cf2570f5 | |||
| 5307ea85b5 | |||
| 21b187ab9f | |||
| 9c31a35f6b | |||
| 5b42100581 | |||
| 591f0ee6a9 | |||
| a18565fd61 | |||
| e5f0e05d43 | |||
| ef540bc498 | |||
| fc66738dca | |||
| 5800dd2448 | |||
| b8cb1a828a | |||
| 23f60da40d | |||
| fb2af0e0e7 | |||
| bb00653645 | |||
| 20456d95e8 | |||
| 3ecb7c1d81 | |||
| d0240a54c7 | |||
| e6745e43ec | |||
| 8ff0f9cd52 | |||
| f9f6c27cb5 | |||
| fe33bd4c83 | |||
| 259ddf0410 | |||
| 3947b164b5 | |||
| 0854e5c4ac | |||
| 79947a051c | |||
| 1b7ff9cdd4 | |||
| 5f58a6b3d0 | |||
| e5c1cf102c | |||
| e03dc3754d | |||
| dd51ddf0f8 | |||
| bdf4c3e1eb | |||
| 9c13ec8808 | |||
| 6b63e91391 | |||
| f0793dc33f | |||
| dfde648e79 | |||
| acd338981c | |||
| 1c840539c6 | |||
| 73a596cb2f | |||
| 6fad87002d | |||
| aa3cf2e077 | |||
| 6b0098bb09 | |||
| b7b23dce5f | |||
| a69a3812c2 | |||
| 6534136632 | |||
| 2542adba92 | |||
| a7b9dccba4 | |||
| db7138e0e3 | |||
| 5a7080c9c0 | |||
| ce1a1d6031 | |||
| 650a2921a3 | |||
| 7650cead3d | |||
| ed9aaba055 | |||
| cb106be710 | |||
| e21c884841 | |||
| cc157718cd | |||
| 4a90663b1c | |||
| 21b4c7c916 | |||
| b1127f2e05 | |||
| ceb23c14c9 | |||
| c4c25fc21f | |||
| 7772669148 | |||
| 1047911cfe | |||
| 134c257081 | |||
| fb9cc7fea5 | |||
| 850107944c | |||
| 330d769bdc | |||
| d779862271 | |||
| b22a719204 | |||
| dcffb422e5 | |||
| b6555519c5 | |||
| 1c77245818 | |||
| 7ded585c0b | |||
| 6065c3ec11 | |||
| c67385ef80 | |||
| af2ee20e19 | |||
| b551610604 | |||
| 4f2c59231a | |||
| 51bf5cd1bf | |||
| a6e2a45869 | |||
| e5bb243b68 | |||
| a6b4f2fc63 | |||
| 762419d4c4 | |||
| 934e4ca549 | |||
| 549a779a59 | |||
| f43333ae01 | |||
| 75cd7feffa | |||
| 0b4361ab6b | |||
| 4e5c163732 | |||
| 17f32246da | |||
| 94d4ea8a40 | |||
| 70e7b0d527 | |||
| f257b25998 | |||
| 610cc2cd4f | |||
| 7ed3340028 | |||
| 5e25a2572b | |||
| 74ce7e89d2 | |||
| 40b9013f41 | |||
| 52cc327f2b | |||
| 94cffaaefe | |||
| 8586a44c79 | |||
| 5a410fe12d | |||
| 222768d363 | |||
| 0c6ef79b11 | |||
| 14cb059b34 | |||
| 45e83d6d15 | |||
| e7f1afdfaa | |||
| 1ca7261f06 | |||
| 6f15bf7209 | |||
| da4058141b | |||
| 77729bc340 | |||
| ace45eabf3 | |||
| 75a97a30fe | |||
| 596ad18ce3 | |||
| f025f923ae | |||
| fbd3b9372b | |||
| 824d6701d8 | |||
| 63bee0c78d | |||
| bcb0200435 | |||
| 9c4129a2a3 | |||
| 8f18d654ee | |||
| 97ab8940f0 | |||
| ae7a21504b | |||
| c871613616 | |||
| 94334ae52d | |||
| 002aac08e8 | |||
| 9d7d66f235 | |||
| e954417c2f | |||
| 7224494ce6 | |||
| 0023014cc2 | |||
| 43afa76e60 | |||
| a599615c1a | |||
| 588861757a | |||
| 830db22dcc | |||
| 143014e9c9 | |||
| 7ca45e1f54 | |||
| 1c24f5d3ce | |||
| ca62a6c4bf | |||
| 788d719f2a | |||
| 2b9c050911 | |||
| 5ae2196a01 | |||
| ddbdf479ae | |||
| f759f94cfa | |||
| a066e0078d | |||
| 03de914dbc | |||
| 143d9bcce6 | |||
| 6e01cca9ad | |||
| 1c02f3d8fe | |||
| 28ce224caa | |||
| 15d6f9861c | |||
| 3186b58ba8 | |||
| 201fa888dd | |||
| 443bc347ef | |||
| 3140865780 | |||
| 36eec5bf95 | |||
| 002ab366fe | |||
| 08f286253c | |||
| e2df50a21a | |||
| 17a444ad49 | |||
| ffb760d8f3 | |||
| 52b00644c6 | |||
| 3674d149dc | |||
| bc313c8630 | |||
| 0b03a5da0d | |||
| 41fe1a5fb5 | |||
| 0897d8ec5f | |||
| 2c8111801d | |||
| 23fcfb4eb2 | |||
| 265e34bd04 | |||
| a49fc1c5d1 | |||
| 63147ee0a9 | |||
| 1a953c99bc | |||
| 1fa73c0cac | |||
| 0a5904a4dd | |||
| 2455cb9545 | |||
| 7aa737de7b | |||
| 75c258ed7e | |||
| e84db38943 | |||
| 19a956110b | |||
| e492faa707 | |||
| d9c21fddb4 | |||
| 77816d2da1 | |||
| 03534b0892 | |||
| e947a03cf7 | |||
| 5cf52d879e | |||
| 3548912d0d | |||
| 117178f547 | |||
| 57d5937bcb | |||
| eb3a940a31 | |||
| 387e8d1dd9 | |||
| 26d02127dd | |||
| 0be26fbb51 | |||
| 979ab9f6ee | |||
| e44e44d317 | |||
| d6e99071aa | |||
| a49751c31d | |||
| 7fbf75c623 | |||
| 5171c33b72 | |||
| 6081a159e3 | |||
| 0d42b6d7ee | |||
| 00960bad36 | |||
| 649559a917 | |||
| 3db604c30c | |||
| 5f5b0485b5 | |||
| 728401b67c | |||
| 1a9c3ba3ff | |||
| 1843606074 | |||
| c4f37741b7 | |||
| e3bb38f13b | |||
| 00cb2e25eb | |||
| 642fb510f8 | |||
| 074751f91f | |||
| 5c97f68331 | |||
| 0f5fcba95d | |||
| 7a89e78f43 | |||
| e05eedfc76 | |||
| 9f078a6e3c | |||
| b4d1e6197c | |||
| 9fbc7a5f09 | |||
| d14a4f1f66 | |||
| 1e43b031ba | |||
| 41fd7b724e | |||
| 2a1706decb | |||
| ab7de52531 | |||
| 1891b9e367 | |||
| 3ac7dfbd3a | |||
| 2853273205 | |||
| 2201dd681e | |||
| 013dab4ba7 | |||
| cf501945a3 | |||
| ab4703c3dd | |||
| 4ce853d892 | |||
| 6cdd56ad11 | |||
| 66122e6e3b | |||
| c444661884 | |||
| 91a8a670d5 | |||
| dbd5566ee0 | |||
| ad2d4a2626 | |||
| 148f03205f | |||
| 2c1f835528 | |||
| 8038e045b0 | |||
| 7a635e2896 | |||
| a40a5721f3 | |||
| e4cf4c9f17 | |||
| 5299afa276 | |||
| 8e8e41d5e1 | |||
| 153e45c345 | |||
| 7bb365c57b | |||
| 8397a81428 | |||
| 17c484b97b | |||
| 3b740659f5 | |||
| 2913bb39e8 | |||
| f21b259376 | |||
| 51f30958cd | |||
| f2e04c77fd | |||
| 34d4904b2e | |||
| dd61d5793c | |||
| faf7a28cf2 | |||
| 05ed7edcbf | |||
| 5ddf24381b | |||
| 305bf653cf | |||
| 4715492f0c | |||
| aa57db03bb | |||
| b2e228c090 | |||
| e9144ff834 | |||
| 6f3d1cdd0a | |||
| 8209639261 | |||
| a580d6785f | |||
| 4976a2ef6a | |||
| 8b22ffe007 | |||
| 24f7ec4a54 | |||
| 4d0dda19b9 | |||
| 55d55212c3 | |||
| 1142fa68ea | |||
| 305f725394 | |||
| 8a297a6fd4 | |||
| d717430256 | |||
| 8804738193 | |||
| b14ac354bb | |||
| 3296337f40 | |||
| 9b11461eaf | |||
| 3f9989ea57 | |||
| 6e60a988a0 | |||
| 64bd762f44 | |||
| b33c2b4f36 | |||
| fe33f09f1d | |||
| 9518ce1d0a | |||
| 53ca33f301 | |||
| 3945e1416b | |||
| 3aa8e67551 | |||
| 03898a064a | |||
| d879b8e064 | |||
| f132198ead | |||
| 5e0d90af2e | |||
| 736119fdc6 | |||
| 5259c41b40 | |||
| 4a6f2f8821 | |||
| 529de24da4 | |||
| fc3d15c544 | |||
| 261c4a7e88 | |||
| ccd619f659 | |||
| 35bbd52f89 | |||
| ea45aa9b19 | |||
| 655c377da8 | |||
| 5498cbf3bf | |||
| 10a343a490 | |||
| b2faad9634 | |||
| 786ab54f84 | |||
| d41d153cff | |||
| 89bd733142 | |||
| 5d2a1e0507 | |||
| 22ff68b89f | |||
| fe41ef619b | |||
| 3870a013fa | |||
| ebd890a0da | |||
| 964a1940c4 | |||
| b11af95ec7 | |||
| e8de6c37fc | |||
| af41cefaac | |||
| 900a96938b | |||
| c58d43ac1e | |||
| 0122ee94a5 | |||
| dfb541011d | |||
| aeff147b6d | |||
| ee02aa394a | |||
| 8ba33d9d10 | |||
| 85a04f8e81 | |||
| 531c75bff9 | |||
| 12f70572b0 | |||
| 7090e85224 | |||
| e5e1f945ea | |||
| e1cf41b94b | |||
| d4bf8368b1 | |||
| 6588a71879 | |||
| d700df6afb | |||
| 35d46e23a8 | |||
| f1fc086612 | |||
| 13cf3deb3f | |||
| 74dfa30556 | |||
| e8b0419ccf | |||
| 793afff0aa | |||
| b80101411f | |||
| e83097d114 | |||
| 7b4e509140 | |||
| c168ce3a7e | |||
| e1dcd290b1 | |||
| 352913ba14 | |||
| dbda31d570 | |||
| d521409033 | |||
| 6b06f1dbcf | |||
| 70912e1d56 | |||
| ffddbb455f | |||
| d5dd8e7ecf | |||
| 082a5819cd | |||
| ae2b3d361e | |||
| bee39dda58 | |||
| 559cd74647 | |||
| 009e1aaebb | |||
| fe9996dd4f | |||
| d1e54b821b | |||
| 8877aac8cb | |||
| a61096ffa5 | |||
| 230c57cca4 | |||
| b8100e9417 | |||
| b3d77ab9eb | |||
| 030a66c091 | |||
| 751c1f20dc | |||
| 00a9c48fec | |||
| 6fbf4a6aac | |||
| f40cf6539a | |||
| 8e4f7babf3 | |||
| e18b059234 | |||
| e3114c29af | |||
| 3539f84c9a | |||
| 5b0c6d1aff | |||
| 1b72b14376 | |||
| 32af6ede73 | |||
| a79fb237e5 | |||
| ec510425a1 | |||
| bf772a5eb9 | |||
| fe3a9fbd67 | |||
| 090b9ea0c1 | |||
| ddfaeddb5f | |||
| abe938c30a | |||
| cf02fecadc | |||
| 54c24f8434 | |||
| 35ab0f4261 | |||
| 73342615d1 | |||
| d64108a5c1 | |||
| 1dfa92b0c3 | |||
| 567d5f70ab | |||
| c8b5ac6c29 | |||
| fe0711c3e2 | |||
| 9486466abf | |||
| 1328e869a9 | |||
| fbc648302d | |||
| ef129a3135 | |||
| 08ef7c93ea | |||
| d56493da54 | |||
| 78f3248ac9 | |||
| 16b0228394 | |||
| 516ed3e9a0 | |||
| f4d4969650 | |||
| 7f482219ef | |||
| dbbc2b70bf | |||
| e265b760c1 | |||
| 138e17508b | |||
| 7b5edc363a | |||
| 8eaa635385 | |||
| 91d3216a00 | |||
| 18c3f274f8 | |||
| b545d8800c | |||
| 3bbaa8dad0 | |||
| a1c251c3b7 | |||
| 8190d7f171 | |||
| 59bbb9e058 | |||
| 861d8a683f | |||
| cb3e8e4112 | |||
| 5f4aee71b8 | |||
| 02403377cd | |||
| 2773949197 | |||
| 3b3cd5ade4 | |||
| 6436fb3bde | |||
| 240ddbcde3 | |||
| ef5d4013d3 | |||
| a8bd59c07f | |||
| db17d8d0ce | |||
| 4d0d08f245 | |||
| c119750896 | |||
| 6d9f504639 | |||
| 8e49a35e0e | |||
| d7a0c69990 | |||
| cb1324fc2d | |||
| a1adab1156 | |||
| a6324c8f65 | |||
| 9ec23559af | |||
| a377933884 | |||
| 9c161121b3 | |||
| a5b00fa718 | |||
| 919e118a2f | |||
| f38df259a7 | |||
| ec10e3bb30 | |||
| 224c2c049e | |||
| 8509761d67 | |||
| a808ac5dc8 | |||
| 37a3c4dbb5 | |||
| 3fd4bb622f | |||
| d74b7fb304 | |||
| 83c72c1458 | |||
| 9b3ff05af7 | |||
| 14ce4d4394 | |||
| 9062c04ef0 | |||
| 0d48ac8fc2 | |||
| 7f2464684a | |||
| 2c4de9878e | |||
| 611961cefe | |||
| e0028d5f94 | |||
| 0d8691045b | |||
| bd727ae189 | |||
| 4bfda76666 | |||
| a030978558 | |||
| 2aff3d76ca | |||
| 8312659275 | |||
| 55ce33bc1c | |||
| 1613bdcd06 | |||
| a67dc00fa3 | |||
| 1c82c73bc0 | |||
| 22b4f33984 | |||
| 6c8288f38a | |||
| e08b57e814 | |||
| 87aa23107d | |||
| 6e0dd2064a | |||
| 5f939430ee | |||
| 4abe8587f3 | |||
| 62778fc1e9 | |||
| b0953e9494 | |||
| 53006ac9ad | |||
| 0fd8de8029 | |||
| 46cc4c72e7 | |||
| a05fe5ce9b | |||
| 8899e3ebb7 | |||
| 727ff8be95 | |||
| a8d97f1daa | |||
| 488485e23e | |||
| 804e652b6d | |||
| 79138dfaf0 | |||
| e3f0991805 | |||
| f02e7d0936 | |||
| 67f3f89bf7 | |||
| 36bdd6cbd0 | |||
| b760dcdb58 | |||
| d926bdb609 | |||
| e1bede1bf6 | |||
| eeede88fb8 | |||
| 2f688892ea | |||
| 5c5fad6bb4 | |||
| 1be136bd2e | |||
| df404507b5 | |||
| 587bdf92f7 | |||
| f52059522b | |||
| 691ac6d439 | |||
| 6fc056cba2 | |||
| 54cb82cbda | |||
| b8c9130ae4 | |||
| c2e1b92cce | |||
| 6113325e07 | |||
| bea7e1526d | |||
| abc75e6c3d | |||
| dfc1db672d | |||
| 5b71591998 | |||
| 4dabf4bf01 | |||
| 210c443b30 | |||
| f95e7e96bf | |||
| 735aa70b53 | |||
| b1fd178341 | |||
| 5059cef065 | |||
| 0bb21ef4a0 | |||
| 2a4a5d2519 | |||
| 99c10e5ed3 | |||
| 892ab47b7a | |||
| ebff015c1c | |||
| 1da00264a0 | |||
| 7f6805aac6 | |||
| d56d624f0f | |||
| fd91e912fe | |||
| 7106791186 | |||
| a0f379f613 | |||
| c0847f6789 | |||
| 831289afc3 | |||
| da6883489e | |||
| ed8c7bc338 | |||
| bd06ed9c14 | |||
| fa67d0581e | |||
| 7ba97f3c32 | |||
| 992436b47c | |||
| 7614481d78 | |||
| 07371ddfdf | |||
| 66f9374477 | |||
| 50c29f6a9b | |||
| a4877c6294 | |||
| c9bebc0700 | |||
| 26867bfd8f | |||
| dfd6df7f42 | |||
| 092681aea7 | |||
| 3a2f4843ba | |||
| db6cdc3ce0 | |||
| b23aa6cebd | |||
| bc01e6369e | |||
| a232dac196 | |||
| 2676daabf1 | |||
| c82e67083f | |||
| 175fd31431 | |||
| 3b1a96582a | |||
| 96303e57ec | |||
| c26649a0a8 | |||
| 0620310f4f | |||
| abdbd1ee64 | |||
| 2b46f04baf | |||
| 106b48f4d5 | |||
| 732b34d28b | |||
| 3c5d2f8b47 | |||
| 116539ce34 | |||
| e8421d4274 | |||
| 0b9ee23a5c | |||
| 2d2841d59e | |||
| a0c2f6a51e | |||
| 1d946afe82 | |||
| 6ea519b55a | |||
| 2d6c49ee20 | |||
| 59b250f091 | |||
| 6c347f08b6 | |||
| 304f24764b | |||
| 3dac26ffda | |||
| f51a442357 | |||
| 1cbcddf410 | |||
| bd819b1f5f | |||
| aad428210d | |||
| a08954f7db | |||
| bba14d265a | |||
| 59e0b43585 | |||
| f103afb495 | |||
| 79ee6a973e | |||
| eab96f2086 | |||
| 975d5f98a3 | |||
| 1e86eff2d3 | |||
| d4145179a9 | |||
| 2492d0b38f | |||
| 8166790113 | |||
| 40cc967c30 | |||
| 6d5c7bcaf5 | |||
| b0904fef69 | |||
| ba397836a6 | |||
| de10f2a6e5 | |||
| c332d6f89a | |||
| 72043c0260 | |||
| c963dbc48d | |||
| 2f4673ce1b | |||
| ca40e6140a | |||
| 2226ff32dc | |||
| 34d294263f | |||
| 526ccd52fd | |||
| 0765d88ff2 | |||
| 9777e71ee0 | |||
| a716025094 | |||
| c8f951e6e8 | |||
| 24c645d8d2 | |||
| 90e7d4076b | |||
| 8ab462f72c | |||
| 0862362ebd | |||
| 766910c0ae | |||
| 2f48521ce7 | |||
| ac6154e94d | |||
| d2d2297dc7 | |||
| bf5e5d1254 | |||
| adbe43c2c2 | |||
| 974e3e192b | |||
| 2283a15172 | |||
| c4d5e50f22 | |||
| 86d90605fc | |||
| db71bf2868 | |||
| 3fe634f8b9 | |||
| fef124a01d | |||
| 272977a521 | |||
| dedb3d57fd | |||
| 0fc507e238 | |||
| 9e9013ec43 | |||
| 19108517da | |||
| babd14d763 | |||
| 063a5d1ae4 | |||
| 1de395bc7b | |||
| c22f8e3607 | |||
| 60f675c6f0 | |||
| 297ca0be2c | |||
| 6dacf9e1f1 | |||
| 2a56ec3b3e | |||
| cfdb9ef1f2 | |||
| a9aa3b6cd8 | |||
| cd1853f853 | |||
| cc106ab42f | |||
| 76e45564f8 | |||
| 7454e9abd2 | |||
| f78bbc6b70 | |||
| 19ad91d5d8 | |||
| 0c50fa9816 | |||
| 83ccb79fa3 | |||
| 8b72c063a8 | |||
| 7e316a1305 | |||
| e0791eacad | |||
| 11ec018933 | |||
| 8ef1cad6fb | |||
| 6885e561db | |||
| 806bff19f4 | |||
| 949057b1c3 | |||
| 5c23f4ac09 | |||
| cdd53f09b9 | |||
| f3210608ae | |||
| f01784108d | |||
| 30c1068a13 | |||
| 3f3df090f4 | |||
| 390f574662 | |||
| 48a09c9783 | |||
| 981109a6f1 | |||
| 2f8428db1a | |||
| d0ec3fa2e2 | |||
| 9533289e57 | |||
| 0f485cf77c | |||
| 8c8b4613d2 | |||
| 3b872f08a8 | |||
| e89e0159bf | |||
| 857d2c26f4 | |||
| 49e70637db | |||
| 72a151816a | |||
| 528b20dc00 | |||
| ce2d2b78c4 | |||
| b22c42b9e3 | |||
| 377d25a1fd | |||
| 32a60c3b5c | |||
| 3f40aff01f | |||
| 09563caf37 | |||
| bea5c55ac9 | |||
| 62dcfe2cae | |||
| 4dd331d546 | |||
| f1debd6cb5 | |||
| a8220147ce | |||
| 80fbe048bf | |||
| 33d1c8c68c | |||
| 9258c234f2 | |||
| 53d77d3421 | |||
| 5f4c57d3eb | |||
| 8a2acd360d | |||
| 130fc5b54d | |||
| e15a848ac6 | |||
| 054e77be42 | |||
| 553b6f1ee8 | |||
| 1729fe6993 | |||
| cc01e88ce8 | |||
| f18715a497 | |||
| 0cee4ac973 | |||
| d47a191d5c | |||
| 513afd603b | |||
| 23efaed29e | |||
| 2c80f4402d | |||
| 9acb3a5482 | |||
| 37d2b80a3d | |||
| 03b52f148c | |||
| f326fa611f | |||
| 7c83481d6f | |||
| afdae7f670 | |||
| 182d6d8602 | |||
| 82ee84ad39 | |||
| b086de1c12 | |||
| 1481d1a1e9 | |||
| 681c473e7a | |||
| 206ff89587 | |||
| 91aa5a0fb9 | |||
| 7c4b8758ea | |||
| f22e559e83 | |||
| 9731437717 | |||
| 6f7bb8dbf2 | |||
| 3dd83c52bf | |||
| 949ac08643 | |||
| 4948b1b86a | |||
| e5bf0e1b9f | |||
| b776465919 | |||
| 82181b28b0 | |||
| eb07fd7b9a | |||
| 79dbad6547 | |||
| 94884fc39a | |||
| aec5ef8332 | |||
| 8e4783a0c6 | |||
| c23f2b61cc | |||
| 12cf7f0f92 | |||
| 6481897ffa | |||
| 9653fc6725 | |||
| 2af4e8fe10 | |||
| 499a7c6129 | |||
| 84fdf9cc80 | |||
| f8d023ed5c | |||
| 5ca61d8568 | |||
| 58998f4576 | |||
| c486577b07 | |||
| a69c8ce6a2 | |||
| e527783e55 | |||
| 4d9c92dd49 | |||
| 9b01229e58 | |||
| e3a030fad8 | |||
| cb878294ea | |||
| b2fc5e8fd3 | |||
| 4fb42319ef | |||
| 1bd1aca0f0 | |||
| b433312042 | |||
| 1041b1b86d | |||
| 1ace5fd10d | |||
| cfc9f73744 | |||
| 2418167182 | |||
| 52090d3a6b | |||
| 73f68c102d | |||
| 862dd1e5f1 | |||
| 58351d1989 | |||
| 6705205e2f | |||
| 2cdd0ff644 | |||
| 69ae841f64 | |||
| 7f8700288f | |||
| f87dec6ca6 | |||
| 65a6c0aed5 | |||
| f6dd0decfb | |||
| 816984542a | |||
| 3837e8b263 | |||
| 47b3141f18 | |||
| e10ee3e55a | |||
| 0a4e89e29b | |||
| 0765fa92b5 | |||
| 2529312152 | |||
| 3404643636 | |||
| 6b9f6ac82e | |||
| ab5bb79754 | |||
| 58f95d6ce3 | |||
| 97be8ee8cc | |||
| 1d6e8c4b7c | |||
| 1cd2f6a070 | |||
| 35ddfc2455 | |||
| 17d1d87268 | |||
| fd871ce830 | |||
| b4a4a8a591 | |||
| 24e4015425 | |||
| c670887b1a | |||
| d3cd6a461b | |||
| 2625a9d762 | |||
| 4fdd9a242b | |||
| a6e8e6f749 | |||
| 03eabbcf63 | |||
| 13f94dcf11 | |||
| 3b44062eb0 | |||
| 1457637707 | |||
| d28567111f | |||
| 1c7f06e570 | |||
| 63cc0fef2e | |||
| 57084b3d6c | |||
| fa23619f08 | |||
| 1f2456fc67 | |||
| 0b71e906a6 | |||
| 2e59c35a44 | |||
| 6f2bd0e932 | |||
| 82bf4238df | |||
| 9d2dc91920 | |||
| 3ae30a59b3 | |||
| 6a883bc7c6 | |||
| 17de6388ca | |||
| e028d263f1 | |||
| 6962ed6730 | |||
| b66d50ae1b | |||
| a742ce1d32 | |||
| 675ce71935 | |||
| 833f844d59 | |||
| af08dc1c69 | |||
| 3593f835cd | |||
| df086f3b3b | |||
| 07628d2ec7 | |||
| aac3dbfe09 | |||
| 185f24ce49 | |||
| 77e29109ee | |||
| 8d89b9efb0 | |||
| b2fee31a13 | |||
| fc7628e2ee | |||
| 2e3e4959d6 | |||
| f22105c2c3 | |||
| 533902d185 | |||
| 6b31d51e31 | |||
| f0d143ecaa | |||
| 196aa020fd | |||
| ffe5105602 | |||
| 4acaa62a07 | |||
| 68653fa91f | |||
| dc0aa61a14 | |||
| ee790ff3a9 | |||
| a2a3926aee | |||
| 9a70344c1f | |||
| 44006dd533 | |||
| f6aabf2d14 | |||
| dc1f15f18d | |||
| 7d7808af8f | |||
| 5029584a9f | |||
| f353d3f114 | |||
| 667e8bc293 | |||
| 2edb9cc4d8 | |||
| 7018666a8c | |||
| f04926ad94 | |||
| e7508538e0 | |||
| 50f5f0acd9 | |||
| 33202a74b0 | |||
| 3745979b81 | |||
| db15f6f08a | |||
| e1a2f51d5a | |||
| a8e1fd7a4a | |||
| d46ef6ac92 | |||
| 36d21b27c7 | |||
| b1636c27e7 | |||
| 5d32fc6c5e | |||
| 065dc474c0 | |||
| 1fb7b24aad | |||
| f0b72aa025 | |||
| 058077736b | |||
| 571ba6773d | |||
| 40652a0ebc | |||
| 481a6de821 | |||
| 66b828ae92 | |||
| b91f51fb46 | |||
| b02f011627 | |||
| e51d2dda00 | |||
| a11fa46ee2 | |||
| 47f3ecbde2 | |||
| deb2319190 | |||
| ea04c746fd | |||
| 97454fc82e | |||
| 4a6afdb108 | |||
| 4b8970f674 | |||
| f43cd97907 | |||
| 65e852600a | |||
| fedd990c13 | |||
| c0329abe40 | |||
| d8850a56a8 | |||
| e171bb06ec | |||
| 3825e07adc | |||
| db8adf7d96 | |||
| e77ae12b9b | |||
| bf4e4aeaf6 | |||
| 2107b069db | |||
| ea2005dacb | |||
| d5cded8aaa | |||
| 430b22d5d7 | |||
| 5b2af6b3d5 | |||
| f604503566 | |||
| 388a0f4196 | |||
| 754ed56119 | |||
| dca8e391fa | |||
| 9d830eb1e2 | |||
| 7e3f84f95e | |||
| cddee38d71 | |||
| e030d0461b | |||
| 4978c8e0d9 | |||
| dc7b7e6e10 | |||
| 1e3eb11b94 | |||
| b15b231b85 | |||
| 262992571a | |||
| 352bf3f9a7 | |||
| 9683868767 | |||
| 40284fbbf8 | |||
| 0c86a900da | |||
| c1e3eaeab1 | |||
| 3c487dff47 | |||
| 2260d79e26 | |||
| 863794d3c0 | |||
| 0d8c9f6626 | |||
| 8a45dda98c | |||
| 3209320547 | |||
| d1db06a9bb | |||
| 1c1d2fd96f | |||
| 2e5ad8c48a | |||
| 9a6f866956 | |||
| c59bce3b58 | |||
| 1185a9c06c | |||
| 026b69c544 | |||
| df7ece7655 | |||
| 7e8f20bd9b | |||
| 20aef27439 | |||
| 12344cf725 | |||
| ebb2704726 | |||
| 5f9d0140c7 | |||
| 02a7f74993 | |||
| 452e12db45 | |||
| ac46c89904 | |||
| 88acc772b3 | |||
| fbec80c801 | |||
| 1ef487a5cc | |||
| 1e5861de25 | |||
| 07733a4efb | |||
| fee15846ba | |||
| 7040da9a44 | |||
| a8a621df3b | |||
| 18660140b0 | |||
| 58cc53b44d | |||
| d8bb831dd9 | |||
| 0d770e3909 | |||
| 3641886ebf | |||
| 611dd7bad1 | |||
| 7db20e0411 | |||
| e835b25637 | |||
| 0cdce9dba2 | |||
| 97078cda7e | |||
| 10c47b8c2a | |||
| 3ebf73ec22 | |||
| ebe05d4a51 | |||
| cdeb9a3b15 | |||
| 60e8d73079 | |||
| cf23892bd4 | |||
| 25f3cef8c3 | |||
| 00f2a0b825 | |||
| 7342629a86 | |||
| 5f860db6a5 | |||
| 6233718b06 | |||
| 62444315de | |||
| a532ea7b42 | |||
| 803249f126 | |||
| 4e65b76b8c | |||
| 890b2da108 | |||
| eac1d19a09 | |||
| c4949de28f | |||
| 019230f6d9 | |||
| fe6c254a24 | |||
| 8ef38178e6 | |||
| 873ac347d4 | |||
| 48400ff5ce | |||
| 340ef194d3 | |||
| ad8bec40bb | |||
| b4547ec4d2 | |||
| 89f7e442f7 | |||
| e7bef5e880 | |||
| ff7c986fb1 | |||
| 137de0a8b2 | |||
| 708fba5136 | |||
| 85f3fdd438 | |||
| 55be82a2c4 | |||
| 0b19d8639b | |||
| 92b35ab3e7 | |||
| 7d92779e99 | |||
| 4c8528dcae | |||
| 3efd1e4e84 | |||
| 0cc6669cbd | |||
| 8bd409e95d | |||
| 3d0d41ebff | |||
| 61323f8526 | |||
| 18d641e2aa | |||
| 017def29d4 | |||
| bfa3507cc6 | |||
| 137a60ccef | |||
| 58d4bad400 | |||
| f6f1f0023a | |||
| f6313b4427 | |||
| 13a04c2941 | |||
| bc9cdf5cdb | |||
| d8ca8f5985 | |||
| ac36297e27 | |||
| f7470af42d | |||
| 5c356ec22a | |||
| 06a35da0a8 | |||
| 55af307c43 | |||
| 4ab572426d | |||
| 01d91bf102 | |||
| 2dfb1058b2 | |||
| cdbb2cc813 | |||
| 0e00f1e0eb | |||
| d13621e631 | |||
| 7fef21218e | |||
| 7aa4ae1782 | |||
| dd7739f95e | |||
| 203f5d06d1 | |||
| c6515da8c9 | |||
| 5d61e45ecd | |||
| 96ba3832d6 | |||
| 14d14dd6f3 | |||
| c9d7498bed | |||
| 46e26e63ef | |||
| 32614daebd | |||
| 6af9df79b2 | |||
| 075da66344 | |||
| e273433d19 | |||
| 2bec653b81 | |||
| 074dc2c58d | |||
| 1b12ccd180 | |||
| 8cf6134f8b | |||
| 8ba1878657 | |||
| d9f3fe186d | |||
| 032793d202 | |||
| 4e45ac6ef4 | |||
| 081ef1fd81 | |||
| 2696bc3704 | |||
| 67653cc0e8 | |||
| b4d95a68f1 | |||
| 0fe1acdabc | |||
| a7d56c29b5 | |||
| d83d510002 | |||
| b202573920 | |||
| 83bf68a64f | |||
| 02d68bc057 | |||
| 5571430e1b | |||
| e38da7eb95 | |||
| 976faee8a3 | |||
| bd6ce4ae25 |
@@ -10,15 +10,12 @@ jobs:
|
||||
# Editor
|
||||
editor-linux:
|
||||
name: Editor (Linux, Development x64)
|
||||
runs-on: "ubuntu-20.04"
|
||||
runs-on: "ubuntu-24.04"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
@@ -41,7 +38,7 @@ jobs:
|
||||
# Game
|
||||
game-linux:
|
||||
name: Game (Linux, Release x64)
|
||||
runs-on: "ubuntu-20.04"
|
||||
runs-on: "ubuntu-24.04"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
|
||||
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
|
||||
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
|
||||
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
# Linux
|
||||
package-linux-editor:
|
||||
name: Editor (Linux)
|
||||
runs-on: "ubuntu-20.04"
|
||||
runs-on: "ubuntu-24.04"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
@@ -86,9 +86,6 @@ jobs:
|
||||
git lfs pull
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
@@ -110,7 +107,7 @@ jobs:
|
||||
path: Output/FlaxEditorLinux.zip
|
||||
package-linux-game:
|
||||
name: Game (Linux)
|
||||
runs-on: "ubuntu-20.04"
|
||||
runs-on: "ubuntu-24.04"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
@@ -120,9 +117,6 @@ jobs:
|
||||
git lfs pull
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
# Tests on Linux
|
||||
tests-linux:
|
||||
name: Tests (Linux)
|
||||
runs-on: "ubuntu-20.04"
|
||||
runs-on: "ubuntu-24.04"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
@@ -28,9 +28,6 @@ jobs:
|
||||
git lfs pull
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -26,14 +26,12 @@ void PS_GBuffer(
|
||||
)
|
||||
{
|
||||
Light = float4(0, 0, 0, 1);
|
||||
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
// LOD masking
|
||||
ClipLODTransition(input);
|
||||
ClipLODTransition(materialInput);
|
||||
#endif
|
||||
|
||||
// Get material parameters
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
Material material = GetMaterialPS(materialInput);
|
||||
|
||||
// Masking
|
||||
|
||||
@@ -12,13 +12,12 @@
|
||||
META_PS(USE_DISTORTION, FEATURE_LEVEL_ES2)
|
||||
float4 PS_Distortion(PixelInput input) : SV_Target0
|
||||
{
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
// LOD masking
|
||||
ClipLODTransition(input);
|
||||
ClipLODTransition(materialInput);
|
||||
#endif
|
||||
|
||||
// Get material parameters
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
Material material = GetMaterialPS(materialInput);
|
||||
|
||||
// Masking
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "./Flax/ExponentialHeightFog.hlsl"
|
||||
@2// Forward Shading: Constants
|
||||
LightData DirectionalLight;
|
||||
LightShadowData DirectionalLightShadow;
|
||||
LightData SkyLight;
|
||||
ProbeData EnvironmentProbe;
|
||||
ExponentialHeightFogData ExponentialHeightFog;
|
||||
@@ -26,9 +25,9 @@ LightData LocalLights[MAX_LOCAL_LIGHTS];
|
||||
@3// Forward Shading: Resources
|
||||
TextureCube EnvProbe : register(t__SRV__);
|
||||
TextureCube SkyLightTexture : register(t__SRV__);
|
||||
Texture2DArray DirectionalLightShadowMap : register(t__SRV__);
|
||||
Buffer<float4> ShadowsBuffer : register(t__SRV__);
|
||||
Texture2D<float> ShadowMap : register(t__SRV__);
|
||||
@4// Forward Shading: Utilities
|
||||
DECLARE_LIGHTSHADOWDATA_ACCESS(DirectionalLightShadow);
|
||||
@5// Forward Shading: Shaders
|
||||
|
||||
// Pixel Shader function for Forward Pass
|
||||
@@ -39,14 +38,12 @@ void PS_Forward(
|
||||
)
|
||||
{
|
||||
output = 0;
|
||||
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
// LOD masking
|
||||
ClipLODTransition(input);
|
||||
ClipLODTransition(materialInput);
|
||||
#endif
|
||||
|
||||
// Get material parameters
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
Material material = GetMaterialPS(materialInput);
|
||||
|
||||
// Masking
|
||||
@@ -80,11 +77,8 @@ void PS_Forward(
|
||||
|
||||
// Calculate lighting from a single directional light
|
||||
float4 shadowMask = 1.0f;
|
||||
if (DirectionalLight.CastShadows > 0)
|
||||
{
|
||||
LightShadowData directionalLightShadowData = GetDirectionalLightShadowData();
|
||||
shadowMask.r = SampleShadow(DirectionalLight, directionalLightShadowData, DirectionalLightShadowMap, gBuffer, shadowMask.g);
|
||||
}
|
||||
ShadowSample shadow = SampleDirectionalLightShadow(DirectionalLight, ShadowsBuffer, ShadowMap, gBuffer);
|
||||
shadowMask = GetShadowMask(shadow);
|
||||
float4 light = GetLighting(ViewPos, DirectionalLight, gBuffer, shadowMask, false, false);
|
||||
|
||||
// Calculate lighting from sky light
|
||||
@@ -125,6 +119,20 @@ void PS_Forward(
|
||||
float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb;
|
||||
reflections = lerp(reflections, screenColor, hit.z);
|
||||
}
|
||||
|
||||
// Fallback to software tracing if possible
|
||||
#if USE_GLOBAL_SURFACE_ATLAS && CAN_USE_GLOBAL_SURFACE_ATLAS
|
||||
if (hit.z < REFLECTIONS_HIT_THRESHOLD)
|
||||
{
|
||||
float3 reflectWS = ScreenSpaceReflectionDirection(screenUV, gBuffer, ViewPos);
|
||||
float4 surfaceAtlas;
|
||||
if (TraceSDFSoftwareReflections(gBuffer, reflectWS, surfaceAtlas))
|
||||
{
|
||||
float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb;
|
||||
reflections = lerp(surfaceAtlas, float4(screenColor, 1), hit.z);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
light.rgb += reflections * GetReflectionSpecularLighting(ViewPos, gBuffer) * light.a;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#define CAN_USE_LIGHTMAP 1
|
||||
@1// Lightmap: Includes
|
||||
@2// Lightmap: Constants
|
||||
float4 LightmapArea;
|
||||
@3// Lightmap: Resources
|
||||
#if USE_LIGHTMAP
|
||||
// Irradiance and directionality prebaked lightmaps
|
||||
|
||||
@@ -11,14 +11,15 @@
|
||||
META_PS(true, FEATURE_LEVEL_ES2)
|
||||
float4 PS_MotionVectors(PixelInput input) : SV_Target0
|
||||
{
|
||||
#if USE_DITHERED_LOD_TRANSITION || MATERIAL_MASKED
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
// LOD masking
|
||||
ClipLODTransition(input);
|
||||
ClipLODTransition(materialInput);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MATERIAL_MASKED
|
||||
// Perform per pixel clipping if material requries it
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
Material material = GetMaterialPS(materialInput);
|
||||
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
@0// SDF Reflections: Defines
|
||||
#define USE_GLOBAL_SURFACE_ATLAS 1
|
||||
@1// SDF Reflections: Includes
|
||||
#include "./Flax/GlobalSignDistanceField.hlsl"
|
||||
#include "./Flax/GI/GlobalSurfaceAtlas.hlsl"
|
||||
@2// SDF Reflections: Constants
|
||||
GlobalSDFData GlobalSDF;
|
||||
GlobalSurfaceAtlasData GlobalSurfaceAtlas;
|
||||
@3// SDF Reflections: Resources
|
||||
Texture3D<snorm float> GlobalSDFTex : register(t__SRV__);
|
||||
Texture3D<snorm float> GlobalSDFMip : register(t__SRV__);
|
||||
ByteAddressBuffer GlobalSurfaceAtlasChunks : register(t__SRV__);
|
||||
ByteAddressBuffer RWGlobalSurfaceAtlasCulledObjects : register(t__SRV__);
|
||||
Buffer<float4> GlobalSurfaceAtlasObjects : register(t__SRV__);
|
||||
Texture2D GlobalSurfaceAtlasDepth : register(t__SRV__);
|
||||
Texture2D GlobalSurfaceAtlasTex : register(t__SRV__);
|
||||
@4// SDF Reflections: Utilities
|
||||
bool TraceSDFSoftwareReflections(GBufferSample gBuffer, float3 reflectWS, out float4 surfaceAtlas)
|
||||
{
|
||||
GlobalSDFTrace sdfTrace;
|
||||
float maxDistance = GLOBAL_SDF_WORLD_SIZE;
|
||||
sdfTrace.Init(gBuffer.WorldPos, reflectWS, 0.0f, maxDistance);
|
||||
GlobalSDFHit sdfHit = RayTraceGlobalSDF(GlobalSDF, GlobalSDFTex, GlobalSDFMip, sdfTrace, 2.0f);
|
||||
if (sdfHit.IsHit())
|
||||
{
|
||||
float3 hitPosition = sdfHit.GetHitPosition(sdfTrace);
|
||||
float surfaceThreshold = GetGlobalSurfaceAtlasThreshold(GlobalSDF, sdfHit);
|
||||
surfaceAtlas = SampleGlobalSurfaceAtlas(GlobalSurfaceAtlas, GlobalSurfaceAtlasChunks, RWGlobalSurfaceAtlasCulledObjects, GlobalSurfaceAtlasObjects, GlobalSurfaceAtlasDepth, GlobalSurfaceAtlasTex, hitPosition, -reflectWS, surfaceThreshold);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@5// SDF Reflections: Shaders
|
||||
@@ -33,8 +33,13 @@ struct TessalationDSToPS
|
||||
MaterialInput GetMaterialInput(TessalationDSToPS input)
|
||||
{
|
||||
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
|
||||
#if USE_PER_DRAW_CONSTANTS
|
||||
output.Object = LoadObject(ObjectsBuffer, input.Geometry.ObjectIndex);
|
||||
#else
|
||||
LoadObjectFromCB(output.Object);
|
||||
#endif
|
||||
output.SvPosition = input.Position;
|
||||
output.TwoSidedSign = WorldDeterminantSign;
|
||||
output.TwoSidedSign = output.Object.WorldDeterminantSign;
|
||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
output.CustomVSToPS = input.CustomVSToPS;
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ struct RibbonInput
|
||||
|
||||
// Primary constant buffer (with additional material parameters)
|
||||
META_CB_BEGIN(0, Data)
|
||||
float4x4 WorldMatrix;
|
||||
float4x3 WorldMatrix;
|
||||
uint SortedIndicesOffset;
|
||||
float PerInstanceRandom;
|
||||
int ParticleStride;
|
||||
@@ -45,7 +45,7 @@ int RibbonWidthOffset;
|
||||
int RibbonTwistOffset;
|
||||
int RibbonFacingVectorOffset;
|
||||
uint RibbonSegmentCount;
|
||||
float4x4 WorldMatrixInverseTransposed;
|
||||
float4x3 WorldMatrixInverseTransposed;
|
||||
@1META_CB_END
|
||||
|
||||
// Particles attributes buffer
|
||||
@@ -138,7 +138,7 @@ MaterialInput GetMaterialInput(PixelInput input)
|
||||
#if USE_INSTANCING
|
||||
#define GetInstanceTransform(input) float4x4(float4(input.InstanceTransform1.xyz, 0.0f), float4(input.InstanceTransform2.xyz, 0.0f), float4(input.InstanceTransform3.xyz, 0.0f), float4(input.InstanceOrigin.xyz, 1.0f))
|
||||
#else
|
||||
#define GetInstanceTransform(input) WorldMatrix;
|
||||
#define GetInstanceTransform(input) ToMatrix4x4(WorldMatrix);
|
||||
#endif
|
||||
|
||||
// Removes the scale vector from the local to world transformation matrix (supports instancing)
|
||||
@@ -264,12 +264,12 @@ float4 GetParticleVec4(uint particleIndex, int offset)
|
||||
|
||||
float3 TransformParticlePosition(float3 input)
|
||||
{
|
||||
return mul(float4(input, 1.0f), WorldMatrix).xyz;
|
||||
return mul(float4(input, 1.0f), ToMatrix4x4(WorldMatrix)).xyz;
|
||||
}
|
||||
|
||||
float3 TransformParticleVector(float3 input)
|
||||
{
|
||||
return mul(float4(input, 0.0f), WorldMatrixInverseTransposed).xyz;
|
||||
return mul(float4(input, 0.0f), ToMatrix4x4(WorldMatrixInverseTransposed)).xyz;
|
||||
}
|
||||
|
||||
@8
|
||||
@@ -333,7 +333,7 @@ VertexOutput VS_Sprite(SpriteInput input, uint particleIndex : SV_InstanceID)
|
||||
float2 spriteSize = GetParticleVec2(particleIndex, SpriteSizeOffset);
|
||||
int spriteFacingMode = SpriteFacingModeOffset != -1 ? GetParticleInt(particleIndex, SpriteFacingModeOffset) : -1;
|
||||
|
||||
float4x4 world = WorldMatrix;
|
||||
float4x4 world = ToMatrix4x4(WorldMatrix);
|
||||
float3x3 eulerMatrix = EulerMatrix(radians(particleRotation));
|
||||
float3x3 viewRot = transpose((float3x3)ViewMatrix);
|
||||
float3 position = mul(float4(particlePosition, 1), world).xyz;
|
||||
@@ -463,11 +463,12 @@ VertexOutput VS_Model(ModelInput input, uint particleIndex : SV_InstanceID)
|
||||
}
|
||||
|
||||
// Read particle data
|
||||
float4x4 worldMatrix = ToMatrix4x4(WorldMatrix);
|
||||
float3 particlePosition = GetParticleVec3(particleIndex, PositionOffset);
|
||||
float3 particleScale = GetParticleVec3(particleIndex, ScaleOffset);
|
||||
float3 particleRotation = GetParticleVec3(particleIndex, RotationOffset);
|
||||
int modelFacingMode = ModelFacingModeOffset != -1 ? GetParticleInt(particleIndex, ModelFacingModeOffset) : -1;
|
||||
float3 position = mul(float4(particlePosition, 1), WorldMatrix).xyz;
|
||||
float3 position = mul(float4(particlePosition, 1), worldMatrix).xyz;
|
||||
|
||||
// Compute final vertex position in the world
|
||||
float3x3 eulerMatrix = EulerMatrix(radians(particleRotation));
|
||||
@@ -506,7 +507,7 @@ VertexOutput VS_Model(ModelInput input, uint particleIndex : SV_InstanceID)
|
||||
world = mul(world, scaleMatrix);
|
||||
}
|
||||
world = transpose(world);
|
||||
world = mul(world, WorldMatrix);
|
||||
world = mul(world, worldMatrix);
|
||||
|
||||
// Calculate the vertex position in world space
|
||||
output.WorldPosition = mul(float4(input.Position, 1), world).xyz;
|
||||
@@ -520,12 +521,12 @@ VertexOutput VS_Model(ModelInput input, uint particleIndex : SV_InstanceID)
|
||||
#if USE_VERTEX_COLOR
|
||||
output.VertexColor = input.Color;
|
||||
#endif
|
||||
output.InstanceOrigin = WorldMatrix[3].xyz;
|
||||
output.InstanceOrigin = worldMatrix[3].xyz;
|
||||
output.InstanceParams = PerInstanceRandom;
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
half3x3 tangentToLocal = CalcTangentToLocal(input);
|
||||
half3x3 tangentToWorld = CalcTangentToWorld(WorldMatrix, tangentToLocal);
|
||||
half3x3 tangentToWorld = CalcTangentToWorld(worldMatrix, tangentToLocal);
|
||||
output.TBN = tangentToWorld;
|
||||
|
||||
// Get material input params if need to evaluate any material property
|
||||
@@ -625,12 +626,13 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
|
||||
#if USE_VERTEX_COLOR
|
||||
output.VertexColor = 1;
|
||||
#endif
|
||||
output.InstanceOrigin = WorldMatrix[3].xyz;
|
||||
float4x4 world = ToMatrix4x4(WorldMatrix);
|
||||
output.InstanceOrigin = world[3].xyz;
|
||||
output.InstanceParams = PerInstanceRandom;
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
half3x3 tangentToLocal = float3x3(tangentRight, tangentUp, cross(tangentRight, tangentUp));
|
||||
half3x3 tangentToWorld = CalcTangentToWorld(WorldMatrix, tangentToLocal);
|
||||
half3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
|
||||
output.TBN = tangentToWorld;
|
||||
|
||||
// Get material input params if need to evaluate any material property
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#define MATERIAL 1
|
||||
#define USE_PER_VIEW_CONSTANTS 1
|
||||
#define USE_PER_DRAW_CONSTANTS 1
|
||||
@3
|
||||
#include "./Flax/Common.hlsl"
|
||||
#include "./Flax/MaterialCommon.hlsl"
|
||||
@@ -10,17 +11,19 @@
|
||||
@7
|
||||
// Primary constant buffer (with additional material parameters)
|
||||
META_CB_BEGIN(0, Data)
|
||||
float4x4 WorldMatrix;
|
||||
float4x4 PrevWorldMatrix;
|
||||
float2 Dummy0;
|
||||
float LODDitherFactor;
|
||||
float PerInstanceRandom;
|
||||
float3 GeometrySize;
|
||||
float WorldDeterminantSign;
|
||||
@1META_CB_END
|
||||
|
||||
// Shader resources
|
||||
@2
|
||||
Buffer<float4> ObjectsBuffer : register(t0);
|
||||
#if USE_SKINNING
|
||||
// The skeletal bones matrix buffer (stored as 4x3, 3 float4 behind each other)
|
||||
Buffer<float4> BoneMatrices : register(t1);
|
||||
#if PER_BONE_MOTION_BLUR
|
||||
// The skeletal bones matrix buffer from the previous frame
|
||||
Buffer<float4> PrevBoneMatrices : register(t2);
|
||||
#endif
|
||||
#endif
|
||||
// Geometry data passed though the graphics rendering stages up to the pixel shader
|
||||
struct GeometryData
|
||||
{
|
||||
@@ -32,12 +35,8 @@ struct GeometryData
|
||||
#endif
|
||||
float3 WorldNormal : TEXCOORD3;
|
||||
float4 WorldTangent : TEXCOORD4;
|
||||
nointerpolation float3 InstanceOrigin : TEXCOORD5;
|
||||
nointerpolation float2 InstanceParams : TEXCOORD6; // x-PerInstanceRandom, y-LODDitherFactor
|
||||
float3 PrevWorldPosition : TEXCOORD7;
|
||||
nointerpolation float3 InstanceTransform1 : TEXCOORD8;
|
||||
nointerpolation float3 InstanceTransform2 : TEXCOORD9;
|
||||
nointerpolation float3 InstanceTransform3 : TEXCOORD10;
|
||||
nointerpolation uint ObjectIndex : TEXCOORD8;
|
||||
};
|
||||
|
||||
// Interpolants passed from the vertex shader
|
||||
@@ -80,11 +79,8 @@ struct MaterialInput
|
||||
float4 SvPosition;
|
||||
float3 PreSkinnedPosition;
|
||||
float3 PreSkinnedNormal;
|
||||
float3 InstanceOrigin;
|
||||
float2 InstanceParams;
|
||||
float3 InstanceTransform1;
|
||||
float3 InstanceTransform2;
|
||||
float3 InstanceTransform3;
|
||||
uint ObjectIndex;
|
||||
ObjectData Object;
|
||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT];
|
||||
#endif
|
||||
@@ -103,11 +99,7 @@ MaterialInput GetGeometryMaterialInput(GeometryData geometry)
|
||||
output.VertexColor = geometry.VertexColor;
|
||||
#endif
|
||||
output.TBN = CalcTangentBasis(geometry.WorldNormal, geometry.WorldTangent);
|
||||
output.InstanceOrigin = geometry.InstanceOrigin;
|
||||
output.InstanceParams = geometry.InstanceParams;
|
||||
output.InstanceTransform1 = geometry.InstanceTransform1;
|
||||
output.InstanceTransform2 = geometry.InstanceTransform2;
|
||||
output.InstanceTransform3 = geometry.InstanceTransform3;
|
||||
output.ObjectIndex = geometry.ObjectIndex;
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -143,11 +135,7 @@ GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, flo
|
||||
output.WorldNormal = normalize(output.WorldNormal);
|
||||
output.WorldTangent = p0.WorldTangent * w0 + p1.WorldTangent * w1 + p2.WorldTangent * w2;
|
||||
output.WorldTangent.xyz = normalize(output.WorldTangent.xyz);
|
||||
output.InstanceOrigin = p0.InstanceOrigin;
|
||||
output.InstanceParams = p0.InstanceParams;
|
||||
output.InstanceTransform1 = p0.InstanceTransform1;
|
||||
output.InstanceTransform2 = p0.InstanceTransform2;
|
||||
output.InstanceTransform3 = p0.InstanceTransform3;
|
||||
output.ObjectIndex = p0.ObjectIndex;
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -156,7 +144,8 @@ GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, flo
|
||||
MaterialInput GetMaterialInput(PixelInput input)
|
||||
{
|
||||
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
|
||||
output.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
|
||||
output.Object = LoadObject(ObjectsBuffer, input.Geometry.ObjectIndex);
|
||||
output.TwoSidedSign = output.Object.WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
|
||||
output.SvPosition = input.Position;
|
||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
output.CustomVSToPS = input.CustomVSToPS;
|
||||
@@ -164,16 +153,6 @@ MaterialInput GetMaterialInput(PixelInput input)
|
||||
return output;
|
||||
}
|
||||
|
||||
// Gets the local to world transform matrix
|
||||
#define GetInstanceTransform(input) float4x4(float4(input.InstanceTransform1.xyz, 0.0f), float4(input.InstanceTransform2.xyz, 0.0f), float4(input.InstanceTransform3.xyz, 0.0f), float4(input.InstanceOrigin.xyz, 1.0f))
|
||||
|
||||
// Extarcts the world matrix and instancce transform vector
|
||||
#if USE_INSTANCING
|
||||
#define CalculateInstanceTransform(input) float4x4 world = GetInstanceTransform(input); output.Geometry.InstanceTransform1 = input.InstanceTransform1.xyz; output.Geometry.InstanceTransform2 = input.InstanceTransform2.xyz; output.Geometry.InstanceTransform3 = input.InstanceTransform3.xyz;
|
||||
#else
|
||||
#define CalculateInstanceTransform(input) float4x4 world = WorldMatrix; output.Geometry.InstanceTransform1 = world[0].xyz; output.Geometry.InstanceTransform2 = world[1].xyz; output.Geometry.InstanceTransform3 = world[2].xyz;
|
||||
#endif
|
||||
|
||||
// Removes the scale vector from the local to world transformation matrix (supports instancing)
|
||||
float3x3 RemoveScaleFromLocalToWorld(float3x3 localToWorld)
|
||||
{
|
||||
@@ -218,7 +197,7 @@ float3 TransformViewVectorToWorld(MaterialInput input, float3 viewVector)
|
||||
// Transforms a vector from local space to world space
|
||||
float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
|
||||
{
|
||||
float3x3 localToWorld = (float3x3)GetInstanceTransform(input);
|
||||
float3x3 localToWorld = (float3x3)input.Object.WorldMatrix;
|
||||
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
|
||||
return mul(localVector, localToWorld);
|
||||
}
|
||||
@@ -226,7 +205,7 @@ float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
|
||||
// Transforms a vector from local space to world space
|
||||
float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
|
||||
{
|
||||
float3x3 localToWorld = (float3x3)GetInstanceTransform(input);
|
||||
float3x3 localToWorld = (float3x3)input.Object.WorldMatrix;
|
||||
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
|
||||
return mul(localToWorld, worldVector);
|
||||
}
|
||||
@@ -234,30 +213,26 @@ float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
|
||||
// Gets the current object position (supports instancing)
|
||||
float3 GetObjectPosition(MaterialInput input)
|
||||
{
|
||||
return input.InstanceOrigin.xyz;
|
||||
return input.Object.WorldMatrix[3].xyz;
|
||||
}
|
||||
|
||||
// Gets the current object size (supports instancing)
|
||||
float3 GetObjectSize(MaterialInput input)
|
||||
{
|
||||
float4x4 world = GetInstanceTransform(input);
|
||||
return GeometrySize * float3(world._m00, world._m11, world._m22);
|
||||
float4x4 world = input.Object.WorldMatrix;
|
||||
return input.Object.GeometrySize * float3(world._m00, world._m11, world._m22);
|
||||
}
|
||||
|
||||
// Get the current object random value (supports instancing)
|
||||
float GetPerInstanceRandom(MaterialInput input)
|
||||
{
|
||||
return input.InstanceParams.x;
|
||||
return input.Object.PerInstanceRandom;
|
||||
}
|
||||
|
||||
// Get the current object LOD transition dither factor (supports instancing)
|
||||
float GetLODDitherFactor(MaterialInput input)
|
||||
{
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
return input.InstanceParams.y;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
return input.Object.LODDitherFactor;
|
||||
}
|
||||
|
||||
// Gets the interpolated vertex color (in linear space)
|
||||
@@ -316,19 +291,22 @@ META_VS_IN_ELEMENT(NORMAL, 0, R10G10B10A2_UNORM, 1, ALIGN, PER_VERTEX, 0, true
|
||||
META_VS_IN_ELEMENT(TANGENT, 0, R10G10B10A2_UNORM, 1, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(TEXCOORD, 1, R16G16_FLOAT, 1, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(COLOR, 0, R8G8B8A8_UNORM, 2, 0, PER_VERTEX, 0, USE_VERTEX_COLOR)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,0, R32G32B32A32_FLOAT,3, 0, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,1, R32G32B32A32_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,2, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,3, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,4, R16G16B16A16_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,0, R32_UINT, 3, 0, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
VertexOutput VS(ModelInput input)
|
||||
{
|
||||
VertexOutput output;
|
||||
|
||||
// Load object data
|
||||
#if USE_INSTANCING
|
||||
output.Geometry.ObjectIndex = input.ObjectIndex;
|
||||
#else
|
||||
output.Geometry.ObjectIndex = DrawObjectIndex;
|
||||
#endif
|
||||
ObjectData object = LoadObject(ObjectsBuffer, output.Geometry.ObjectIndex);
|
||||
|
||||
// Compute world space vertex position
|
||||
CalculateInstanceTransform(input);
|
||||
output.Geometry.WorldPosition = mul(float4(input.Position.xyz, 1), world).xyz;
|
||||
output.Geometry.PrevWorldPosition = mul(float4(input.Position.xyz, 1), PrevWorldMatrix).xyz;
|
||||
output.Geometry.WorldPosition = mul(float4(input.Position.xyz, 1), object.WorldMatrix).xyz;
|
||||
output.Geometry.PrevWorldPosition = mul(float4(input.Position.xyz, 1), object.PrevWorldMatrix).xyz;
|
||||
|
||||
// Compute clip space position
|
||||
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
|
||||
@@ -338,22 +316,15 @@ VertexOutput VS(ModelInput input)
|
||||
#if USE_VERTEX_COLOR
|
||||
output.Geometry.VertexColor = input.Color;
|
||||
#endif
|
||||
output.Geometry.InstanceOrigin = world[3].xyz;
|
||||
#if USE_INSTANCING
|
||||
output.Geometry.LightmapUV = input.LightmapUV * input.InstanceLightmapArea.zw + input.InstanceLightmapArea.xy;
|
||||
output.Geometry.InstanceParams = float2(input.InstanceOrigin.w, input.InstanceTransform1.w);
|
||||
#else
|
||||
#if CAN_USE_LIGHTMAP
|
||||
output.Geometry.LightmapUV = input.LightmapUV * LightmapArea.zw + LightmapArea.xy;
|
||||
output.Geometry.LightmapUV = input.LightmapUV * object.LightmapArea.zw + object.LightmapArea.xy;
|
||||
#else
|
||||
output.Geometry.LightmapUV = input.LightmapUV;
|
||||
#endif
|
||||
output.Geometry.InstanceParams = float2(PerInstanceRandom, LODDitherFactor);
|
||||
#endif
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
float3x3 tangentToLocal = CalcTangentToLocal(input);
|
||||
float3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
|
||||
float3x3 tangentToWorld = CalcTangentToWorld(object.WorldMatrix, tangentToLocal);
|
||||
output.Geometry.WorldNormal = tangentToWorld[2];
|
||||
output.Geometry.WorldTangent.xyz = tangentToWorld[0];
|
||||
output.Geometry.WorldTangent.w = input.Tangent.w ? -1.0f : +1.0f;
|
||||
@@ -361,10 +332,11 @@ VertexOutput VS(ModelInput input)
|
||||
// Get material input params if need to evaluate any material property
|
||||
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
MaterialInput materialInput = GetGeometryMaterialInput(output.Geometry);
|
||||
materialInput.TwoSidedSign = WorldDeterminantSign;
|
||||
materialInput.TwoSidedSign = object.WorldDeterminantSign;
|
||||
materialInput.SvPosition = output.Position;
|
||||
materialInput.PreSkinnedPosition = input.Position.xyz;
|
||||
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
|
||||
materialInput.Object = object;
|
||||
Material material = GetMaterialVS(materialInput);
|
||||
#endif
|
||||
|
||||
@@ -392,33 +364,27 @@ META_VS(true, FEATURE_LEVEL_ES2)
|
||||
META_PERMUTATION_1(USE_INSTANCING=0)
|
||||
META_PERMUTATION_1(USE_INSTANCING=1)
|
||||
META_VS_IN_ELEMENT(POSITION, 0, R32G32B32_FLOAT, 0, 0, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,0, R32G32B32A32_FLOAT,3, 0, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,1, R32G32B32A32_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,2, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,3, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,4, R16G16B16A16_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
META_VS_IN_ELEMENT(ATTRIBUTE,0, R32_UINT, 3, 0, PER_INSTANCE, 1, USE_INSTANCING)
|
||||
float4 VS_Depth(ModelInput_PosOnly input) : SV_Position
|
||||
{
|
||||
// Load object data
|
||||
#if USE_INSTANCING
|
||||
float4x4 world = GetInstanceTransform(input);
|
||||
uint objectIndex = input.ObjectIndex;
|
||||
#else
|
||||
float4x4 world = WorldMatrix;
|
||||
uint objectIndex = DrawObjectIndex;
|
||||
#endif
|
||||
float3 worldPosition = mul(float4(input.Position.xyz, 1), world).xyz;
|
||||
ObjectData object = LoadObject(ObjectsBuffer, objectIndex);
|
||||
|
||||
// Transform vertex position into the screen
|
||||
float3 worldPosition = mul(float4(input.Position.xyz, 1), object.WorldMatrix).xyz;
|
||||
float4 position = mul(float4(worldPosition, 1), ViewProjectionMatrix);
|
||||
return position;
|
||||
}
|
||||
|
||||
#if USE_SKINNING
|
||||
|
||||
// The skeletal bones matrix buffer (stored as 4x3, 3 float4 behind each other)
|
||||
Buffer<float4> BoneMatrices : register(t0);
|
||||
|
||||
#if PER_BONE_MOTION_BLUR
|
||||
|
||||
// The skeletal bones matrix buffer from the previous frame
|
||||
Buffer<float4> PrevBoneMatrices : register(t1);
|
||||
|
||||
float3x4 GetPrevBoneMatrix(int index)
|
||||
{
|
||||
float4 a = PrevBoneMatrices[index * 3];
|
||||
@@ -497,6 +463,10 @@ META_VS_IN_ELEMENT(BLENDWEIGHT, 0, R16G16B16A16_FLOAT,0, ALIGN, PER_VERTEX, 0,
|
||||
VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
{
|
||||
VertexOutput output;
|
||||
|
||||
// Load object data
|
||||
output.Geometry.ObjectIndex = DrawObjectIndex;
|
||||
ObjectData object = LoadObject(ObjectsBuffer, output.Geometry.ObjectIndex);
|
||||
|
||||
// Perform skinning
|
||||
float3x4 boneMatrix = GetBoneMatrix(input);
|
||||
@@ -504,13 +474,12 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
float3x3 tangentToLocal = SkinTangents(input, boneMatrix);
|
||||
|
||||
// Compute world space vertex position
|
||||
CalculateInstanceTransform(input);
|
||||
output.Geometry.WorldPosition = mul(float4(position, 1), world).xyz;
|
||||
output.Geometry.WorldPosition = mul(float4(position, 1), object.WorldMatrix).xyz;
|
||||
#if PER_BONE_MOTION_BLUR
|
||||
float3 prevPosition = SkinPrevPosition(input);
|
||||
output.Geometry.PrevWorldPosition = mul(float4(prevPosition, 1), PrevWorldMatrix).xyz;
|
||||
output.Geometry.PrevWorldPosition = mul(float4(prevPosition, 1), object.PrevWorldMatrix).xyz;
|
||||
#else
|
||||
output.Geometry.PrevWorldPosition = mul(float4(position, 1), PrevWorldMatrix).xyz;
|
||||
output.Geometry.PrevWorldPosition = mul(float4(position, 1), object.PrevWorldMatrix).xyz;
|
||||
#endif
|
||||
|
||||
// Compute clip space position
|
||||
@@ -522,15 +491,9 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
output.Geometry.VertexColor = float4(0, 0, 0, 1);
|
||||
#endif
|
||||
output.Geometry.LightmapUV = float2(0, 0);
|
||||
output.Geometry.InstanceOrigin = world[3].xyz;
|
||||
#if USE_INSTANCING
|
||||
output.Geometry.InstanceParams = float2(input.InstanceOrigin.w, input.InstanceTransform1.w);
|
||||
#else
|
||||
output.Geometry.InstanceParams = float2(PerInstanceRandom, LODDitherFactor);
|
||||
#endif
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
float3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
|
||||
float3x3 tangentToWorld = CalcTangentToWorld(object.WorldMatrix, tangentToLocal);
|
||||
output.Geometry.WorldNormal = tangentToWorld[2];
|
||||
output.Geometry.WorldTangent.xyz = tangentToWorld[0];
|
||||
output.Geometry.WorldTangent.w = input.Tangent.w ? -1.0f : +1.0f;
|
||||
@@ -538,10 +501,11 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
// Get material input params if need to evaluate any material property
|
||||
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
MaterialInput materialInput = GetGeometryMaterialInput(output.Geometry);
|
||||
materialInput.TwoSidedSign = WorldDeterminantSign;
|
||||
materialInput.TwoSidedSign = object.WorldDeterminantSign;
|
||||
materialInput.SvPosition = output.Position;
|
||||
materialInput.PreSkinnedPosition = input.Position.xyz;
|
||||
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
|
||||
materialInput.Object = object;
|
||||
Material material = GetMaterialVS(materialInput);
|
||||
#endif
|
||||
|
||||
@@ -568,12 +532,12 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
|
||||
void ClipLODTransition(PixelInput input)
|
||||
void ClipLODTransition(MaterialInput input)
|
||||
{
|
||||
float ditherFactor = input.Geometry.InstanceParams.y;
|
||||
float ditherFactor = input.Object.LODDitherFactor;
|
||||
if (abs(ditherFactor) > 0.001)
|
||||
{
|
||||
float randGrid = cos(dot(floor(input.Position.xy), float2(347.83452793, 3343.28371863)));
|
||||
float randGrid = cos(dot(floor(input.SvPosition.xy), float2(347.83452793, 3343.28371863)));
|
||||
float randGridFrac = frac(randGrid * 1000.0);
|
||||
half mask = (ditherFactor < 0.0) ? (ditherFactor + 1.0 > randGridFrac) : (ditherFactor < randGridFrac);
|
||||
clip(mask - 0.001);
|
||||
@@ -586,14 +550,13 @@ void ClipLODTransition(PixelInput input)
|
||||
META_PS(true, FEATURE_LEVEL_ES2)
|
||||
void PS_Depth(PixelInput input)
|
||||
{
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
#if USE_DITHERED_LOD_TRANSITION
|
||||
// LOD masking
|
||||
ClipLODTransition(input);
|
||||
ClipLODTransition(materialInput);
|
||||
#endif
|
||||
|
||||
#if MATERIAL_MASKED || MATERIAL_BLEND != MATERIAL_BLEND_OPAQUE
|
||||
// Get material parameters
|
||||
MaterialInput materialInput = GetMaterialInput(input);
|
||||
Material material = GetMaterialPS(materialInput);
|
||||
|
||||
// Perform per pixel clipping
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#define MATERIAL 1
|
||||
#define USE_PER_VIEW_CONSTANTS 1
|
||||
#define LoadObjectFromCB(var) var = GetObject()
|
||||
@3
|
||||
// Enables/disables smooth terrain chunks LOD transitions (with morphing higher LOD near edges to the lower LOD in the neighbour)
|
||||
#define USE_SMOOTH_LOD_TRANSITION 1
|
||||
@@ -17,7 +18,7 @@
|
||||
@7
|
||||
// Primary constant buffer (with additional material parameters)
|
||||
META_CB_BEGIN(0, Data)
|
||||
float4x4 WorldMatrix;
|
||||
float4x3 WorldMatrix;
|
||||
float3 WorldInvScale;
|
||||
float WorldDeterminantSign;
|
||||
float PerInstanceRandom;
|
||||
@@ -28,6 +29,7 @@ float4 HeightmapUVScaleBias;
|
||||
float4 NeighborLOD;
|
||||
float2 OffsetUV;
|
||||
float2 Dummy0;
|
||||
float4 LightmapArea;
|
||||
@1META_CB_END
|
||||
|
||||
// Terrain data
|
||||
@@ -88,6 +90,7 @@ struct MaterialInput
|
||||
float3 PreSkinnedPosition;
|
||||
float3 PreSkinnedNormal;
|
||||
float HolesMask;
|
||||
ObjectData Object;
|
||||
#if USE_TERRAIN_LAYERS
|
||||
float4 Layers[TERRAIN_LAYERS_DATA_SIZE];
|
||||
#endif
|
||||
@@ -147,9 +150,23 @@ GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, flo
|
||||
|
||||
#endif
|
||||
|
||||
ObjectData GetObject()
|
||||
{
|
||||
ObjectData object = (ObjectData)0;
|
||||
object.WorldMatrix = ToMatrix4x4(WorldMatrix);
|
||||
object.PrevWorldMatrix = object.WorldMatrix;
|
||||
object.GeometrySize = float3(1, 1, 1);
|
||||
object.PerInstanceRandom = PerInstanceRandom;
|
||||
object.WorldDeterminantSign = WorldDeterminantSign;
|
||||
object.LODDitherFactor = 0.0f;
|
||||
object.LightmapArea = LightmapArea;
|
||||
return object;
|
||||
}
|
||||
|
||||
MaterialInput GetMaterialInput(PixelInput input)
|
||||
{
|
||||
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
|
||||
output.Object = GetObject();
|
||||
output.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
|
||||
output.SvPosition = input.Position;
|
||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
@@ -194,7 +211,7 @@ float3 TransformViewVectorToWorld(MaterialInput input, float3 viewVector)
|
||||
// Transforms a vector from local space to world space
|
||||
float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
|
||||
{
|
||||
float3x3 localToWorld = (float3x3)WorldMatrix;
|
||||
float3x3 localToWorld = (float3x3)ToMatrix4x4(WorldMatrix);
|
||||
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
|
||||
return mul(localVector, localToWorld);
|
||||
}
|
||||
@@ -202,7 +219,7 @@ float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
|
||||
// Transforms a vector from local space to world space
|
||||
float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
|
||||
{
|
||||
float3x3 localToWorld = (float3x3)WorldMatrix;
|
||||
float3x3 localToWorld = (float3x3)ToMatrix4x4(WorldMatrix);
|
||||
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
|
||||
return mul(localToWorld, worldVector);
|
||||
}
|
||||
@@ -210,7 +227,7 @@ float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
|
||||
// Gets the current object position
|
||||
float3 GetObjectPosition(MaterialInput input)
|
||||
{
|
||||
return WorldMatrix[3].xyz;
|
||||
return ToMatrix4x4(WorldMatrix)[3].xyz;
|
||||
}
|
||||
|
||||
// Gets the current object size
|
||||
@@ -365,7 +382,8 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
float3 position = float3(positionXZ.x, height, positionXZ.y);
|
||||
|
||||
// Compute world space vertex position
|
||||
output.Geometry.WorldPosition = mul(float4(position, 1), WorldMatrix).xyz;
|
||||
float4x4 worldMatrix = ToMatrix4x4(WorldMatrix);
|
||||
output.Geometry.WorldPosition = mul(float4(position, 1), worldMatrix).xyz;
|
||||
|
||||
// Compute clip space position
|
||||
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
|
||||
@@ -389,12 +407,13 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
|
||||
// Compute world space normal vector
|
||||
float3x3 tangentToLocal = CalcTangentBasisFromWorldNormal(normal);
|
||||
float3x3 tangentToWorld = CalcTangentToWorld(WorldMatrix, tangentToLocal);
|
||||
float3x3 tangentToWorld = CalcTangentToWorld(worldMatrix, tangentToLocal);
|
||||
output.Geometry.WorldNormal = tangentToWorld[2];
|
||||
|
||||
// Get material input params if need to evaluate any material property
|
||||
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
MaterialInput materialInput = (MaterialInput)0;
|
||||
materialInput.Object = GetObject();
|
||||
materialInput.WorldPosition = output.Geometry.WorldPosition;
|
||||
materialInput.TexCoord = output.Geometry.TexCoord;
|
||||
#if USE_LIGHTMAP
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
// Primary constant buffer (with additional material parameters)
|
||||
META_CB_BEGIN(0, Data)
|
||||
float4x4 InverseViewProjectionMatrix;
|
||||
float4x4 WorldMatrix;
|
||||
float4x4 WorldMatrixInverseTransposed;
|
||||
float4x3 WorldMatrix;
|
||||
float4x3 WorldMatrixInverseTransposed;
|
||||
float3 GridSize;
|
||||
float PerInstanceRandom;
|
||||
float Dummy0;
|
||||
@@ -49,7 +49,7 @@ struct MaterialInput
|
||||
#endif
|
||||
};
|
||||
|
||||
#define GetInstanceTransform(input) WorldMatrix;
|
||||
#define GetInstanceTransform(input) ToMatrix4x4(WorldMatrix);
|
||||
|
||||
// Removes the scale vector from the local to world transformation matrix (supports instancing)
|
||||
float3x3 RemoveScaleFromLocalToWorld(float3x3 localToWorld)
|
||||
@@ -170,12 +170,12 @@ float4 GetParticleVec4(uint particleIndex, int offset)
|
||||
|
||||
float3 TransformParticlePosition(float3 input)
|
||||
{
|
||||
return mul(float4(input, 1.0f), WorldMatrix).xyz;
|
||||
return mul(float4(input, 1.0f), ToMatrix4x4(WorldMatrix)).xyz;
|
||||
}
|
||||
|
||||
float3 TransformParticleVector(float3 input)
|
||||
{
|
||||
return mul(float4(input, 0.0f), WorldMatrixInverseTransposed).xyz;
|
||||
return mul(float4(input, 0.0f), ToMatrix4x4(WorldMatrixInverseTransposed)).xyz;
|
||||
}
|
||||
|
||||
@8
|
||||
@@ -219,7 +219,7 @@ void PS_VolumetricFog(Quad_GS2PS input, out float4 VBufferA : SV_Target0, out fl
|
||||
materialInput.ParticleIndex = ParticleIndex;
|
||||
materialInput.TBN = float3x3(float3(1, 0, 0), float3(0, 1, 0), float3(0, 0, 1));
|
||||
materialInput.TwoSidedSign = 1.0f;
|
||||
materialInput.InstanceOrigin = WorldMatrix[3].xyz;
|
||||
materialInput.InstanceOrigin = ToMatrix4x4(WorldMatrix)[3].xyz;
|
||||
materialInput.InstanceParams = PerInstanceRandom;
|
||||
materialInput.SvPosition = clipPos;
|
||||
Material material = GetMaterialPS(materialInput);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
%copyright%using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace %namespace%;
|
||||
@@ -13,10 +13,10 @@ API_CLASS() class %module%%class% : public ISerializable
|
||||
API_AUTO_SERIALIZATION();
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(%class%);
|
||||
public:
|
||||
// Custom float value.
|
||||
// Custom float value.
|
||||
API_FIELD(Attributes = "Range(0, 20), EditorOrder(0), EditorDisplay(\"Data\")")
|
||||
float FloatValue = 20.0f;
|
||||
// Custom vector data.
|
||||
// Custom vector data.
|
||||
API_FIELD(Attributes = "EditorOrder(1), EditorDisplay(\"Data\")")
|
||||
Vector3 Vector3Value = Vector3(0.1f);
|
||||
};
|
||||
|
||||
@@ -7,6 +7,6 @@ META_CB_END
|
||||
META_PS(true, FEATURE_LEVEL_ES2)
|
||||
float4 PS_Fullscreen(Quad_VS2PS input) : SV_Target
|
||||
{
|
||||
// Solid color fill from the constant buffer passed from code
|
||||
return Color;
|
||||
// Solid color fill from the constant buffer passed from code
|
||||
return Color;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3
-3
@@ -2,9 +2,9 @@
|
||||
"Name": "Flax",
|
||||
"Version": {
|
||||
"Major": 1,
|
||||
"Minor": 8,
|
||||
"Revision": 1,
|
||||
"Build": 6511
|
||||
"Minor": 9,
|
||||
"Revision": 0,
|
||||
"Build": 6605
|
||||
},
|
||||
"Company": "Flax",
|
||||
"Copyright": "Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.",
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=UNION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=UNION_005FMEMBER/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AI/@EntryIndexedValue">AI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ARGB/@EntryIndexedValue">ARGB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LO/@EntryIndexedValue">LO</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RPC/@EntryIndexedValue">RPC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SDK/@EntryIndexedValue">SDK</s:String>
|
||||
|
||||
@@ -124,3 +124,7 @@ Install `.NET SDK`, `NuGet package manager` and `NuGet targets and build tasks`
|
||||
Using Flax source code is strictly governed by the Flax Engine End User License Agreement. If you don't agree to those terms, as amended from time to time, you are not permitted to access or use Flax Engine.
|
||||
|
||||
We welcome any contributions to Flax Engine development through pull requests on GitHub. Most of our active development is in the master branch, so we prefer to take pull requests there (particularly for new features). We try to make sure that all new code adheres to the Flax coding standards. All contributions are governed by the terms of the [EULA](https://flaxengine.com/licensing/).
|
||||
|
||||
## SAST Tools
|
||||
|
||||
[PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using FlaxEditor.Scripting;
|
||||
@@ -94,30 +96,8 @@ public class AssetPickerValidator : IContentItemOwner
|
||||
/// </summary>
|
||||
public string SelectedPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string path = _selectedItem?.Path ?? _selected?.Path;
|
||||
if (path != null)
|
||||
{
|
||||
// Convert into path relative to the project (cross-platform)
|
||||
var projectFolder = Globals.ProjectFolder;
|
||||
if (path.StartsWith(projectFolder))
|
||||
path = path.Substring(projectFolder.Length + 1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
SelectedItem = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var path = StringUtils.IsRelative(value) ? Path.Combine(Globals.ProjectFolder, value) : value;
|
||||
SelectedItem = Editor.Instance.ContentDatabase.Find(path);
|
||||
}
|
||||
}
|
||||
get => Utilities.Utils.ToPathProject(_selectedItem?.Path ?? _selected?.Path);
|
||||
set => SelectedItem = string.IsNullOrEmpty(value) ? null : Editor.Instance.ContentDatabase.Find(Utilities.Utils.ToPathAbsolute(value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -242,7 +222,7 @@ public class AssetPickerValidator : IContentItemOwner
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AssetPickerValidator"/> class.
|
||||
/// </summary>
|
||||
/// <param name="assetType">The assets types that this picker accepts.</param>
|
||||
/// <param name="assetType">The asset types that this picker accepts.</param>
|
||||
public AssetPickerValidator(ScriptType assetType)
|
||||
{
|
||||
_type = assetType;
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
using Object = FlaxEngine.Object;
|
||||
|
||||
namespace FlaxEditor.Content.Create
|
||||
{
|
||||
/// <summary>
|
||||
/// Prefab asset creating handler. Allows to specify base actor to use as the root.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class PrefabCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// The create options.
|
||||
/// </summary>
|
||||
public class Options
|
||||
{
|
||||
/// <summary>
|
||||
/// The root actor.
|
||||
/// </summary>
|
||||
[TypeReference(typeof(FlaxEngine.Actor), nameof(IsValid))]
|
||||
[Tooltip("The actor type of the root of the new Prefab.")]
|
||||
public Type RootActorType = typeof(EmptyActor);
|
||||
|
||||
private static bool IsValid(Type type)
|
||||
{
|
||||
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Options _options = new Options();
|
||||
|
||||
/// <inheritdoc />
|
||||
public override object Settings => _options;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PrefabCreateEntry"/> class.
|
||||
/// </summary>
|
||||
/// <param name="resultUrl">The result file url.</param>
|
||||
public PrefabCreateEntry(string resultUrl)
|
||||
: base("Settings", resultUrl)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool Create()
|
||||
{
|
||||
var actorType = new ScriptType(_options.RootActorType ?? typeof(EmptyActor));
|
||||
Actor actor;
|
||||
try
|
||||
{
|
||||
actor = actorType.CreateInstance() as Actor;
|
||||
Object.Destroy(actor, 20.0f);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Editor.LogError("Failed to create prefab with root actor type: " + actorType.Name);
|
||||
Editor.LogWarning(ex);
|
||||
return true;
|
||||
}
|
||||
|
||||
return PrefabManager.CreatePrefab(actor, ResultUrl, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Widget asset creating handler. Allows to specify base UIControl to use as the root.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class WidgetCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// The create options.
|
||||
/// </summary>
|
||||
public class Options
|
||||
{
|
||||
/// <summary>
|
||||
/// Which mode is used to initialize this widget.
|
||||
/// </summary>
|
||||
public enum WidgetMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize the widget with a UICanvas.
|
||||
/// </summary>
|
||||
Canvas,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the widget with a UIControl.
|
||||
/// </summary>
|
||||
Control
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The mode used to initialize the widget.
|
||||
/// </summary>
|
||||
[Tooltip("Whether to initialize the widget with a canvas or a control.")]
|
||||
public WidgetMode WidgetInitializationMode = WidgetMode.Control;
|
||||
|
||||
bool ShowRoot => WidgetInitializationMode == WidgetMode.Control;
|
||||
|
||||
/// <summary>
|
||||
/// The root control.
|
||||
/// </summary>
|
||||
[TypeReference(typeof(Control), nameof(IsValid))]
|
||||
[Tooltip("The control type of the root of the new Widget's root control."), VisibleIf(nameof(ShowRoot))]
|
||||
public Type RootControlType = typeof(Button);
|
||||
|
||||
private static bool IsValid(Type type)
|
||||
{
|
||||
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Options _options = new Options();
|
||||
|
||||
/// <inheritdoc />
|
||||
public override object Settings => _options;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WidgetCreateEntry"/> class.
|
||||
/// </summary>
|
||||
/// <param name="resultUrl">The result file url.</param>
|
||||
public WidgetCreateEntry(string resultUrl)
|
||||
: base("Settings", resultUrl)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool Create()
|
||||
{
|
||||
Actor actor = null;
|
||||
|
||||
if (_options.WidgetInitializationMode == Options.WidgetMode.Control)
|
||||
{
|
||||
var controlType = new ScriptType(_options.RootControlType ?? typeof(Control));
|
||||
Control control;
|
||||
try
|
||||
{
|
||||
control = controlType.CreateInstance() as Control;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Editor.LogError("Failed to create widget with root control type: " + controlType.Name);
|
||||
Editor.LogWarning(ex);
|
||||
return true;
|
||||
}
|
||||
|
||||
actor = new UIControl
|
||||
{
|
||||
Control = control,
|
||||
Name = controlType.Name
|
||||
};
|
||||
}
|
||||
else if (_options.WidgetInitializationMode == Options.WidgetMode.Canvas)
|
||||
{
|
||||
actor = new UICanvas();
|
||||
}
|
||||
|
||||
if (actor == null)
|
||||
{
|
||||
Editor.LogError("Failed to create widget. Final actor was null.");
|
||||
return true;
|
||||
}
|
||||
Object.Destroy(actor, 20.0f);
|
||||
|
||||
return PrefabManager.CreatePrefab(actor, ResultUrl, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,8 @@ namespace FlaxEditor.Content.GUI
|
||||
private bool _isRubberBandSpanning;
|
||||
private Float2 _mousePressLocation;
|
||||
private Rectangle _rubberBandRectangle;
|
||||
private bool _isCutting;
|
||||
private List<ContentItem> _cutItems = new List<ContentItem>();
|
||||
|
||||
private bool _validDragOver;
|
||||
private DragActors _dragActors;
|
||||
@@ -83,9 +85,9 @@ namespace FlaxEditor.Content.GUI
|
||||
public event Action<List<ContentItem>> OnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// Called when user wants to paste the files/folders.
|
||||
/// Called when user wants to paste the files/folders. Bool is for cutting.
|
||||
/// </summary>
|
||||
public event Action<string[]> OnPaste;
|
||||
public event Action<string[], bool> OnPaste;
|
||||
|
||||
/// <summary>
|
||||
/// Called when user wants to duplicate the item(s).
|
||||
@@ -210,6 +212,12 @@ namespace FlaxEditor.Content.GUI
|
||||
}),
|
||||
new InputActionsContainer.Binding(options => options.Copy, Copy),
|
||||
new InputActionsContainer.Binding(options => options.Paste, Paste),
|
||||
new InputActionsContainer.Binding(options => options.Cut, Cut),
|
||||
new InputActionsContainer.Binding(options => options.Undo, () =>
|
||||
{
|
||||
if (_isCutting)
|
||||
UpdateContentItemCut(false);
|
||||
}),
|
||||
new InputActionsContainer.Binding(options => options.Duplicate, Duplicate),
|
||||
});
|
||||
}
|
||||
@@ -462,6 +470,7 @@ namespace FlaxEditor.Content.GUI
|
||||
/// </summary>
|
||||
public void Duplicate()
|
||||
{
|
||||
UpdateContentItemCut(false);
|
||||
OnDuplicate?.Invoke(_selection);
|
||||
}
|
||||
|
||||
@@ -475,6 +484,7 @@ namespace FlaxEditor.Content.GUI
|
||||
|
||||
var files = _selection.ConvertAll(x => x.Path).ToArray();
|
||||
Clipboard.Files = files;
|
||||
UpdateContentItemCut(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -496,7 +506,36 @@ namespace FlaxEditor.Content.GUI
|
||||
if (files == null || files.Length == 0)
|
||||
return;
|
||||
|
||||
OnPaste?.Invoke(files);
|
||||
OnPaste?.Invoke(files, _isCutting);
|
||||
UpdateContentItemCut(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cuts the items.
|
||||
/// </summary>
|
||||
public void Cut()
|
||||
{
|
||||
Copy();
|
||||
UpdateContentItemCut(true);
|
||||
}
|
||||
|
||||
private void UpdateContentItemCut(bool cut)
|
||||
{
|
||||
_isCutting = cut;
|
||||
|
||||
// Add selection to cut list
|
||||
if (cut)
|
||||
_cutItems.AddRange(_selection);
|
||||
|
||||
// Update item with if it is being cut.
|
||||
foreach (var item in _cutItems)
|
||||
{
|
||||
item.IsBeingCut = cut;
|
||||
}
|
||||
|
||||
// Clean up cut items
|
||||
if (!cut)
|
||||
_cutItems.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -58,10 +58,10 @@ namespace FlaxEngine.Tools
|
||||
FieldInfo[] fields = typeof(CustomMaxSizes).GetFields();
|
||||
for (int i = 0; i < fields.Length; i++)
|
||||
{
|
||||
var field = fields[i];
|
||||
if (field.Name.Equals("value__"))
|
||||
var @field = fields[i];
|
||||
if (@field.Name.Equals("value__"))
|
||||
continue;
|
||||
if (value == (int)field.GetRawConstantValue())
|
||||
if (value == (int)@field.GetRawConstantValue())
|
||||
return (CustomMaxSizes)value;
|
||||
}
|
||||
return CustomMaxSizes._8192;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace FlaxEditor.Content
|
||||
// Translate asset type name
|
||||
var typeName = TypeName;
|
||||
string[] typeNamespaces = typeName.Split('.');
|
||||
if (typeNamespaces.Length != 0 && typeNamespaces.Length != 0)
|
||||
if (typeNamespaces.Length != 0 && typeNamespaces[typeNamespaces.Length - 1].Length != 0)
|
||||
{
|
||||
typeName = Utilities.Utils.GetPropertyNameUI(typeNamespaces[typeNamespaces.Length - 1]);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using FlaxEngine;
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains C# script file with source code.
|
||||
/// Content item that contains C# file with source code.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.ScriptItem" />
|
||||
public class CSharpScriptItem : ScriptItem
|
||||
|
||||
@@ -182,6 +182,11 @@ namespace FlaxEditor.Content
|
||||
/// </summary>
|
||||
public const int DefaultHeight = (DefaultThumbnailSize + 2 * DefaultMarginSize + DefaultTextHeight);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the item is being but.
|
||||
/// </summary>
|
||||
public bool IsBeingCut;
|
||||
|
||||
private ContentFolder _parentFolder;
|
||||
|
||||
private bool _isMouseDown;
|
||||
@@ -383,7 +388,7 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
sb.Append("Type: ").Append(TypeDescription).AppendLine();
|
||||
if (File.Exists(Path))
|
||||
sb.Append("Size: ").Append(Utilities.Utils.FormatBytesCount((int)new FileInfo(Path).Length)).AppendLine();
|
||||
sb.Append("Size: ").Append(Utilities.Utils.FormatBytesCount((ulong)new FileInfo(Path).Length)).AppendLine();
|
||||
sb.Append("Path: ").Append(Utilities.Utils.GetAssetNamePathWithExt(Path)).AppendLine();
|
||||
}
|
||||
|
||||
@@ -747,6 +752,12 @@ namespace FlaxEditor.Content
|
||||
Render2D.PushClip(ref textRect);
|
||||
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 1f, 0.95f);
|
||||
Render2D.PopClip();
|
||||
|
||||
if (IsBeingCut)
|
||||
{
|
||||
var color = style.LightBackground.AlphaMultiplied(0.5f);
|
||||
Render2D.FillRectangle(clientRect, color);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace FlaxEditor.Content
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class PrefabItem : JsonAssetItem
|
||||
{
|
||||
private string _cachedTypeDescription = null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PrefabItem"/> class.
|
||||
/// </summary>
|
||||
@@ -42,6 +44,26 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => SpriteHandle.Invalid;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string TypeDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_cachedTypeDescription == null)
|
||||
{
|
||||
_cachedTypeDescription = "Prefab";
|
||||
var prefab = FlaxEngine.Content.Load<Prefab>(ID);
|
||||
if (prefab)
|
||||
{
|
||||
Actor root = prefab.GetDefaultInstance();
|
||||
if (root is UIControl or UICanvas)
|
||||
_cachedTypeDescription = "Widget";
|
||||
}
|
||||
}
|
||||
return _cachedTypeDescription;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsOfType(Type type)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains video media file.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class VideoItem : FileItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VideoItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The file path.</param>
|
||||
public VideoItem(string path)
|
||||
: base(path)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string TypeDescription => "Video";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document128;
|
||||
}
|
||||
}
|
||||
@@ -100,12 +100,16 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public object GetValue(object obj)
|
||||
{
|
||||
if (!_type.Asset)
|
||||
throw new TargetException("Missing Visual Script asset.");
|
||||
return _type.Asset.GetScriptInstanceParameterValue(_parameter.Name, (Object)obj);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void SetValue(object obj, object value)
|
||||
{
|
||||
if (!_type.Asset)
|
||||
throw new TargetException("Missing Visual Script asset.");
|
||||
_type.Asset.SetScriptInstanceParameterValue(_parameter.Name, (Object)obj, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,7 @@ namespace FlaxEditor.Content
|
||||
/// <summary>
|
||||
/// Determines whether [is virtual proxy].
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// <c>true</c> if [is virtual proxy]; otherwise, <c>false</c>.
|
||||
/// </returns>
|
||||
/// <returns><c>true</c> if [is virtual proxy]; otherwise, <c>false</c>.</returns>
|
||||
public bool IsVirtualProxy()
|
||||
{
|
||||
return IsVirtual && CanExport == false;
|
||||
|
||||
+51
-9
@@ -9,19 +9,15 @@ using FlaxEngine;
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Context proxy object for C# script files.
|
||||
/// Proxy object for C# files
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||
[ContentContextMenu("New/C# Script")]
|
||||
public class CSharpScriptProxy : ScriptProxy
|
||||
/// /// <seealso cref="FlaxEditor.Content.ScriptProxy" />
|
||||
public abstract class CSharpProxy : ScriptProxy
|
||||
{
|
||||
/// <summary>
|
||||
/// The script files extension filter.
|
||||
/// </summary>
|
||||
public static readonly string ExtensionFiler = "*.cs";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "C# Script";
|
||||
public static readonly string ExtensionFilter = "*.cs";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsProxyFor(ContentItem item)
|
||||
@@ -29,11 +25,23 @@ namespace FlaxEditor.Content
|
||||
return item is CSharpScriptItem;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path for the C# template.
|
||||
/// </summary>
|
||||
/// <param name="path">The path to the template</param>
|
||||
protected abstract void GetTemplatePath(out string path);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ContentItem ConstructItem(string path)
|
||||
{
|
||||
return new CSharpScriptItem(path);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Create(string outputPath, object arg)
|
||||
{
|
||||
// Load template
|
||||
var templatePath = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.cs");
|
||||
GetTemplatePath(out var templatePath);
|
||||
var scriptTemplate = File.ReadAllText(templatePath);
|
||||
|
||||
// Find the module that this script is being added (based on the path)
|
||||
@@ -63,4 +71,38 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override Color AccentColor => Color.FromRGB(0x1c9c2b);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Context proxy object for C# script files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpProxy" />
|
||||
[ContentContextMenu("New/C#/C# Script")]
|
||||
public class CSharpScriptProxy : CSharpProxy
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "C# Script";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void GetTemplatePath(out string path)
|
||||
{
|
||||
path = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.cs");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Context proxy object for empty C# files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpProxy" />
|
||||
[ContentContextMenu("New/C#/C# Empty File")]
|
||||
public class CSharpEmptyProxy : CSharpProxy
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "C# Empty File";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void GetTemplatePath(out string path)
|
||||
{
|
||||
path = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/CSharpEmptyTemplate.cs");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,16 @@ namespace FlaxEditor.Content
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs the item for the file.
|
||||
/// </summary>
|
||||
/// <param name="path">The file path.</param>
|
||||
/// <returns>Created item or null.</returns>
|
||||
public virtual ContentItem ConstructItem(string path)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this proxy if for assets.
|
||||
/// </summary>
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace FlaxEditor.Content
|
||||
/// <summary>
|
||||
/// Context proxy object for C++ files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||
/// <seealso cref="FlaxEditor.Content.ScriptProxy" />
|
||||
public abstract class CppProxy : ScriptProxy
|
||||
{
|
||||
/// <summary>
|
||||
@@ -74,7 +74,7 @@ namespace FlaxEditor.Content
|
||||
/// <summary>
|
||||
/// Context proxy object for C++ script files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||
/// <seealso cref="FlaxEditor.Content.CppProxy" />
|
||||
[ContentContextMenu("New/C++/C++ Script")]
|
||||
public class CppScriptProxy : CppProxy
|
||||
{
|
||||
@@ -87,6 +87,12 @@ namespace FlaxEditor.Content
|
||||
return item is CppScriptItem;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ContentItem ConstructItem(string path)
|
||||
{
|
||||
return new CppScriptItem(path);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void GetTemplatePaths(out string headerTemplate, out string sourceTemplate)
|
||||
{
|
||||
@@ -98,7 +104,7 @@ namespace FlaxEditor.Content
|
||||
/// <summary>
|
||||
/// Context proxy object for C++ Json Asset files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||
/// <seealso cref="FlaxEditor.Content.CppProxy" />
|
||||
[ContentContextMenu("New/C++/C++ Function Library")]
|
||||
public class CppStaticClassProxy : CppProxy
|
||||
{
|
||||
@@ -116,7 +122,7 @@ namespace FlaxEditor.Content
|
||||
/// <summary>
|
||||
/// Context proxy object for C++ Json Asset files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||
/// <seealso cref="FlaxEditor.Content.CppProxy" />
|
||||
[ContentContextMenu("New/C++/C++ Json Asset")]
|
||||
public class CppAssetProxy : CppProxy
|
||||
{
|
||||
|
||||
@@ -20,12 +20,26 @@ namespace FlaxEditor.Content
|
||||
return item is FileItem;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ContentItem ConstructItem(string path)
|
||||
{
|
||||
return new FileItem(path);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FileExtension => string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
{
|
||||
#if PLATFORM_WINDOWS
|
||||
CreateProcessSettings settings = new CreateProcessSettings
|
||||
{
|
||||
ShellExecute = true,
|
||||
FileName = item.Path
|
||||
};
|
||||
Platform.CreateProcess(ref settings);
|
||||
#endif
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,25 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override string Name { get; } = Utilities.Utils.GetPropertyNameUI(typeof(T).Name);
|
||||
|
||||
private SpriteHandle _thumbnail;
|
||||
|
||||
/// <summary>
|
||||
/// Default Constructor.
|
||||
/// </summary>
|
||||
public SpawnableJsonAssetProxy()
|
||||
{
|
||||
_thumbnail = SpriteHandle.Invalid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with overriden thumbnail.
|
||||
/// </summary>
|
||||
/// <param name="thumbnail">The thumbnail to use.</param>
|
||||
public SpawnableJsonAssetProxy(SpriteHandle thumbnail)
|
||||
{
|
||||
_thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanCreate(ContentFolder targetLocation)
|
||||
{
|
||||
@@ -177,6 +196,12 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
Editor.SaveJsonAsset(outputPath, new T());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||
{
|
||||
return _thumbnail.IsValid ? new JsonAssetItem(path, id, typeName, _thumbnail) : base.ConstructItem(path, typeName, ref id);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string TypeName { get; } = typeof(T).FullName;
|
||||
|
||||
@@ -94,7 +94,10 @@ namespace FlaxEditor.Content
|
||||
_preview.Model = (Model)request.Asset;
|
||||
_preview.Parent = guiRoot;
|
||||
_preview.SyncBackbufferSize();
|
||||
_preview.ViewportCamera.SetArcBallView(_preview.Model.GetBox());
|
||||
var bounds = _preview.Model.GetBox();
|
||||
var maxSize = Math.Max(0.001f, (float)bounds.Size.MaxValue);
|
||||
_preview.ViewportCamera.SetArcBallView(bounds);
|
||||
_preview.FarPlane = Mathf.Max(1000.0f, maxSize * 2 + 100.0f);
|
||||
|
||||
_preview.Task.OnDraw();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
using System;
|
||||
using FlaxEditor.Content.Create;
|
||||
using FlaxEditor.Content.Thumbnails;
|
||||
using FlaxEditor.GUI.ContextMenu;
|
||||
using FlaxEditor.GUI.Timeline;
|
||||
using FlaxEditor.GUI.Timeline.Tracks;
|
||||
using FlaxEditor.Viewport.Previews;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
@@ -48,6 +51,63 @@ namespace FlaxEditor.Content
|
||||
Editor.Instance.ContentImporting.Create(new ParticleEmitterCreateEntry(outputPath));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnContentWindowContextMenu(ContextMenu menu, ContentItem item)
|
||||
{
|
||||
base.OnContentWindowContextMenu(menu, item);
|
||||
|
||||
if (item is BinaryAssetItem binaryAssetItem)
|
||||
{
|
||||
var button = menu.AddButton("Create Particle System", CreateParticleSystemClicked);
|
||||
button.Tag = binaryAssetItem;
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateParticleSystemClicked(ContextMenuButton obj)
|
||||
{
|
||||
var binaryAssetItem = (BinaryAssetItem)obj.Tag;
|
||||
CreateParticleSystem(binaryAssetItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the particle system from the given particle emitter.
|
||||
/// </summary>
|
||||
/// <param name="emitterItem">The particle emitter item to use as a base for the particle system.</param>
|
||||
public static void CreateParticleSystem(BinaryAssetItem emitterItem)
|
||||
{
|
||||
var particleSystemName = emitterItem.ShortName + " Particle System";
|
||||
var particleSystemProxy = Editor.Instance.ContentDatabase.GetProxy<ParticleSystem>();
|
||||
Editor.Instance.Windows.ContentWin.NewItem(particleSystemProxy, null, item => OnParticleSystemCreated(item, emitterItem), particleSystemName);
|
||||
}
|
||||
|
||||
private static void OnParticleSystemCreated(ContentItem item, BinaryAssetItem particleItem)
|
||||
{
|
||||
var assetItem = (AssetItem)item;
|
||||
var particleSystem = FlaxEngine.Content.LoadAsync<ParticleSystem>(assetItem.ID);
|
||||
if (particleSystem == null || particleSystem.WaitForLoaded())
|
||||
{
|
||||
Editor.LogError("Failed to load created particle system.");
|
||||
return;
|
||||
}
|
||||
|
||||
ParticleEmitter emitter = FlaxEngine.Content.LoadAsync<ParticleEmitter>(particleItem.ID);
|
||||
if (emitter == null || emitter.WaitForLoaded())
|
||||
{
|
||||
Editor.LogError("Failed to load base particle emitter.");
|
||||
}
|
||||
|
||||
ParticleSystemPreview tempPreview = new ParticleSystemPreview(false);
|
||||
ParticleSystemTimeline timeline = new ParticleSystemTimeline(tempPreview);
|
||||
timeline.Load(particleSystem);
|
||||
|
||||
var track = (ParticleEmitterTrack)timeline.NewTrack(ParticleEmitterTrack.GetArchetype());
|
||||
track.Asset = emitter;
|
||||
track.TrackMedia.DurationFrames = timeline.DurationFrames;
|
||||
track.Rename(particleItem.ShortName);
|
||||
timeline.AddTrack(track);
|
||||
timeline.Save(particleSystem);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnThumbnailDrawPrepare(ThumbnailRequest request)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using FlaxEditor.Content.Create;
|
||||
using FlaxEditor.Content.Thumbnails;
|
||||
using FlaxEditor.Viewport.Previews;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
using Object = FlaxEngine.Object;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
@@ -73,6 +72,16 @@ namespace FlaxEditor.Content
|
||||
return targetLocation.CanHaveAssets;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
{
|
||||
if (item is not PrefabItem prefabItem)
|
||||
return base.CanReimport(item);
|
||||
|
||||
var prefab = FlaxEngine.Content.Load<Prefab>(prefabItem.ID);
|
||||
return prefab.GetDefaultInstance().GetScript<ModelPrefab>() != null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Create(string outputPath, object arg)
|
||||
{
|
||||
@@ -80,14 +89,8 @@ namespace FlaxEditor.Content
|
||||
var transform = Transform.Identity;
|
||||
if (!(arg is Actor actor))
|
||||
{
|
||||
// Create default prefab root object
|
||||
actor = new EmptyActor
|
||||
{
|
||||
Name = "Root"
|
||||
};
|
||||
|
||||
// Cleanup it after usage
|
||||
Object.Destroy(actor, 20.0f);
|
||||
Editor.Instance.ContentImporting.Create(new PrefabCreateEntry(outputPath));
|
||||
return;
|
||||
}
|
||||
else if (actor.HasScene)
|
||||
{
|
||||
@@ -241,18 +244,8 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override void Create(string outputPath, object arg)
|
||||
{
|
||||
// Create prefab with UI Control
|
||||
var actor = new UIControl
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(outputPath),
|
||||
StaticFlags = StaticFlags.None,
|
||||
};
|
||||
actor.Control = new Button
|
||||
{
|
||||
Text = "Button",
|
||||
};
|
||||
PrefabManager.CreatePrefab(actor, outputPath, false);
|
||||
Object.Destroy(actor, 20.0f);
|
||||
Editor.Instance.ContentImporting.Create(new WidgetCreateEntry(outputPath));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using FlaxEditor.Content.Thumbnails;
|
||||
using FlaxEditor.GUI.ContextMenu;
|
||||
using FlaxEditor.Viewport.Previews;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
@@ -39,6 +40,59 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override Type AssetType => typeof(SkinnedModel);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnContentWindowContextMenu(ContextMenu menu, ContentItem item)
|
||||
{
|
||||
base.OnContentWindowContextMenu(menu, item);
|
||||
|
||||
if (item is BinaryAssetItem binaryAssetItem)
|
||||
{
|
||||
var button = menu.AddButton("Create Animation Graph", CreateAnimationGraphClicked);
|
||||
button.Tag = binaryAssetItem;
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateAnimationGraphClicked(ContextMenuButton obj)
|
||||
{
|
||||
var binaryAssetItem = (BinaryAssetItem)obj.Tag;
|
||||
CreateAnimationGraph(binaryAssetItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the animation graph from the given particle emitter.
|
||||
/// </summary>
|
||||
/// <param name="skinnedModelItem">The skinned model item to use as the base model for the animation graph.</param>
|
||||
public static void CreateAnimationGraph(BinaryAssetItem skinnedModelItem)
|
||||
{
|
||||
var animationGraphName = skinnedModelItem.ShortName + " Graph";
|
||||
var animationGraphProxy = Editor.Instance.ContentDatabase.GetProxy<AnimationGraph>();
|
||||
Editor.Instance.Windows.ContentWin.NewItem(animationGraphProxy, null, item => OnAnimationGraphCreated(item, skinnedModelItem), animationGraphName);
|
||||
}
|
||||
|
||||
private static void OnAnimationGraphCreated(ContentItem item, BinaryAssetItem skinnedModelItem)
|
||||
{
|
||||
var skinnedModel = FlaxEngine.Content.Load<SkinnedModel>(skinnedModelItem.ID);
|
||||
if (skinnedModel == null)
|
||||
{
|
||||
Editor.LogError("Failed to load base skinned model.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Hack the animation graph window to modify the base model of the animation graph.
|
||||
// TODO: implement it without window logic (load AnimGraphSurface and set AnimationGraphWindow.BaseModelId to model)
|
||||
AnimationGraphWindow win = new AnimationGraphWindow(Editor.Instance, item as AssetItem);
|
||||
win.Show();
|
||||
|
||||
// Ensure the window knows the asset is loaded so we can save it later.
|
||||
win.Asset.WaitForLoaded();
|
||||
win.Update(0); // Call Update() to refresh the loaded flag.
|
||||
|
||||
win.SetBaseModel(skinnedModel);
|
||||
win.Surface.MarkAsEdited();
|
||||
win.Save();
|
||||
win.Close();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnThumbnailDrawPrepare(ThumbnailRequest request)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// A video media file proxy object.
|
||||
/// </summary>
|
||||
public class VideoProxy : ContentProxy
|
||||
{
|
||||
private readonly string _extension;
|
||||
|
||||
internal VideoProxy(string extension)
|
||||
{
|
||||
_extension = extension;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Video";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FileExtension => _extension;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Color AccentColor => Color.FromRGB(0x11f7f1);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsProxyFor(ContentItem item)
|
||||
{
|
||||
return item is VideoItem;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ContentItem ConstructItem(string path)
|
||||
{
|
||||
return new VideoItem(path);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
{
|
||||
return new VideoWindow(editor, (VideoItem)item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,6 +134,12 @@ API_ENUM() enum class BuildPlatform
|
||||
/// </summary>
|
||||
API_ENUM(Attributes="EditorDisplay(null, \"iOS ARM64\")")
|
||||
iOSARM64 = 14,
|
||||
|
||||
/// <summary>
|
||||
/// Windows (ARM64)
|
||||
/// </summary>
|
||||
API_ENUM(Attributes = "EditorDisplay(null, \"Windows ARM64\")")
|
||||
WindowsARM64 = 15,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -285,24 +291,22 @@ public:
|
||||
/// <summary>
|
||||
/// The total assets amount in the build.
|
||||
/// </summary>
|
||||
int32 TotalAssets;
|
||||
int32 TotalAssets = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The cooked assets (TotalAssets - CookedAssets is amount of reused cached assets).
|
||||
/// </summary>
|
||||
int32 CookedAssets;
|
||||
int32 CookedAssets = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The final output content size in MB.
|
||||
/// The final output content size (in bytes).
|
||||
/// </summary>
|
||||
int32 ContentSizeMB;
|
||||
uint64 ContentSize = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The asset type stats. Key is the asset typename, value is the stats container.
|
||||
/// </summary>
|
||||
Dictionary<String, AssetTypeStatistics> AssetStats;
|
||||
|
||||
Statistics();
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -328,6 +332,11 @@ public:
|
||||
/// </summary>
|
||||
HashSet<Guid> Assets;
|
||||
|
||||
/// <summary>
|
||||
/// The final files collection to include in build (valid only after CollectAssetsStep).
|
||||
/// </summary>
|
||||
HashSet<String> Files;
|
||||
|
||||
struct BinaryModuleInfo
|
||||
{
|
||||
String Name;
|
||||
|
||||
@@ -148,6 +148,8 @@ const Char* ToString(const BuildPlatform platform)
|
||||
return TEXT("Mac ARM64");
|
||||
case BuildPlatform::iOSARM64:
|
||||
return TEXT("iOS ARM64");
|
||||
case BuildPlatform::WindowsARM64:
|
||||
return TEXT("Windows ARM64");
|
||||
default:
|
||||
return TEXT("");
|
||||
}
|
||||
@@ -202,13 +204,6 @@ bool CookingData::AssetTypeStatistics::operator<(const AssetTypeStatistics& othe
|
||||
return Count > other.Count;
|
||||
}
|
||||
|
||||
CookingData::Statistics::Statistics()
|
||||
{
|
||||
TotalAssets = 0;
|
||||
CookedAssets = 0;
|
||||
ContentSizeMB = 0;
|
||||
}
|
||||
|
||||
CookingData::CookingData(const SpawnParams& params)
|
||||
: ScriptingObject(params)
|
||||
{
|
||||
@@ -307,6 +302,10 @@ void CookingData::GetBuildPlatformName(const Char*& platform, const Char*& archi
|
||||
platform = TEXT("iOS");
|
||||
architecture = TEXT("ARM64");
|
||||
break;
|
||||
case BuildPlatform::WindowsARM64:
|
||||
platform = TEXT("Windows");
|
||||
architecture = TEXT("ARM64");
|
||||
break;
|
||||
default:
|
||||
LOG(Fatal, "Unknown or unsupported build platform.");
|
||||
}
|
||||
@@ -393,6 +392,9 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
|
||||
case BuildPlatform::Windows64:
|
||||
result = New<WindowsPlatformTools>(ArchitectureType::x64);
|
||||
break;
|
||||
case BuildPlatform::WindowsARM64:
|
||||
result = New<WindowsPlatformTools>(ArchitectureType::ARM64);
|
||||
break;
|
||||
#endif
|
||||
#if PLATFORM_TOOLS_UWP
|
||||
case BuildPlatform::UWPx86:
|
||||
@@ -554,7 +556,12 @@ void GameCooker::GetCurrentPlatform(PlatformType& platform, BuildPlatform& build
|
||||
switch (PLATFORM_TYPE)
|
||||
{
|
||||
case PlatformType::Windows:
|
||||
buildPlatform = PLATFORM_64BITS ? BuildPlatform::Windows64 : BuildPlatform::Windows32;
|
||||
if (PLATFORM_ARCH == ArchitectureType::x64)
|
||||
buildPlatform = BuildPlatform::Windows64;
|
||||
else if (PLATFORM_ARCH == ArchitectureType::ARM64)
|
||||
buildPlatform = BuildPlatform::WindowsARM64;
|
||||
else
|
||||
buildPlatform = BuildPlatform::Windows32;
|
||||
break;
|
||||
case PlatformType::XboxOne:
|
||||
buildPlatform = BuildPlatform::XboxOne;
|
||||
|
||||
@@ -229,7 +229,7 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
||||
}
|
||||
|
||||
// Copy fresh Gradle project template
|
||||
if (FileSystem::CopyDirectory(data.OriginalOutputPath, platformDataPath / TEXT("Project"), true))
|
||||
if (FileSystem::CopyDirectory(data.OriginalOutputPath, platformDataPath / TEXT("Project")))
|
||||
{
|
||||
LOG(Error, "Failed to deploy Gradle project to {0} from {1}", data.OriginalOutputPath, platformDataPath);
|
||||
return true;
|
||||
@@ -325,9 +325,7 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
||||
|
||||
const auto buildSettings = BuildSettings::Get();
|
||||
if (buildSettings->SkipPackaging)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
GameCooker::PackageFiles();
|
||||
|
||||
// Validate environment variables
|
||||
@@ -365,7 +363,7 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
||||
Platform::CreateProcess(procSettings);
|
||||
}
|
||||
#endif
|
||||
const bool distributionPackage = buildSettings->ForDistribution;
|
||||
const bool distributionPackage = buildSettings->ForDistribution || data.Configuration == BuildConfiguration::Release;
|
||||
{
|
||||
CreateProcessSettings procSettings;
|
||||
procSettings.FileName = String::Format(TEXT("\"{0}\" {1}"), data.OriginalOutputPath / gradlew, distributionPackage ? TEXT("assemble") : TEXT("assembleDebug"));
|
||||
|
||||
@@ -146,7 +146,7 @@ bool GDKPlatformTools::OnPostProcess(CookingData& data, GDKPlatformSettings* pla
|
||||
sb.Append(TEXT(" </ExecutableList>\n"));
|
||||
sb.AppendFormat(TEXT(" <ShellVisuals DefaultDisplayName=\"{0}\"\n"), gameSettings->ProductName);
|
||||
sb.AppendFormat(TEXT(" PublisherDisplayName=\"{0}\"\n"), platformSettings->PublisherDisplayName.HasChars() ? platformSettings->PublisherDisplayName : gameSettings->CompanyName);
|
||||
sb.AppendFormat(TEXT(" BackgroundColor=\"#{0}\"\n"), platformSettings->BackgroundColor.ToHexString());
|
||||
sb.AppendFormat(TEXT(" BackgroundColor=\"#{0}\"\n"), platformSettings->BackgroundColor.ToHexString().Left(6));
|
||||
sb.AppendFormat(TEXT(" ForegroundText=\"{0}\"\n"), platformSettings->ForegroundText);
|
||||
sb.Append(TEXT(" Square150x150Logo=\"Assets\\Square150x150Logo.png\"\n"));
|
||||
sb.Append(TEXT(" Square480x480Logo=\"Assets\\Square480x480Logo.png\"\n"));
|
||||
|
||||
@@ -123,7 +123,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
||||
const auto srcAssetsPath = uwpDataPath / TEXT("Assets");
|
||||
if (!FileSystem::DirectoryExists(dstAssetsPath))
|
||||
{
|
||||
if (FileSystem::CopyDirectory(dstAssetsPath, srcAssetsPath, true))
|
||||
if (FileSystem::CopyDirectory(dstAssetsPath, srcAssetsPath))
|
||||
{
|
||||
data.Error(TEXT("Failed to copy Assets directory."));
|
||||
return true;
|
||||
|
||||
@@ -203,7 +203,7 @@ bool iOSPlatformTools::OnPostProcess(CookingData& data)
|
||||
return true;
|
||||
|
||||
// Copy fresh XCode project template
|
||||
if (FileSystem::CopyDirectory(data.OriginalOutputPath, platformDataPath / TEXT("Project"), true))
|
||||
if (FileSystem::CopyDirectory(data.OriginalOutputPath, platformDataPath / TEXT("Project")))
|
||||
{
|
||||
LOG(Error, "Failed to deploy XCode project to {0} from {1}", data.OriginalOutputPath, platformDataPath);
|
||||
return true;
|
||||
|
||||
@@ -10,47 +10,26 @@
|
||||
#include "Engine/Content/Assets/Shader.h"
|
||||
#include "Engine/Content/Cache/AssetsCache.h"
|
||||
|
||||
bool CollectAssetsStep::Process(CookingData& data, Asset* asset)
|
||||
{
|
||||
// Skip virtual/temporary assets
|
||||
if (asset->IsVirtual())
|
||||
return false;
|
||||
|
||||
// Keep reference to the asset
|
||||
AssetReference<Asset> ref(asset);
|
||||
|
||||
// Asset should have loaded data
|
||||
if (asset->WaitForLoaded())
|
||||
return false;
|
||||
|
||||
// Gather asset references
|
||||
_references.Clear();
|
||||
asset->Locker.Lock();
|
||||
asset->GetReferences(_references);
|
||||
asset->Locker.Unlock();
|
||||
_assetsQueue.Add(_references);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CollectAssetsStep::Perform(CookingData& data)
|
||||
{
|
||||
LOG(Info, "Searching for assets to include in a build. Using {0} root assets.", data.RootAssets.Count());
|
||||
data.StepProgress(TEXT("Collecting assets"), 0);
|
||||
|
||||
// Initialize assets queue
|
||||
_assetsQueue.Clear();
|
||||
_assetsQueue.EnsureCapacity(1024);
|
||||
Array<Guid> assetsQueue;
|
||||
assetsQueue.Clear();
|
||||
assetsQueue.EnsureCapacity(1024);
|
||||
for (auto i = data.RootAssets.Begin(); i.IsNotEnd(); ++i)
|
||||
_assetsQueue.Add(i->Item);
|
||||
assetsQueue.Add(i->Item);
|
||||
|
||||
// Iterate through the assets graph
|
||||
AssetInfo assetInfo;
|
||||
while (_assetsQueue.HasItems())
|
||||
Array<Guid> references;
|
||||
Array<String> files;
|
||||
while (assetsQueue.HasItems())
|
||||
{
|
||||
BUILD_STEP_CANCEL_CHECK;
|
||||
|
||||
const auto assetId = _assetsQueue.Dequeue();
|
||||
const Guid assetId = assetsQueue.Dequeue();
|
||||
|
||||
// Skip already processed or invalid assets
|
||||
if (!assetId.IsValid()
|
||||
@@ -69,14 +48,31 @@ bool CollectAssetsStep::Perform(CookingData& data)
|
||||
}
|
||||
|
||||
// Load asset
|
||||
const auto asset = Content::LoadAsync<Asset>(assetId);
|
||||
AssetReference<Asset> asset = Content::LoadAsync<Asset>(assetId);
|
||||
if (asset == nullptr)
|
||||
continue;
|
||||
|
||||
// Process that asset
|
||||
LOG_STR(Info, asset->GetPath());
|
||||
data.Assets.Add(assetId);
|
||||
Process(data, asset);
|
||||
|
||||
// Skip virtual/temporary assets
|
||||
if (asset->IsVirtual())
|
||||
continue;
|
||||
|
||||
// Asset should have loaded data
|
||||
if (asset->WaitForLoaded())
|
||||
continue;
|
||||
|
||||
// Gather asset references
|
||||
references.Clear();
|
||||
asset->Locker.Lock();
|
||||
asset->GetReferences(references, files);
|
||||
asset->Locker.Unlock();
|
||||
assetsQueue.Add(references);
|
||||
for (String& file : files)
|
||||
{
|
||||
if (file.HasChars())
|
||||
data.Files.Add(MoveTemp(file));
|
||||
}
|
||||
}
|
||||
|
||||
data.Stats.TotalAssets = data.Assets.Count();
|
||||
|
||||
@@ -12,15 +12,7 @@ class Asset;
|
||||
/// <seealso cref="GameCooker::BuildStep" />
|
||||
class CollectAssetsStep : public GameCooker::BuildStep
|
||||
{
|
||||
private:
|
||||
|
||||
Array<Guid> _assetsQueue;
|
||||
Array<Guid> _references;
|
||||
|
||||
bool Process(CookingData& data, Asset* asset);
|
||||
|
||||
public:
|
||||
|
||||
// [BuildStep]
|
||||
bool Perform(CookingData& data) override;
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user