godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.13k stars 21.19k forks source link

Graphical glitch when zooming in a big sprite in the editor #49483

Open dryluggage opened 3 years ago

dryluggage commented 3 years ago

Godot version

3.3.2

System information

Linux Mint 20.1 Ulyssa

Issue description

when zooming into a sprite in the editor the sprite deforms

https://user-images.githubusercontent.com/58333865/121510280-c1252f00-c9e7-11eb-836b-eda11aeabff6.mp4

Steps to reproduce

open scene and zoom into the sprite

Minimal reproduction project

Zoom Bug.zip

insomniacUNDERSCORElemon commented 3 years ago

Doesn't happen for me with your test scene on Arch Linux (5.12.9-arch1-1) and a 1050 Ti (proprietary driver version 465.31). Also XFCE with compositor disabled. (if you also have nVidia, maybe an OpenGL setting in nvidia-settings ?)

Also, you forgot to define your main scene (opening your project will look like nothing exists until looking at the FileSystem dock).

dryluggage commented 3 years ago

i dont have nividia godot tells me i have Mesa DRI Intel(R) Q45/Q43 (ELK)

Chaosus commented 3 years ago

I guess it's because the default camera Z-near is too big for such a zoom amount and sprite fragments are discarded from the view.

insomniacUNDERSCORElemon commented 3 years ago

@Chaosus in dryluggage's video, only one triangle is discarded and it's only happening at ~400%-500%.

Not sure if you've tried it, but as I've said I can't replicate it.

It seems like dryluggage is using older discontinued hardware so that might be at fault here. Assuming they are on the newest graphics driver they can get, that is.

Chaosus commented 3 years ago

Yeah, it's probably a driver bug, I tried the same on Windows 10 and didn't see this effect.

Calinou commented 3 years ago

I guess it's because the default camera Z-near is too big for such a zoom amount and sprite fragments are discarded from the view.

Godot's 2D renderer doesn't make use of a 3D camera or Z-buffer, so this is caused by something else.

@dryluggage Can you reproduce this after disabling batching (for both the editor and project) in the project settings?

dryluggage commented 3 years ago

Yes it still happens after disabling batching and restarting the editor