-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
LineMaterial: Write line segments with capsule depth #27353
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
base: dev
Are you sure you want to change the base?
Conversation
Looks great! The problem is that we lose antialiasing? |
/ping @WestLangley |
The problem is that when using the function to determine capsule intersection it doesn't give the right information needed to determine alpha-to-coverage anti aliasing. The solution that came to mind was to run both capsule intersection functions but that felt messy / slow. It needs a bit more work but it's possible there's another way to determine the AA value - I just need to think about it more. Here is what I was thinking for a more fully featured version of this if other are interested in picking it up:
|
Related issue: #27349, #26916
Description
A quick try at enabling the Line2 to write the line segments depth buffer as capsule shapes so they more sensibly intersect with other scene objects. Unfortunately I'm not sure how to make this work cleanly with alpha-to-coverage to make sure the edges have clean AA without calling the previous intersect function along with the new depth function which would have performance implications. We could add a separate toggle, though, but I don't love that. I'll leave this here for now in case someone else has some ideas.
Demo here. You can toggle the new depth write with the "capsule depth" option.