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.
This commit is contained in:
parent
6891f1c9e0
commit
d84c15696b
Notes:
blender-bot
2023-02-14 10:09:30 +01:00
Referenced by issue #41601, correlated multi-jitter with high samples "hangs"
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue