godot-xr-tools icon indicating copy to clipboard operation
godot-xr-tools copied to clipboard

Viewport2dto3D: Add fix to make textures clearer, make it easier for devs to enable refresh throttle

Open teddybear082 opened this issue 2 years ago • 1 comments

  1. 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.

  2. 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

teddybear082 avatar Oct 13 '22 11:10 teddybear082

Both good ideas, we need to find some time for this :)

BastiaanOlij avatar Oct 14 '22 02:10 BastiaanOlij