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

@ -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,