-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
line_draw always draws with width=1 #8289
Comments
From IRC logs:
|
In Godot master it's possible to draw polygon-based thick lines with Line2D ;) |
@Zylann I tried it, but can't get anything to show on the screen, thought it was broken. Any examples available? |
2D shapes themselves aren't broken, but this is: #7840 (comment) Currently Line2D is just a Node2D with a list of points and some rendering options. |
@Zylann so... it doesnt work at the moment, right? :) |
It works but you can't see it (in the issue I linked you can see the wireframe is correct), so... for the end user it doesn't works indeed, until that bug is fixed^^ |
so I guess its safe to close this, since the problem is basically in #7840 , right? |
I found SpatialMaterial has an option for line width, which I needed to make some debug lines more visible, but it has no effect. Should it be removed or are there plans to implement general purpose line rendering in both 2D and 3D? |
If not done already, it could probably be reimplemented in the GLES2 backend. According to @reduz in #8289 (comment) the usual method is not supported in GLES3, so it needs a different implementation (or it will be fixed only when properly implemented in the Vulkan backend). |
I have tested GLES2 on Godot 3.1 alpha 2, and it is the same. |
I have researched this a bit, and apparently this is not a bug. Regarding Line Width property in GeometryInstance. If we want to render lines that are thicker, we need to write our own method for doing so. Line Width property is just not supported. As mentioned before drawing-lines-is-hard. |
Draw_line's width parameter works as expected on my Windows machine running 3.0.6 Stable. |
I'm having this problem in 3D (SpatialMaterial) in Godot 3.1.1, in both GLES2 and 3. Should there be a separate issue for 3D? |
@Skaruts It seems the 3D issue has been mentioned above in this thread, no need to create a new issue. |
@Calinou, indeed. I was just wondering. Although, I'm also wondering how the editor's 3D gizmos are drawn. Because they have thick lines. Could you point me to the place in Godot's source where this happens? I've no clue where to find it, but I wonder if I might find a workaround there. |
@Skaruts It's in godot/editor/spatial_editor_gizmos.cpp Line 203 in ad0d87b
3D gizmos are drawn using procedural meshes generated using ArrayMesh. The |
@Calinou interesting... I always thought the manipulators would be made with Anyway, thanks a lot for pointing me to it. |
I'm on v3.2 stable, Linux, having the same issue with anti-aliasing |
@bluenote10 |
Can anyone still reproduce this bug in Godot 3.2.3 or any later release? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
@KoBeWi it's not working for me in 3D, netiher in GLES2 nor GLES3. Lines are all 1 width. However, GLES3 doesn't work well anyway in my old Radeon HD 4870, and I don't know if it's supposed to work in GLES2 to begin with. I suppose I can try to find time to make an MRP, if this is supposed to work in GLES2. I won't fiddle with GLES3, as it stalls a lot on my end. |
GLES2 should work on old GPUs, but GLES3 isn't expected to work correctly indeed. That said, unlike NVIDIA, AMD didn't implement line widths above 1 in their OpenGL line drawing code. This is why #43828 in 4.0 solves this problem entirely by not relying on OpenGL line drawing in the first place. |
I meant the line widths, though. But I guess you answered my question, and it's not supposed to work at all in my gfx card, at least in 3.x. (I'll be switching to an NVIDIA soon anyway.) Although it's odd then, that I had line widths in Godot 2. |
I don't think this a problem in master, especially after fixes like #69851. Hardware limitation still applies of course, as described above. |
Operating system or device - Godot version: Godot 3(master), Linux
Issue description:
Using any width value in draw_line seems to be useless, the drawn line is always 1px(?) in width.
The text was updated successfully, but these errors were encountered: