godot-xr-tools
godot-xr-tools copied to clipboard
Viewport2dto3D: Add fix to make textures clearer, make it easier for devs to enable refresh throttle
-
Per discussions on Godot XR discord channel, almost always it will be a bad idea in VR for the Viewport to update always. So would be good to have an easy to use toggle at the parent level of the Viewport2dto3D scene for whether someone really wants to update always or instead wants to set a throttled update or only once update.
-
Per discussions on Godot XR discord channel, the texture displayed on the viewport may appear to be more blurry than it needs to be without a few extra lines of code:
var tex = $Viewport.get_texture() tex.flags = Texture.FLAG_FILTER material.albedo_texture = tex
Example of a start of a "fixed" Viewport2dto3d is here (though still needs the option for going back to auto update or totally only a once update): https://github.com/teddybear082/godot-3d-platformer-vr/blob/main/addons/godot-xr-tools/objects/Viewport_2D_in_3D.gd
Both good ideas, we need to find some time for this :)