Bugfix, own collection:

Random seeding is still not perfect in render, especially lack of good
thread support still.

- VectorBlur node was calling seed for each exec, causing other nodes to
  get fixed random too.
- added seed in non-OSA main loop for render
- use BLI_srandom, is better than BLI_srand
This commit is contained in:
2006-11-21 15:52:45 +00:00
parent 9f9d99ef8d
commit 20e6dc7f57
5 changed files with 20 additions and 9 deletions

View File

@@ -171,6 +171,9 @@ void BLI_thread_srandom(int thread, unsigned int seed)
{
extern unsigned char hash[]; // noise.c
if(thread >= MAX_RNG_THREADS)
thread= 0;
rng_seed(&rng_tab[thread], seed + hash[seed & 255]);
seed= rng_getInt(&rng_tab[thread]);
rng_seed(&rng_tab[thread], seed + hash[seed & 255]);