Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-29 18:27:24 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-29 18:27:24 +0400
commit238f3a7d343875992f5b9c2ad657f2bc6f148938 (patch)
treeddc809124879b7eef15a708470f9de6bce43118a /intern/cycles/render/integrator.cpp
parent996f2cd8b2362779e16fdfbd3913231c38e4a623 (diff)
Cycles: seed value to get different noise values from renders, there was a patch
for this but I've implemented it differently.
Diffstat (limited to 'intern/cycles/render/integrator.cpp')
-rw-r--r--intern/cycles/render/integrator.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index 78ea464d836..9d129d8e8db 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -21,6 +21,8 @@
#include "scene.h"
#include "sobol.h"
+#include "util_hash.h"
+
CCL_NAMESPACE_BEGIN
Integrator::Integrator()
@@ -41,6 +43,8 @@ Integrator::Integrator()
no_caustics = false;
blur_caustics = 0.0f;
+ seed = 0;
+
need_update = true;
}
@@ -79,6 +83,8 @@ void Integrator::device_update(Device *device, DeviceScene *dscene)
kintegrator->no_caustics = no_caustics;
kintegrator->blur_caustics = blur_caustics;
+ kintegrator->seed = hash_int(seed);
+
/* sobol directions table */
int dimensions = PRNG_BASE_NUM + (max_bounce + transparent_max_bounce + 2)*PRNG_BOUNCE_NUM;
uint *directions = dscene->sobol_directions.resize(SOBOL_BITS*dimensions);
@@ -109,7 +115,8 @@ bool Integrator::modified(const Integrator& integrator)
transparent_probalistic == integrator.transparent_probalistic &&
transparent_shadows == integrator.transparent_shadows &&
no_caustics == integrator.no_caustics &&
- blur_caustics == integrator.blur_caustics);
+ blur_caustics == integrator.blur_caustics &&
+ seed == integrator.seed);
}
void Integrator::tag_update(Scene *scene)