Original Post
I am in need of a function that converts a 3d coordinate into a 2d one and make sure the output is as random as possible. I am using this to do a 2D lookup in map based on a 3d position. Right now I am using: val_x = x + z; val_y = y + z; But this is pretty bad as the value might not change on certain surfaces. I am going to implement this in a GPU shader so I would take simpler over more random(=faster), as long as it is pretty random.