hecomi / uDesktopDuplication

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

Access only part of screen #55

Open wtesler opened 2 years ago

wtesler commented 2 years ago

I was wondering if there is any way to configure the code to only capture a subset of the screen, for example a square in the center of the screen. Has anyone thought about this use case?

Thanks, Will

hecomi commented 2 years ago

It is not currently possible to capture only a specific part of the desktop. This is because the Desktop Duplication API is designed to return the entire desktop, and there is a large overhead to crop a portion of it.

Please try using the Loupe component instead, which crops the entire texture and displays a portion of it in a shader. A sample is included in the project.

20161203232152