Files
godot-demo-projects/2d/polygons_lines/README.md
2024-06-06 00:15:33 +02:00

830 B

2D Polygons and Lines

A demo of solid and textured 2D polygons and lines using Polygon2D and Line2D.

In this project, solid Line2Ds are antialiased by using a specially crafted texture. By using a texture that is solid white on all its pixels except the top and bottom edges (which are fully transparent white), the border appears smooth thanks to bilinear filtering. A more extensive variation of this concept (which works better with variable-width lines) can be found in the unofficial Antialiased Line2D add-on.

Language: GDScript

Renderer: GLES 2

Screenshots

Screenshot