bevy/examples/shader
Elabajaba 70a592f31a
Update to wgpu 0.18 (#10266)
# Objective

Keep up to date with wgpu.

## Solution

Update the wgpu version.

Currently blocked on naga_oil updating to naga 0.14 and releasing a new
version.

3d scenes (or maybe any scene with lighting?) currently don't render
anything due to
```
error: naga_oil bug, please file a report: composer failed to build a valid header: Type [2] '' is invalid
 = Capability Capabilities(CUBE_ARRAY_TEXTURES) is required
 ```

I'm not sure what should be passed in for `wgpu::InstanceFlags`, or if we want to make the gles3minorversion configurable (might be useful for debugging?)

Currently blocked on https://github.com/bevyengine/naga_oil/pull/63, and https://github.com/gfx-rs/wgpu/issues/4569 to be fixed upstream in wgpu first.

## Known issues

Amd+windows+vulkan has issues with texture_binding_arrays (see the image [here](https://github.com/bevyengine/bevy/pull/10266#issuecomment-1819946278)), but that'll be fixed in the next wgpu/naga version, and you can just use dx12 as a workaround for now (Amd+linux mesa+vulkan texture_binding_arrays are fixed though).

---

## Changelog

Updated wgpu to 0.18, naga to 0.14.2, and naga_oil to 0.11.
- Windows desktop GL should now be less painful as it no longer requires Angle.
- You can now toggle shader validation and debug information for debug and release builds using `WgpuSettings.instance_flags` and [InstanceFlags](https://docs.rs/wgpu/0.18.0/wgpu/struct.InstanceFlags.html)

## Migration Guide

- `RenderPassDescriptor` `color_attachments`  (as well as `RenderPassColorAttachment`, and `RenderPassDepthStencilAttachment`) now use `StoreOp::Store` or `StoreOp::Discard` instead of a `boolean` to declare whether or not they should be stored.
- `RenderPassDescriptor` now have `timestamp_writes` and `occlusion_query_set` fields. These can safely be set to `None`.
- `ComputePassDescriptor` now have a `timestamp_writes` field. This can be set to `None` for now.
- See the [wgpu changelog](https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md#v0180-2023-10-25) for additional details
2023-12-14 02:45:47 +00:00
..
animate_shader.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
array_texture.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
compute_shader_game_of_life.rs Bind group layout entries (#10224) 2023-11-28 04:00:49 +00:00
custom_vertex_attribute.rs Add consuming builder methods for more ergonomic Mesh creation (#10056) 2023-10-09 19:47:41 +00:00
extended_material.rs Ensure ExtendedMaterial works with reflection (to enable bevy_egui_inspector integration) (#10548) 2023-11-15 12:48:36 +00:00
fallback_image.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
post_processing.rs Update to wgpu 0.18 (#10266) 2023-12-14 02:45:47 +00:00
shader_defs.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
shader_instancing.rs Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
shader_material.rs Improve shader_material example (#10547) 2023-11-20 10:24:02 +00:00
shader_material_2d.rs Add shader_material_2d example (#10542) 2023-11-14 02:18:25 +00:00
shader_material_glsl.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
shader_material_screenspace_texture.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
shader_prepass.rs Rename Input to ButtonInput (#10859) 2023-12-06 20:32:34 +00:00
texture_binding_array.rs Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00