Skip to content

Conversation

@yugalkaushik
Copy link
Contributor

Resolves #7839

Before

beginShape(POINTS) ignored per‑vertex stroke() changes because the point shader used a uniform uMaterialColor only; lines/triangles already passed aVertexColor and interpolated as expected. This made POINTS single‑color even when stroke() was set per vertex.

After

POINTS now honor per‑vertex stroke colors by passing aVertexColor to the point shader and binding it from vertexStrokeColors. Single point() continues to use the uniform stroke color.

Behavior

beginShape(POINTS) now renders each vertex with its own stroke() color.
point() (standalone) continues to use the uniform stroke() color.
LINES/TRIANGLES behavior unchanged.

image

Signed-off-by: yugalkaushik <yugalkaushik14@gmail.com>
@perminder-17 perminder-17 self-requested a review January 3, 2026 21:52
Copy link
Collaborator

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Are you also intereseted in working on dev-2.0 branch as well? Since I see the same bug on 2.x versions as well?

@davepagurek do you have any suggestions to this PR?

@yugalkaushik
Copy link
Contributor Author

Looks good to me! Are you also intereseted in working on dev-2.0 branch as well? Since I see the same bug on 2.x versions as well?

@davepagurek do you have any suggestions to this PR?

Hi, Yes I can work on that issue if this approach is good.

@davepagurek
Copy link
Contributor

I think this works! As mentioned in #7839, a possible approach for this is to deprecate the point shader and have it go through the stroke system instead, and that's what is happening in the 2.x branch now, so we should have per-point colors in the next release.

@davepagurek davepagurek merged commit 98c2345 into processing:main Jan 4, 2026
2 checks passed
@yugalkaushik yugalkaushik deleted the 7839-fix branch January 5, 2026 09:30
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.

beginShape(POINTS) doesn't use stroke() per vertex()

3 participants