godotengine / godot

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

ARVR viewport size cannot be changed #74901

Open mittorn opened 1 year ago

mittorn commented 1 year ago

Godot version

3.x branch

System information

any

Issue description

It is impossible to override arvr viewport size. When rendering overlay openvr application which has multiple viewports, all ARVR viewpors are forced to main rendertarget size: https://github.com/godotengine/godot/blob/3.x/servers/visual/visual_server_viewport.cpp#L288 This results in non pixel-perfect overlay rendering and high gpu usage even on small overlays It cannot be solved on godot_openvr side because godot_openvr does not know which rendertarget size is requested with ARVR interface, it only can report same value for all overlays as it sorted every frame. Adding some viewport info or some flag that disables this lines would solve this

Steps to reproduce

Create viewport, enable arvr flag Set viewport size get it reseted every frame before rendering witn no ability to somehow hook/override it even with custom ARVR interface

Minimal reproduction project

N/A

Calinou commented 1 year ago

cc @BastiaanOlij

mittorn commented 1 year ago

PR not related to vr viewports as it's size is overriden