Refactor Starlight Smooth matrix effect (#25442)

This commit is contained in:
フィルターペーパー 2025-07-06 14:44:44 +08:00 committed by GitHub
parent e92f1fb220
commit 584ad807cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ static uint8_t phase_offsets[RGB_MATRIX_LED_COUNT];
hsv_t STARLIGHT_SMOOTH_math(hsv_t hsv, uint8_t i, uint8_t time) {
if (phase_offsets[i] == 0) {
phase_offsets[i] = rand() % 255;
phase_offsets[i] = random8();
}
hsv.v = scale8(abs8(sin8((time + phase_offsets[i]) / 2) - 128) * 2, hsv.v);
return hsv;