mausimus / ShaderGlass

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

Remove yellow border from full-screen window #11

Open somatronicon opened 3 years ago

somatronicon commented 3 years ago

First off, great project! Absolutely love it. Until people figure out there is a market for poly lenses that emulate CRTs for LED monitors (akin to this: https://hackaday.com/2021/06/16/fit-your-lcds-with-lenses-for-that-vintage-crt-look/), I'm using ShaderGlass 👍

As I'm trying to immerse myself in the past, I'm a bit distracted by the yellow border that appears around the full-screen window. My configuration can be seen below:

ProfileVersion "1.0"
PixelSize "1"
AspectRatio "1"
ShaderCategory "crt"
ShaderName "crt-lottes-multipass"
FrameSkip "2"
OutputScale "100"
FlipH "0"
FlipV "0"
Clone "0"
CaptureCursor "1"
Transparent "1"

And the screenshot:

image

somatronicon commented 3 years ago

Sorry, just noticed that the screenshot above doesn't show the shaders being applied. However, you can still see the yellow border around the ShaderGlass main window.

rohatsu commented 3 years ago

Hey, thanks for the feedback. Yes the yellow border is unfortunate but it's a security feature of Windows Capture API and cannot be removed (OBS etc. also has this problem). The only way to avoid it is to use clone mode (either capture the other monitor if you have multiple, or capture just the window of your game/app and put ShaderGlass in front of it), please try setting up your content that way.

somatronicon commented 3 years ago

Very interesting... Totally understandable then as it's a limitation of the API used to capture. I'll give clone a shot and see what happens. Unfortunately I only have a single monitor, and am after retro-izing my entire desktop... So, I might just have to live with the yellow border for now.

somatronicon commented 3 years ago

BTW, I just stumbled onto this; maybe useful?:

https://www.gitmemory.com/issue/microsoft/Windows.UI.Composition-Win32-Samples/46/829032545

somatronicon commented 3 years ago

Also, just for some context, I traced that snippet back to the following github issue; unfortunately, I can't tell if it'd be applicable in this case judging from the API docs:

https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/46

trebory6 commented 3 years ago

So I was going through some Windows documentation, and found that this page now references a borderless capture requests.

Maybe this can help solve this issue? I'll drop it here just in case.

https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture.graphicscapturesession.isborderrequired?view=winrt-20348#Windows_Graphics_Capture_GraphicsCaptureSession_IsBorderRequired

rohatsu commented 3 years ago

Great find @trebory6 , I will test this out!

trebory6 commented 3 years ago

No problem @rohatsu! I was actually searching how to disable it universally via the registry or something(My media center is mainly offline so not worried about rogue screen capture).

This was where I found out about the borderless capture request, and apparently that reply mentioning this document is relatively new as that response was posted only 10 days ago, so this seems like a relatively new development that I hope helps with this project!

Thanks again for this project by the way. This is EXACTLY what I've been looking for for my Retro media center project for years! Let me know if you have a patreon or paypal, I'd love to throw some coffee money your way for this.

rohatsu commented 3 years ago

The good news is removing yellow border works, the bad news is that at the moment only on Windows 11. Hopefully Microsoft will include this in an upcoming Windows 10 update (21H2 perhaps? I haven't tried the preview yet). On the latest released Windows 10 21H1 (build 19043.1165) it does not work unfortunately.

Feel free to give it a shot, the 0.5 beta will attempt to disable the border if the OS reports support for it. https://github.com/rohatsu/ShaderGlass/releases/tag/v0.5-beta

Edit: confirmed still not possible on latest Windows 10 21H2 preview (19044.1200), we'll have to wait longer to have this feature on Windows 10 it seems.

greysondn commented 1 year ago

Hi.

Was hoping to write a full screen LUT shader for reasons, stumbled headlong into this issue "yet again", just popping a note here to say I'd love to see it solved.

Otherwise, thanks for your application; it's been a trip down memory lane testing it against old game footage. I've not felt this young in... well, my age minus about 8 years ;)

shinra358 commented 1 year ago

obs does not have this problem

ner00 commented 1 year ago

True, I think this is the relevant portion: https://github.com/obsproject/obs-studio/pull/4070

Hey commented 1 year ago

obs does not have this problem

It does if you use the "Window 10 (1903 and up)" display capture method.

nakami commented 1 year ago

Any updates on this issue?

mausimus commented 1 year ago

I am not able to reproduce yellow border on latest Windows 11 (22H2), I've added steps to confirm ShaderGlass has Windows' permission to suppress it to the FAQ but in my testing they get enabled by default. If anyone is on latest Windows 11 and those steps don't make yellow border disappear, please post here.

QUAKEULUS commented 4 months ago

Still an issue on Microsoft Windows 10 Enterprise 10.0.19045 N/A Build 19045

with ShaderGlass-0.9-win-x64

Tasosgemah commented 2 months ago

Still an issue in Windows 10 pro 22H2