Hello World / plɹoM ollǝH

Programmers Live in Vain

2018-12-10から1日間の記事一覧

2D Perlin Noise in C++

こんな感じやろか? float interp(float x, float y, float t) { return x + (y - x) * t; // とりあえず線形 } float noise(int32_t x, int32_t y) { auto n = x + y * 57; n = (n << 13) ^ n; return (1.0f - ((n * (n * n * 15731 + 789221) + 1376312589…