mausimus / shaderglass Goto Github PK
View Code? Open in Web Editor NEWOverlay for running GPU shaders on top of Windows desktop
License: GNU General Public License v3.0
Overlay for running GPU shaders on top of Windows desktop
License: GNU General Public License v3.0
It's possible?
This is more of a quality-of-life suggestion:
ShaderGlass currently bases everything from the display window's top-left corner. This works just fine, but there are times where I find myself wishing everything (scaling, aspect ratio correction, etc) could be anchored around the display window's center instead.
Hi,
I like very much what you did, i try to use it with QEmu to play with old w98 games.
Perhaps it's me but when i use fullscreen mode (ctrl shift +g), window go to the left top corner and will use the size of the child. if i use alt+enter instead it doesn't keep the 4/3 aspect ratio.
Also i think about something, a mode with ShaderGlass centered, using a black background to hide everything else.
Best regards.
Edit:
For the while i found a way to play with good conditions
(I can't screenshot process)
I've looked through some of the source, but its not clear to me how glass mode avoids the "hall of mirrors" effect you get when in capturing in clone mode with the output window on the monitor that's being captured. I only see WS_EX_TRANSPARENT being set.
Any insight would be great.
As in the title, Mednafen 1.29.0 x64, running any emulated system fullscreen, when I try to capture the emulator output in ShaderGlass through the input menu, ShaderGlass 0.7 quits. No Windows Error Reporting dialog or any indication what's up.
Since it is not possible to capture full-screen applications, is it possible to add the function of completely hiding the program interface? So that only the target application is visible, without any borders.
Hi there, figured I'd submit another issue I'm having.
So SharderGlass isn't detecting Kodi. I've tried several different things, and it's the one thing that it doesn't seem to be able to detect.
Coincidentally it's the one thing I wanted to use this with haha
Thanks again!
Capture Cursor - is it possible to hide the main Windows cursor in this mode somehow (just like DosBox does, for example)? Currently I have two cursors on the screen when I use ShaderGlass with this option enabled. You could bring back the cursor with some keys combination. Thank you and good luck.
The metacrt shader, for example, has a background image, wood grain texture and monitor border texture. Being able to swap those out to something else would be a game changer.
The requirements say version 2004, and partially 1903, but in case Win10 version 1909 was intended to be functional as well:
When running ShaderGlass the program's UI opens, it's unresponsive, and it closes without giving any errors. If I try to run it from command line to see if there's an output for --help, it'll open and be unresponsive, but it won't close. It'll just stay open.
Here's a crash dump, a crash report, and Dependency Walker output.
Report_and_DMP.zip
DependencyWalker_Output.zip
First off i really enjoy this program I've been wanting to emulate a CRT on my entire windows 10 OS and this fills that mostly.
But what im wondering is how i select multiple shaders or is it not possible yet?
I'm using this full-screen on my main machine because it's awesome. One thing I noticed is that although I have the cursor captured, I'm still seeing my actual cursor ghosting around in front of it. When using shaders with a curve, the cursor is visible as I near the corners and is offset due to the curvature.
I think there is a Win32 API to hide the cursor in a Window, I just haven't been down that road for so long I don't remember what it is.
BTW, +1 for using C++ and Win32 API; that's how I cut my teeth on C++ and MASM32 20+ years ago.
My preset is as follows:
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"
ShaderGlass and its choice of ctrl+shift+s is rather unfortunate. That shortcut is used by all sort of software as "save as" but now instead I get snapshot. Since ShaderGlass is an overlay software it cannot just hijack crucial hotkeys. So some way to modify hotkeys would be nice.
I'm on a monitor that is capable of 120/144hz, and so the current Frame Skip settings run a lot faster than I'd like them to. If a "Target Framerate" setting could be added in addition to Frame Skip, that'd offer much more flexibility.
Hi im using Windows 10 LTSC 1809 and when i try to install Shader Glass it says it reqs Windows 10 1903. Any way to fix that? Thank you for your fantastic work.
It would be extremly useful and time saving if you could have profiles for different apps apply themselves automatically when the app in question is opened/focused/on full screen.
I managed to get the shaders to apply on most of my emulators, opened from a frontend, and running fullscreen. But it's kind of a hassle to exit fullscreen to switch shaders.
A great fature would be to add video recording and possibly in two ways:
Hello.
It is difficult to use a shader screen that is curved, because in Glass mode, the cursor position is different from the actual cursor position.
So I am using clone mode, but the cursor does not show up on the application screen.
Is it possible to make the cursor appear?
Also, when I specify a window, the cursor and context menu do not appear in the application.
Windows version
Edition: windows 10 pro 64bit
Version: 20H2
Video of the problem
Best regards.
As Free option for Output Scale is blocked, can you add more preset values? For my usage (playing Windows 98 games), I currently use 150% scaling but the scaled display it's too big so some part of the game is not visible. I guess something around 125% would be perfect though I cannot select it. Thank you and good luck.
Great software, but I'm facing some issues. When going fullscreen on Glass mode the window below basically becomes irresponsive, as controls are applied by default to the active window (in this case, ShaderGlass window). Then, if I activate the window below, fullscreen mode switches to windowed. I guess it is a standard Windows behavior. That is somewhat problematic, as sometimes Clone mode leaves window edges intact and you can't do anything with it, while in Glass mode you can first force-resize emulator window to fullscreen with borders left out.
I think this can be fixed by adding window staying on top option combined with borderless window mode available with custom window resolution settings. What do you think?
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.
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."
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:
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".)
Hey there, not sure where to mention this best, but https://www.pcgamingwiki.com/wiki/Special_K can be used to lower latency of the copied shaderglass window, down to +1 frame in windowed mode. Since desktop compositing on windows can already be kind of slow depending on the setup, specialK seems to be the most powerful project at fixing the most common issues that cause window manager latency
I really love the idea. but i am not gonna use window just for this application, so if it could work on common Linux distribution like Debian and Ubuntu i would really appreciate it, i could try to build from source but their is no guaranty that i would succeed,
maybe some library are incompatible.
Will there be any chance for importing our own shaders like the ones written for shadertoy?
Hello, i'm running win10 21h2 (19044)
gpu is nvidia 1660
1440p with 100% scaling set for display
I've tried to apply fsr shader and upscale some apps, but no actual upscaling happens, just shaderglass window gets bigger. If i choose bigger pixel size, image becomes even smaller.
And if i set scale level to "free", image gets bigger, but no actual fsr applied. Doesn't work in full-screen either.
The problem is that when I play games on borderless window, I've noticed that the mouse appears on the left side of the screen, I've figured out its mouse noticing the shader glass window which by pressing it pauses the game, please fix this
Hello! Almost everything I try has low quality text under Shaderglass? Is this a bug, a reality of small text on burner screens or fixable in settings.
Love this program, looking forward to bezels and CRT Royale, would love an ascii, monochrome (green beige et cetera) and the ability to stack shaders!
So I am using ShaderGlass to play BlazBlu CT, so I mirror the window then make ShaderGlass full screen. Which would be perfect but my controller doesn;t control the game unless I click back on the game window, which of course makes Shader Glass small and not the focus.
How do I get around this? I can't find a way to use ShaderGlass and actually control the game.
To have the following features:
very good work so far!
I don't know if there's anything to be done about this besides documenting it, but it appears ShaderGlass in fullscreen output doesn't play nicely with Radeon Enhanced Sync on AMD GPUs. Activating both causes ShaderGlass's framerate to skyrocket to 400-600 fps, which in turn makes the desktop lag and can even crash the graphics driver. Once the problem starts, it also appears to persist until the user logs out and back in again. Closing ShaderGlass "fixes" the lag, but it returns when the user relaunches ShaderGlass; and also the lag then occurs whether ShaderGlass is in fullscreen mode or not.
I've found two workarounds so far. The easiest, and probably safest, is to simply disable Enhanced Sync beforehand; so the issue never arises in the first place. Alternatively, the user can set a framerate limit in the AMD Software and externally limit ShaderGlass's polling rate.
I tested this on ShaderGlass v0.7, with ReShade 5.5.1 installed to it. I would test it without ReShade installed to confirm that it's not ReShade's fault, but... frankly I'm tired of restarting my machine tonight.
I have an issue where in glass mode, everything is shifted over because I have 2 monitors. I don't really need or want to use the shader on both, so maybe add something where you select which monitor you want to use the shader on.
Might it be possible to have ShaderGlass follow along with whatever Virtual Desktop you've switched to?
I understand applying ShaderGlass to a specific desktop has its uses and advantages.
Separately I'd say it's just as important to have the opposite happen - where no matter what vdesktop you're on, ShaderGlass is running on.
Thanks!
First off, thank you for this software, it's like exactly what I'm looking for for my retro media center.
However, I've run into an issue. It seems that whenever I open this, it doesn't display the full screen, only the top left corner very zoomed in.
This is probably because I have Scaling enabled on my 4K TV's desktop due to how small the text would be otherwise.
I tried going into the .exe's properties > Compatibility > Change High DPI Settings > High DPI Override, but no matter what I select, the program opens up zoomed in.
When I completely disabled Scaling in windows, and tried again, it worked 100%, however it just makes the experience unusable due to being unable to read anything from across the room.
Is there any fix for this incoming? This is like the program I've been looking for for years.
this is what it's showing me:
none of the settings seem to do anything about this. i'm not sure what other information would be helpful or if its just a me problem etc but it sucks because this is the prettiest filter ive found yet. btw, thanks for making this its the closest thing ive found to a usable crt monitor after weeks scouring thrift shops for a real one
directly importing .glsl files through the UI is probably not viable because I imagine you would've done it already if you could, but even trying to make a custom build with a new shader isn't really well enough explained either.
I've been using mGBA, I remember Shader Glass working a few months ago but now going into fullscreen in mGBA makes it lay over Shader Glass.
I'm trying to take a high resolution screenshot with a CRT shader, but the image gets cut off when I take a screenshot when the scale is bigger than my screen.
Could there be a way to take a screenshot at a higher scale than the user's screen?
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:
If you're running shaderglass on top of a game that has AutoHDR for Windows 11 enabled (basically just HDR enabled) then the shader glass image becomes extremely blown-out/over-exposed, as if it is not properly passing through the HDR data.
Had to take a picture with my phone because windows screenshot could not capture the issue. Windows screenshot would ironically take a screenshot of the whole game and make it look like it had the same issue as shaderglass.
Hey!
Just saw you added a full-screen option for it, and i've been loving it so far (im using it rn with ReShade so i can have CRT-royale over my entire screen along with other shaders that ain't ported to it) and i was wondering if you could implement the following changes to it, to make it more viable to use as a Start-up app:
-Save and Load configs from previous sessions
-Ability to remove the Yellow borders on Full-Screen mode.
-Allow to change which display it should be activated on (Currently the only option is All displays, and it ain't so friendly with multimonitor setups of different resolutions.
-Ability to start in Fullscreen (maybe with the config option?)
If those are possible, i'll defo be using this more than i thought! Congrats on the work so far tho, its already a really cool novelty program to show to my friends.
In some cases, I've noticed the full-screen window doesn't stay on top of other windows. For example, if I click on the date/time in the system tray, it pops up in ShaderGlass with the shader applied, and also above the full-screen ShaderGlass window without the shader applied. This also happens with the start menu, tooltips, context menus, etc.
I don't know if there is a way in the Win32 API to make the ShaderGlass FS window actually completely cover all other Windows; that'd be mint though if it could.
Thanks again for the great project!
Minimizing ShaderGlass to task bar resets the shader parameters back to default. Easy to notice with for example lottes because I had those huge rings disabled and they come back every time. Reapeatable bug.
Id like to just say thanks, this software is amazing because it allows me to turn my lcd into kinda crt for work. For some type of graphics it is actually amazing.
Win 11
Hi!
Super important FR: ability to "set default shader" when ShaderGlass opens. We have all these abilities to customize shaders, but then every time we use ShaderGlass have to go through all the menus, find the shader, and load it. Would be so simple to just pin a default shader that opens every time.
I envision creating the perfect shader, saving it as default, and whenever ShaderGlass opens it immediately is running it full-screen., and adding this to Windows Startup would be the icing on the cake.
The current Aspect Ratio settings cover some decent bases (NES, SNES, and DOS), but I'd like to have finer control over this by setting custom pixel aspect ratios with a dialog box. (via either X : Y ratios or decimal values. Maybe both?)
My use-case for this is creating retro-style pixel art. I was introduced to Shader Glass today, and I immediately saw its usefulness for testing pixel art against NTSC video shaders while working. I work with PS1-style visuals, and the PS1's ratios can get pretty weird. Eg: Silent Hill's menus were in 5:7 / 0.714. Wipeout 3's menus used a bizarre 32:15 / 2.133.
I tend to work in 3:4 / 0.75, so Shader Glass does offer similar aspect ratio settings for my case, but I'd love to play with weirder ratios via Shader Glass in the future.
Please add options for Window/Clone mode, to lock ShaderGlass window to a precise, fixed size, so it scales input window (no matter its size) to that fixed output size.
A few shaders seem to not clamp their outputs to (0,1) range and will cause issues like white becoming solid red (it's not a problem for every GPU if I remember correctly), so an option to clamp the output to (0,1) would be useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.