update to 0.17

0.17
Benjamin Hansen 10 months ago
parent 48d4d1a353
commit 35a4e1642b

164
Cargo.lock generated

@ -159,9 +159,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
[[package]]
name = "ash"
version = "0.37.2+1.3.238"
version = "0.37.3+1.3.251"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28bf19c1f0a470be5fbf7522a308a05df06610252c5bcf5143e1b23f629a9a03"
checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a"
dependencies = [
"libloading 0.7.3",
]
@ -660,7 +660,7 @@ dependencies = [
"bitflags 1.3.2",
"core-foundation",
"core-graphics-types",
"foreign-types",
"foreign-types 0.3.2",
"libc",
]
@ -672,7 +672,7 @@ checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
"foreign-types",
"foreign-types 0.3.2",
"libc",
]
@ -840,12 +840,12 @@ dependencies = [
[[package]]
name = "d3d12"
version = "0.6.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da"
checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20"
dependencies = [
"bitflags 1.3.2",
"libloading 0.7.3",
"bitflags 2.3.1",
"libloading 0.8.0",
"winapi",
]
@ -1002,7 +1002,28 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
"foreign-types-shared",
"foreign-types-shared 0.1.1",
]
[[package]]
name = "foreign-types"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
dependencies = [
"foreign-types-macros",
"foreign-types-shared 0.3.1",
]
[[package]]
name = "foreign-types-macros"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.18",
]
[[package]]
@ -1011,6 +1032,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "foreign-types-shared"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
[[package]]
name = "form_urlencoded"
version = "1.1.0"
@ -1187,9 +1214,9 @@ dependencies = [
[[package]]
name = "glow"
version = "0.12.2"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "807edf58b70c0b5b2181dd39fe1839dbdb3ba02645630dc5f753e23da307f762"
checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728"
dependencies = [
"js-sys",
"slotmap",
@ -1237,21 +1264,21 @@ dependencies = [
[[package]]
name = "gpu-alloc"
version = "0.5.3"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d"
checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"
dependencies = [
"bitflags 1.3.2",
"bitflags 2.3.1",
"gpu-alloc-types",
]
[[package]]
name = "gpu-alloc-types"
version = "0.2.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5"
checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"
dependencies = [
"bitflags 1.3.2",
"bitflags 2.3.1",
]
[[package]]
@ -1610,9 +1637,9 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.61"
version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
dependencies = [
"wasm-bindgen",
]
@ -1791,16 +1818,17 @@ dependencies = [
[[package]]
name = "metal"
version = "0.24.0"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060"
checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318"
dependencies = [
"bitflags 1.3.2",
"bitflags 2.3.1",
"block",
"core-graphics-types",
"foreign-types",
"foreign-types 0.5.0",
"log",
"objc",
"paste",
]
[[package]]
@ -1908,12 +1936,12 @@ dependencies = [
[[package]]
name = "naga"
version = "0.12.2"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80cd00bd6180a8790f1c020ed258a46b8d73dd5bd6af104a238c9d71f806938e"
checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e"
dependencies = [
"bit-set",
"bitflags 1.3.2",
"bitflags 2.3.1",
"codespan-reporting",
"hexf-parse",
"indexmap",
@ -2203,7 +2231,7 @@ checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13"
dependencies = [
"bitflags 1.3.2",
"cfg-if",
"foreign-types",
"foreign-types 0.3.2",
"libc",
"once_cell",
"openssl-macros",
@ -2321,6 +2349,12 @@ dependencies = [
"windows-sys 0.42.0",
]
[[package]]
name = "paste"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]]
name = "peeking_take_while"
version = "0.1.2"
@ -3835,9 +3869,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@ -3845,9 +3879,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
dependencies = [
"bumpalo",
"log",
@ -3860,9 +3894,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-cli-support"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8315d6503415e5d44ff64f1ba34aefd8264c561df17e0f1c8eb8c96bde79c45e"
checksum = "d21c60239a09bf9bab8dfa752be4e6c637db22296b9ded493800090448692da9"
dependencies = [
"anyhow",
"base64 0.9.3",
@ -3882,9 +3916,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-externref-xform"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4522bf3be16c6274c87a5a2c5d2a62efa80253b025f8e813f9682d0d6a8a8fca"
checksum = "bafbe1984f67cc12645f12ab65e6145e8ddce1ab265d0be58435f25bb0ce2608"
dependencies = [
"anyhow",
"walrus",
@ -3904,9 +3938,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -3914,9 +3948,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
@ -3927,9 +3961,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-multi-value-xform"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "113256596776ebb4b243512d3711e73d5475eaeff373e1ae65427c66e5aa2073"
checksum = "581419e3995571a1d2d066e360ca1c0c09da097f5a53c98e6f00d96eddaf0ffe"
dependencies = [
"anyhow",
"walrus",
@ -3937,15 +3971,15 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "wasm-bindgen-threads-xform"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89106aaf83a2b80464fc8f60a074a4575135b73a491e174f35bbeae6ff0d7ec6"
checksum = "e05d272073981137e8426cf2a6830d43d1f84f988a050b2f8b210f0e266b8983"
dependencies = [
"anyhow",
"walrus",
@ -3954,9 +3988,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-wasm-conventions"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84e5ad27a7930400994cb40823d3d4a7ef235fac52d0c75ebd61fa40eba994a8"
checksum = "0e9c65b1ff5041ea824ca24c519948aec16fb6611c617d601623c0657dfcd47b"
dependencies = [
"anyhow",
"walrus",
@ -3964,9 +3998,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-wasm-interpreter"
version = "0.2.86"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e69500063b7b20f3e9422d78c2b381dd192c7c4ebaef34d205332877cd78e0d3"
checksum = "7c5c796220738ab5d44666f37205728a74141c0039d1166bcf8110b26bafaa1e"
dependencies = [
"anyhow",
"log",
@ -4068,9 +4102,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.61"
version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
dependencies = [
"js-sys",
"wasm-bindgen",
@ -4093,15 +4127,15 @@ dependencies = [
[[package]]
name = "wgpu"
version = "0.16.1"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3059ea4ddec41ca14f356833e2af65e7e38c0a8f91273867ed526fb9bafcca95"
checksum = "7472f3b69449a8ae073f6ec41d05b6f846902d92a6c45313c50cb25857b736ce"
dependencies = [
"arrayvec",
"cfg-if",
"js-sys",
"log",
"naga 0.12.2",
"naga 0.13.0",
"parking_lot 0.12.1",
"profiling",
"raw-window-handle",
@ -4117,16 +4151,16 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "0.16.1"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2"
checksum = "ecf7454d9386f602f7399225c92dd2fbdcde52c519bc8fb0bd6fbeb388075dc2"
dependencies = [
"arrayvec",
"bit-vec",
"bitflags 2.3.1",
"codespan-reporting",
"log",
"naga 0.12.2",
"naga 0.13.0",
"parking_lot 0.12.1",
"profiling",
"raw-window-handle",
@ -4140,9 +4174,9 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "0.16.1"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74851c2c8e5d97652e74c241d41b0656b31c924a45dcdecde83975717362cfa4"
checksum = "6654a13885a17f475e8324efb46dc6986d7aaaa98353330f8de2077b153d0101"
dependencies = [
"android_system_properties",
"arrayvec",
@ -4152,7 +4186,6 @@ dependencies = [
"block",
"core-graphics-types",
"d3d12",
"foreign-types",
"glow",
"gpu-alloc",
"gpu-allocator",
@ -4164,7 +4197,7 @@ dependencies = [
"libloading 0.8.0",
"log",
"metal",
"naga 0.12.2",
"naga 0.13.0",
"objc",
"parking_lot 0.12.1",
"profiling",
@ -4195,9 +4228,9 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "0.16.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bd33a976130f03dcdcd39b3810c0c3fc05daf86f0aaf867db14bfb7c4a9a32b"
checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67"
dependencies = [
"bitflags 2.3.1",
"js-sys",
@ -4206,9 +4239,8 @@ dependencies = [
[[package]]
name = "wgpu_glyph"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb849776538364c4d7571aca9718e2cb5ab973bee3cf5e127b83eab7616e33f"
version = "0.20.1"
source = "git+https://github.com/sotrh/wgpu_glyph.git#419f82a142d7bd54d28f9cd9c8ee761befb64ab6"
dependencies = [
"bytemuck",
"glyph_brush",

@ -16,14 +16,14 @@ cfg-if = "1"
winit = "0.28"
env_logger = "0.10"
log = "0.4"
wgpu = "0.16"
wgpu = "0.17"
pollster = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wasm-bindgen = "=0.2.86"
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "=0.2.87"
wasm-bindgen-futures = "0.4.30"
web-sys = { version = "0.3.53", features = [
"Document",

@ -12,13 +12,13 @@ cfg-if = "1"
winit = "0.28"
env_logger = "0.10"
log = "0.4"
wgpu = "0.16"
wgpu = "0.17"
pollster = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -12,13 +12,13 @@ cfg-if = "1"
winit = "0.28"
env_logger = "0.10"
log = "0.4"
wgpu = "0.16"
wgpu = "0.17"
pollster = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -11,7 +11,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
cfg-if = "1"
winit = "0.28"
wgpu = "0.16"
wgpu = "0.17"
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
@ -21,7 +21,7 @@ bytemuck = { version = "1.12", features = [ "derive" ] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -14,7 +14,7 @@ bytemuck = { version = "1.12", features = [ "derive" ] }
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
[dependencies.image]
@ -25,7 +25,7 @@ features = ["png", "jpeg"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
[dependencies.image]
@ -26,7 +26,7 @@ features = ["png", "jpeg"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
[dependencies.image]
@ -26,7 +26,7 @@ features = ["png", "jpeg"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
[dependencies.image]
@ -26,7 +26,7 @@ features = ["png", "jpeg"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
[dependencies.image]
@ -28,7 +28,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
wgpu = { version = "0.16"}
wgpu = { version = "0.17"}
winit = "0.28"
[dependencies.image]
@ -28,7 +28,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
wgpu = { version = "0.16"}
wgpu = { version = "0.17"}
winit = "0.28"
[dependencies.image]
@ -28,7 +28,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
wgpu = { version = "0.16"}
wgpu = { version = "0.17"}
winit = "0.28"
instant = "0.1"
@ -29,7 +29,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
wgpu = { version = "0.16"}
wgpu = { version = "0.17"}
winit = "0.28"
instant = "0.1"
@ -29,7 +29,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -0,0 +1 @@
These texture files were created by FreePBR.com and may be used freely in your video games and 3d work at no cost. They may not however be redistributed on other websites or anywhere else other than FreePBR.com. We think that is more than fair. :) We also would greatly appreciate it if some sorrt of credit was given if you do indeed use these textures in a published game. Other than that, keep on creating and have fun. :)

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
IconIndex=16

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

@ -0,0 +1,8 @@
use std::marker::PhantomData;
pub struct Binder<B> {
layout: wgpu::BindGroupLayout,
_marker: PhantomData<B>
}
// pub trait Uniform

@ -16,6 +16,7 @@ mod model;
mod resources;
mod terrain;
mod texture;
mod bindgroups; // NEW!
use model::{DrawLight, DrawModel, Vertex};
@ -154,13 +155,11 @@ struct State {
light_buffer: wgpu::Buffer,
light_bind_group: wgpu::BindGroup,
light_render_pipeline: wgpu::RenderPipeline,
#[allow(dead_code)]
debug_material: model::Material,
terrain_material: model::Material, // UPDATED!
mouse_pressed: bool,
// NEW!
terrain: terrain::Terrain,
terrain_pipeline: terrain::TerrainPipeline,
terrain_hack_pipeline: terrain::TerrainHackPipeline,
}
fn create_render_pipeline(
@ -488,9 +487,9 @@ impl State {
)
};
let debug_material = {
let diffuse_bytes = include_bytes!("../res/cobble-diffuse.png");
let normal_bytes = include_bytes!("../res/cobble-normal.png");
let terrain_material = {
let diffuse_bytes = include_bytes!("../res/slate2-tiled-bl4/slate2-tiled-albedo2.png");
let normal_bytes = include_bytes!("../res/slate2-tiled-bl4/slate2-tiled-ogl.png");
let diffuse_texture = texture::Texture::from_bytes(
&device,
@ -498,6 +497,7 @@ impl State {
diffuse_bytes,
"res/alt-diffuse.png",
false,
wgpu::AddressMode::Repeat,
)
.unwrap();
let normal_texture = texture::Texture::from_bytes(
@ -506,6 +506,7 @@ impl State {
normal_bytes,
"res/alt-normal.png",
true,
wgpu::AddressMode::Repeat,
)
.unwrap();
@ -519,7 +520,7 @@ impl State {
};
let chunk_size = (256, 256).into();
let min_max_height = (-5.0, 5.0).into();
let min_max_height = (-20.0, 20.0).into();
// let min_max_height = (0.0, 10.0).into();
let terrain_pipeline = terrain::TerrainPipeline::new(
&device,
@ -527,15 +528,7 @@ impl State {
min_max_height,
&camera_bind_group_layout,
&light_bind_group_layout,
config.format,
Some(texture::Texture::DEPTH_FORMAT),
);
let terrain_hack_pipeline = terrain::TerrainHackPipeline::new(
&device,
chunk_size,
min_max_height,
&camera_bind_group_layout,
&light_bind_group_layout,
&texture_bind_group_layout,
config.format,
Some(texture::Texture::DEPTH_FORMAT),
);
@ -584,12 +577,11 @@ impl State {
light_bind_group,
light_render_pipeline,
#[allow(dead_code)]
debug_material,
terrain_material,
mouse_pressed: false,
// NEW!
terrain,
terrain_pipeline,
terrain_hack_pipeline,
}
}
@ -708,19 +700,20 @@ impl State {
&self.light_bind_group,
);
// render_pass.set_pipeline(&self.render_pipeline);
// render_pass.draw_model_instanced(
// &self.obj_model,
// 0..self.instances.len() as u32,
// &self.camera_bind_group,
// &self.light_bind_group,
// );
render_pass.set_pipeline(&self.render_pipeline);
render_pass.draw_model_instanced(
&self.obj_model,
0..self.instances.len() as u32,
&self.camera_bind_group,
&self.light_bind_group,
);
self.terrain_pipeline.render(
&mut render_pass,
&self.terrain,
&self.camera_bind_group,
&self.light_bind_group,
&self.terrain_material.bind_group,
);
}
self.queue.submit(iter::once(encoder.finish()));

@ -59,11 +59,13 @@ pub async fn load_binary(file_name: &str) -> anyhow::Result<Vec<u8>> {
pub async fn load_texture(
file_name: &str,
is_normal_map: bool,
address_mode: wgpu::AddressMode, // NEW!
device: &wgpu::Device,
queue: &wgpu::Queue,
) -> anyhow::Result<texture::Texture> {
let data = load_binary(file_name).await?;
texture::Texture::from_bytes(device, queue, &data, file_name, is_normal_map)
texture::Texture::from_bytes(device, queue, &data, file_name, is_normal_map, address_mode)
// UDPATED!
}
pub async fn load_model(
@ -92,8 +94,22 @@ pub async fn load_model(
let mut materials = Vec::new();
for m in obj_materials? {
let diffuse_texture = load_texture(&m.diffuse_texture, false, device, queue).await?;
let normal_texture = load_texture(&m.normal_texture, true, device, queue).await?;
let diffuse_texture = load_texture(
&m.diffuse_texture,
false,
wgpu::AddressMode::ClampToEdge, // NEW!
device,
queue,
)
.await?;
let normal_texture = load_texture(
&m.normal_texture,
true,
wgpu::AddressMode::ClampToEdge, // NEW!
device,
queue,
)
.await?;
materials.push(model::Material::new(
device,

@ -75,6 +75,7 @@ impl TerrainPipeline {
min_max_height: cgmath::Vector2<f32>,
camera_layout: &wgpu::BindGroupLayout,
light_layout: &wgpu::BindGroupLayout,
material_layout: &wgpu::BindGroupLayout,
color_format: wgpu::TextureFormat,
depth_format: Option<wgpu::TextureFormat>,
) -> Self {
@ -131,7 +132,7 @@ impl TerrainPipeline {
let render_pipeline_layout =
device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("TerrainPipeline::Render::PipelineLayout"),
bind_group_layouts: &[camera_layout, light_layout],
bind_group_layouts: &[camera_layout, light_layout, material_layout],
push_constant_ranges: &[],
});
let render_pipeline = create_render_pipeline(
@ -173,10 +174,12 @@ impl TerrainPipeline {
terrain: &'a Terrain,
camera_bind_group: &'a wgpu::BindGroup,
light_bind_group: &'a wgpu::BindGroup,
material_bind_group: &'a wgpu::BindGroup,
) {
render_pass.set_pipeline(&self.render_pipeline);
render_pass.set_bind_group(0, camera_bind_group, &[]);
render_pass.set_bind_group(1, light_bind_group, &[]);
render_pass.set_bind_group(2, material_bind_group, &[]);
for chunk in &terrain.chunks {
render_pass
.set_index_buffer(chunk.mesh.index_buffer.slice(..), chunk.mesh.index_format);
@ -209,7 +212,6 @@ impl GenerateChunk for TerrainPipeline {
mapped_at_creation: false,
});
let num_elements = self.chunk_size.x * self.chunk_size.y * 6;
println!("num_elements: {}", num_elements);
let index_buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some(&format!("{}: Indices", chunk_name)),
size: (num_elements * std::mem::size_of::<u32>() as u32) as _,
@ -240,7 +242,6 @@ impl GenerateChunk for TerrainPipeline {
label: Some("TerrainPipeline: ChunkData"),
size: size_of_val(&data) as _,
usage: wgpu::BufferUsages::UNIFORM
| wgpu::BufferUsages::MAP_READ
| wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,
});
@ -275,7 +276,7 @@ impl GenerateChunk for TerrainPipeline {
cpass.set_pipeline(&self.gen_pipeline);
cpass.set_bind_group(0, &bind_group, &[]);
cpass.dispatch_workgroups(
dbg!((((self.chunk_size.x + 1) * (self.chunk_size.y + 1)) as f32 / 64.0).ceil()) as _,
(((self.chunk_size.x + 1) * (self.chunk_size.y + 1)) as f32 / 64.0).ceil() as _,
1,
1,
);
@ -284,360 +285,6 @@ impl GenerateChunk for TerrainPipeline {
queue.submit(std::iter::once(encoder.finish()));
device.poll(wgpu::Maintain::Wait);
// resources::export_mesh_data(&format!("{}.json", chunk.mesh.name), device, &chunk.mesh);
chunk
}
}
pub struct TerrainHackPipeline {
texture_size: u32,
gen_layout: wgpu::BindGroupLayout,
gen_pipeline: wgpu::RenderPipeline,
render_pipeline: wgpu::RenderPipeline,
chunk_size: cgmath::Vector2<u32>,
min_max_height: cgmath::Vector2<f32>,
}
impl TerrainHackPipeline {
pub fn new(
device: &wgpu::Device,
chunk_size: cgmath::Vector2<u32>,
min_max_height: cgmath::Vector2<f32>,
camera_layout: &wgpu::BindGroupLayout,
light_layout: &wgpu::BindGroupLayout,
color_format: wgpu::TextureFormat,
depth_format: Option<wgpu::TextureFormat>,
) -> Self {
// Given that the vertices in the chunk are 2 vec3s, num_indices should = num_vertices
let texture_size = 512;
let gen_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: Some("HackTerrainPipeline::BindGroupLayout"),
entries: &[wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::VERTEX | wgpu::ShaderStages::FRAGMENT,
ty: wgpu::BindingType::Buffer {
ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None,
},
count: None,
}],
});
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("HackTerrainPipeline::PipelineLayout"),
bind_group_layouts: &[&gen_layout],
push_constant_ranges: &[],
});
let shader = device.create_shader_module(wgpu::include_wgsl!("terrain.wgsl"));
let gen_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: Some("HackTerrainPipeline::GenPipeline"),
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: &shader,
entry_point: "gen_terrain_vertex",
buffers: &[],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
cull_mode: None,
..Default::default()
},
depth_stencil: None,
multisample: wgpu::MultisampleState {
count: 1,
mask: !0,
alpha_to_coverage_enabled: false,
},
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "gen_terrain_fragment",
targets: &[
Some(wgpu::ColorTargetState {
format: wgpu::TextureFormat::R32Uint,
blend: None,
write_mask: wgpu::ColorWrites::ALL,
}),
Some(wgpu::ColorTargetState {
format: wgpu::TextureFormat::R32Uint,
blend: None,
write_mask: wgpu::ColorWrites::ALL,
}),
],
}),
multiview: None,
});
let render_pipeline_layout =
device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("TerrainPipeline::Render::PipelineLayout"),
bind_group_layouts: &[camera_layout, light_layout],
push_constant_ranges: &[],
});
let render_pipeline = create_render_pipeline(
device,
&render_pipeline_layout,
color_format,
depth_format,
&[wgpu::VertexBufferLayout {
array_stride: 24,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &[
wgpu::VertexAttribute {
format: wgpu::VertexFormat::Float32x3,
offset: 0,
shader_location: 0,
},
wgpu::VertexAttribute {
format: wgpu::VertexFormat::Float32x3,
offset: 12,
shader_location: 1,
},
],
}],
&shader,
);
Self {
chunk_size,
min_max_height,
texture_size,
gen_layout,
gen_pipeline,
render_pipeline,
}
}
pub fn render<'a, 'b>(
&'a self,
render_pass: &'b mut wgpu::RenderPass<'a>,
terrain: &'a Terrain,
camera_bind_group: &'a wgpu::BindGroup,
light_bind_group: &'a wgpu::BindGroup,
) {
render_pass.set_pipeline(&self.render_pipeline);
render_pass.set_bind_group(0, camera_bind_group, &[]);
render_pass.set_bind_group(1, light_bind_group, &[]);
for chunk in &terrain.chunks {
render_pass
.set_index_buffer(chunk.mesh.index_buffer.slice(..), chunk.mesh.index_format);
render_pass.set_vertex_buffer(0, chunk.mesh.vertex_buffer.slice(..));
render_pass.draw_indexed(0..chunk.mesh.num_elements, 0, 0..1);
}
}
fn create_work_texture(&self, device: &wgpu::Device, index: bool) -> wgpu::Texture {
device.create_texture(&wgpu::TextureDescriptor {
label: Some(if index {
"Index Texture"
} else {
"Vertex Texture"
}),
size: wgpu::Extent3d {
width: self.texture_size,
height: self.texture_size,
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: wgpu::TextureFormat::R32Uint,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::COPY_SRC,
view_formats: &[wgpu::TextureFormat::R32Uint],
})
}
}
impl GenerateChunk for TerrainHackPipeline {
fn gen_chunk(
&self,
device: &wgpu::Device,
queue: &wgpu::Queue,
corner: cgmath::Vector2<i32>,
existing_chunk: Option<Chunk>,
) -> Chunk {
let chunk = if let Some(mut chunk) = existing_chunk {
chunk.corner = corner;
chunk
} else {
let chunk_name = format!("Chunk {:?}", corner);
let num_vertices = (self.chunk_size.x + 1) * (self.chunk_size.y + 1);
let vertex_buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some(&format!("{}: Vertices", chunk_name)),
size: (num_vertices * 8 * std::mem::size_of::<f32>() as u32) as _,
usage: wgpu::BufferUsages::COPY_DST
| wgpu::BufferUsages::VERTEX
| wgpu::BufferUsages::MAP_READ,
mapped_at_creation: false,
});
let num_elements = self.chunk_size.x * self.chunk_size.y * 6;
let index_buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some(&format!("{}: Indices", chunk_name)),
size: (num_elements * std::mem::size_of::<u32>() as u32) as _,
usage: wgpu::BufferUsages::COPY_DST
| wgpu::BufferUsages::INDEX
| wgpu::BufferUsages::MAP_READ,
mapped_at_creation: false,
});
Chunk {
corner,
mesh: model::Mesh {
name: chunk_name,
vertex_buffer,
index_buffer,
num_elements,
material: 0,
index_format: wgpu::IndexFormat::Uint32,
},
}
};
let vertex_texture = self.create_work_texture(device, false);
let vertex_view = vertex_texture.create_view(&wgpu::TextureViewDescriptor {
label: Some("HackTerrainPipeline: vertex_view"),
..Default::default()
});
let index_texture = self.create_work_texture(device, true);
let index_view = index_texture.create_view(&wgpu::TextureViewDescriptor {
label: Some("HackTerrainPipeline: index_view"),
..Default::default()
});
let data = GenData::new(
self.texture_size,
0,
self.chunk_size,
corner,
self.min_max_height,
);
println!("gen data: {:?}", data);
let gen_buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some("HackTerrainPipeline: GenData"),
size: size_of_val(&data) as _,
usage: wgpu::BufferUsages::UNIFORM
| wgpu::BufferUsages::MAP_READ
| wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,
});
queue.write_buffer(&gen_buffer, 0, bytemuck::bytes_of(&data));
let gen_uniforms = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: Some("HackTerrainPipeline: gen_uniforms"),
layout: &self.gen_layout,
entries: &[wgpu::BindGroupEntry {
binding: 0,
resource: gen_buffer.as_entire_binding(),
}],
});
let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("HackTerrainPipeline: encoder"),
});
let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("HackTerrainPipeline: pass"),
color_attachments: &[
Some(wgpu::RenderPassColorAttachment {
view: &vertex_view,
resolve_target: None,
ops: wgpu::Operations::default(),
}),
Some(wgpu::RenderPassColorAttachment {
view: &index_view,
resolve_target: None,
ops: wgpu::Operations::default(),
}),
],
depth_stencil_attachment: None,
});
pass.set_pipeline(&self.gen_pipeline);
pass.set_bind_group(0, &gen_uniforms, &[]);
pass.draw(0..6, 0..1);
drop(pass);
encoder.copy_texture_to_buffer(
wgpu::ImageCopyTexture {
texture: &vertex_texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
wgpu::ImageCopyBuffer {
buffer: &chunk.mesh.vertex_buffer,
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(std::mem::size_of::<u32>() as u32 * self.texture_size),
rows_per_image: Some(self.texture_size),
},
},
wgpu::Extent3d {
width: self.texture_size,
height: self.texture_size,
depth_or_array_layers: 1,
},
);
encoder.copy_texture_to_buffer(
wgpu::ImageCopyTexture {
texture: &index_texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
wgpu::ImageCopyBuffer {
buffer: &chunk.mesh.index_buffer,
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(std::mem::size_of::<u32>() as u32 * self.texture_size),
rows_per_image: Some(self.texture_size),
},
},
wgpu::Extent3d {
width: self.texture_size,
height: self.texture_size,
depth_or_array_layers: 1,
},
);
queue.submit(std::iter::once(encoder.finish()));
{
device.poll(wgpu::Maintain::Wait);
let bs = chunk.mesh.index_buffer.slice(..);
let (tx, rx) = std::sync::mpsc::channel();
bs.map_async(wgpu::MapMode::Read, move |result| {
tx.send(result).unwrap();
});
device.poll(wgpu::Maintain::Wait);
rx.recv().unwrap().unwrap();
let data = bs.get_mapped_range();
let indices: &[u32] = bytemuck::cast_slice(&data);
let mut f = std::fs::File::create(format!(
"Chunk ({}, {}) Indices.txt",
chunk.corner.x, chunk.corner.y
))
.unwrap();
use std::io::Write;
for quad in indices.chunks(6) {
writeln!(f, "{:?}", quad);
}
drop(f);
let img = image::ImageBuffer::<image::Rgba<u8>, _>::from_raw(
self.texture_size,
self.texture_size,
data,
)
.unwrap();
img.save(format!(
"Chunk ({}, {}) Vertex Data.png",
chunk.corner.x, chunk.corner.y
))
.unwrap();
}
chunk.mesh.index_buffer.unmap();
chunk
}
}

@ -274,8 +274,41 @@ fn color23(p: vec2<f32>) -> vec3<f32> {
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
var color = smoothstep(vec3<f32>(0.0), vec3<f32>(0.1), fract(in.world_pos));
color = mix(vec3<f32>(0.5, 0.1, 0.7), vec3<f32>(0.2, 0.2, 0.2), vec3<f32>(color.x * color.y * color.z));
// Adapted from https://bgolus.medium.com/normal-mapping-for-a-triplanar-shader-10bf39dca05a
var blend = abs(in.normal);
blend /= blend.x + blend.y + blend.z;
let uv_x = in.world_pos.zy * 0.1;
let uv_y = in.world_pos.xz * 0.1;
let uv_z = in.world_pos.xy * 0.1;
let albedo_x = textureSample(t_diffuse, s_diffuse, uv_x).rgb;
let albedo_y = textureSample(t_diffuse, s_diffuse, uv_y).rgb;
let albedo_z = textureSample(t_diffuse, s_diffuse, uv_z).rgb;
let albedo = albedo_x * blend.x + albedo_y * blend.y + albedo_z * blend.z;
var tnormal_x = 2.0 * textureSample(t_normal, s_normal, uv_x).xyz - 1.0;
var tnormal_y = 2.0 * textureSample(t_normal, s_normal, uv_y).xyz - 1.0;
var tnormal_z = 2.0 * textureSample(t_normal, s_normal, uv_z).xyz - 1.0;
tnormal_x = vec3(
tnormal_x.xy + in.normal.zy,
abs(tnormal_x.z) * in.normal.x,
);
tnormal_y = vec3(
tnormal_y.xy + in.normal.xz,
abs(tnormal_y.z) * in.normal.y,
);
tnormal_z = vec3(
tnormal_z.xy + in.normal.xy,
abs(tnormal_z.z) * in.normal.z,
);
let world_normal = normalize(
tnormal_x.zyx * blend.x +
tnormal_y.xzy * blend.y +
tnormal_z.xyz * blend.z
);
let ambient_strength = 0.1;
let ambient_color = light.color * ambient_strength;
@ -284,13 +317,13 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let view_dir = normalize(camera.view_pos.xyz - in.world_pos);
let half_dir = normalize(view_dir + light_dir);
let diffuse_strength = max(dot(in.normal, light_dir), 0.0);
let diffuse_strength = max(dot(world_normal, light_dir), 0.0);
let diffuse_color = diffuse_strength * light.color;
let specular_strength = pow(max(dot(in.normal, half_dir), 0.0), 32.0);
let specular_strength = pow(max(dot(world_normal, half_dir), 0.0), 32.0);
let specular_color = specular_strength * light.color;
let result = (ambient_color + diffuse_color + specular_color) * color;
let result = (ambient_color + diffuse_color + specular_color) * albedo.rgb;
return vec4<f32>(result, 1.0);
}

@ -1,6 +1,6 @@
use anyhow::*;
use image::GenericImageView;
use std::num::NonZeroU32;
use wgpu::AddressMode;
pub struct Texture {
pub texture: wgpu::Texture,
@ -60,9 +60,10 @@ impl Texture {
bytes: &[u8],
label: &str,
is_normal_map: bool,
address_mode: AddressMode, // NEW!
) -> Result<Self> {
let img = image::load_from_memory(bytes)?;
Self::from_image(device, queue, &img, Some(label), is_normal_map)
Self::from_image(device, queue, &img, Some(label), is_normal_map, address_mode) // UPDATED!
}
pub fn from_image(
@ -71,6 +72,7 @@ impl Texture {
img: &image::DynamicImage,
label: Option<&str>,
is_normal_map: bool,
address_mode: AddressMode, // NEW!
) -> Result<Self> {
let dimensions = img.dimensions();
let rgba = img.to_rgba8();
@ -114,9 +116,10 @@ impl Texture {
let view = texture.create_view(&wgpu::TextureViewDescriptor::default());
let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
address_mode_u: wgpu::AddressMode::ClampToEdge,
address_mode_v: wgpu::AddressMode::ClampToEdge,
address_mode_w: wgpu::AddressMode::ClampToEdge,
// UPDATED!
address_mode_u: address_mode,
address_mode_v: address_mode,
address_mode_w: address_mode,
mag_filter: wgpu::FilterMode::Linear,
min_filter: wgpu::FilterMode::Nearest,
mipmap_filter: wgpu::FilterMode::Nearest,

@ -14,7 +14,7 @@ image = "0.24"
log = "0.4"
rayon = "1.4"
tobj = "2.0"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
[build-dependencies]

@ -14,7 +14,7 @@ pollster = "0.3"
image = "0.24.2"
log = "0.4"
tobj = "2.0"
wgpu = "0.16"
wgpu = "0.17"
wgpu-subscriber = "0.1"
winit = "0.28"

@ -14,7 +14,7 @@ pollster = "0.3"
image = "0.24.2"
log = "0.4"
tobj = "3.1"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
gif = "0.11.4"
futures-intrusive = "0.4"

@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0"
wgpu = "0.16"
wgpu = "0.17"
pollster = "0.3"
imgui = "0.7"
imgui-wgpu = "0.17"

@ -7,6 +7,6 @@ edition = "2021"
[dependencies]
anyhow = "1"
wgpu = "0.16"
wgpu = "0.17"
winit = "0.28"
pollster = "0.3"

@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
wgpu = { version = "0.16"}
wgpu = { version = "0.17"}
winit = "0.28"
instant = "0.1"
@ -29,7 +29,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -15,8 +15,9 @@ anyhow = "1.0"
bytemuck = { version = "1.12", features = [ "derive" ] }
cgmath = "0.18"
pollster = "0.3"
wgpu = { version = "0.16", features = ["spirv"]}
wgpu_glyph = "0.20"
wgpu = { version = "0.17", features = ["spirv"]}
#wgpu_glyph = { version = "0.20", path = "../../../../wgpu_glyph" }
wgpu_glyph = { version = "0.20", git = "https://github.com/sotrh/wgpu_glyph.git" }
rand = "0.8"
rodio = { version = "0.16", default-features = false, features = ["wav"] }
log = "0.4"
@ -28,13 +29,13 @@ console_log = "1.0"
getrandom = { version = "0.2", features = ["js"] }
rodio = { version = "0.16", default-features = false, features = ["wasm-bindgen", "wav"] }
wasm-bindgen-futures = "0.4.20"
wasm-bindgen = "=0.2.86"
wasm-bindgen = "=0.2.87"
web-sys = { version = "0.3.53", features = [
"Document",
"Window",
"Element",
]}
wgpu = { version = "0.16", features = ["spirv", "webgl"]}
wgpu = { version = "0.17", features = ["spirv", "webgl"]}
[build-dependencies]
anyhow = "1.0"

@ -17,7 +17,7 @@ pollster = "0.3"
log = "0.4"
rayon = "1.4" # NEW!
tobj = { version = "3.2", features = ["async"]}
wgpu = { version = "0.16"}
wgpu = { version = "0.17"}
winit = "0.28"
instant = "0.1"
async-std = "1"
@ -31,7 +31,7 @@ features = ["png", "jpeg"]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -9,7 +9,7 @@ edition = "2018"
[dependencies]
image = "0.24"
shaderc = "0.8"
wgpu = { version = "0.16", features = ["spirv"] }
wgpu = { version = "0.17", features = ["spirv"] }
pollster = "0.3"
futures-intrusive = "0.4"

@ -41,7 +41,6 @@ module.exports = {
'/intermediate/tutorial10-lighting/',
'/intermediate/tutorial11-normals/',
'/intermediate/tutorial12-camera/',
// '/intermediate/tutorial13-threading/',
],
},
{
@ -54,13 +53,14 @@ module.exports = {
'/showcase/pong/',
'/showcase/compute/',
'/showcase/alignment/',
// '/showcase/imgui-demo/',
]
},
{
title: 'News',
collapsable: true,
children: [
'/news/0.17/',
'/news/0.16/',
'/news/0.15/',
'/news/0.14/',
'/news/0.13/',

@ -11,7 +11,7 @@ For the beginner stuff, we're going to keep things very simple, we'll add things
winit = "0.28"
env_logger = "0.10"
log = "0.4"
wgpu = "0.16"
wgpu = "0.17"
```
## Using Rust's new resolver
@ -110,7 +110,7 @@ cfg-if = "1"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.30"
web-sys = { version = "0.3", features = [

@ -261,13 +261,13 @@ cfg-if = "1"
winit = "0.28"
env_logger = "0.10"
log = "0.4"
wgpu = "0.16"
wgpu = "0.17"
pollster = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "0.16", features = ["webgl"]}
wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

@ -450,7 +450,7 @@ winit = "0.28"
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
wgpu = "0.16"
wgpu = "0.17"
bytemuck = { version = "1.12", features = [ "derive" ] }
anyhow = "1.0" # NEW!
```

@ -29,7 +29,7 @@ In other news WebGPU has been added to Chrome 113 and up! Currently the Linux ve
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
# wgpu = { version = "0.16", features = ["webgl"]}
# wgpu = { version = "0.17", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
@ -42,4 +42,4 @@ web-sys = { version = "0.3", features = [
No other changes need to be made to switch to using WebGPU in browser, so once the WebGPU samples at <https://webgpu.github.io/> work in Chrome on Linux, I'll look into removing the `webgl` feature.
That's all! As always let me know if I missed anything!
That's all! As always let me know if I missed anything!

@ -0,0 +1,3 @@
# Update to 0.17
No changes needed to the tutorial!

@ -14,7 +14,7 @@ This is not an in-depth guide on how to use Imgui. But here are some of the basi
```toml
imgui = "0.7"
imgui-wgpu = "0.16"
imgui-wgpu = "0.17"
imgui-winit-support = "0.7"
```

@ -1,12 +1,6 @@
# Pong
![](./pong.png)
<div class="warn">
Currently not working, this will be updated when [wgpu_glyph gets updated to 0.15](https://github.com/hecrj/wgpu_glyph/pull/95).
</div>
![A screenshot of pong](./pong.png)
Practically the "Hello World!" of games. Pong has been remade thousands of times. I know Pong. You know Pong. We all know Pong. That being said, this time I wanted to put in a little more effort than most people do. This showcase has a basic menu system, sounds, and different game states.
@ -274,7 +268,7 @@ anyhow = "1.0"
bytemuck = { version = "1.12", features = [ "derive" ] }
cgmath = "0.18"
pollster = "0.3"
wgpu = { version = "0.16", features = ["spirv"]}
wgpu = { version = "0.17", features = ["spirv"]}
wgpu_glyph = "0.17"
rand = "0.8"
rodio = { version = "0.15", default-features = false, features = ["wav"] }
@ -287,13 +281,13 @@ console_log = "1.0"
getrandom = { version = "0.2", features = ["js"] }
rodio = { version = "0.15", default-features = false, features = ["wasm-bindgen", "wav"] }
wasm-bindgen-futures = "0.4.20"
wasm-bindgen = "=0.2.86"
wasm-bindgen = "=0.2.87"
web-sys = { version = "0.3.53", features = [
"Document",
"Window",
"Element",
]}
wgpu = { version = "0.16", features = ["spirv", "webgl"]}
wgpu = { version = "0.17", features = ["spirv", "webgl"]}
[build-dependencies]
anyhow = "1.0"

@ -100,7 +100,7 @@ Update dependencies to support SPIR-V module.
[dependencies]
image = "0.23"
shaderc = "0.7"
wgpu = { version = "0.16", features = ["spirv"] }
wgpu = { version = "0.17", features = ["spirv"] }
pollster = "0.3"
```

Loading…
Cancel
Save