Why does switching from Mersenne twister to other PRNGs in Gradient Noise Generator give bad results?
问题 I've been trying to create a generalized Gradient Noise generator (which doesn't use the hash method to get gradients). The code is below: class GradientNoise { std::uint64_t m_seed; std::uniform_int_distribution<std::uint8_t> distribution; const std::array<glm::vec2, 4> vector_choice = {glm::vec2(1.0, 1.0), glm::vec2(-1.0, 1.0), glm::vec2(1.0, -1.0), glm::vec2(-1.0, -1.0)}; public: GradientNoise(uint64_t seed) { m_seed = seed; distribution = std::uniform_int_distribution<std::uint8_t>(0, 3);