godotengine / godot

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

Vulkan Mobile: Orientation Sensor / Some artifacts appear #63099

Open moomoosic opened 2 years ago

moomoosic commented 2 years ago

Godot version

4.0.alpha12

System information

Android 12 Samsung m21

Issue description

The first rotation of the phone is ок. The second rotation changes the aspect ratio. Some artifacts appear. Default settings.

Screenshot_20220716-163259_2 Screenshot_20220716-163317_2 Screenshot_20220717-084139_2

Screenshot_20220716-163214_2 Screenshot_20220716-163243_2

Steps to reproduce

AndroidAPK_Godot4_Alpha.apk - Run on smartphone and rotate 90 degrees.

Minimal reproduction project

Project: test_12alpha.zip

Apk file: AndroidAPK_Godot4_Alpha12.zip

Calinou commented 2 years ago

@moomoosic Please upload a minimal reproduction project to make this easier to troubleshoot.

akien-mga commented 1 year ago

Is this still reproducible in 4.0 RC 3 or later?

Calinou commented 1 year ago

The project's thread model is set to Multi-Threaded, which causes various rendering issues. For instance, attempting to resize the running project window's on desktop will cause the project to freeze (and possibly cause your system to lockup).

Resetting the thread model advanced project setting to its default value resolves that particular issue. I'd wager it also fixes the issue on Android, since changing orientation is similar to resizing the window (it requires recreating framebuffers).