-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
looking at this code in bloom.rs:
// Downsample bind groups
for i in 1..BLOOM_MIP_COUNT {
// Ping
bloom_mat.bind_group.push(create_bloom_bind_group(
renderer,
bloom_mat,
&bloom_mat.bind_groups_textures[1].mip_view[i],
&bloom_mat.bind_groups_textures[0].view,
&renderer.hdr_texture.view,
renderer.hdr_texture.sampler.as_ref().unwrap(),
&bloom_mat.bind_groups_buffers[0],
));
// Pong
bloom_mat.bind_group.push(create_bloom_bind_group(
renderer,
bloom_mat,
&bloom_mat.bind_groups_textures[0].mip_view[i],
&bloom_mat.bind_groups_textures[1].view,
&renderer.hdr_texture.view,
renderer.hdr_texture.sampler.as_ref().unwrap(),
&bloom_mat.bind_groups_buffers[0],
));
}Why not just construct all downsampled mip levels in a single texture:
// Downsample bind groups
for i in 1..BLOOM_MIP_COUNT {
bloom_mat.bind_group.push(create_bloom_bind_group(
renderer,
bloom_mat,
&bloom_mat.bind_groups_textures[0].mip_view[i],
&bloom_mat.bind_groups_textures[0].mip_view[i-1],
&renderer.hdr_texture.view,
renderer.hdr_texture.sampler.as_ref().unwrap(),
&bloom_mat.bind_groups_buffers[0],
));
}Wouldn't this achieve the same result, but with a lot less compute passes?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels