-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
There are no files selected for viewing
5 comments
on commit d3c401e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blazoncek, in principle, wu_pixel could be modified to use uint32_t color instead of CRGB. Basically we would simply replicate line 713 for the W channel. 🤔 But not sure if that's worth it ... what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wu_pixel could be modified to use uint32_t color instead of CRGB
Of course. I just ported it from FastLED examples with as little effort I managed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did look at the 'wu algorithm' a while back, need to check my notes for details but IIRC I found it to be ill-suited for the particle system (but it does almost the same thing). With knowledge gained from all the optimization work I did recently I may revisit the topic though.
Regarding white channel: my take on this is still that 2D setups very rarely (at least currently) use RGBW pixels, palettes do not use any white channel either. I still do not fully understand, where the white channel is even used in rendering (before white channel calculation, which is done at bus level if I am not mistaken).
I would be in favour a solution that drops the white channel completely and use an alpha channel instead.
EDIT:
if you want to add white channel support: this would be a good opportunity to use the CRGBW struct I added in the speed improvements PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
White channel is only used in one effect if memory serves me well. Not sure in which.
I am in favour of ditching W or replace it with alpha.
If anyone wants to reduce power usage by utilising W channel he/she can do with auto-white calculation.
precalculation is done even if this condition is false. What is the point of the precalculation? the compiler will probably drop those.
edit:
disregard that, I just now realised the value is used twice...