Repository navigation
Perlinscape FX (2D) in the user_fx usermod - #5587
Conversation
|
@BobLoeffler68 I see "0 files changed" - is this expected?
|
Hmmmmm... I'm not sure what is happening. I can't even compile it anymore as it says platform_wled_default doesn't exist in the [common] section of platformio.ini Something strange is happening. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
WalkthroughThe user FX system adds and registers a 2D Perlin-noise effect. It uses palette or RGB output, with optional rotation and timed random direction changes. Unsupported layouts and allocation failures use the static fallback. Changes2D Perlinscape Effect
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
…- use cos_approx() and sin_approx() instead of cosf and sinf
|
This is a nice and very useful effect and I would recommend it for inclusion into core effects. My recommendations for improvement (from Discord):
And BTW, to avoid pointer use (for a cleaner look) use references instead. I.e. uint32_t prevT = reinterpret_cast<uint32_t&>(*SEGENV.data);
float offX = reinterpret_cast<float&>(*(SEGENV.data + sizeof(uint32_t)));
...Perhaps @coderabbitai can help with replacing floating point math with integer math to improve speed. Or use Claude. |
This comment was marked as low quality.
This comment was marked as low quality.
… otherwise use selected palette. Also, I expanded the speed range towards the slower side. Both requested by blazoncek.
* Switched from using pointers to using references. * Added a slider for the rotation speed (0 = no rotation), so I removed the rotation checkbox. * Fixed a bug during rotation where the animation would "jump" because it would overflow * Changed byte to uint16_t in for loops.
* Fixed the speed slider and rotation slider because their middle values were pretty much the same as their lower values.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
@coderabbitai full review |
✅ Action performedFull review finished. |
softhack007
left a comment
There was a problem hiding this comment.
Looks good to me, thanks 👍
a Perlin noise landscape animation First slider is for speed Second slider is for zooming in/out (Perlin scaling) Third slider is the X multiplier Fourth slider is the Y multiplier Fifth slider is the rotation speed (0 = do not rotate) Checkbox will randomize the horizonal and vertical directions

This PR adds the 2D Perlinscape effect into the new user_fx usermod instead of FX.cpp
Example videos:
80007897461__00E4D193-7401-4ED9-9F74-DBF3C8C172A7.mov
^-- Default settings and Rotation
IMG_6838.mov
^-- Using the Hult 64 palette
Untitled.1.mp4
^-- Hult 64 palette and mirrored X
Untitled.mp4
^-- Candy palette and Rotation
Summary by CodeRabbit