Skip to content

Commit 2e8abee

Browse files
authored
use ssr dynamic offset in volumetric fog bind group (#13544)
# Objective - #13418 broke volumetric fog ``` wgpu error: Validation Error Caused by: In a RenderPass note: encoder = `<CommandBuffer-(2, 4, Metal)>` In a set_bind_group command note: bind group = `mesh_view_bind_group` Bind group 0 expects 5 dynamic offsets. However 4 dynamic offsets were provided. ``` ## Solution - add ssr offset to volumetric fog bind group
1 parent 901d71b commit 2e8abee

File tree

1 file changed

+4
-0
lines changed
  • crates/bevy_pbr/src/volumetric_fog

1 file changed

+4
-0
lines changed

crates/bevy_pbr/src/volumetric_fog/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ use bevy_utils::prelude::default;
7373
use crate::{
7474
graph::NodePbr, MeshPipelineViewLayoutKey, MeshPipelineViewLayouts, MeshViewBindGroup,
7575
ViewFogUniformOffset, ViewLightProbesUniformOffset, ViewLightsUniformOffset,
76+
ViewScreenSpaceReflectionsUniformOffset,
7677
};
7778

7879
/// The volumetric fog shader.
@@ -397,6 +398,7 @@ impl ViewNode for VolumetricFogNode {
397398
Read<ViewLightProbesUniformOffset>,
398399
Read<ViewVolumetricFogUniformOffset>,
399400
Read<MeshViewBindGroup>,
401+
Read<ViewScreenSpaceReflectionsUniformOffset>,
400402
);
401403

402404
fn run<'w>(
@@ -413,6 +415,7 @@ impl ViewNode for VolumetricFogNode {
413415
view_light_probes_offset,
414416
view_volumetric_lighting_uniform_buffer_offset,
415417
view_bind_group,
418+
view_ssr_offset,
416419
): QueryItem<'w, Self::ViewQuery>,
417420
world: &'w World,
418421
) -> Result<(), NodeRunError> {
@@ -474,6 +477,7 @@ impl ViewNode for VolumetricFogNode {
474477
view_lights_offset.offset,
475478
view_fog_offset.offset,
476479
**view_light_probes_offset,
480+
**view_ssr_offset,
477481
],
478482
);
479483
render_pass.set_bind_group(

0 commit comments

Comments
 (0)