Fix T49838: Noise randomization for frame should be done per interframes as well

Add subframe to the animated seed hash calculation.

Should be no difference for the regular files, only for cases when scene is
rendered from sequencer with a speed effect, which is not really a common thing.
This commit is contained in:
Sergey Sharybin 2016-11-08 11:16:37 +01:00
parent 93ace71bd7
commit a2d78d7a46
Notes: blender-bot 2023-02-14 07:28:09 +01:00
Referenced by issue #49838, Noise randomization for frame should be done per interframes as well.
1 changed files with 6 additions and 2 deletions

View File

@ -255,8 +255,12 @@ void BlenderSync::sync_integrator()
integrator->filter_glossy = get_float(cscene, "blur_glossy");
integrator->seed = get_int(cscene, "seed");
if(get_boolean(cscene, "use_animated_seed"))
integrator->seed = hash_int_2d(b_scene.frame_current(), get_int(cscene, "seed"));
if(get_boolean(cscene, "use_animated_seed")) {
integrator->seed = hash_int_2d(b_scene.frame_current(),
get_int(cscene, "seed")) +
hash_int_2d((int)(b_scene.frame_subframe() * (float)INT_MAX),
get_int(cscene, "seed"));
}
integrator->sampling_pattern = (SamplingPattern)get_enum(
cscene,