Skip to content

feat(native): map filter, backdrop-filter, mask-image and blend modes onto effect layers - #52

Closed
mateo-m wants to merge 66 commits into
remorses:mainfrom
mateo-m:feat/layer-effects
Closed

feat(native): map filter, backdrop-filter, mask-image and blend modes onto effect layers#52
mateo-m wants to merge 66 commits into
remorses:mainfrom
mateo-m:feat/layer-effects

Conversation

@mateo-m

@mateo-m mateo-m commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Contains #51.

What this adds

filter, backdrop-filter, mask-image, mix-blend-mode, background-blend-mode and overscroll-behavior.

An element with any of the first four paints itself and its children into a texture of its own, and the GPU paints that texture over the frame with the effect. blur() is a two-pass Gaussian on a shrunk texture, so a wide blur costs the same as a narrow one. The other filter functions fold into one colour matrix. mask-image takes a gradient and keeps each pixel by its alpha. Over a backdrop-filter: blur() the alpha scales the blur radius instead, so an eased mask gives a progressive blur. All sixteen blend modes of Compositing and Blending 1 plus plus-lighter paint. background-image now paints over background-color instead of replacing it. A rounded scroll box now clips at its corner arcs, and the scroll range ends at the far edge of the content.

The zed bump brings the effect layer render passes in gpui (Metal, wgpu, DirectX) and the per-fragment gradient easing, which replaces the hint approximation of #51.

What I ran and saw

  • cargo test at this branch: 295 passed, 0 failed.
  • The react suite at this branch: 422 passed, 0 failed.
  • The blur output matches headless Chrome within 2 percent at every sampled scanline.
  • The demo gradients page gained a sticky header over scrolling rows with a progressive blur. It lives on this branch because it needs backdropFilter, maskImage and overscrollBehavior.

What I did not verify

  • The DirectX backend. It is a blind port and never compiled on this machine.
  • WebGL paints the content of an effect layer with no effect (by design, no storage buffers), and I did not run the web build.

Moved from the fork

This PR was mateo-m#3.

The branch merged its parent branch after that one merged upstream main at 028f70a.

The history was rewritten once after the first push. It dropped the commits that reworded AGENTS.md, and the zed pin moved to the rewritten mateo-m/zed branches. No code changed in that rewrite.

On the merged head cargo check and tsc pass. The full suites ran at the bottom and at the top of the stack.

Stacked on #51. The diff here includes #50, #51.

The zed submodule points at the mateo-m/zed fork until remorses/zed#5, #6 and #7 merge. Then a follow-up commit restores .gitmodules to remorses/zed on the gpuix branch and pins the merged commit. The same GPUI stack is also open upstream as zed-industries/zed#63771, #63772 and #63773.

mateo-m added 30 commits August 25, 2026 16:59
mateo-m added 19 commits August 27, 2026 16:06
# Conflicts:
#	packages/native/src/style/resolve.rs
# Conflicts:
#	.github/workflows/ci.yml
#	examples/compile.ts
#	packages/native/src/custom_elements/anchored.rs
#	packages/native/src/custom_elements/code.rs
#	packages/native/src/custom_elements/diff.rs
#	packages/native/src/custom_elements/img.rs
#	packages/native/src/custom_elements/input.rs
#	packages/native/src/custom_elements/markdown.rs
#	packages/native/src/renderer.rs
#	packages/react/src/types/host.ts
#	zed
@mateo-m mateo-m closed this Sep 13, 2026
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