EEVEE-Next: Depth Of Field: Fix glitch on foreground scattered bokeh
This was caused by a missing synchronization. The background gather pass was writting to the same occlusion texture before the end of the scatter draw.
This commit is contained in:
@@ -430,6 +430,10 @@ void DepthOfField::scatter_pass_sync()
|
||||
DRW_shgroup_uniform_texture_ref(grp, "bokeh_lut_tx", &bokeh_scatter_lut_tx_);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "occlusion_tx", &occlusion_tx_);
|
||||
DRW_shgroup_call_procedural_indirect(grp, GPU_PRIM_TRI_STRIP, nullptr, scatter_buf);
|
||||
if (pass == 0) {
|
||||
/* Avoid background gather pass writing to the occlusion_tx mid pass. */
|
||||
DRW_shgroup_barrier(grp, GPU_BARRIER_SHADER_IMAGE_ACCESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user