Fix T78704: RenderPass normals disapear when view isn't updated

When the view isn't updated the renderpass thought that it was rendering
the next sample, skipping the conversion from encoded to blender
normals.

This patch resets the current sample when only rendering single sample
layers.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8280
This commit is contained in:
Jeroen Bakker
2020-07-13 14:19:13 +02:00
parent 6cc88e330b
commit 0b100e21fb
@@ -240,9 +240,9 @@ int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data
view_is_valid = view_is_valid && (ED_screen_animation_no_scrub(wm) == NULL);
}
effects->taa_total_sample = EEVEE_renderpasses_only_first_sample_pass_active(vedata) ?
1 :
scene_eval->eevee.taa_samples;
const bool first_sample_only = EEVEE_renderpasses_only_first_sample_pass_active(vedata);
view_is_valid = view_is_valid && !first_sample_only;
effects->taa_total_sample = first_sample_only ? 1 : scene_eval->eevee.taa_samples;
MAX2(effects->taa_total_sample, 0);
DRW_view_persmat_get(NULL, persmat, false);