Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line shader to avoid artifacts on straight lines #421

Merged
merged 1 commit into from
Jan 5, 2023
Merged

Conversation

almarklein
Copy link
Collaborator

@almarklein almarklein commented Jan 5, 2023

Closes #419

Changes how the 5th vertex position is calculated, avoiding the generate case when the current point is exactly on the line between the two neighboring points (i.e. the line is straight). Also fixes the calculation of the angle so it can actually be used to decide on what side the "inside" is.

I visually confirmed that the line examples still produce correct results, and that the artifacts in #419 are gone.

@kushalkolar
Copy link
Contributor

Wow you guys are amazing! This fix works 🎉

Using the lines in these massive visualizations which were impossible with pyqtgraph 😄

line_fixed-2023-01-05_16.55.48.mp4

@Korijn Korijn merged commit c3fa916 into main Jan 5, 2023
@Korijn Korijn deleted the fix-line branch January 5, 2023 22:45
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.

Weird line rendering with a long line where relatively few points have a high alpha value
3 participants