-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 glLineWidth to ImmediateGeometry #2490
Comments
OpenGL line width isn't reliably supported across platforms – for instance, AMD GPUs will ignore it and treat it as if it was always The "proper" fix is to render lines as triangle strips. It was done in 2D by godotengine/godot#43828, but it needs to be implemented in 3D as well. |
Closing, as there are no plans to implement this per the above hardware limitations. It's important for Godot to look as identical as possible on various GPUs, so OpenGL line width won't be exposed. If you want to draw thick straight lines in 3D space, you can use stretched MeshInstances with CubeMeshes or CylinderMeshes. In 2D space, you can use a Line2D node (or AntialiasedLine2D add-on if you need antialiasing). |
@Calinou: What about the workaround you mentioned above, "lines as triangle strips"? |
I think this depends on #112 first, as there is no quick way to draw hardware-based lines in 3D right now. You can use procedural mesh generation and Also, in a game, using particle trails is likely a better idea as it's far more flexible. Hardware line drawing is best reserved to debug tools, where antialiasing is not critical. |
Describe the project you are working on
Similar BlockOut
Describe the problem or limitation you are having in your project
There is no possibility to set line thickness
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It will be possible to set the line thickness
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
ImmediateGeometry.set_line_width(thickness)
If this enhancement will not be used often, can it be worked around with a few lines of script?
I do not know how
Is there a reason why this should be core and not an add-on in the asset library?
it is logical if the possibility from GL will be in Godot
PS: excuse me for my level of english
The text was updated successfully, but these errors were encountered: