Skip to content

Instantly share code, notes, and snippets.

@Kakusakov
Kakusakov / Perlin.cs
Last active October 15, 2023 07:52 — forked from Flafla2/Perlin.cs
Improved Perlin Noise Implementation in C#
// Clone of https://gist.github.com/Flafla2/1a0b9ebef678bbce3215 with more dimensions and seed generation.
public class PerlinGen
{
private readonly int[] p; // Randomly shuffled array of values from 0 to 255.
// Values are repeated twice to get performance boost
// from avoiding the use of modulo operator.
public PerlinGen(int seed)
{