Skip to content

Commit 49ab2c4

Browse files
authored
Another batch of migration guides (76%) (#1490)
1 parent 85af2c0 commit 49ab2c4

16 files changed

+59
-53
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The `bevy_pbr::utils::random1D` shader function has been replaced by the similar `bevy_pbr::utils::rand_f`.
1+
The `bevy_pbr::utils::random1D()` **shader** function has been replaced by the similar `bevy_pbr::utils::rand_f()`. Note that if you convert the returned `f32` to a different data type, you may be interested in `rand_u()` which returns a `u32` and `rand_vec2f()` which returns a `vec2<f32>`.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Duplicate `MeshVertexBufferLayout`s are now combined into a single object, `MeshVertexBufferLayoutRef`, which contains an atomically-reference-counted pointer to the layout. Code that was using `MeshVertexBufferLayout` may need to be updated to use `MeshVertexBufferLayoutRef` instead.
1+
Duplicate `MeshVertexBufferLayout`s are now combined into a single object, `MeshVertexBufferLayoutRef`, which contains an atomically-reference-counted (`Arc`) pointer to the layout. By interning these layouts, the results of `PartialEq` can be cached, resulting in a speedup in rendering. Code that was using `MeshVertexBufferLayout` may need to be updated to use `MeshVertexBufferLayoutRef` instead.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
`GpuArrayBufferIndex::index` is now a u32 instead of a `NonMaxU32`. Remove any calls to `NonMaxU32::get` on the member.
1+
`GpuArrayBufferIndex::index` is now a `u32` instead of a `NonMaxU32`, since restricting the number isn't necessary anymore. Please update any usage to use `u32` instead.

release-content/0.14/migration-guides/12526_Solve_some_oklaba_inconsistencies.md

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
`MaterialPlugin` now has a `shadows_enabled` setting, if you didn’t spawn the plugin using `::default()` or `..default()`, you’ll need to set it. `shadows_enabled: true` is the same behavior as the previous version, and also the default value.
1+
`MaterialPlugin` now has a `shadows_enabled` property. If you manually constructed this plugin, you may need to set it. By default it is true, but you can disable shadows entirely by setting it to false.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The raw values for the `HDR`, `TONEMAP_IN_SHADER` and `DEBAND_DITHER` flags have changed, so if you were constructing the pipeline key from raw `u32`s you’ll have to account for that.
1+
The `COLORED` flag of `SpritePipelineKey` has been removed, since it is no longer used. In doing so, the raw values of `HDR`, `TONEMAP_IN_SHADER`, and `DEBAND_DITHER` have changed. If you are manually converting a `u32` into `SpritePipelineKey`, you may need to update it.

release-content/0.14/migration-guides/12649_Implement_maths_and_Animatable_for_Srgba.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Custom render phases now need multiple systems beyond just `batch_and_prepare_render_phase`. Code that was previously creating custom render phases should now add a `BinnedRenderPhasePlugin` or `SortedRenderPhasePlugin` as appropriate instead of directly adding `batch_and_prepare_render_phase`.
1+
Custom render phases now need multiple systems beyond just `batch_and_prepare_render_phase`. Code that was previously creating custom render phases should now add a `BinnedRenderPhasePlugin` or `SortedRenderPhasePlugin` as appropriate, instead of directly adding `batch_and_prepare_render_phase`.
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
- The `primitive_topology` field on `GpuMesh` is now an accessor method: `GpuMesh::primitive_topology()`.
2-
- For performance reasons, `MeshPipelineKey` has been split into `BaseMeshPipelineKey`, which lives in `bevy_render`, and `MeshPipelineKey`, which lives in `bevy_pbr`. These two should be combined with bitwise-or to produce the final `MeshPipelineKey`.
1+
The `primitive_topology` field on `GpuMesh` is now an getter method: `GpuMesh::primitive_topology()`.
2+
3+
For performance reasons, `MeshPipelineKey` has been split into `BaseMeshPipelineKey`, which lives in `bevy::render`, and `MeshPipelineKey`, which lives in `bevy::pbr`. These two may be combined with bitwise-or to produce the final `MeshPipelineKey`.
4+
5+
```rust
6+
let base_pipeline_key = BaseMeshPipelineKey::all();
7+
let pbr_pipeline_key = MeshPipelineKey::all();
8+
9+
let pipeline_key: u64 = base_pipeline_key.bits() | pbr_pipeline_key.bits();
10+
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Removed `DeterministicRenderingConfig`. There shouldn’t be any z fighting anymore in the rendering even without setting `stable_sort_z_fighting`
1+
`DeterministicRenderingConfig` has been removed because its only property, `stable_sort_z_fighting`, is no longer needed. Z-fighting has been generally removed now that opaque items are binned instead of sorted.

0 commit comments

Comments
 (0)