sampling : also use upper bits for initializing state

This commit is contained in:
Jan Boon 2026-02-09 12:55:54 +00:00
parent 2a74c288c8
commit 10179a636d
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ struct blue_noise_rng {
{-1, -1},
};
for (int i = 0; i < n; i++) {
uint32_t h = rng->next32() % 10;
uint32_t h = (uint32_t)(((uint64_t)rng->next32() * 10) >> 32);
states[i] = {tbl[h][0], tbl[h][1]}; // random initial state
}
}