Skip to content

Instantly share code, notes, and snippets.

View cstrachan88's full-sized avatar

Courtney Strachan cstrachan88

View GitHub Profile
@cstrachan88
cstrachan88 / OpenSimplex2S.java
Created November 28, 2024 23:31 — forked from KdotJPG/OpenSimplex2S.java
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@cstrachan88
cstrachan88 / wgsl_noise.md
Created January 17, 2025 18:51 — forked from munrocket/wgsl_noise.md
WGSL Noise Algorithms

WGSL Noise Algorithms

Good and fast integer hash

// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
    var h = n * 747796405u + 2891336453u;
    h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;
    return (h >> 22u) ^ h;
}