Fix T85609 EEVEE: Viewport "vibrates" when mouse input is active

Taa offset was applied on first sample. This wasn't happening before
DOF refactor.

Also fixes T85618 Wireframe Displays Strangely in Eevee (Rendered,
material Preview)
This commit is contained in:
Clément Foucault 2021-02-22 17:32:26 +01:00
parent cd1a083984
commit d45a89ee44
Notes: blender-bot 2023-02-13 19:35:27 +01:00
Referenced by issue #85618, Wireframe Displays Strangely in Eevee (Rendered, material Preview)
Referenced by issue #85609, Viewport "vibrates" when mouse input is active
1 changed files with 3 additions and 1 deletions

View File

@ -151,7 +151,9 @@ void EEVEE_temporal_sampling_matrices_calc(EEVEE_EffectsInfo *effects, const dou
float ofs[2];
EEVEE_temporal_sampling_offset_calc(ht_point, rd->gauss, ofs);
window_translate_m4(winmat, persmat, ofs[0] / viewport_size[0], ofs[1] / viewport_size[1]);
if (effects->taa_current_sample > 1) {
window_translate_m4(winmat, persmat, ofs[0] / viewport_size[0], ofs[1] / viewport_size[1]);
}
/* Jitter is in pixel space. Focus distance in world space units. */
float dof_jitter[2], focus_distance;