Hotrian / OpenVRDesktopDisplayPortal

Put your favorite Desktop Window directly into any OpenVR game!
Other
445 stars 97 forks source link

Multithreading? #46

Closed GageBachik closed 7 years ago

GageBachik commented 7 years ago

Are you planning on bringing this into the app at any point? I love this app so much but it literally uses more cpu than OBS... I have an i7 hexcore on windows 10 and can't use this to stream because it maxes out my cpu </3

Hotrian commented 7 years ago

Does it really? It's only using <20% of my FX-6300 last I checked. Typically <10%. Currently it uses the GDI api so it is not GPU accelerated. Once I implement the new API it will be GPU accelerated and no longer CPU bound (and also capable of capturing the entire desktop resolution at >60FPS).

So to answer your question I probably won't implement multi threading since Unity does not like it and it won't matter once the application is GPU accelerated because it will be using a very small percentage of your CPU.

Edit: API name redacted ;]

Hotrian commented 7 years ago

I just tried the latest preview and it still uses 20% max of my CPU. It will use less CPU with a smaller window, but even a 2560x1440 window only uses up 20% of my CPU, though only captures at 6FPS :P.

Can you try capturing a smaller window? I recommend <480p right now. Depends on your hardware though. Like I said, the new API is far superior to the GDI API and will be able to capture your full desktop (including multiple monitors) at 60+FPS, but Unity is not compatible with it directly so I have to write some native plugins to get it working.

Edit: API name redacted ;]

GageBachik commented 7 years ago

First off sorry for the lat reply!

Alright so I have a msi 1080 gaming x. It came with a program for "optimizing" vr. I believe that app was causing my cpu to overheat and give inaccurate readouts on certain apps.

Still 20% cpu is extremely high so I'm excited for you to switch over to DDA.

I'm going to run another test (window I'm using is <480p), without the msi app to mess things up and I'll take pics of the results! :D

GageBachik commented 7 years ago

Alright I haven seen it go over 20% CPU since removing the MSI Gaming app from the picture. This normally sits around 14-16% CPU for me. Hopefully it will be sub 10% when the switch is made.