From f85e0dd5eaf13a6fb3883521c8f3be0813aeaf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Wed, 25 Dec 2024 11:15:57 +0100 Subject: [PATCH 1/5] correctly set `slot` when not bindless --- crates/bevy_pbr/src/render/pbr_fragment.wgsl | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_pbr/src/render/pbr_fragment.wgsl b/crates/bevy_pbr/src/render/pbr_fragment.wgsl index 1df7ef404f7b8..7d991a9769330 100644 --- a/crates/bevy_pbr/src/render/pbr_fragment.wgsl +++ b/crates/bevy_pbr/src/render/pbr_fragment.wgsl @@ -80,6 +80,7 @@ fn pbr_input_from_standard_material( let base_color = pbr_bindings::material[slot].base_color; let deferred_lighting_pass_id = pbr_bindings::material[slot].deferred_lighting_pass_id; #else // BINDLESS + let slot = mesh[in.instance_index].material_and_lightmap_bind_group_slot & 0xffffu; let flags = pbr_bindings::material.flags; let base_color = pbr_bindings::material.base_color; let deferred_lighting_pass_id = pbr_bindings::material.deferred_lighting_pass_id; From 3e297fec47d84520f63e639ba83f78356cf8d799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Wed, 25 Dec 2024 11:16:10 +0100 Subject: [PATCH 2/5] also use `slot` for `VERTEX_UVS_B` --- crates/bevy_pbr/src/render/pbr_fragment.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/render/pbr_fragment.wgsl b/crates/bevy_pbr/src/render/pbr_fragment.wgsl index 7d991a9769330..a8a02b3f71a4e 100644 --- a/crates/bevy_pbr/src/render/pbr_fragment.wgsl +++ b/crates/bevy_pbr/src/render/pbr_fragment.wgsl @@ -172,7 +172,7 @@ fn pbr_input_from_standard_material( // parallax mapping algorithm easier to understand and reason // about. -Vt, - in.instance_index, + slot, ); #else uv_b = uv; From 25bdd7f82da9ba433956989ebbdd0cc24055bfff Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Thu, 26 Dec 2024 10:22:19 -0700 Subject: [PATCH 3/5] Fix panic in `audio_control` example --- examples/audio/audio_control.rs | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/examples/audio/audio_control.rs b/examples/audio/audio_control.rs index 2091ac8011966..89600c69deadf 100644 --- a/examples/audio/audio_control.rs +++ b/examples/audio/audio_control.rs @@ -34,11 +34,22 @@ fn setup(mut commands: Commands, asset_server: Res) { #[derive(Component)] struct MyMusic; -fn update_speed(sink: Single<&AudioSink, With>, time: Res