hecomi / uDesktopDuplication

Desktop Duplication API implementation for Unity (only for Windows 8/10)
http://tips.hecomi.com/entry/2016/12/04/125641
MIT License
563 stars 97 forks source link

Resolution to Low for VR (Video) #54

Open Marco-Zechner opened 2 years ago

Marco-Zechner commented 2 years ago

https://youtu.be/jt0vwiF9wGU

As you can see in the video I have to get quite close to the Screens to be able to read the text. I don't know what causes this flickering but when I get back to the normal distance then all the text gets constantly cut into parts. I don't know a better way to describe it. Probably I just messed up some settings in Unity but I try to make this small program for me now for at least 2 months and I just can't find a solution. I know that it should be possible to read the text at that size because I can read it in Virtual Desktop (but that only support 1 monitor, and I can't modify the world how I would like it.) So if ANYONE has ANY ideas, please tell me. I'm quite desperate because I think it would be really cool but I can't get it to work. I even tried to render my full HD monitors at 4k with DSR

hecomi commented 2 years ago

The flickering is probably caused by the fact that the Texture2D supplied by uDesktopDuplication does not create mipmaps. This is because there is an overhead to create mipmaps. I think it is possible to add an option to create them, but I am currently working on another project, so I am not able to do it myself for now...

adimas-nri commented 2 years ago

Hello, did you find the solution to this issue yet?

ar-zadeh commented 8 months ago

Adding mismap will just make it blurry and make the desktop content even harder to work with. What I found useful in my project was to create a VRscale script and change the eyeTextureResolutionScale. The code will look like the following: `using UnityEngine; using UnityEngine.XR;

public class VRRenderScale : MonoBehaviour { public float TextureResolutionScale; void Start() { XRSettings.enabled = true; XRSettings.eyeTextureResolutionScale = TextureResolutionScale; }

}` The higher the scale, the better the quality.