# Bug in "Expand 1D FX"

**URL:** <https://wled.discourse.group/t/bug-in-expand-1d-fx/14642>\
**Category:** Issues\
**Created:** [July 9, 2025, 5:44am UTC](https://wled.discourse.group/t/bug-in-expand-1d-fx/14642 "2025-07-09T05:44:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![epoyart](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@epoyart](https://wled.discourse.group/u/epoyart)\
**Post date:** [July 9, 2025, 5:44am UTC](https://wled.discourse.group/t/bug-in-expand-1d-fx/14642/1 "2025-07-09T05:44:59Z")

</div>

Hello! I have a 8x64 panel, consisting of two of the common 8x32 panels that can be found on Amazon. When I use the Gravcenter effect, it doesn’t fade out properly. Only the top 64 pixels fade out.

That is probably because of the virtualLength calculation in FX\_fcn.cpp line 630. With an 8x64 segment, we get `sqrt(64*64+8*8)`, which is approximately 64.

The problem happens in all effects that use SEGMENT.fade\_out() and that are Expanded from 1D with the Arc mode.

What would be a good fix for it?

Thanks!

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [July 9, 2025, 5:47am UTC](https://wled.discourse.group/t/bug-in-expand-1d-fx/14642/2 "2025-07-09T05:47:20Z")

</div>

Fix is already in PR.

> <https://github.com/wled/WLED/pull/4712>
>
> Ran in to this one during testing last night. Since we're using get/setPixelCo…lorRaw, we need the true pixel count, not the virtual length.
> 
> 
> \## Summary by CodeRabbit
> 
> \- \*\*Bug Fixes\*\*
> - Improved pixel fading behavior to ensure fade-out covers the entire 2D area for segments, providing more consistent visual effects.
> - Enhanced fade and blur effects by accurately processing the full physical pixel area in segments, resulting in smoother transitions.

---

<div class="post-metadata">

**Author:** ![epoyart](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@epoyart](https://wled.discourse.group/u/epoyart)\
**Post date:** [July 9, 2025, 6:18am UTC](https://wled.discourse.group/t/bug-in-expand-1d-fx/14642/3 "2025-07-09T06:18:29Z")

</div>

Nice! Is it going to be merged soon?

---

<div class="post-metadata">

**Author:** ![epoyart](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@epoyart](https://wled.discourse.group/u/epoyart)\
**Post date:** [July 14, 2025, 1:55am UTC](https://wled.discourse.group/t/bug-in-expand-1d-fx/14642/4 "2025-07-14T01:55:56Z")

</div>

I can confirm that the fix worked perfectly. Thanks!
