Skip to content

fix(background): make the gradient motions visible at a glance - #839

Merged
EtienneLescot merged 1 commit into
integration/demo-never-uglyfrom
claude/gradient-animation-intensity-b1ccff
Sep 26, 2026
Merged

EtienneLescot merged 1 commit into
integration/demo-never-uglyfrom
claude/gradient-animation-intensity-b1ccff

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The gradient motions were invisible; they now read at a glance. Measured on a port of the shader, drift, aurora and waves strayed 3–9 % from the still gradient and changed by less than 1/255 per frame.

  • Twice as fast, two to ten times wider depending on the gradient.
  • Aurora blobs and wave crests lighten or darken a little. Most offered gradients pair two neighbouring hues, where moving their own colours alone stays invisible.
  • Drift slides along its axis on top of swinging ±30°: a rotation alone leaves the centre still.

Image wallpapers get the same three motions in a follow-up commit on this PR.

Related issue

Part of #814 (stacked on integration/demo-never-ugly).

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

Before/after renders from the D3D11 compositor (8 s per motion, two catalogue gradients) were reviewed locally.

Testing

Frame-mean change on the catalogue gradient #3b82f6 → #8b5cf6, 0–255 units:

motion deviation from still, old → new change per second, old → new
drift 1.1 → 5.2 0.33 → 2.15
aurora 3.4 → 8.2 1.06 → 4.99
waves 1.7 → 7.2 0.91 → 7.48
  • cargo test -p openscreen-compositor --lib: 372 passed.
  • animated_background GPU test (D3D11): the still gradient is byte-identical at every instant; each motion is distinct at three instants and reproducible.
  • HLSL compiled by FXC (build.rs), WGSL validated by naga. Metal cannot be compiled on this machine; it mirrors the HLSL line for line.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Visual Updates
    • Animated gradients now feature faster-moving aurora and cloud patterns, brighter color layers, and wave-driven lighting that shifts colors between lighter and darker tones.
    • Drifting linear gradients now rotate and slide along their direction, creating more noticeable movement.
    • Gradient animation timing has been adjusted to better accommodate the updated motion patterns.

Measured on a port of the shader, the three motions strayed 3 to 9 % from
the still gradient and changed by less than 1/255 per frame, so they read
as a still background. Motion is now twice as fast and two to ten times
wider, depending on the gradient.

Aurora blobs and wave crests also lighten or darken a little: most offered
gradients pair two neighbouring hues, and moving their own colours alone
stayed invisible on them. Drift slides along its axis on top of swinging
it, since a rotation alone leaves the centre still.
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d1207ef9-8ce0-4c4e-8596-1c64437ebdb1

📥 Commits

Reviewing files that changed from the base of the PR and between 3d25465 and e8e2187.

⛔ Files ignored due to path filters (1)
  • crates/compositor/src/shaders.hlsl is excluded by !**/*.hlsl
📒 Files selected for processing (3)
  • crates/compositor/src/frame_geometry.rs
  • crates/compositor/src/shaders.metal
  • crates/compositor/src/vk_shaders/layer.wgsl

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The compositor’s Metal and WGSL shaders now use faster aurora and wave animation, adjusted color blending, and stronger linear-gradient drift. The documented gradient motion periods and divisibility test now include 6, 10, 12, 15, 20, and 30 seconds. The 120-second wrap period remains unchanged.

Changes

Gradient Animation

Layer / File(s) Summary
Aurora and wave animation
crates/compositor/src/frame_geometry.rs, crates/compositor/src/shaders.metal, crates/compositor/src/vk_shaders/layer.wgsl
Both shaders add a color-lightening helper and change aurora and wave motion, color, and blending parameters. The documented periods and divisibility test are updated.
Linear-gradient drift
crates/compositor/src/shaders.metal, crates/compositor/src/vk_shaders/layer.wgsl
Both shaders increase the gradient axis rotation range and add a sinusoidal slide to the gradient position.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e8e21

The updated gradient motions have no identified merge-blocking issue in the supplied evidence.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: making background gradient motions more visible.
Description check ✅ Passed The description is complete and covers the summary, related issue, change type, release impact, platform impact, visual review, and testing. It provides quantitative results and test details. No mater…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.1)

Clippy execution failed


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot
EtienneLescot merged commit 63e82d3 into integration/demo-never-ugly Sep 26, 2026
5 checks passed
@EtienneLescot
EtienneLescot deleted the claude/gradient-animation-intensity-b1ccff branch September 26, 2026 22:28
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