Fix WebGL vertex stroke colors for retained mode + some shape modes#5928
Merged
davepagurek merged 2 commits intoJan 6, 2023
Merged
Conversation
Contributor
|
I see, it was better to separate the array used to configure the vertex colors and the array sent to the shader... Thanks for the fix! |
Contributor
|
I'm sorry, I'm using "lineVertexColors" to get the vertex colors of the lines in bezierVertex() and quadraticVertex() which was recently merged, so I feel like I have to change that to "vertexStrokeColors" as well. |
Contributor
Author
|
ooh good catch, I'll change it there too! |
Contributor
|
And...for bezierVertex() and quadraticVertex(), I didn't add a unit test for line vertex color interpolation, but that might have prevented it...wouldn't it be nice to add that as well? |
Contributor
Author
|
agreed, I'll add some new tests when I make those changes. |
Contributor
|
Thank you for even preparing a test for _useLineColor! It's certainly safer... |
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.
Resolves #5926
Changes:
lineVertexColors) from the per-vertex color info (now calledvertexStrokeColors)vertexStrokeColors) is empty, now that the one used for rendering will always be filledScreenshots of the change:
Live: https://editor.p5js.org/davepagurek/sketches/DIb8nX4-C
PR Checklist
npm run lintpasses