mausimus / ShaderGlass

Overlay for running GPU shaders on top of Windows desktop
GNU General Public License v3.0
970 stars 37 forks source link

Bugs encountered while using "Lock Current Area" (and workarounds) #27

Open HeyItsLollie opened 2 years ago

HeyItsLollie commented 2 years ago

I want to say upfront: The new "Lock Current Area" feature is very useful to me, I love it. But I've encountered a couple issues while using this feature, and I have some workarounds in case anyone else needs them.

On a multi-monitor setup, when the Input is set to Displays > All Displays, "Lock Current Area" incorrectly sets ShaderGlass's cloned display region coordinates.

NVIDIA_Share_20211229_14-02-04-572-copy ShaderGlass seems to take its lock coordinates from the current monitor that the window is positioned on, but clones a display region based on all available monitors. This results in a cloned display that is offset by the coordinates and resolution of your left-most monitor.

Workaround: First, set your Display to the monitor that you wish to lock the current area to, and then enable "Lock Current Area."


When ShaderGlass is on a display that is not your primary monitor, "Lock Current Area" causes the "Input" top-menu to be stuck in frame, and the resulting frame becomes frozen in time.

snap3 This only seems to affect secondary monitors, and is not fixed by setting the Input to a single display.

Potential Workaround 1: First, pause ShaderGlass by using the keyboard shortcut, Ctrl+Shift+P. You can now enable "Lock Current Area," and then unpause ShaderGlass using the same shortcut as before.

This workaround isn't foolproof however. Sometimes this works, a lot of the time it doesn't. This only seems to affect secondary monitors, and is not fixed by setting the Input to a single display.


Potential Workaround 2: Keep ShaderGlass on your primary monitor, and set its Input to your target display. Move ShaderGlass so that its top-left corner is in the same position as whatever you're trying to capture from your target display, and then enable "Lock Current Area." This will cause ShaderGlass to clone the region of your target display without any issues.

This works for me without fail, though it is much more finicky and difficult to explain. Hopefully the image below helps: Aseprite_20211229_15-43-07-266-copy

I positioned ShaderGlass on my primary monitor so that its top-left corner was in the same position as the small canvas on my second display. Once this was set up, I set my Input to be my secondary display, and then enabled "Lock Current Area,"

With everything set up, the red mark I've drawn on both screens shows where ShaderGlass is capturing from. At this point, ShaderGlass can be freely moved around and resized without any issues. (I'm also using a "1x" Input Pixel Size, an Output Scale set to "300%", and Aspect Ratio Correction set to "1.33".)

mausimus commented 2 years ago

Many thanks for reporting this, I will investigate. Could you post a screenshot of your Windows' display settings (the page that shows monitors 1 | 2 and alignment etc.), please?

HeyItsLollie commented 2 years ago

Sure! ApplicationFrameHost_20211229_17-19-34-957

I realized this is likely related to #7 - my second display is to the left of my primary display, so it has negative coordinates that need to be accounted for.