-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
Add vertex color alpha channel support to LineMaterial #23680
Comments
Related: #16570 |
It was stated in #16570 to not support transparency because of the resulting artifacts. @jhurliman Don't you experience these in your custom version of |
@Mugen87 the artifacts are acceptable for my use case (user-generated content). |
@Mugen87 if @mrdoob and @gkjohnson agree, we could add opacity and alpha-channel support to Fat Lines. Some users will be happy... others will complain. |
With two draws (one depth only, one with stencil operations) it's possible to alleviate the corner artifacts though you sacrifice any line overlap rendering. But it does look cleaner: https://gkjohnson.github.io/threejs-sandbox/fat-line-opacity/webgl_lines_fat.html It may look odd if a very transparent line is in front of an opaque line, though. I don't have strong opinions either way. Transparent thick lines seem to be something a lot of users ask for. |
@gkjohnson thanks for the pointer, we are using this technique in Foxglove Studio (see https://github.com/foxglove/studio/blob/main/packages/studio-base/src/panels/ThreeDeeRender/renderables/markers/RenderableLineList.ts#L39) |
@jhurliman Your link is now broken. I'm guessing that link contains an example where you modified
On a related note, in my case the overlapping thing isn't an issue because I'm rendering disconnected line segments. |
Is your feature request related to a problem? Please describe.
I am using Line2 with vertex colors and my data source provides RGBA values, but I cannot support the alpha channel without creating my own copy of LineMaterial.js.
Describe the solution you'd like
#20975 added support for vertex color alpha, but the LineMaterial class assumes vec3 colors only. I would like to see the LineMaterial class natively support vec4 vertex colors.
Describe alternatives you've considered
I've created my own copy of LineMaterial that uses vec4, but automatically doing the correct thing for vec3 and vec4 colors and upstreaming this change would be preferable.
The text was updated successfully, but these errors were encountered: