Fix flashing eevee render passes in viewport
Caused by rB85fe12071ad7. When looking at a render pass in viewport and move the camera, there's a "flash" effect in this AOVs test file: {F9753476} {F9753473} The cause seems to be that taa_current_sample when rendering (DRW_state_is_image_render()) is ok because it has been incremented in EEVEE_temporal_sampling_draw but taa_current_sample is wrong when we are not rendering. D10375 by Ulysse Martin (youle) with clang format changes. Reviewed By: jbakker, lichtwerk, also blessing from fclem Differential Revision: https://developer.blender.org/D10375
This commit is contained in:
parent
3bb58e2a7c
commit
75580fa6a6
Notes:
blender-bot
2023-02-14 07:08:26 +01:00
Referenced by issue #85831, Strange EEVEE flickering and lack of clarity
|
@ -283,8 +283,9 @@ void EEVEE_renderpasses_postprocess(EEVEE_ViewLayerData *UNUSED(sldata),
|
|||
EEVEE_EffectsInfo *effects = stl->effects;
|
||||
|
||||
/* Compensate for taa_current_sample being incremented after last drawing in
|
||||
* EEVEE_temporal_sampling_draw. */
|
||||
const int current_sample = effects->taa_current_sample - 1;
|
||||
* EEVEE_temporal_sampling_draw when DRW_state_is_image_render(). */
|
||||
const int current_sample = DRW_state_is_image_render() ? effects->taa_current_sample - 1 :
|
||||
effects->taa_current_sample;
|
||||
g_data->renderpass_current_sample = current_sample;
|
||||
g_data->renderpass_type = renderpass_type;
|
||||
g_data->renderpass_postprocess = PASS_POST_UNDEFINED;
|
||||
|
|
Loading…
Reference in New Issue