Replace the AlphaBlending struct with separate attributes#4086
Merged
Replace the AlphaBlending struct with separate attributes#4086
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the alpha blending system by replacing the monolithic AlphaBlending struct with individual attribute columns for blend_mode, opacity, opacity_fill, and clipping_mask. This change improves data granularity and simplifies attribute handling across the codebase. The review identified an inconsistency in the GPU raster rendering logic where opacity_fill_attr was ignored and the layer decision logic differed from the CPU implementation; a suggestion was provided to unify this behavior.
Contributor
There was a problem hiding this comment.
3 issues found across 15 files
Confidence score: 2/5
- There are concrete, user-visible rendering risks: in
node-graph/libraries/rendering/src/renderer.rs, artboard clipping is read from the wrong attribute key (severity 7/10, high confidence), so clip settings can be ignored at render time. node-graph/libraries/rendering/src/renderer.rsalso has a GPU raster mismatch (severity 6/10, high confidence) where opacity handling skipsATTR_OPACITY_FILLand mask-mode composition, which can make output differ from other render paths.- The issue in
node-graph/libraries/core-types/src/table.rsis low risk and documentation-only (comment referencesATTR_FILLinstead ofATTR_OPACITY_FILL), but it should still be corrected for clarity. - Pay close attention to
node-graph/libraries/rendering/src/renderer.rs- clipping and opacity behavior are both flagged as likely incorrect at runtime.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="node-graph/libraries/rendering/src/renderer.rs">
<violation number="1" location="node-graph/libraries/rendering/src/renderer.rs:514">
P1: Artboard clipping is read from the wrong attribute key, so artboard clip settings can be ignored at render time.</violation>
<violation number="2" location="node-graph/libraries/rendering/src/renderer.rs:1655">
P2: GPU raster layer opacity ignores `ATTR_OPACITY_FILL` (and mask-mode composition), causing incorrect opacity compared with other render paths.</violation>
</file>
<file name="node-graph/libraries/core-types/src/table.rs">
<violation number="1" location="node-graph/libraries/core-types/src/table.rs:23">
P3: The doc comment references `ATTR_FILL`, but the actual attribute constant is `ATTR_OPACITY_FILL`. Update the comment to the correct name to avoid confusion.
(Based on your team's feedback about consistent, precise terminology in names and docs.) [FEEDBACK_USED]</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
295f2a5 to
d0e254c
Compare
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.
No description provided.