Skip to content
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

Antialiasing property is ignored when rendering Line2D or Polygon2D #62954

Open
poiati opened this issue Jul 12, 2022 · 8 comments
Open

Antialiasing property is ignored when rendering Line2D or Polygon2D #62954

poiati opened this issue Jul 12, 2022 · 8 comments

Comments

@poiati
Copy link
Contributor

poiati commented Jul 12, 2022

Godot version

4.0-alpha11

System information

Linux 5.18.9-arch1-1, NVIDIA driver version 515.57, RTX 3060

Issue description

Antialiasing properties of the Line2D and Polygon2D nodes are being ignored. They are not being sent to the RenderingServer when being drawn.

A side question: does MSAA or other project-level antialias settings affect the 2D renderer?

Steps to reproduce

Add any Line2D or Polygon2D. Toggling the antialias property of them does not have any effect.

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Jul 12, 2022

They are not being sent to the DisplayServer when being drawn.

I think you meant RenderingServer 🙂

A side question: does MSAA or other project-level antialias settings affect the 2D renderer?

No, as MSAA/FXAA/TAA only affect 3D rendering.

@poiati
Copy link
Contributor Author

poiati commented Jul 12, 2022

They are not being sent to the DisplayServer when being drawn.

I think you meant RenderingServer slightly_smiling_face

A side question: does MSAA or other project-level antialias settings affect the 2D renderer?

No, as MSAA/FXAA/TAA only affect 3D rendering.

Yes, RenderingServer! Sorry.

@AcatXIo
Copy link

AcatXIo commented Sep 5, 2023

I can confirm the issue for version 4.2.dev4, for both compatibility and mobile renderers, the antialiased = true property does nothing, no matter what other settings I tried to use.
image

@Calinou
Copy link
Member

Calinou commented Sep 9, 2023

I'd suggest using godot-extended-libraries/godot-antialiased-line2d#8 (which I haven't merged yet, as I ran into some visual issues that are also present in 3.x for some reason).

@IllustratedMan-code
Copy link
Contributor

IllustratedMan-code commented Jan 25, 2024

Can confirm that this is still a problem in 4.2.x. I assume that this means that there is currently no way to get an antialiased line2D correct?

@Calinou
Copy link
Member

Calinou commented Jan 25, 2024

I assume that this means that there is currently no way to get an antialiased line2D correct?

You can use the fork of the AntialiasedLine2D add-on from here: https://github.com/OmarShehata/godot-antialiased-line2d/tree/master

@IllustratedMan-code
Copy link
Contributor

Thanks, I think I will go that route! I do wonder why draw_line can draw antialiased lines, but Line2D cannot. Is there some big problem preventing this from being fixed?

@Calinou
Copy link
Member

Calinou commented Jan 25, 2024

I do wonder why draw_line can draw antialiased lines, but Line2D cannot

Line2D doesn't rely on draw_line() but relies on a procedurally generated polygon instead. This is done because draw_line() is far less flexible than a custom solution like Line2D is. For instance, it doesn't support textured lines, variable width, bevel/round cap/joint types and so on.

Fixing this issue requires redoing #43828 but in Line2D. Maybe @Chaosus could take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants