bevy/crates/bevy_pbr/src/render
Elabajaba bfd1d4b0a7 Wgpu 0.15 (#7356)
# 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).
2023-01-29 20:27:30 +00:00
..
clustered_forward.wgsl Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
depth.wgsl Cascaded shadow maps. (#7064) 2023-01-25 12:35:39 +00:00
fog.rs Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
fog.wgsl Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
light.rs Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
mesh.rs Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
mesh.wgsl bevy_pbr: Fix incorrect and unnecessary normal-mapping code (#5766) 2022-11-03 20:37:32 +00:00
mesh_bindings.wgsl update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00
mesh_functions.wgsl bevy_pbr: Fix tangent and normal normalization (#5666) 2022-08-18 21:54:40 +00:00
mesh_types.wgsl Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
mesh_vertex_output.wgsl update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00
mesh_view_bindings.wgsl Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
mesh_view_types.wgsl Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
mod.rs Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
pbr.wgsl Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
pbr_bindings.wgsl update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00
pbr_functions.wgsl Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
pbr_lighting.wgsl bevy_pbr: Avoid copying structs and using registers in shaders (#7069) 2023-01-02 22:07:33 +00:00
pbr_prepass.wgsl Add depth and normal prepass (#6284) 2023-01-19 22:11:13 +00:00
pbr_types.wgsl Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
shadows.wgsl Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
skinning.wgsl bevy_pbr: Normalize skinned normals (#6543) 2022-11-11 03:31:57 +00:00
utils.wgsl Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
wireframe.wgsl update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00