Pathtracer: A Bad Seed

A while back I was porting over a shader from GLSL to Metal, the languages are different enough that some functions - especially those using any global variables -need to be written functionally with no globals. The problem occurred when redoing the random number generator for the hemisphere ray calculation. I had written it correctly, but the seed feed to it was not good. The resulting image came out with some weird reflections.

incorrect

The reflections were messed up. Some kind of pattern is seen, but not one I can reason about. I am writing this in retrospect so I don't have the files handy, so take this image from further away to see how it was supposed to look with a good seed.

correct

I must say the one with the bad seed ended up with a more interesting image in the end.