Believe it or not, I used newx = oldx * 5 + 1 (or a slight change) in several video games. Accident is terrible - it is a scrambled sequence rather than a random generator. But sometimes that's all you need. If I remember correctly, he looks through all the numbers before repeating.
He has some terrible characteristics. He never gives you the same number twice in a row. Some of us did a bunch of variation tests, and we used some variations in other games.
We used it when we did not have a good module. This is just a shift by two and two additions (or multiplication by 5 and one addition). I would never use it at present for random numbers - I use LCG - but it may work fine for a shader where speed is critical and your instruction set may be limited.
Nosredna
source share