function doesn't have a variable tracking how many times the function was called per one pixel, resulting in giving the same result multiple times.
My thoughts on how to fix that:
To not change something many people are familiar with, I would add seed input which is cancelled out when It's equal to 0.
I have no idea how to replace it, so I guess there needs to be a custom prng with 4 float inputs.