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>2013-04-17 18:48:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-17 18:48:01 +0400
commit45552a45950459e4bb83bc44d41eeaa5457bfdae (patch)
tree5b4784f2187eac1bea08e013d4f7b6bf449fb946 /intern/cycles/kernel/kernel_random.h
parentcf0e457e524cfc9f496705de6cbf1e41c5118828 (diff)
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.
Diffstat (limited to 'intern/cycles/kernel/kernel_random.h')
-rw-r--r--intern/cycles/kernel/kernel_random.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h
index e2eb8d5db83..fc33e226051 100644
--- a/intern/cycles/kernel/kernel_random.h
+++ b/intern/cycles/kernel/kernel_random.h
@@ -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;
}