Skip to content

Fix Vello renderer cropping wide miter joins and square caps#4108

Merged
Keavon merged 2 commits intomasterfrom
fix-renderer-cropping-strokes
May 6, 2026
Merged

Fix Vello renderer cropping wide miter joins and square caps#4108
Keavon merged 2 commits intomasterfrom
fix-renderer-cropping-strokes

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 6, 2026

This bug occurs in Vello when a non-default alpha blending setting is used like an opacity <100%. The render bounds given to Vello was given with an incorrectly too-small worst-case area.

Vello (before):

image

SVG (unchanged) and Vello (after):

image

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new method max_aabb_inflation to the Stroke struct in vector-types, which calculates a worst-case upper bound for stroke extent by accounting for miter joins and square caps. The renderer in rendering has been updated to use this new method instead of effective_width when determining bounding box inflation, ensuring that compositing layers do not crop stroke geometry. I have no feedback to provide as there were no review comments to evaluate.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a max_aabb_inflation method to the Stroke struct, providing a more accurate worst-case upper bound for stroke extent by accounting for miter joins and square caps. This new method replaces the use of effective_width in the renderer to ensure better clipping bounds. Feedback includes a correction for a double-scaling issue in the inflation calculation and a suggestion to rename a variable for consistency.

Comment thread node-graph/libraries/rendering/src/renderer.rs Outdated
Comment thread node-graph/libraries/rendering/src/renderer.rs Outdated
@Keavon Keavon changed the title Fix renderer compositing layers cropping wide miter joins and square caps Fix Vello renderer cropping wide miter joins and square caps May 6, 2026
@Keavon Keavon merged commit 5becf13 into master May 6, 2026
11 checks passed
@Keavon Keavon deleted the fix-renderer-cropping-strokes branch May 6, 2026 05:02
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