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

draw_line's antialiasing broken in 4.4 dev3 #98886

Closed
sockeye-d opened this issue Nov 6, 2024 · 2 comments
Closed

draw_line's antialiasing broken in 4.4 dev3 #98886

sockeye-d opened this issue Nov 6, 2024 · 2 comments

Comments

@sockeye-d
Copy link
Contributor

sockeye-d commented Nov 6, 2024

Tested versions

  • Reproducible in v4.4.dev3.official [f4af820]
  • Not reproducible in v4.4.dev2.official [97ef3c8]

System information

Godot v4.4.dev3 - Windows 10.0.19045 - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 - 12th Gen Intel(R) Core(TM) i5-12400F (12 threads)

Issue description

When using draw_line to draw antialiased lines with a CanvasItem node with MSAA on, the antialiasing appears broken:
image

In 4.4dev2 and earlier versions:
image

I was also helping someone make a radar-like UI element, and this is how it looks on dev3:
image

The circles are antialiased correctly but the lines are not (it also looks correct on dev2). Without MSAA, it also looks correct

Steps to reproduce

I have this script that simply draws a line between two child Marker2D nodes:

@tool
extends Node2D


@export var width: float = 3.0


func _process(delta: float) -> void:
	queue_redraw()


func _draw() -> void:
	var children := find_children("", "Marker2D")
	if children.size() < 2:
		return
	draw_line(children[0].position, children[1].position, Color.WHITE, width, true)

In 4.4 dev2 it works as expected, but in dev3 it looks wrong

Minimal reproduction project (MRP)

lines.zip

@matheusmdx
Copy link
Contributor

This issue was already fixed in master by #98652

image

@clayjohn
Copy link
Member

clayjohn commented Nov 6, 2024

That's right! This will be fixed in dev 4

Closing as fixed by #98652

@clayjohn clayjohn closed this as completed Nov 6, 2024
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

4 participants