Fix #131785: EEVEE samples affected by (disabled motionblur) samples

This was reported for freestyle, but was also the case for regular
renders.

So even though MotionBlurModule::init and MotionBlurModule::step return
early when motionblur is disabled, Sampling::init would still up the
samples with motionblur samples (even if motionblur was disabled
alltogether).

To resolve, only do this when motionblur is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/131795
This commit is contained in:
Philipp Oeser
2024-12-12 14:03:49 +01:00
committed by Philipp Oeser
parent c3cc3c019d
commit a01fd34f2d

View File

@@ -46,7 +46,9 @@ void Sampling::init(const Scene *scene)
}
}
motion_blur_steps_ = !inst_.is_viewport() ? scene->eevee.motion_blur_steps : 1;
motion_blur_steps_ = !inst_.is_viewport() && ((scene->r.mode & R_MBLUR) != 0) ?
scene->eevee.motion_blur_steps :
1;
sample_count_ = divide_ceil_u(sample_count_, motion_blur_steps_);
if (scene->eevee.flag & SCE_EEVEE_DOF_JITTER) {