Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
JMS55 committed May 4, 2024
1 parent 5e5975a commit 65379df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ fn downsample_depth(
downsample_depth_first_pipeline: &ComputePipeline,
downsample_depth_second_pipeline: &ComputePipeline,
) {
let downsample_depth_workgroups = meshlet_view_resources.view_size.x.div_ceil(64);

let command_encoder = render_context.command_encoder();
let mut downsample_pass = command_encoder.begin_compute_pass(&ComputePassDescriptor {
label: Some("downsample_depth"),
Expand All @@ -399,16 +401,16 @@ fn downsample_depth(
);
downsample_pass.set_bind_group(0, &meshlet_view_bind_groups.downsample_depth, &[]);
downsample_pass.dispatch_workgroups(
meshlet_view_resources.view_size.x.div_ceil(64),
meshlet_view_resources.view_size.y.div_ceil(64),
downsample_depth_workgroups,
downsample_depth_workgroups,
1,
);

if meshlet_view_resources.depth_pyramid_mip_count >= 7 {
downsample_pass.set_pipeline(downsample_depth_second_pipeline);
downsample_pass.dispatch_workgroups(
meshlet_view_resources.view_size.x.div_ceil(64),
meshlet_view_resources.view_size.y.div_ceil(64),
downsample_depth_workgroups,
downsample_depth_workgroups,
1,
);
}
Expand Down

0 comments on commit 65379df

Please sign in to comment.