Skip to content

Instantly share code, notes, and snippets.

View ivan-r-sigaev's full-sized avatar

Ivan ivan-r-sigaev

View GitHub Profile
@ivan-r-sigaev
ivan-r-sigaev / Perlin.cs
Last active July 25, 2025 19:54 — forked from Flafla2/Perlin.cs
Improved Perlin Noise Implementation in C#
// Algorithm inspired by https://gist.github.com/Flafla2/1a0b9ebef678bbce3215
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)
{