67 const int32_t* fade_lut =
state.fade_lut;
69 constexpr int GRID = 16;
70 constexpr float STEP_F = 0.05f;
72 constexpr int32_t STEP_I =
static_cast<int32_t
>(0.05f * 65536.0f);
76 float ax = 0.0f, ay = 0.0f;
79 for (
int it = 0; it < iters; it++) {
85 for (
int row = 0; row < GRID; row++) {
86 float y = ay + row * STEP_F;
87 for (
int col = 0; col < GRID; col++) {
88 float x = ax + col * STEP_F;
92 sink +=
static_cast<int32_t
>(n * 127.0f);
103 int32_t ax_i = 0, ay_i = 0;
105 constexpr int32_t DRIFT_X =
static_cast<int32_t
>(0.011f * 65536.0f);
106 constexpr int32_t DRIFT_Y =
static_cast<int32_t
>(0.013f * 65536.0f);
109 for (
int it = 0; it < iters; it++) {
112 for (
int row = 0; row < GRID; row++) {
113 int32_t y_i = ay_i + row * STEP_I;
114 for (
int col = 0; col < GRID; col++) {
115 int32_t x_i = ax_i + col * STEP_I;
120 x_i, y_i, fade_lut, fl::PERLIN_NOISE);