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

Editor Camera2D current outline disappearing when zooming out #56818

Open
DelinWorks opened this issue Jan 15, 2022 · 5 comments
Open

Editor Camera2D current outline disappearing when zooming out #56818

DelinWorks opened this issue Jan 15, 2022 · 5 comments

Comments

@DelinWorks
Copy link

Godot version

3.4.2.stable.mono.official

System information

Windows 10, GLES3, GeForce GTX 1060 3GB

Issue description

I noticed an ugly "bug" you could say but I shouldn't say it's a bug but rather a problem in design

Whenever you zoom slightly like here, the current camera and the default camera have normal border lines that fill a single pixel
image

When you zoom out the lines start to disappear and blink pixels when zooming out like in here
image

Here is my conclusion, I think the border is being drawn with a model, two triangles for every side (top, bottom, left, right)
While this can do the job, it doesn't look nice and crisp when the viewport camera zooms in or out, I think it would look better if a real border is drawn (like with glDrawLine) it follows the scale of the viewport at exactly 1 pixel no matter how zoomed in or out the viewport is

I've noticed that because when you zoom in you see the border gets bigger and bigger
image

Steps to reproduce

No steps needed just open the editor and zoom out and you'll see

Minimal reproduction project

No response

@Chaosus Chaosus modified the milestone: 3.5 Jan 15, 2022
@Calinou Calinou added this to the 4.0 milestone Jan 15, 2022
@Calinou
Copy link
Member

Calinou commented Jan 15, 2022

Lines are made bolder when Camera2D has its current property enabled: #49125

Making them thin (i.e. using OpenGL line drawing) would make it impossible to distinguish a current Camera2D from a non-current Camera2D. See godotengine/godot-proposals#1363 (except we want thick lines that do not scale with viewport zoom here).

As a workaround, we could draw two lines next to each other for current Camera2Ds, but it will look strange when zoomed in.

@Calinou Calinou changed the title Editor Camera Outline Disappearing when zooming out Editor Camera2D current outline disappearing when zooming out Jan 15, 2022
@DelinWorks
Copy link
Author

I mean can't you draw thicker lines with opengl? (Like 3 pixels wide)
I remember when programming with opengl that you can draw a thick line by calling glLineWidth(); but that's legacy opengl
I don't know if Opengl 2.0 or after support this

@Calinou
Copy link
Member

Calinou commented Jan 15, 2022

I mean can't you draw thicker lines with opengl? (Like 3 pixels wide)

The maximum supported OpenGL line width varies across hardware and drivers. Many drivers (such as AMD and mobile GPUs) do not support line widths above 1, so Godot emulates thick lines using triangle strips to ensure consistent behavior across platforms.

@KoBeWi KoBeWi removed this from the 4.0 milestone May 1, 2022
@kuroodo
Copy link

kuroodo commented Mar 1, 2023

I'm having this problem with 4.0 stable. I only have one camera on my scene.
In Godot 3.5 I can zoom out a ton before this starts to happen. In 4.0 it occurs much sooner. The image showing Godot 3.5 shows how far you can zoom out without it occuring.

My GPU is a GTX 1080 with the latest drivers as of this message, Windows 10

Screenshot 2023-03-01 105258
Screenshot 2023-03-01 104817
Screenshot 2023-03-01 105334
Screenshot 2023-03-01 110438

@lucasshuan
Copy link

Currently having this issue in Godot 4, Windows, RTX 2060. Can barely see an enabled camera or limit lines when zoomed out

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

6 participants