Cycles: initialize LCG for sss and hair sampling without using the sobol sampler,

slightly faster but also fixes the u/v sampling dimensions not longer being at even
values which is needed for best results.
This commit is contained in:
Brecht Van Lommel
2013-04-17 14:48:01 +00:00
parent cf0e457e52
commit 45552a4595
3 changed files with 8 additions and 11 deletions

View File

@@ -207,9 +207,9 @@ __device float lcg_step(uint *rng)
return (float)*rng * (1.0f/(float)0xFFFFFFFF);
}
__device uint lcg_init(float seed)
__device uint lcg_init(uint seed)
{
uint rng = __float_as_int(seed);
uint rng = seed;
lcg_step(&rng);
return rng;
}