You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For many use cases, dynamically drawn antialiased lines are necessary to match an existing game aesthetic (e.g. a dynamically drawn HUD targeting display in a futuristic FPS, or trajectory preview in a minimalist 2d artillery/angry birds game). I think the article needs the addition of information on how to achieve dynamically drawn antialiased lines.
This is motivated by a personal need! In Unity I used the Vectrosity plugin to draw antialiased lines, I'm wondering how to do this in Godot.
The text was updated successfully, but these errors were encountered:
I think this functionality should be added in core for all kinds of 2D line drawing. Currently, draw_line() offers an antialiased parameter but it doesn't work well in all situations (e.g. with translucent lines). See godotengine/godot#12840 and godotengine/godot#8289.
As a workaround, you may be able to use Line2D/Path2D + Curve2D with a texture that features an one-pixel gradient on the top and bottom edges — see this example project I made. It works quite well with constant line widths, but antialiasing won't look as good if the line width is variable (since the gradient may end up being too thin or too thick for the displayed size).
Currently the custom drawing in 2D tutorial demonstrates how to create aliased lines only:
https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html
For many use cases, dynamically drawn antialiased lines are necessary to match an existing game aesthetic (e.g. a dynamically drawn HUD targeting display in a futuristic FPS, or trajectory preview in a minimalist 2d artillery/angry birds game). I think the article needs the addition of information on how to achieve dynamically drawn antialiased lines.
This is motivated by a personal need! In Unity I used the Vectrosity plugin to draw antialiased lines, I'm wondering how to do this in Godot.
The text was updated successfully, but these errors were encountered: