Fix T65569 Eevee: Volumetrics on alphablend surf. not working in renders
The wrong volume buffer was used one frame out of two.
This commit is contained in:
parent
34644f520a
commit
88cce6faea
Notes:
blender-bot
2024-01-16 18:05:25 +01:00
Referenced by issue #65569, Material with blend mode «alpha blend» ignores volumetric depth when rendering (Eevee)
|
@ -571,10 +571,6 @@ void EEVEE_volumes_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
{GPU_ATTACHMENT_NONE,
|
||||
GPU_ATTACHMENT_TEXTURE(txl->volume_scatter_history),
|
||||
GPU_ATTACHMENT_TEXTURE(txl->volume_transmit_history)});
|
||||
|
||||
/* Usage happens after buffer have been swapped. */
|
||||
effects->volume_scatter = txl->volume_scatter_history;
|
||||
effects->volume_transmit = txl->volume_transmit_history;
|
||||
}
|
||||
else {
|
||||
DRW_TEXTURE_FREE_SAFE(txl->volume_prop_scattering);
|
||||
|
@ -588,10 +584,10 @@ void EEVEE_volumes_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
GPU_FRAMEBUFFER_FREE_SAFE(fbl->volumetric_fb);
|
||||
GPU_FRAMEBUFFER_FREE_SAFE(fbl->volumetric_scat_fb);
|
||||
GPU_FRAMEBUFFER_FREE_SAFE(fbl->volumetric_integ_fb);
|
||||
|
||||
effects->volume_scatter = e_data.dummy_scatter;
|
||||
effects->volume_transmit = e_data.dummy_transmit;
|
||||
}
|
||||
|
||||
effects->volume_scatter = e_data.dummy_scatter;
|
||||
effects->volume_transmit = e_data.dummy_transmit;
|
||||
}
|
||||
|
||||
void EEVEE_volumes_compute(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
|
||||
|
@ -618,6 +614,9 @@ void EEVEE_volumes_compute(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *veda
|
|||
SWAP(GPUTexture *, txl->volume_scatter, txl->volume_scatter_history);
|
||||
SWAP(GPUTexture *, txl->volume_transmit, txl->volume_transmit_history);
|
||||
|
||||
effects->volume_scatter = txl->volume_scatter;
|
||||
effects->volume_transmit = txl->volume_transmit;
|
||||
|
||||
/* Restore */
|
||||
GPU_framebuffer_bind(fbl->main_fb);
|
||||
|
||||
|
|
Loading…
Reference in New Issue