Skip to content

Core - Fix profile rendering and timeline bugs found by the tests - #909

Merged
RobertBeekman merged 9 commits into
masterfrom
fix/profile-rendering
Oct 20, 2026
Merged

RobertBeekman merged 9 commits into
masterfrom
fix/profile-rendering

Conversation

@RobertBeekman

@RobertBeekman RobertBeekman commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Fixes the profile rendering and timeline bugs found by the test suite (#907). Each fix flips the test that pinned the old behaviour.

Fixed

  • Layer opacity is applied once for brushes that draw with the paint. It used to be applied twice, so a layer at 50% opacity showed at about 25%.
  • Effect filters are applied once on layers. Color and image filters from effects used to be applied twice.
  • Renamed effects keep their name when the profile is loaded.
  • Suspending a folder that is already rendering hides it. This only mattered outside the editor, the editor disables suspended elements itself.
  • Rotating or scaling a device updates its LED positions right away, instead of waiting until X or Y is set.
  • Always-on timelines wrap around by how far they went past the main segment, rather than by the frame time. This is off by at most one frame in practice.
  • The docs of the Layer(parent, name) and Folder(parent, name) constructors no longer claim they add themselves to the parent.

⚠️ Visible change for existing profiles

The opacity and effect filter fixes change how existing profiles look:

  • Layers below 100% opacity that use a shader brush get brighter, they now show at the opacity that's set.
  • Effects that apply a color or image filter look weaker than before, because the filter is no longer applied twice.

Users may have tuned their profiles around the old look.

Testing

  • Artemis.Core.Tests: 1389 passed
  • Artemis.UI.Shared.Tests: 176 passed

BaseLayerEffect.Load checked HasBeenRenamed before reading it from the entity, so renamed effects always fell back to the descriptor's display name.
Layer.DelegateRendering composited the layer with the pre-processed paint and also handed that paint to the brush, so color and image filters of effects applied to the brush output and again when compositing. The brush now gets a copy of the paint without those filters, like folders which apply them once.
Layer.Update disables a suspended layer but Folder.Update only disabled a folder once its timeline finished, so a folder suspended outside of the editor kept rendering its children.
The Rotation and Scale setters only updated the RGB.NET device, the Artemis LED rectangles and the device path kept their old positions and DeviceUpdated wasn't raised until X or Y was set.
They claimed the new element adds itself to the child collection of the parent, it doesn't and callers rely on adding it themselves.
Brushes drawing with a shader or image keep the alpha of the paint they are given, so the layer opacity and opacity effects applied to the brush output and again when compositing, 50% opacity rendered at 25%. The brush now gets an opaque paint, per-LED brushes already overrode the color. The solid color test brush now draws with a shader like the real solid brush so the opacity tests cover this.
Adds an AtOpacity helper so assertions read as red at 50% over black instead of a hand-computed 127, and uses it for layer opacity, opacity effects, folder fades, the profile fade and semi-transparent drawing.
Repeating timelines wrapped around by the frame time rather than by how
far they went past the end of the main segment, so wrapping could be off
by up to a frame. A timeline that was already past the end, like the
finished timeline new layers start with, still starts the main segment
over.
@RobertBeekman
RobertBeekman marked this pull request as ready for review October 20, 2026 11:29
@RobertBeekman
RobertBeekman merged commit a25d0f0 into master Oct 20, 2026
2 checks passed
@RobertBeekman
RobertBeekman deleted the fix/profile-rendering branch October 20, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant