Repository navigation
fix(layers): sdf text outline in webgpu - #10640
Merged
Merged
Conversation
Greptile SummaryThe PR fixes WebGPU SDF text outlines by giving the fill and outline passes separate models, preventing one pass from overwriting the other’s uniforms.
Confidence Score: 5/5The PR appears safe to merge; no concrete correctness, lifecycle, or rendering-state defect remains in the changed paths. The dedicated fill model is created whenever the primary model is initialized or rebuilt, participates in shared model configuration, and is destroyed through the normal layer lifecycle, while WebGL retains the existing single-model behavior.
|
| Filename | Overview |
|---|---|
| modules/layers/src/icon-layer/icon-layer.ts | Refactors the existing icon draw setup into a protected model-specific helper and allows callers to assign distinct model IDs. |
| modules/layers/src/text-layer/multi-icon-layer/multi-icon-layer.ts | Adds lifecycle-managed WebGPU fill-model state and routes the second SDF pass through that separate model. |
| test/render/golden-images/platform-overrides/webgpu/text-layer-sdf-outline.png | Removes the backend-specific expected image so WebGPU must match the shared text-outline visual contract. |
Sequence Diagram
sequenceDiagram
participant Layer as MultiIconLayer
participant Outline as Outline Model
participant Fill as Fill Model
participant GPU as WebGPU Render Pass
Layer->>Outline: Set outline SDF uniforms
Layer->>Outline: Draw outlined glyphs
Layer->>Fill: Set fill SDF uniforms
Layer->>Fill: Draw glyph fill
Outline->>GPU: Record outline pass
Fill->>GPU: Record fill pass
Reviews (1): Last reviewed commit: "Fix sdf text outline in webgpu" | Re-trigger Greptile
felixpalmer
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TextLayer draws the same model twice with different uniforms.
Change List