Skip to content

made luminance work as a mask#4343

Closed
NicTanghe wants to merge 6 commits into
GraphiteEditor:masterfrom
NicTanghe:luminance_masks
Closed

made luminance work as a mask#4343
NicTanghe wants to merge 6 commits into
GraphiteEditor:masterfrom
NicTanghe:luminance_masks

Conversation

@NicTanghe

@NicTanghe NicTanghe commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Adds typed support for distinguishing alpha and luminance clipping masks throughout
Graphite’s document and rendering pipeline.

Previously, all clipping masks were treated as alpha masks. Consequently, opaque black
and white SVG mask artwork produced identical results, even though luminance masks
should use color luminance multiplied by alpha.

When merging take special attention to how it interacts with goupmasks becouse it should transfer extra fields ecs.

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

Copy link
Copy Markdown
Contributor

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 support for luminance masks alongside the existing alpha masks. It defines a new MaskMode enum (with Alpha and Luminance variants), adds a mask_mode node in the blending category to configure this property on graphics, and updates both the SVG and Vello renderers to handle luminance masking. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files

Confidence score: 5/5

  • Safe to merge after the addressed issues were fixed.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread node-graph/graph-craft/src/document/value.rs
@NicTanghe

Copy link
Copy Markdown
Author

Was only able to get the luminance masks working after merging the 2 branches.

@NicTanghe NicTanghe closed this Jul 15, 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