godotengine / godot

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

Mobile VR Interface doesn't work in 4.X #89755

Closed AdriLorenz closed 2 weeks ago

AdriLorenz commented 5 months ago

Tested versions

Tested in Godot 4.2 and 4.3 dev5

System information

Samsung Galaxy S23 Ultra, Godot in compatibily mode

Issue description

The interface that manages VR mobile games called 'Native mobile' is totally broken right now and it doesn't rotate the camera properly. It also has a weird flickering.

Steps to reproduce

extends Node3D

var xr_interface: XRInterface

func _ready():
    var interface = XRServer.find_interface("Native mobile")
    if interface and interface.initialize():
        get_viewport().use_xr = true

Minimal reproduction project (MRP)

NativeMobileBug.zip

HectorVarel commented 4 months ago

Do you resolve this problem? I have the same:(

AdriLorenz commented 4 months ago

Do you resolve this problem? I have the same:(

Nothing. This seems to be out of the priorities of the Godot Team, sadly x.x

bierig commented 4 months ago

I can confirm this issue -- it interfered with a VR lab I was preparing. Please address this urgently or get in contact with me so that I can help getting started.

BastiaanOlij commented 4 months ago

@akien-mga just having a quick look, I'm using a Pixel 6 phone to test. I'm not getting any flickering issues but indeed the orientation code is far more broken than I previously thought so I'll investigate that further.

On the flickering issue, it would be good to know what GPU is on the phone. I only have Mali phones here to test. If the GPU is a Qualcomm (which googling suggests it does) it could be the same issue as we're experiencing on Quest in which case it would be good for @DarioSamo to take a look at it as the native mobile setup doesn't do anything special with rendering.

On a side note, I did notice that glow is completely broken when running on a mobile phone, while working properly on desktop. Thats a whole new issue...

DarioSamo commented 4 months ago

On the flickering issue, it would be good to know what GPU is on the phone. I only have Mali phones here to test. If the GPU is a Qualcomm (which googling suggests it does) it could be the same issue as we're experiencing on Quest in which case it would be good for @DarioSamo to take a look at it as the native mobile setup doesn't do anything special with rendering.

We clarified this over DM already, but OP claims to be using the compatibility renderer, an area I haven't really worked on, so I'm not familiar with what could be affecting it in that regard.

BastiaanOlij commented 4 months ago

Yup, read that wrong.. I can't reproduce the flickering on compatibility either (yet), still doing some tests.

Did fix the orientation issue, that was dumb, I should have found that ages ago.

bierig commented 4 months ago

The orientation issue is the one that is most pressing imho as it prevents mobile VR altogether.

BastiaanOlij commented 3 months ago

The orientation issue is the one that is most pressing imho as it prevents mobile VR altogether.

Yes, but that should be fixed by #91305, it would be good to confirm.

akien-mga commented 2 weeks ago

Assuming fixed by #91305.