Just to give a answer to other people who might have the same problem. I found one that produced a pretty good result. I didn't even need the rand() function.
__forceinline float getRandomField(const vec3& Position) const
{
uint32_t seed = uint32_t(Position.x)*1087;
seed ^= 0xE56FAA12;
seed += uint32_t(Position.y)*2749;
seed ^= 0x69628a2d;
seed += uint32_t(Position.z)*3433;
seed ^= 0xa7b2c49a;
return (float(int(seed%2001) -1000)/1000.0f);
}
The key is to multiply each axis with a prime number. I found these on wikipedia: 1087,2749,3433. The hex values xor'ed with is just randomly hammered down by me. They are not primes, as far as I know. Check out the result: