-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Line2: Add support for Alpha To Coverage #21451
Conversation
Interesting idea: anti-aliasing of the line end-caps. It is very subtle. I'll defer to @Mugen87 on this one. |
Heh I've noticed it forever and it's always bugged me and now it can be addressed! It's definitely more noticeable on lower DPI displays and it also helps some jaggedness around curved corners on paths where the end points meet.
I'm not seeing this on the two machines I'm able to test with but I suspect it's because a derivative was being taken in a conditional the behavior of which probably varies depending on hardware. I've attempted to fix this by defining A couple other fixes I just pushed:
|
Heh uh oh 😅 What hardware are you using? I'm hoping I can reproduce it somehow otherwise this won't be a fun one to track down. |
It's an iMac (10.15.7) with a AMD Radeon R9 M295X 4 GB. Chrome version: 89.0.4389.82 |
I was able to reproduce the issue on a mac laptop and have fixed them (in my case). It seems that on some hardware taking a derivative inside a conditional at all can cause undefined behavior even if the variable is defined outside the condition. I should have fixed it in the last commit -- let me know! |
Looks better now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks better.
Thanks! |
Related issue: --
Description
Adds support for
alphaToCoverage
to Line2. It's a subtle effect but it enables anti aliasing on the rounded tips of the line segments which can be seen on the line ends and when the line is curving in the demo:https://raw.githack.com/gkjohnson/three.js/atc-line2/examples/webgl_lines_fat.html
cc @WestLangley