2020-04-06 03:19:02 +00:00
|
|
|
[package]
|
|
|
|
name = "bevy_render"
|
2024-02-21 20:58:59 +00:00
|
|
|
version = "0.14.0-dev"
|
2021-10-25 18:00:13 +00:00
|
|
|
edition = "2021"
|
2020-08-10 00:24:27 +00:00
|
|
|
description = "Provides rendering functionality for Bevy Engine"
|
|
|
|
homepage = "https://bevyengine.org"
|
|
|
|
repository = "https://github.com/bevyengine/bevy"
|
2021-07-23 21:11:51 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2020-08-10 00:24:27 +00:00
|
|
|
keywords = ["bevy"]
|
2020-04-06 03:19:02 +00:00
|
|
|
|
2021-12-14 03:58:23 +00:00
|
|
|
[features]
|
|
|
|
png = ["image/png"]
|
2023-02-19 20:38:13 +00:00
|
|
|
exr = ["image/exr"]
|
2021-12-14 03:58:23 +00:00
|
|
|
hdr = ["image/hdr"]
|
|
|
|
tga = ["image/tga"]
|
|
|
|
jpeg = ["image/jpeg"]
|
|
|
|
bmp = ["image/bmp"]
|
Added `WebP` image format support (#8220)
# Objective
WebP is a modern image format developed by Google that offers a
significant reduction in file size compared to other image formats such
as PNG and JPEG, while still maintaining good image quality. This makes
it particularly useful for games with large numbers of images, such as
those with high-quality textures or detailed sprites, where file size
and loading times can have a significant impact on performance.
By adding support for WebP images in Bevy, game developers using this
engine can now take advantage of this modern image format and reduce the
memory usage and loading times of their games. This improvement can
ultimately result in a better gaming experience for players.
In summary, the objective of adding WebP image format support in Bevy is
to enable game developers to use a modern image format that provides
better compression rates and smaller file sizes, resulting in faster
loading times and reduced memory usage for their games.
## Solution
To add support for WebP images in Bevy, this pull request leverages the
existing `image` crate support for WebP. This implementation is easily
integrated into the existing Bevy asset-loading system. To maintain
compatibility with existing Bevy projects, WebP image support is
disabled by default, and developers can enable it by adding a feature
flag to their project's `Cargo.toml` file. With this feature, Bevy
becomes even more versatile for game developers and provides a valuable
addition to the game engine.
---
## Changelog
- Added support for WebP image format in Bevy game engine
## Migration Guide
To enable WebP image support in your Bevy project, add the following
line to your project's Cargo.toml file:
```toml
bevy = { version = "*", features = ["webp"]}
```
2023-03-28 19:53:55 +00:00
|
|
|
webp = ["image/webp"]
|
2022-03-15 22:26:46 +00:00
|
|
|
dds = ["ddsfile"]
|
2023-05-16 23:51:47 +00:00
|
|
|
pnm = ["image/pnm"]
|
2024-05-06 20:49:32 +00:00
|
|
|
multi_threaded = ["bevy_tasks/multi_threaded"]
|
2022-03-15 22:26:46 +00:00
|
|
|
|
Implement minimal reflection probes (fixed macOS, iOS, and Android). (#11366)
This pull request re-submits #10057, which was backed out for breaking
macOS, iOS, and Android. I've tested this version on macOS and Android
and on the iOS simulator.
# Objective
This pull request implements *reflection probes*, which generalize
environment maps to allow for multiple environment maps in the same
scene, each of which has an axis-aligned bounding box. This is a
standard feature of physically-based renderers and was inspired by [the
corresponding feature in Blender's Eevee renderer].
## Solution
This is a minimal implementation of reflection probes that allows
artists to define cuboid bounding regions associated with environment
maps. For every view, on every frame, a system builds up a list of the
nearest 4 reflection probes that are within the view's frustum and
supplies that list to the shader. The PBR fragment shader searches
through the list, finds the first containing reflection probe, and uses
it for indirect lighting, falling back to the view's environment map if
none is found. Both forward and deferred renderers are fully supported.
A reflection probe is an entity with a pair of components, *LightProbe*
and *EnvironmentMapLight* (as well as the standard *SpatialBundle*, to
position it in the world). The *LightProbe* component (along with the
*Transform*) defines the bounding region, while the
*EnvironmentMapLight* component specifies the associated diffuse and
specular cubemaps.
A frequent question is "why two components instead of just one?" The
advantages of this setup are:
1. It's readily extensible to other types of light probes, in particular
*irradiance volumes* (also known as ambient cubes or voxel global
illumination), which use the same approach of bounding cuboids. With a
single component that applies to both reflection probes and irradiance
volumes, we can share the logic that implements falloff and blending
between multiple light probes between both of those features.
2. It reduces duplication between the existing *EnvironmentMapLight* and
these new reflection probes. Systems can treat environment maps attached
to cameras the same way they treat environment maps applied to
reflection probes if they wish.
Internally, we gather up all environment maps in the scene and place
them in a cubemap array. At present, this means that all environment
maps must have the same size, mipmap count, and texture format. A
warning is emitted if this restriction is violated. We could potentially
relax this in the future as part of the automatic mipmap generation
work, which could easily do texture format conversion as part of its
preprocessing.
An easy way to generate reflection probe cubemaps is to bake them in
Blender and use the `export-blender-gi` tool that's part of the
[`bevy-baked-gi`] project. This tool takes a `.blend` file containing
baked cubemaps as input and exports cubemap images, pre-filtered with an
embedded fork of the [glTF IBL Sampler], alongside a corresponding
`.scn.ron` file that the scene spawner can use to recreate the
reflection probes.
Note that this is intentionally a minimal implementation, to aid
reviewability. Known issues are:
* Reflection probes are basically unsupported on WebGL 2, because WebGL
2 has no cubemap arrays. (Strictly speaking, you can have precisely one
reflection probe in the scene if you have no other cubemaps anywhere,
but this isn't very useful.)
* Reflection probes have no falloff, so reflections will abruptly change
when objects move from one bounding region to another.
* As mentioned before, all cubemaps in the world of a given type
(diffuse or specular) must have the same size, format, and mipmap count.
Future work includes:
* Blending between multiple reflection probes.
* A falloff/fade-out region so that reflected objects disappear
gradually instead of vanishing all at once.
* Irradiance volumes for voxel-based global illumination. This should
reuse much of the reflection probe logic, as they're both GI techniques
based on cuboid bounding regions.
* Support for WebGL 2, by breaking batches when reflection probes are
used.
These issues notwithstanding, I think it's best to land this with
roughly the current set of functionality, because this patch is useful
as is and adding everything above would make the pull request
significantly larger and harder to review.
---
## Changelog
### Added
* A new *LightProbe* component is available that specifies a bounding
region that an *EnvironmentMapLight* applies to. The combination of a
*LightProbe* and an *EnvironmentMapLight* offers *reflection probe*
functionality similar to that available in other engines.
[the corresponding feature in Blender's Eevee renderer]:
https://docs.blender.org/manual/en/latest/render/eevee/light_probes/reflection_cubemaps.html
[`bevy-baked-gi`]: https://github.com/pcwalton/bevy-baked-gi
[glTF IBL Sampler]: https://github.com/KhronosGroup/glTF-IBL-Sampler
2024-01-19 07:33:52 +00:00
|
|
|
shader_format_glsl = ["naga/glsl-in", "naga/wgsl-out", "naga_oil/glsl"]
|
2023-04-25 19:30:48 +00:00
|
|
|
shader_format_spirv = ["wgpu/spirv", "naga/spv-in", "naga/spv-out"]
|
|
|
|
|
2022-03-15 22:26:46 +00:00
|
|
|
# For ktx2 supercompression
|
|
|
|
zlib = ["flate2"]
|
|
|
|
zstd = ["ruzstd"]
|
|
|
|
|
2022-07-04 09:14:04 +00:00
|
|
|
trace = ["profiling"]
|
2022-04-08 22:50:23 +00:00
|
|
|
tracing-tracy = []
|
2021-12-14 03:58:23 +00:00
|
|
|
wgpu_trace = ["wgpu/trace"]
|
|
|
|
ci_limits = []
|
2021-12-22 20:59:48 +00:00
|
|
|
webgl = ["wgpu/webgl"]
|
Update to wgpu 0.19 and raw-window-handle 0.6 (#11280)
# Objective
Keep core dependencies up to date.
## Solution
Update the dependencies.
wgpu 0.19 only supports raw-window-handle (rwh) 0.6, so bumping that was
included in this.
The rwh 0.6 version bump is just the simplest way of doing it. There
might be a way we can take advantage of wgpu's new safe surface creation
api, but I'm not familiar enough with bevy's window management to
untangle it and my attempt ended up being a mess of lifetimes and rustc
complaining about missing trait impls (that were implemented). Thanks to
@MiniaczQ for the (much simpler) rwh 0.6 version bump code.
Unblocks https://github.com/bevyengine/bevy/pull/9172 and
https://github.com/bevyengine/bevy/pull/10812
~~This might be blocked on cpal and oboe updating their ndk versions to
0.8, as they both currently target ndk 0.7 which uses rwh 0.5.2~~ Tested
on android, and everything seems to work correctly (audio properly stops
when minimized, and plays when re-focusing the app).
---
## Changelog
- `wgpu` has been updated to 0.19! The long awaited arcanization has
been merged (for more info, see
https://gfx-rs.github.io/2023/11/24/arcanization.html), and Vulkan
should now be working again on Intel GPUs.
- Targeting WebGPU now requires that you add the new `webgpu` feature
(setting the `RUSTFLAGS` environment variable to
`--cfg=web_sys_unstable_apis` is still required). This feature currently
overrides the `webgl2` feature if you have both enabled (the `webgl2`
feature is enabled by default), so it is not recommended to add it as a
default feature to libraries without putting it behind a flag that
allows library users to opt out of it! In the future we plan on
supporting wasm binaries that can target both webgl2 and webgpu now that
wgpu added support for doing so (see
https://github.com/bevyengine/bevy/issues/11505).
- `raw-window-handle` has been updated to version 0.6.
## Migration Guide
- `bevy_render::instance_index::get_instance_index()` has been removed
as the webgl2 workaround is no longer required as it was fixed upstream
in wgpu. The `BASE_INSTANCE_WORKAROUND` shaderdef has also been removed.
- WebGPU now requires the new `webgpu` feature to be enabled. The
`webgpu` feature currently overrides the `webgl2` feature so you no
longer need to disable all default features and re-add them all when
targeting `webgpu`, but binaries built with both the `webgpu` and
`webgl2` features will only target the webgpu backend, and will only
work on browsers that support WebGPU.
- Places where you conditionally compiled things for webgl2 need to be
updated because of this change, eg:
- `#[cfg(any(not(feature = "webgl"), not(target_arch = "wasm32")))]`
becomes `#[cfg(any(not(feature = "webgl") ,not(target_arch = "wasm32"),
feature = "webgpu"))]`
- `#[cfg(all(feature = "webgl", target_arch = "wasm32"))]` becomes
`#[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))]`
- `if cfg!(all(feature = "webgl", target_arch = "wasm32"))` becomes `if
cfg!(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))`
- `create_texture_with_data` now also takes a `TextureDataOrder`. You
can probably just set this to `TextureDataOrder::default()`
- `TextureFormat`'s `block_size` has been renamed to `block_copy_size`
- See the `wgpu` changelog for anything I might've missed:
https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md
---------
Co-authored-by: François <mockersf@gmail.com>
2024-01-26 18:14:21 +00:00
|
|
|
webgpu = ["wgpu/webgpu"]
|
2024-02-25 15:19:27 +00:00
|
|
|
ios_simulator = []
|
2021-12-14 03:58:23 +00:00
|
|
|
|
2020-04-06 03:19:02 +00:00
|
|
|
[dependencies]
|
|
|
|
# bevy
|
2024-02-21 20:58:59 +00:00
|
|
|
bevy_app = { path = "../bevy_app", version = "0.14.0-dev" }
|
|
|
|
bevy_asset = { path = "../bevy_asset", version = "0.14.0-dev" }
|
2024-03-24 08:55:34 +00:00
|
|
|
bevy_color = { path = "../bevy_color", version = "0.14.0-dev", features = [
|
|
|
|
"serialize",
|
2024-04-08 19:45:42 +00:00
|
|
|
"wgpu-types",
|
2024-03-24 08:55:34 +00:00
|
|
|
] }
|
2024-02-21 20:58:59 +00:00
|
|
|
bevy_core = { path = "../bevy_core", version = "0.14.0-dev" }
|
|
|
|
bevy_derive = { path = "../bevy_derive", version = "0.14.0-dev" }
|
2024-03-17 20:29:35 +00:00
|
|
|
bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.14.0-dev" }
|
2024-02-21 20:58:59 +00:00
|
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev" }
|
|
|
|
bevy_encase_derive = { path = "../bevy_encase_derive", version = "0.14.0-dev" }
|
|
|
|
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.14.0-dev" }
|
|
|
|
bevy_math = { path = "../bevy_math", version = "0.14.0-dev" }
|
|
|
|
bevy_mikktspace = { path = "../bevy_mikktspace", version = "0.14.0-dev" }
|
|
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.14.0-dev", features = [
|
2023-11-21 01:04:14 +00:00
|
|
|
"bevy",
|
|
|
|
] }
|
2024-02-21 20:58:59 +00:00
|
|
|
bevy_render_macros = { path = "macros", version = "0.14.0-dev" }
|
|
|
|
bevy_time = { path = "../bevy_time", version = "0.14.0-dev" }
|
|
|
|
bevy_transform = { path = "../bevy_transform", version = "0.14.0-dev" }
|
|
|
|
bevy_window = { path = "../bevy_window", version = "0.14.0-dev" }
|
|
|
|
bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" }
|
|
|
|
bevy_tasks = { path = "../bevy_tasks", version = "0.14.0-dev" }
|
2020-04-06 03:19:02 +00:00
|
|
|
|
|
|
|
# rendering
|
2024-03-29 06:40:09 +00:00
|
|
|
image = { version = "0.25", default-features = false }
|
2020-04-06 03:19:02 +00:00
|
|
|
|
|
|
|
# misc
|
2021-12-22 22:16:42 +00:00
|
|
|
codespan-reporting = "0.11.0"
|
2023-10-09 20:15:24 +00:00
|
|
|
# `fragile-send-sync-non-atomic-wasm` feature means we can't use WASM threads for rendering
|
2024-03-25 19:10:18 +00:00
|
|
|
# It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm.
|
|
|
|
# When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing
|
|
|
|
# and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread.
|
2024-03-02 00:44:51 +00:00
|
|
|
wgpu = { version = "0.19.3", default-features = false, features = [
|
Update to wgpu 0.19 and raw-window-handle 0.6 (#11280)
# Objective
Keep core dependencies up to date.
## Solution
Update the dependencies.
wgpu 0.19 only supports raw-window-handle (rwh) 0.6, so bumping that was
included in this.
The rwh 0.6 version bump is just the simplest way of doing it. There
might be a way we can take advantage of wgpu's new safe surface creation
api, but I'm not familiar enough with bevy's window management to
untangle it and my attempt ended up being a mess of lifetimes and rustc
complaining about missing trait impls (that were implemented). Thanks to
@MiniaczQ for the (much simpler) rwh 0.6 version bump code.
Unblocks https://github.com/bevyengine/bevy/pull/9172 and
https://github.com/bevyengine/bevy/pull/10812
~~This might be blocked on cpal and oboe updating their ndk versions to
0.8, as they both currently target ndk 0.7 which uses rwh 0.5.2~~ Tested
on android, and everything seems to work correctly (audio properly stops
when minimized, and plays when re-focusing the app).
---
## Changelog
- `wgpu` has been updated to 0.19! The long awaited arcanization has
been merged (for more info, see
https://gfx-rs.github.io/2023/11/24/arcanization.html), and Vulkan
should now be working again on Intel GPUs.
- Targeting WebGPU now requires that you add the new `webgpu` feature
(setting the `RUSTFLAGS` environment variable to
`--cfg=web_sys_unstable_apis` is still required). This feature currently
overrides the `webgl2` feature if you have both enabled (the `webgl2`
feature is enabled by default), so it is not recommended to add it as a
default feature to libraries without putting it behind a flag that
allows library users to opt out of it! In the future we plan on
supporting wasm binaries that can target both webgl2 and webgpu now that
wgpu added support for doing so (see
https://github.com/bevyengine/bevy/issues/11505).
- `raw-window-handle` has been updated to version 0.6.
## Migration Guide
- `bevy_render::instance_index::get_instance_index()` has been removed
as the webgl2 workaround is no longer required as it was fixed upstream
in wgpu. The `BASE_INSTANCE_WORKAROUND` shaderdef has also been removed.
- WebGPU now requires the new `webgpu` feature to be enabled. The
`webgpu` feature currently overrides the `webgl2` feature so you no
longer need to disable all default features and re-add them all when
targeting `webgpu`, but binaries built with both the `webgpu` and
`webgl2` features will only target the webgpu backend, and will only
work on browsers that support WebGPU.
- Places where you conditionally compiled things for webgl2 need to be
updated because of this change, eg:
- `#[cfg(any(not(feature = "webgl"), not(target_arch = "wasm32")))]`
becomes `#[cfg(any(not(feature = "webgl") ,not(target_arch = "wasm32"),
feature = "webgpu"))]`
- `#[cfg(all(feature = "webgl", target_arch = "wasm32"))]` becomes
`#[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))]`
- `if cfg!(all(feature = "webgl", target_arch = "wasm32"))` becomes `if
cfg!(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))`
- `create_texture_with_data` now also takes a `TextureDataOrder`. You
can probably just set this to `TextureDataOrder::default()`
- `TextureFormat`'s `block_size` has been renamed to `block_copy_size`
- See the `wgpu` changelog for anything I might've missed:
https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md
---------
Co-authored-by: François <mockersf@gmail.com>
2024-01-26 18:14:21 +00:00
|
|
|
"wgsl",
|
|
|
|
"dx12",
|
|
|
|
"metal",
|
2023-11-21 01:04:14 +00:00
|
|
|
"naga",
|
Update to wgpu 0.19 and raw-window-handle 0.6 (#11280)
# Objective
Keep core dependencies up to date.
## Solution
Update the dependencies.
wgpu 0.19 only supports raw-window-handle (rwh) 0.6, so bumping that was
included in this.
The rwh 0.6 version bump is just the simplest way of doing it. There
might be a way we can take advantage of wgpu's new safe surface creation
api, but I'm not familiar enough with bevy's window management to
untangle it and my attempt ended up being a mess of lifetimes and rustc
complaining about missing trait impls (that were implemented). Thanks to
@MiniaczQ for the (much simpler) rwh 0.6 version bump code.
Unblocks https://github.com/bevyengine/bevy/pull/9172 and
https://github.com/bevyengine/bevy/pull/10812
~~This might be blocked on cpal and oboe updating their ndk versions to
0.8, as they both currently target ndk 0.7 which uses rwh 0.5.2~~ Tested
on android, and everything seems to work correctly (audio properly stops
when minimized, and plays when re-focusing the app).
---
## Changelog
- `wgpu` has been updated to 0.19! The long awaited arcanization has
been merged (for more info, see
https://gfx-rs.github.io/2023/11/24/arcanization.html), and Vulkan
should now be working again on Intel GPUs.
- Targeting WebGPU now requires that you add the new `webgpu` feature
(setting the `RUSTFLAGS` environment variable to
`--cfg=web_sys_unstable_apis` is still required). This feature currently
overrides the `webgl2` feature if you have both enabled (the `webgl2`
feature is enabled by default), so it is not recommended to add it as a
default feature to libraries without putting it behind a flag that
allows library users to opt out of it! In the future we plan on
supporting wasm binaries that can target both webgl2 and webgpu now that
wgpu added support for doing so (see
https://github.com/bevyengine/bevy/issues/11505).
- `raw-window-handle` has been updated to version 0.6.
## Migration Guide
- `bevy_render::instance_index::get_instance_index()` has been removed
as the webgl2 workaround is no longer required as it was fixed upstream
in wgpu. The `BASE_INSTANCE_WORKAROUND` shaderdef has also been removed.
- WebGPU now requires the new `webgpu` feature to be enabled. The
`webgpu` feature currently overrides the `webgl2` feature so you no
longer need to disable all default features and re-add them all when
targeting `webgpu`, but binaries built with both the `webgpu` and
`webgl2` features will only target the webgpu backend, and will only
work on browsers that support WebGPU.
- Places where you conditionally compiled things for webgl2 need to be
updated because of this change, eg:
- `#[cfg(any(not(feature = "webgl"), not(target_arch = "wasm32")))]`
becomes `#[cfg(any(not(feature = "webgl") ,not(target_arch = "wasm32"),
feature = "webgpu"))]`
- `#[cfg(all(feature = "webgl", target_arch = "wasm32"))]` becomes
`#[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))]`
- `if cfg!(all(feature = "webgl", target_arch = "wasm32"))` becomes `if
cfg!(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))`
- `create_texture_with_data` now also takes a `TextureDataOrder`. You
can probably just set this to `TextureDataOrder::default()`
- `TextureFormat`'s `block_size` has been renamed to `block_copy_size`
- See the `wgpu` changelog for anything I might've missed:
https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md
---------
Co-authored-by: François <mockersf@gmail.com>
2024-01-26 18:14:21 +00:00
|
|
|
"naga-ir",
|
2023-11-21 01:04:14 +00:00
|
|
|
"fragile-send-sync-non-atomic-wasm",
|
|
|
|
] }
|
Update to wgpu 0.19 and raw-window-handle 0.6 (#11280)
# Objective
Keep core dependencies up to date.
## Solution
Update the dependencies.
wgpu 0.19 only supports raw-window-handle (rwh) 0.6, so bumping that was
included in this.
The rwh 0.6 version bump is just the simplest way of doing it. There
might be a way we can take advantage of wgpu's new safe surface creation
api, but I'm not familiar enough with bevy's window management to
untangle it and my attempt ended up being a mess of lifetimes and rustc
complaining about missing trait impls (that were implemented). Thanks to
@MiniaczQ for the (much simpler) rwh 0.6 version bump code.
Unblocks https://github.com/bevyengine/bevy/pull/9172 and
https://github.com/bevyengine/bevy/pull/10812
~~This might be blocked on cpal and oboe updating their ndk versions to
0.8, as they both currently target ndk 0.7 which uses rwh 0.5.2~~ Tested
on android, and everything seems to work correctly (audio properly stops
when minimized, and plays when re-focusing the app).
---
## Changelog
- `wgpu` has been updated to 0.19! The long awaited arcanization has
been merged (for more info, see
https://gfx-rs.github.io/2023/11/24/arcanization.html), and Vulkan
should now be working again on Intel GPUs.
- Targeting WebGPU now requires that you add the new `webgpu` feature
(setting the `RUSTFLAGS` environment variable to
`--cfg=web_sys_unstable_apis` is still required). This feature currently
overrides the `webgl2` feature if you have both enabled (the `webgl2`
feature is enabled by default), so it is not recommended to add it as a
default feature to libraries without putting it behind a flag that
allows library users to opt out of it! In the future we plan on
supporting wasm binaries that can target both webgl2 and webgpu now that
wgpu added support for doing so (see
https://github.com/bevyengine/bevy/issues/11505).
- `raw-window-handle` has been updated to version 0.6.
## Migration Guide
- `bevy_render::instance_index::get_instance_index()` has been removed
as the webgl2 workaround is no longer required as it was fixed upstream
in wgpu. The `BASE_INSTANCE_WORKAROUND` shaderdef has also been removed.
- WebGPU now requires the new `webgpu` feature to be enabled. The
`webgpu` feature currently overrides the `webgl2` feature so you no
longer need to disable all default features and re-add them all when
targeting `webgpu`, but binaries built with both the `webgpu` and
`webgl2` features will only target the webgpu backend, and will only
work on browsers that support WebGPU.
- Places where you conditionally compiled things for webgl2 need to be
updated because of this change, eg:
- `#[cfg(any(not(feature = "webgl"), not(target_arch = "wasm32")))]`
becomes `#[cfg(any(not(feature = "webgl") ,not(target_arch = "wasm32"),
feature = "webgpu"))]`
- `#[cfg(all(feature = "webgl", target_arch = "wasm32"))]` becomes
`#[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))]`
- `if cfg!(all(feature = "webgl", target_arch = "wasm32"))` becomes `if
cfg!(all(feature = "webgl", target_arch = "wasm32", not(feature =
"webgpu")))`
- `create_texture_with_data` now also takes a `TextureDataOrder`. You
can probably just set this to `TextureDataOrder::default()`
- `TextureFormat`'s `block_size` has been renamed to `block_copy_size`
- See the `wgpu` changelog for anything I might've missed:
https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md
---------
Co-authored-by: François <mockersf@gmail.com>
2024-01-26 18:14:21 +00:00
|
|
|
naga = { version = "0.19", features = ["wgsl-in"] }
|
2020-05-26 01:27:04 +00:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
2024-02-19 00:37:34 +00:00
|
|
|
bitflags = { version = "2.3", features = ["serde"] }
|
2024-04-05 02:11:41 +00:00
|
|
|
bytemuck = { version = "1.5", features = ["derive", "must_cast"] }
|
2020-09-10 19:54:24 +00:00
|
|
|
downcast-rs = "1.2.0"
|
2020-05-16 02:30:02 +00:00
|
|
|
thiserror = "1.0"
|
2023-11-24 16:31:55 +00:00
|
|
|
futures-lite = "2.0.1"
|
2024-05-02 18:42:34 +00:00
|
|
|
hexasphere = "12.0"
|
2024-04-08 17:16:25 +00:00
|
|
|
ddsfile = { version = "0.5.2", optional = true }
|
2022-03-15 22:26:46 +00:00
|
|
|
ktx2 = { version = "0.3.0", optional = true }
|
|
|
|
# For ktx2 supercompression
|
|
|
|
flate2 = { version = "1.0.22", optional = true }
|
2024-03-11 06:35:56 +00:00
|
|
|
ruzstd = { version = "0.6.0", optional = true }
|
2022-03-15 22:26:46 +00:00
|
|
|
# For transcoding of UASTC/ETC1S universal formats, and for .basis file support
|
2023-05-17 23:29:31 +00:00
|
|
|
basis-universal = { version = "0.3.0", optional = true }
|
2024-05-02 18:42:34 +00:00
|
|
|
encase = { version = "0.8", features = ["glam"] }
|
2022-07-04 09:14:04 +00:00
|
|
|
# For wgpu profiling using tracing. Use `RUST_LOG=info` to also capture the wgpu spans.
|
2023-11-21 01:04:14 +00:00
|
|
|
profiling = { version = "1", features = [
|
|
|
|
"profile-with-tracing",
|
|
|
|
], optional = true }
|
2024-02-21 19:34:39 +00:00
|
|
|
async-channel = "2.2.0"
|
2024-03-07 02:30:15 +00:00
|
|
|
nonmax = "0.5"
|
|
|
|
smallvec = "1.11"
|
2024-02-17 02:22:49 +00:00
|
|
|
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
|
|
# Omit the `glsl` feature in non-WebAssembly by default.
|
|
|
|
naga_oil = { version = "0.13", default-features = false, features = [
|
|
|
|
"test_shader",
|
|
|
|
] }
|
|
|
|
|
2023-04-28 19:37:11 +00:00
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
2024-02-17 02:22:49 +00:00
|
|
|
naga_oil = "0.13"
|
2023-04-28 19:37:11 +00:00
|
|
|
js-sys = "0.3"
|
2024-03-02 00:44:51 +00:00
|
|
|
web-sys = { version = "0.3.67", features = [
|
2023-11-21 01:04:14 +00:00
|
|
|
'Blob',
|
|
|
|
'Document',
|
|
|
|
'Element',
|
|
|
|
'HtmlElement',
|
|
|
|
'Node',
|
|
|
|
'Url',
|
|
|
|
'Window',
|
2023-04-28 19:37:11 +00:00
|
|
|
] }
|
|
|
|
wasm-bindgen = "0.2"
|
2023-11-18 20:58:48 +00:00
|
|
|
|
2024-03-25 19:10:18 +00:00
|
|
|
[target.'cfg(all(target_arch = "wasm32", target_feature = "atomics"))'.dependencies]
|
|
|
|
send_wrapper = "0.6.0"
|
|
|
|
|
2023-11-18 20:58:48 +00:00
|
|
|
[lints]
|
|
|
|
workspace = true
|
2024-03-08 20:03:09 +00:00
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
2024-03-23 02:22:52 +00:00
|
|
|
rustdoc-args = ["-Zunstable-options", "--cfg", "docsrs"]
|
2024-03-08 20:03:09 +00:00
|
|
|
all-features = true
|