Open kaetemi opened 3 years ago
This one worked nicely for me https://gist.github.com/blixt/f17b47c62508be59987b
Converted to PHP, I'm sure you can make this complex function work for you:
/**
source: https://gist.github.com/blixt/f17b47c62508be59987b */ function manual_rng_init($seed) { $seed = $seed % 2147483647; if ($seed <= 0) $seed += 2147483646;
return $seed; }
function manual_rng(&$seed) { $seed = $seed * 16807 % 2147483647; return abs(($seed - 1) / 2147483646); };
We'll just use wang hash.
Possibly it's using some randomization during the lightmapping. Use a repeatable pseudo-random instead.