66 const int32_t* fade_lut =
state.fade_lut;
68 constexpr int GRID = 16;
69 constexpr float STEP_F = 0.05f;
71 constexpr int32_t STEP_I =
static_cast<int32_t
>(0.05f * 65536.0f);
75 float ax = 0.0f, ay = 0.0f;
77 uint32_t t0 = micros();
78 for (
int it = 0; it < iters; it++) {
84 for (
int row = 0; row < GRID; row++) {
85 float y = ay + row * STEP_F;
86 for (
int col = 0; col < GRID; col++) {
87 float x = ax + col * STEP_F;
91 sink +=
static_cast<int32_t
>(n * 127.0f);
95 uint32_t t1 = micros();
102 int32_t ax_i = 0, ay_i = 0;
104 constexpr int32_t DRIFT_X =
static_cast<int32_t
>(0.011f * 65536.0f);
105 constexpr int32_t DRIFT_Y =
static_cast<int32_t
>(0.013f * 65536.0f);
107 uint32_t t0 = micros();
108 for (
int it = 0; it < iters; it++) {
111 for (
int row = 0; row < GRID; row++) {
112 int32_t y_i = ay_i + row * STEP_I;
113 for (
int col = 0; col < GRID; col++) {
114 int32_t x_i = ax_i + col * STEP_I;
119 x_i, y_i, fade_lut, fl::PERLIN_NOISE);
125 uint32_t t1 = micros();