57 static const FadeLut fade_lut_holder;
58 const int32_t* fade_lut = fade_lut_holder.table;
60 constexpr int GRID = 16;
61 constexpr float STEP_F = 0.05f;
63 constexpr int32_t STEP_I =
static_cast<int32_t
>(0.05f * 65536.0f);
67 float ax = 0.0f, ay = 0.0f;
69 uint32_t t0 = micros();
70 for (
int it = 0; it < iters; it++) {
76 for (
int row = 0; row < GRID; row++) {
77 float y = ay + row * STEP_F;
78 for (
int col = 0; col < GRID; col++) {
79 float x = ax + col * STEP_F;
83 sink +=
static_cast<int32_t
>(n * 127.0f);
87 uint32_t t1 = micros();
94 int32_t ax_i = 0, ay_i = 0;
96 constexpr int32_t DRIFT_X =
static_cast<int32_t
>(0.011f * 65536.0f);
97 constexpr int32_t DRIFT_Y =
static_cast<int32_t
>(0.013f * 65536.0f);
99 uint32_t t0 = micros();
100 for (
int it = 0; it < iters; it++) {
103 for (
int row = 0; row < GRID; row++) {
104 int32_t y_i = ay_i + row * STEP_I;
105 for (
int col = 0; col < GRID; col++) {
106 int32_t x_i = ax_i + col * STEP_I;
111 x_i, y_i, fade_lut, fl::PERLIN_NOISE);
117 uint32_t t1 = micros();