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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-08-28 13:15:59 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-08-28 13:15:59 +0400
commitd84c15696b2949b7e596b1f75e5864033fd9d067 (patch)
tree3ef25df7b3fa100c199251dbb37e81d6341ea003 /intern
parent6891f1c9e05bd67eb98c37fb05157775590e6eac (diff)
Fix T41601: Correlated multi-jitter with high samples "hangs"
Issue was caused by the precision issues which made sdivm by 1 under it's actual value. We can try to do some eps magic, but from the tests on laptop and desktop doing integer division is not slower than using floats here.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_jitter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_jitter.h b/intern/cycles/kernel/kernel_jitter.h
index 4dfffcb3af1..2a5b7689e57 100644
--- a/intern/cycles/kernel/kernel_jitter.h
+++ b/intern/cycles/kernel/kernel_jitter.h
@@ -182,7 +182,8 @@ ccl_device void cmj_sample_2D(int s, int N, int p, float *fx, float *fy)
smodm = cmj_fast_mod_pow2(s, m);
}
else {
- sdivm = float_to_int(s * invm);
+ /* Doing s*inmv gives precision issues here. */
+ sdivm = s / m;
smodm = s - sdivm*m;
}