Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Wgpu 0.15 #7356

Closed
wants to merge 17 commits into from
Closed

Conversation

Elabajaba
Copy link
Contributor

@Elabajaba Elabajaba commented Jan 24, 2023

Objective

Update Bevy to wgpu 0.15.

Changelog

  • Update to wgpu 0.15, wgpu-hal 0.15.1, and naga 0.11
  • Users can now use the DirectX Shader Compiler (DXC) on Windows with DX12 for faster shader compilation and ShaderModel 6.0+ support (requires dxcompiler.dll and dxil.dll, which are included in DXC downloads from here)

Migration Guide

WGSL Top-Level let is now const

All top level constants are now declared with const, catching up with the wgsl spec.

let is no longer allowed at the global scope, only within functions.

-let SOME_CONSTANT = 12.0;
+const SOME_CONSTANT = 12.0;

TextureDescriptor and SurfaceConfiguration now requires a view_formats field

The new view_formats field in the TextureDescriptor is used to specify a list of formats the texture can be re-interpreted to in a texture view. Currently only changing srgb-ness is allowed (ex. Rgba8Unorm <=> Rgba8UnormSrgb). You should set view_formats to &[] (empty) unless you have a specific reason not to.

The DirectX Shader Compiler (DXC) is now supported on DX12

DXC is now the default shader compiler when using the DX12 backend. DXC is Microsoft's replacement for their legacy FXC compiler, and is faster, less buggy, and allows for modern shader features to be used (ShaderModel 6.0+). DXC requires dxcompiler.dll and dxil.dll to be available, otherwise it will log a warning and fall back to FXC.

You can get dxcompiler.dll and dxil.dll by downloading the latest release from Microsoft's DirectXShaderCompiler github repo and copying them into your project's root directory. These must be included when you distribute your Bevy game/app/etc if you plan on supporting the DX12 backend and are using DXC.

WgpuSettings now has a dx12_shader_compiler field which can be used to choose between either FXC or DXC (if you pass None for the paths for DXC, it will check for the .dlls in the working directory).

@hymm hymm added this to the 0.10 milestone Jan 24, 2023
@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in C-Dependencies A change to the crates that Bevy depends on labels Jan 24, 2023
@Elabajaba
Copy link
Contributor Author

Elabajaba commented Jan 25, 2023

I'd prefer to default to the DXC shader compiler for DX12 for this PR, as it's faster/supports modern features (FXC doesn't support Shadermodel 6.0+, while DXC does. Note that the techpowerup shadermodel support is inaccurate, as new drivers have upped the support on older GPUs), is actually maintained (unlike FXC, the current default), and is necessary for eg. FSR2 support for users using DX12.

The problem is that it requires the user to get dxcompiler.dll and dxil.dll (from the releases tab on https://github.com/microsoft/DirectXShaderCompiler) and ship them with their game if they plan on supporting DX12. There is an environment variable users can set so they don't have to keep copying the .dlls into every new project. edit: forgot what I did in my own PR

Currently WGPU logs a warning (sidenote, why are we filtering out WGPUs warning logs?) and falls back to FXC if either of the .dlls are missing.

WGPU wants to switch to DX12 by default for Windows in the near future (probably within the next 2 releases?), so testing this feature (including what docs improvements are needed, error message tweaks, possible bugs, unsupported drivers, etc) is imo pretty important before that happens to try and limit any future papercuts once that happens. (and for now, 99% of Bevy Windows users use Vulkan anyways, since it's the default)

edit: Users can test the wgpu dx12 backend (on Windows) by creating/setting the WGPU_BACKEND environment variable to dx12. You can temporarily set it for a terminal's scope by writing $env:WGPU_BACKEND="dx12" (including the $)

@Elabajaba Elabajaba marked this pull request as ready for review January 26, 2023 04:30
Copy link
Contributor

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! Haven't downloaded and tested it, but the PR itself lgtm. Only thing I would change is mention in the migration guide that you should use an empty view_formats (&[]) unless you have a specific reason not to. I imagine most people won't know how to fill it out otherwise - we should tell them it's ok to leave blank.

Not approving this yet, as when I was using a git branch of wgpu, I was getting errors about multisampled texture creation when MSAA was enabled. @Elabajaba can you confirm if MSAA works? Once you do, I'll approve this PR.

@Elabajaba
Copy link
Contributor Author

...mention in the migration guide that you should use an empty view_formats (&[]) unless you have a specific reason not to.

Done

Not approving this yet, as when I was using a git branch of wgpu, I was getting errors about multisampled texture creation when MSAA was enabled.

MSAA works fine on my machine on DX12 , Vulkan and webGL in Firefox, but I think most MSAA issues are Linux+Intel+Vulkan or GL which I don't have to test against.

@Elabajaba
Copy link
Contributor Author

Elabajaba commented Jan 26, 2023

Ideally we'd try to use an sRGB texture_view on the surface if sRGB surface formats aren't supported (afaik only WebGPU doesn't support sRGB surface formats, so if someone somehow gets Bevy working with webgpu before next release, the colours will be wrong). However, I couldn't get it working on Vulkan without spewing thousands of validation errors per second, so I just made a TODO of it at SurfaceConfiguration creation.

Other than that, I think it's ready? Maybe the book should be updated to tell users to download DXC and drop the .dlls into their project if they want to use DX12?

edit: Oh yeah, wgsl-analyzer doesn't support top level const (wgsl-analyzer/wgsl-analyzer#66), so it's horribly broken for naga 0.11+/wgpu 0.15+

@robtfm
Copy link
Contributor

robtfm commented Jan 26, 2023

bors try

bors bot added a commit that referenced this pull request Jan 26, 2023
@bors
Copy link
Contributor

bors bot commented Jan 26, 2023

try

Build failed:

crates/bevy_render/src/view/window.rs Outdated Show resolved Hide resolved
crates/bevy_render/src/view/window.rs Outdated Show resolved Hide resolved
// TODO: If this isn't an sRGB surface (eg. on webgpu), use an sRGB view_format on the SurfaceConfiguration.
// TODO: webgpu doesn't support sRGB surfaces, and requires an sRGB view_format, but that was causing issues on Vulkan
// so it's getting skipped for now.
formats[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we instead try to find the first sRGB format supported, else fall back to format[0]?

Copy link
Contributor Author

@Elabajaba Elabajaba Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't that require iterating through all the formats available and checking if they're either Bgra8UnormSrgb or Rgba8UnormSrgb? IMO that's less clear than just explicitly requesting the formats.

let good_formats = [TextureFormat::Bgra8UnormSrgb, TextureFormat::Rgba8UnormSrgb];
let mut format = formats[0];
for available_format in formats {
    if good_formats.contains(&available_format) {
        format = available_format;
        break;
    }
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we instead try to find the first sRGB format supported, else fall back to format[0]?

i agree with the suggestion. looking for a supported srgb format starting at the beginning of the list seems like the robust choice that preserves wgpu "preferred" format (the wgpu docs say explicitly "The first format in the vector is preferred") while still giving an srgb result if possible. that's different to the current change here which will pick Rgba8UnormSrgb over Bgra8UnormSrgb even if Bgra8UnormSrgb is first.

there's also a bunch of BcN and Etc2 formats that return srgb: true in decsribe(). presumably surfaces can't return them? but perhaps its still better to search the list and call describe() on them for future compatibility/weird device compatibility.

as an aside, it looks like for me at least that the formats changed. in 0.15 win/nvidia/vulkan i get [Bgra8Unorm, Bgra8UnormSrgb, Rgba16Float] where in 0.14 i used to get [Bgra8UnormSrgb, Bgra8Unorm, Rgba16Float, Rgb10a2Unorm, Rgb10a2Unorm]. has the wgpu idea of "preferred" changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think iterate the formats and check texture_format.describe().srgb.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with doing the .describe().srgb, as like rob says there's multiple formats that we don't want for a surface that are srgb (and in the future afaik we don't want an srgb surface for hdr output). Those formats should be filtered out by wgpu, but I'd prefer to explicitly request formats here as imo it's clearer (and there's only 2 that we want).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the preferred formats (i.e. those closer to the beginning of the list) are more likely to support more features like more MSAA modes or so. Also, my understanding is that some devices prefer Bgra over Rgba, but will support both. I don't know if there's a performance hit somewhere just for doing the swizzling. I think the hard-coded way overrides the preferences of the device, whereas the respecting-preferences way 'risks' choosing a 'poor' sRGB format that is less preferred and less suitable.

@cwfitzgerald - do you know if it is better to:

  1. hard-code and request Rgba8UnormSrgb, else Bgra8UnormSrgb, else fall back to the first format in the list
  2. or if it is better to look for the first sRGB format in the list, else fall back to the first format in the list
  3. or just take the first format in the list and then manually apply sRGB in a shader if the format is not an sRGB format?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had missed that the PR was updated to default to the first format, and then iterate the list to look for either Rgba8UnormSrgb or Bgra8UnormSrgb and select the first encountered of those two if available. So it's a bit like option 2 above but filtering on the pool of allowed sRGB formats. Seems ok for now but I'm still interested in cwfitzgerald's input.

@Elabajaba
Copy link
Contributor Author

CI failures should be fixed since #7370 and #7368 landed in main. I don't think I need to rebase on main for it to work this time.

@rparrett
Copy link
Contributor

I tested all the examples on MacOS/M1.

post_processing and shader_prepass are broken, but both seem unrelated to this PR.

@Elabajaba
Copy link
Contributor Author

I tested all the examples on MacOS/M1.

post_processing and shader_prepass are broken, but both seem unrelated to this PR.

Looks like the cascaded shadow maps (CSM) PR probably broke both of them, as I'm now getting failures when running those examples after rebasing on main with CSM.

#6997 is a bit of a bodge and needs to be updated for CSM, but should fix them. #5703 is probably the better fix, but might not land in time for the next bevy release?

@robtfm
Copy link
Contributor

robtfm commented Jan 27, 2023

bors try

bors bot added a commit that referenced this pull request Jan 27, 2023
@Elabajaba
Copy link
Contributor Author

This currently panics when Msaa is used on an unsupported format instead of silently falling back to no Msaa (due to wgpu changes). Afaik this is mainly an issue on Linux+Vulkan+Intel Mesa setups.

Ideally we'd have the Msaa on Windows PR lined up (along with 2x and 8x support, since they all require the same querying for supported msaa formats on the Surface's format), but I can probably add a check on surface creation to log an error and fall back to disabling Msaa, and a TODO to remove it once someone does #7194.

Copy link
Contributor

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small doc issue, otherwise looks good to me. Can't comment on the format texture stuff, I don't understand it well enough. I'll leave that to others to review.

The MSAA check is important - it causes a crash on intel + vulkan + linux for me otherwise. Previous versions of wgpu were giving me weird white artifacts around edges due to MSAA.

crates/bevy_render/src/settings.rs Show resolved Hide resolved
};

// This is an ugly hack to work around drivers that don't support MSAA.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is indeed pretty ugly, but at least ResMut<Msaa> doesn't conflict with anything here so it shouldn't affect perf. good incentive to get #7194 done :)

@superdump superdump added the A-Rendering Drawing game state to the screen label Jan 28, 2023
Copy link
Contributor

@superdump superdump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes to the surface format selection. :) Looking close to mergeable now I think.

crates/bevy_render/src/lib.rs Outdated Show resolved Hide resolved
@@ -324,6 +324,8 @@ fn prepare_view_targets(
format: main_texture_format,
usage: TextureUsages::RENDER_ATTACHMENT
| TextureUsages::TEXTURE_BINDING,
// TODO: Consider changing this if main_texture_format is not sRGB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the implications here? The comment doesn't elaborate enough for me to understand its purpose. It seems to imply that something assumes a default that will be an sRGB format?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wgpu documentation suggests this is about potentially requesting a different kind of texture view than the texture format of the surface texture. So I suppose we would do something like:

if !main_texture_format.describe().srgb {
    main_texture_format.add_srgb_suffix()
}

Or, we could even do it unconditionally as the same format would be returned anyway: https://docs.rs/wgpu-types/0.15.0/src/wgpu_types/lib.rs.html#2608 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented this with a focus on understanding the wgpu-side and calling it. But for our side I feel like we should only need to bother about srgb for the final surface, but I know that the deband dithering needs to be applied where quantisation happens which is unfortunately at the output of the main lighting pass, and then if we’re converting to srgb at some later point like in the final blit to the surface texture, we’d probably need to apply it there too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik this should only be an issue on WebGPU (and maybe Nvidia Wayland?) where sRGB surfaces aren't supported.

You need to use an sRGB texture view on the surfaces for the output colours to look right, but I was running into Vulkan validation errors which seemed to imply that the whole pipeline needs to have the same sRGB texture view as the surface it outputs to. (which isn't possible, as texture views are currently limited in wgpu to the same format as the texture, just with sRGB toggled)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation issues might also be due to a wgpu bug. There's a fix for it (gfx-rs/wgpu#3432), but I haven't tested it yet.

crates/bevy_render/src/view/window.rs Outdated Show resolved Hide resolved
crates/bevy_render/src/view/window.rs Show resolved Hide resolved
Comment on lines +236 to +252
// This is an ugly hack to work around drivers that don't support MSAA.
// This should be removed once https://github.com/bevyengine/bevy/issues/7194 lands and we're doing proper
// feature detection for MSAA.
let sample_flags = render_adapter
.get_texture_format_features(surface_configuration.format)
.flags;
match *msaa {
Msaa::Off => (),
Msaa::Sample4 => {
if !sample_flags.contains(wgpu::TextureFormatFeatureFlags::MULTISAMPLE_X4) {
bevy_log::warn!(
"MSAA 4x is not supported on this device. Falling back to disabling MSAA."
);
*msaa = Msaa::Off;
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One problem I see with this is that MSAA can be toggled at runtime. We have an msaa example that tests that IIRC. What happens in that case? If it was a problem before wgpu 0.15 and so is not a regression then we can just create an issue and not block this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre 0.15 it wouldn't cause a panic, it just wouldn't work and would render strangely (weird white outlines around stuff, that no longer happens with this according to Jasmine (@JMS55)).

In 0.15 it panics.

@JMS55 tested this and it works both when MSAA is enabled at the start, and when it's toggled at runtime.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, in 0.15 it panics when MSAA is turned on.

This code to disable MSAA works well and prevents the crash, including when toggled at runtime.

@coreh
Copy link
Contributor

coreh commented Jan 28, 2023

Does this also allow us to use const expressions?

@Elabajaba
Copy link
Contributor Author

Someone ran into an issue with custom paths for the DXC dlls (gfx-rs/wgpu#3433), but there'll probably be a wgpu patch version released in a week or two (so before bevy releases) and I've made a PR to fix it that will most likely be included in the wgpu patch.

@Elabajaba
Copy link
Contributor Author

Does this also allow us to use const expressions?

I don't know, and I didn't see anything about it in the wgpu or naga changelog when I skimmed it.

@superdump
Copy link
Contributor

@Elabajaba could you rebase? I’m going to give this another look over but I think it’s probably ready to merge.

Copy link
Contributor

@superdump superdump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot pushed a commit that referenced this pull request Jan 29, 2023
# Objective

Update Bevy to wgpu 0.15.

## Changelog

- Update to wgpu 0.15, wgpu-hal 0.15.1, and naga 0.11
- Users can now use the [DirectX Shader Compiler](https://github.com/microsoft/DirectXShaderCompiler) (DXC) on Windows with DX12 for faster shader compilation and ShaderModel 6.0+ support (requires `dxcompiler.dll` and `dxil.dll`, which are included in DXC downloads from [here](https://github.com/microsoft/DirectXShaderCompiler/releases/latest))

## Migration Guide

### WGSL Top-Level `let` is now `const`

All top level constants are now declared with `const`, catching up with the wgsl spec.

`let` is no longer allowed at the global scope, only within functions.

```diff
-let SOME_CONSTANT = 12.0;
+const SOME_CONSTANT = 12.0;
```

#### `TextureDescriptor` and `SurfaceConfiguration` now requires a `view_formats` field

The new `view_formats` field in the `TextureDescriptor` is used to specify a list of formats the texture can be re-interpreted to in a texture view. Currently only changing srgb-ness is allowed (ex. `Rgba8Unorm` <=> `Rgba8UnormSrgb`). You should set `view_formats` to `&[]` (empty) unless you have a specific reason not to.

#### The DirectX Shader Compiler (DXC) is now supported on DX12

DXC is now the default shader compiler when using the DX12 backend. DXC is Microsoft's replacement for their legacy FXC compiler, and is faster, less buggy, and allows for modern shader features to be used (ShaderModel 6.0+). DXC requires `dxcompiler.dll` and `dxil.dll` to be available, otherwise it will log a warning and fall back to FXC.

You can get `dxcompiler.dll` and `dxil.dll` by downloading the latest release from [Microsoft's DirectXShaderCompiler github repo](https://github.com/microsoft/DirectXShaderCompiler/releases/latest) and copying them into your project's root directory. These must be included when you distribute your Bevy game/app/etc if you plan on supporting the DX12 backend and are using DXC.

`WgpuSettings` now has a `dx12_shader_compiler` field which can be used to choose between either FXC or DXC (if you pass None for the paths for DXC, it will check for the .dlls in the working directory).
@bors bors bot changed the title Wgpu 0.15 [Merged by Bors] - Wgpu 0.15 Jan 29, 2023
@bors bors bot closed this Jan 29, 2023
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Update Bevy to wgpu 0.15.

## Changelog

- Update to wgpu 0.15, wgpu-hal 0.15.1, and naga 0.11
- Users can now use the [DirectX Shader Compiler](https://github.com/microsoft/DirectXShaderCompiler) (DXC) on Windows with DX12 for faster shader compilation and ShaderModel 6.0+ support (requires `dxcompiler.dll` and `dxil.dll`, which are included in DXC downloads from [here](https://github.com/microsoft/DirectXShaderCompiler/releases/latest))

## Migration Guide

### WGSL Top-Level `let` is now `const`

All top level constants are now declared with `const`, catching up with the wgsl spec.

`let` is no longer allowed at the global scope, only within functions.

```diff
-let SOME_CONSTANT = 12.0;
+const SOME_CONSTANT = 12.0;
```

#### `TextureDescriptor` and `SurfaceConfiguration` now requires a `view_formats` field

The new `view_formats` field in the `TextureDescriptor` is used to specify a list of formats the texture can be re-interpreted to in a texture view. Currently only changing srgb-ness is allowed (ex. `Rgba8Unorm` <=> `Rgba8UnormSrgb`). You should set `view_formats` to `&[]` (empty) unless you have a specific reason not to.

#### The DirectX Shader Compiler (DXC) is now supported on DX12

DXC is now the default shader compiler when using the DX12 backend. DXC is Microsoft's replacement for their legacy FXC compiler, and is faster, less buggy, and allows for modern shader features to be used (ShaderModel 6.0+). DXC requires `dxcompiler.dll` and `dxil.dll` to be available, otherwise it will log a warning and fall back to FXC.

You can get `dxcompiler.dll` and `dxil.dll` by downloading the latest release from [Microsoft's DirectXShaderCompiler github repo](https://github.com/microsoft/DirectXShaderCompiler/releases/latest) and copying them into your project's root directory. These must be included when you distribute your Bevy game/app/etc if you plan on supporting the DX12 backend and are using DXC.

`WgpuSettings` now has a `dx12_shader_compiler` field which can be used to choose between either FXC or DXC (if you pass None for the paths for DXC, it will check for the .dlls in the working directory).
bors bot pushed a commit to bevyengine/bevy-website that referenced this pull request Mar 6, 2023
## How This Works

For the Bevy 0.10 release blog post (and for the first time ever), I'm publicly opening the doors to other people writing blog post sections. Specifically, if you worked on a feature in a substantial way and are interested in presenting it, you can now ask to claim a section by leaving a comment in this PR. If you claim a section, submit a pull request to the `release-0.10.0` branch in this repo. For the next week, we will be filling in sections (the release target is Saturday March 4th). Please don't claim a section if you don't plan on completing it within that timeline. Also don't claim a section if you weren't an active participant in the design and implementation of the change (unless you are a Maintainer or SME).

I will claim any unclaimed sections.

Try to match the style of previous release blog posts as much as possible.

1. Show, don't tell. Don't bombard people with information. Avoid large walls of text _and_ large walls of code. Prefer the pattern "byte sized description of one thing" -> "example code/picture/video contextualizing that one thing" -> repeat. Take readers on a journey step by simple step.
2. Don't use up reader's "mental bandwidth" without good reason. We can't afford page-long descriptions of minor bug fixes. If it isn't a "headliner change", keep the description short and sweet. If a change is self describing, let it do that (ex: We now support this new mesh shape primitive ... this is what it looks like). If it is a "headliner change", still try to keep it reasonable. We always have a lot to cover.
3. In slight competition with point (2), don't omit interesting technical information when it is truly fun and engaging. A good chunk of our users are highly technical and enjoy learning how the sausage is made. Try to strike a balance between "terse and simple" and "nerdy details".
4. When relevant, briefly describe the problem being solved first, then describe the solution we chose. This contextualizes the change and gives the feature value and purpose.
5. When possible, provide visuals. They create interest / keep people hooked / break up the monotony.
6. Record images and videos at the default bevy resolution (1280x720)
7. Provide an accurate listing of authors that meaningfully contributed to the feature. Try to sort in order of "contribution scale". This is hard to define, but try to be fair. When in doubt, ask other contributors, SMEs, and/or maintainers.
8. Provide numbers and graphs where possible.  If something is faster, use numbers to back it up. We don't (yet) have automated graph generation in blog post style, so send data / info to me (@cart) if you want a graph made.

## Headliners

Headliners are our "big ticket high importance / high profile" changes. They are listed briefly at the beginning of the blog post, their entries are roughly sorted "to the top", and they are given priority when it comes to "space in the blog post". If you think we missed something (or didn't prioritize something appropriately), let us know.

* ECS Schedule v3 (previously known as "stageless")  
* Partial Android Support
* Depth and Normal Prepass
* Environment Map Lighting
* Cascaded Shadow Maps
* Distance and Atmospheric Fog
* Smooth Skeletal Animation Transitions
* Enable Parallel Pipelined Rendering
* Windows as Entities
* Renderer Optimizations
* ECS Optimizations

## Sections

These are the sections we will cover in the blog post. If a section has been claimed, it will have `(claimed by X)` in the title. If it is unclaimed it will have `(unclaimed)` in the title. Let us know if we missed a section. We don't cover every feature, but we should cover pretty much everything that would be interesting to users. Note that what is interesting or challenging to implement is not necessarily something that is relevant to our blog post readers. And sometimes the reverse is true!

If you believe a section should be split up or reorganized, just bring it up here and we can discuss it.

### ~~Schedule V3 (claimed by @alice-i-cecile)~~

* [Migrate engine to Schedule v3][7267]
* [Add `bevy_ecs::schedule_v3` module][6587]
* [Stageless: fix unapplied systems][7446]
* [Stageless: move final apply outside of spawned executor][7445]
* Sets
* Base Sets
  * [Base Sets][7466]
* Reporting
  * [Report sets][7756]
  * [beter cycle reporting][7463]
* Run Conditions
  * [Add condition negation][7559]
  * [And/Or][7605]
  * [Add more common run conditions][7579]
* States
  * [States derive macro][7535]
* System Piping Flexibility
  * [Support piping exclusive systems][7023]
  * [Allow piping run conditions][7547]

### ~~Depth and Normal Prepass (claimed by @IceSentry)~~

* [Add depth and normal prepass][6284]
* [Move prepass functions to prepass_utils][7354]

### ~~Distance and Atmospheric Fog (claimed by @coreh)~~

* [Add Distance and Atmospheric Fog support][6412]

### ~~Cascaded Shadow Maps (claimed by @cart)~~

* [Cascaded shadow maps.][7064]
* [Better cascades config defaults + builder, tweak example configs][7456]

### ~~Environment Map Lighting (claimed by @cart)~~

* [EnvironmentMapLight, BRDF Improvements][7051]
* [Webgl2 support][7737]

### ~~Tonemapping options (claimed by @cart)~~

* [Initial tonemapping options][7594]

### ~~Android support + unification (claimed by @mockersf)~~

* [IOS, Android... same thing][7493]

### ~~Windows as Entities (claimed by @Aceeri)~~

* [Windows as Entities][5589]
* [break feedback loop when moving cursor][7298]
* [Fix `Window` feedback loop between the OS and Bevy][7517]

### ~~Enable Parallel Pipelined Rendering (claimed by @james7132)~~

* [Pipelined Rendering][6503]
* [Stageless: add a method to scope to always run a task on the scope thread][7415]
* [Separate Extract from Sub App Schedule][7046]

### ~~Smooth Skeletal Animation Transitions (claimed by @james7132)~~

* [Smooth Transition between Animations][6922]

### ~~Spatial Audio (claimed by @harudagondi)~~

* [Spatial Audio][6028]

### ~~Shader Processor Features (claimed by @cart)~~

* [Shader defs can now have a value][5900]
* [Shaders can now have #else ifdef chains][7431]
* [Define shader defs in shader][7518]

### ~~Shader Flexibility Improvements (claimed by @cart)~~

* [add ambient lighting hook][5428]
* [Refactor Globals and View structs into separate shaders][7512]

### ~~Renderer Optimizations (claimed by @james7132)~~

* [bevy_pbr: Avoid copying structs and using registers in shaders][7069]
* [Flatten render commands][6885]
* [Replace UUID based IDs with a atomic-counted ones][6988]
* [improve compile time by type-erasing wgpu structs][5950]
* [Shrink DrawFunctionId][6944]
* [Shrink ComputedVisibility][6305]
* [Reduce branching in TrackedRenderPass][7053]
* [Make PipelineCache internally mutable.][7205]
* [Improve `Color::hex` performance][6940]
* [Support recording multiple CommandBuffers in RenderContext][7248]
* [Parallelized transform propagation][4775]
* [Introduce detailed_trace macro, use in TrackedRenderPass][7639]
* [Optimize color computation in prepare_uinodes][7311]
* [Directly extract joints into SkinnedMeshJoints][6833]
* [Parallelize forward kinematics animation systems][6785]
* [Move system_commands spans into apply_buffers][6900]
* [Reduce the use of atomics in the render phase][7084]

### ~~ECS Optimizations (claimed by @james7132 )~~

* [Remove redundant table and sparse set component IDs from Archetype][4927]
* [Immutable sparse sets for metadata storage][4928]
* [Replace BlobVec's swap_scratch with a swap_nonoverlapping][4853]
* [Use T::Storage::STORAGE_TYPE to optimize out unused branches][6800]
* [Remove unnecessary branching from bundle insertion][6902]
* [Split Component Ticks][6547]
* [use bevy_utils::HashMap for better performance. TypeId is predefined …][7642]
* [Extend EntityLocation with TableId and TableRow][6681]
* [Basic adaptive batching for parallel quer- [Speed up `CommandQueue` by storing commands more densely][6391]y iteration][4777]

### ~~Reflect Improvements (claimed by @cart)~~

* [bevy_reflect: Add `ReflectFromReflect` (v2)][6245]
* [Add reflection support for VecDeque][6831]
* [reflect: add `insert` and `remove` methods to `List`][7063]
* [Add `remove` method to `Map` reflection trait.][6564]
* [bevy_reflect: Fix binary deserialization not working for unit structs][6722]
* [Add `TypeRegistrationDeserializer` and remove `BorrowedStr`][7094]
* [bevy_reflect: Add simple enum support to reflection paths][6560]
* [Enable deriving Reflect on structs with generic types][7364]
* [bevy_reflect: Support tuple reflection paths][7324]
* [bevy_reflect: Pre-parsed paths][7321]
* [bevy_ecs: ReflectComponentFns without World][7206]

### ~~AsBindGroup Improvements (claimed by @cart)~~

* [Support storage buffers in derive `AsBindGroup`][6129]
* [Support raw buffers in AsBindGroup][7701]

### ~~Cylinder Shape (claimed by @cart)~~

* [Add cylinder shape][6809]

### ~~Subdividable Plane Shape (claimed by @cart)~~

* [added subdivisions to shape::Plane][7546]

### ~~StandardMaterial Blend Modes (claimed by @coreh)~~

* [Standard Material Blend Modes][6644]

### ~~Configurable Visibility Component (claimed by @cart)~~

* [enum `Visibility` component][6320]

### Task Improvements (claimed by @cart)

* [Fix panicking on another scope][6524]
* [Add thread create/destroy callbacks to TaskPool][6561]
* [Thread executor for running tasks on specific threads.][7087]
* [await tasks to cancel][6696]
* [Stageless: move MainThreadExecutor to schedule_v3][7444]
* [Stageless: close the finish channel so executor doesn't deadlock][7448]

### ~~Upgrade to wgpu 0.15 (claimed by @cart)~~

* [Wgpu 0.15][7356]

### ~~Expose Bindless / Non-uniform Indexing Support (claimed by @cart)~~

* [Request WGPU Capabilities for Non-uniform Indexing][6995]

### ~~Cubic Spline (claimed by @aevyrie)~~

* [Bezier][7653]

### ~~Revamp Bloom (claimed by @JMS55)~~

* [Revamp bloom](bevyengine/bevy#6677)

### ~~Use Prepass Shaders for Shadows (claimed by @superdump)~~

* [use prepass shaders for shadows](bevyengine/bevy#7784)

### ~~AccessKit (claimed by @alice-i-cecile)~~

* [accesskit](bevyengine/bevy#6874)

### ~~Camera Output Modes (claimed by @cart)~~

* [camera output modes](bevyengine/bevy#7671)

### ~~SystemParam Improvements (claimed by @JoJoJet)~~

* [Make the `SystemParam` derive macro more flexible][6694]
* [Add a `SystemParam` primitive for deferred mutations; allow `#[derive]`ing more types of SystemParam][6817]

### ~~Gamepad Improvements (claimed by @cart)~~

* [Gamepad events refactor][6965]
* [add `Axis::devices` to get all the input devices][5400]

### ~~Input Methods (claimed by @cart)~~

* [add Input Method Editor support][7325]

### ~~Color Improvements (claimed by @cart)~~

* [Add LCH(ab) color space to `bevy_render::color::Color`][7483]
* [Add a more familiar hex color entry][7060]

### ~~Split Up CorePlugin (claimed by @cart)~~

* [Break `CorePlugin` into `TaskPoolPlugin`, `TypeRegistrationPlugin`, `FrameCountPlugin`.][7083]

### ~~ExtractComponent Derive (claimed by @cart)~~

* [Extract component derive][7399]

### ~~Added OpenGL and DX11 Backends By Default (claimed by @cart)~~

* [add OpenGL and DX11 backends][7481]

### ~~UnsafeWorldCell (claimed by @BoxyUwU)~~

* [Move all logic to `UnsafeWorldCell`][7381]
* [Rename `UnsafeWorldCellEntityRef` to `UnsafeEntityCell`][7568]

### ~~Entity Commands (claimed by @cart)~~

* [Add a trait for commands that run for a given `Entity`][7015]

* [Add an extension trait to `EntityCommands` to update hierarchy while preserving `GlobalTransform`][7024]
* [Add ReplaceChildren and ClearChildren EntityCommands][6035]

### ~~Iterate EntityRef (claimed by @james7132)~~

* [Allow iterating over with EntityRef over the entire World][6843]

### ~~Ref Queries (@JoJoJet)~~

* [Added Ref to allow immutable access with change detection][7097]

### ~~Taffy Upgrade (claimed by @cart)~~

* [Upgrade to Taffy 0.2][6743]

### ~~Relative Cursor Position (claimed by @cart)~~

* [Relative cursor position][7199]

### ~~Const UI Config (claimed by @cart)~~

* [Add const to methods and const defaults to bevy_ui][5542]

### ~~Examples (claimed by @cart)~~

* [Add pixelated Bevy to assets and an example][6408]
* [Organized scene_viewer into plugins for reuse and organization][6936]

### ~~CI Improvements (claimed by @cart)~~

* [add rust-version for MSRV and CI job to check][6852]
* [msrv: only send a message on failure during the actual msrv part][7532]
* [Make CI friendlier][7398]
* [Fix CI welcome message][7428]
* [add an action to ask for a migration guide when one is missing][7507]

### ~~SMEs (@cart)~~

This was already covered in another blog post. Just briefly call out what they are and that this is the first release that used them. Link to the other blog post.

* [Subject Matter Experts and new Bevy Org docs][7185]

[4775]: bevyengine/bevy#4775
[4777]: bevyengine/bevy#4777
[4853]: bevyengine/bevy#4853
[4927]: bevyengine/bevy#4927
[4928]: bevyengine/bevy#4928
[5400]: bevyengine/bevy#5400
[5428]: bevyengine/bevy#5428
[5542]: bevyengine/bevy#5542
[5589]: bevyengine/bevy#5589
[5900]: bevyengine/bevy#5900
[5950]: bevyengine/bevy#5950
[6028]: bevyengine/bevy#6028
[6035]: bevyengine/bevy#6035
[6129]: bevyengine/bevy#6129
[6179]: bevyengine/bevy#6179
[6245]: bevyengine/bevy#6245
[6284]: bevyengine/bevy#6284
[6305]: bevyengine/bevy#6305
[6320]: bevyengine/bevy#6320
[6391]: bevyengine/bevy#6391
[6408]: bevyengine/bevy#6408
[6412]: bevyengine/bevy#6412
[6503]: bevyengine/bevy#6503
[6524]: bevyengine/bevy#6524
[6547]: bevyengine/bevy#6547
[6557]: bevyengine/bevy#6557
[6560]: bevyengine/bevy#6560
[6561]: bevyengine/bevy#6561
[6564]: bevyengine/bevy#6564
[6587]: bevyengine/bevy#6587
[6644]: bevyengine/bevy#6644
[6649]: bevyengine/bevy#6649
[6681]: bevyengine/bevy#6681
[6694]: bevyengine/bevy#6694
[6696]: bevyengine/bevy#6696
[6722]: bevyengine/bevy#6722
[6743]: bevyengine/bevy#6743
[6785]: bevyengine/bevy#6785
[6800]: bevyengine/bevy#6800
[6802]: bevyengine/bevy#6802
[6809]: bevyengine/bevy#6809
[6817]: bevyengine/bevy#6817
[6831]: bevyengine/bevy#6831
[6833]: bevyengine/bevy#6833
[6843]: bevyengine/bevy#6843
[6852]: bevyengine/bevy#6852
[6885]: bevyengine/bevy#6885
[6900]: bevyengine/bevy#6900
[6902]: bevyengine/bevy#6902
[6922]: bevyengine/bevy#6922
[6926]: bevyengine/bevy#6926
[6936]: bevyengine/bevy#6936
[6940]: bevyengine/bevy#6940
[6944]: bevyengine/bevy#6944
[6965]: bevyengine/bevy#6965
[6988]: bevyengine/bevy#6988
[6995]: bevyengine/bevy#6995
[7015]: bevyengine/bevy#7015
[7023]: bevyengine/bevy#7023
[7024]: bevyengine/bevy#7024
[7046]: bevyengine/bevy#7046
[7051]: bevyengine/bevy#7051
[7053]: bevyengine/bevy#7053
[7060]: bevyengine/bevy#7060
[7063]: bevyengine/bevy#7063
[7064]: bevyengine/bevy#7064
[7069]: bevyengine/bevy#7069
[7083]: bevyengine/bevy#7083
[7084]: bevyengine/bevy#7084
[7087]: bevyengine/bevy#7087
[7094]: bevyengine/bevy#7094
[7097]: bevyengine/bevy#7097
[7185]: bevyengine/bevy#7185
[7199]: bevyengine/bevy#7199
[7205]: bevyengine/bevy#7205
[7206]: bevyengine/bevy#7206
[7248]: bevyengine/bevy#7248
[7267]: bevyengine/bevy#7267
[7298]: bevyengine/bevy#7298
[7311]: bevyengine/bevy#7311
[7321]: bevyengine/bevy#7321
[7324]: bevyengine/bevy#7324
[7325]: bevyengine/bevy#7325
[7354]: bevyengine/bevy#7354
[7356]: bevyengine/bevy#7356
[7364]: bevyengine/bevy#7364
[7381]: bevyengine/bevy#7381
[7398]: bevyengine/bevy#7398
[7399]: bevyengine/bevy#7399
[7415]: bevyengine/bevy#7415
[7428]: bevyengine/bevy#7428
[7431]: bevyengine/bevy#7431
[7444]: bevyengine/bevy#7444
[7445]: bevyengine/bevy#7445
[7446]: bevyengine/bevy#7446
[7448]: bevyengine/bevy#7448
[7456]: bevyengine/bevy#7456
[7463]: bevyengine/bevy#7463
[7466]: bevyengine/bevy#7466
[7481]: bevyengine/bevy#7481
[7483]: bevyengine/bevy#7483
[7493]: bevyengine/bevy#7493
[7507]: bevyengine/bevy#7507
[7510]: bevyengine/bevy#7510
[7512]: bevyengine/bevy#7512
[7517]: bevyengine/bevy#7517
[7518]: bevyengine/bevy#7518
[7532]: bevyengine/bevy#7532
[7535]: bevyengine/bevy#7535
[7546]: bevyengine/bevy#7546
[7547]: bevyengine/bevy#7547
[7559]: bevyengine/bevy#7559
[7568]: bevyengine/bevy#7568
[7579]: bevyengine/bevy#7579
[7594]: bevyengine/bevy#7594
[7605]: bevyengine/bevy#7605
[7639]: bevyengine/bevy#7639
[7642]: bevyengine/bevy#7642
[7653]: bevyengine/bevy#7653
[7701]: bevyengine/bevy#7701
[7737]: bevyengine/bevy#7737
[7756]: bevyengine/bevy#7756


Co-authored-by: François <mockersf@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Mike <mike.hsu@gmail.com>
Co-authored-by: Boxy <supbscripter@gmail.com>
Co-authored-by: IceSentry <c.giguere42@gmail.com>
Co-authored-by: JoJoJet <21144246+JoJoJet@users.noreply.github.com>
Co-authored-by: Aevyrie <aevyrie@gmail.com>
Co-authored-by: James Liu <contact@jamessliu.com>
Co-authored-by: Marco Buono <thecoreh@gmail.com>
Co-authored-by: Aceeri <conmcclusk@gmail.com>
@tim-blackbird tim-blackbird mentioned this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-Windowing Platform-agnostic interface layer to run your app in C-Dependencies A change to the crates that Bevy depends on
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

8 participants