Skip to content

Conversation

@DedeHai
Copy link
Collaborator

@DedeHai DedeHai commented May 19, 2025

  • fixed "jumpyness" by improving offset calculation resolution
  • added palette support
  • added two rendering modes for use with palette: one uses hue-mapping, one uses brightness mapping
  • added alternate animation mode (from initial source)
  • extended scaling: zoom checkmark (depends on matrix size)

Summary by CodeRabbit

  • New Features

    • Introduced alternate distortion mode and zoom option for 2D distortion waves effect.
    • Added palette-based color options with fill and smear-blur to reduce artifacts.
  • Improvements

    • Enhanced precision and range of distortion calculations for smoother visual effects.
    • Updated effect metadata to reflect new parameters.

- fixed "jumpyness" by improving offset calculation resolution
- added palette support
- added two rendering modes for use with palette: one uses hue-mapping, one uses brightness mapping
- added alternate animation mode (from initial source)
- extended scaling: zoom checkmark (depends on matrix size)
@coderabbitai

This comment was marked as resolved.

@DedeHai
Copy link
Collaborator Author

DedeHai commented Jun 5, 2025

any objections to merging this?
existing presets should not be affected by the changes.

@willmmiles
Copy link
Member

LGTM from a quick code inspection. Go for it.

On the micro-optimization side: I notice that you've converted some 2* to x<<1. The compiler ought to be able to make that transformation itself if it's faster, given a literal multiplicand -- sometimes it isn't, particularly when it can leverage fused-multiply-add instructions. This is especially likely for *2 and *4 cases where address calculation opcodes can sometimes be co-opted into doing arithmetic for us. I'm not recommending changing it back, just something to be cognizant of.

@DedeHai
Copy link
Collaborator Author

DedeHai commented Jun 6, 2025

thanks for the review. good point about the multiply-add, I will consider it in the future. That variable that was a constant 2 bothered me as it was confusing, I chose a shift over a multiplication just out of habit, since its not really impacting speed a bit of a questionable choice ;)

@DedeHai DedeHai merged commit a87b562 into wled:main Jun 6, 2025
21 checks passed
@DedeHai DedeHai deleted the distortionwave_update branch June 6, 2025 15:05
blazoncek pushed a commit to blazoncek/WLED that referenced this pull request Jun 11, 2025
- fixed "jumpyness" by improving offset calculation resolution
- added palette support
- added two rendering modes for use with palette: one uses hue-mapping, one uses brightness mapping
- added alternate animation mode (from initial source)
- extended scaling: zoom checkmark (depends on matrix size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants