Giter Site home page Giter Site logo

mausimus / shaderglass Goto Github PK

View Code? Open in Web Editor NEW
823.0 823.0 32.0 39.21 MB

Overlay for running GPU shaders on top of Windows desktop

License: GNU General Public License v3.0

C++ 100.00%
crt crt-monitor directx libretro overlay retro retroarch retrogaming shader shaders slang windows

shaderglass's People

Contributors

lonestarr avatar mausimus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shaderglass's Issues

Custom shader support

Will there be any chance for importing our own shaders like the ones written for shadertoy?

Ctrl+Shift+S is unfortunate choice for screenshot.

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.

Hi i would could it be possible to make it work on Linux?

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.

Apply ShaderGlass to "Active" desktop instead of "Original" desktop

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!

App crash when binding to fullscreen Mednafen emulation

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.

FSR shader doesn't work

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.
ShaderGlass_21 21-09-58 ShaderGlass_(Mch・柔・r・・,_fsr,_x1,_150%,_~1)

Low Text Quality

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!

Windows 11 HDR Over-Exposed Issue

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.
20221026_205400-min

Minimizing to task bar resets shaders parameters.

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

Reflecting the mouse and context menu capture

Hello.

  1. 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?

  2. 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.

Incompatibility with Radeon Enhanced Sync

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.

Remove yellow border from full-screen window

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

Please add video recording...

A great fature would be to add video recording and possibly in two ways:

  1. normal, realtime.
  2. no visualization, but record a window, apply shader and save video...

Link settings to apps?

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.

It would be great...

To have the following features:

  1. integration or a better compatibility with VICE C64 emulator.
  2. possibility to save the output as a screenshot and/or a video.

very good work so far!

Fullscreen Issue with emulator

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.

Fullscreen Issues

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?

ShaderGlass in full-screen not always above other windows

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!

duel monitor issues

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.

[REQUESTS] Additional Features

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.

ShaderGlass not detecting Kodi

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!

newpixie-crt renders wrong?

this is what it's showing me:
image
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

Select mutiple shaders?

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?

Windows 10 Version 1909 CTD

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

Feature Req: Clamp output to (0,1)

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.

Fullscreen problem

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

  • Launch QEMU in SDL mode (preserve aspect ratio, and don't hang mouse on Command & Conquer)
  • set ShaderGlass to \.\display1.
  • Maximize QEMU (Fullscreen stop shaders isn't it ?)
  • In addition set the windows bar to "hide".

(I can't screenshot process)

With capture window
2022-03-21_10h14_52

Can't control the game and make ShaderGlass full screen?

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.

Ability to "set default shader"

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.

[Request] Take high-res screenshots

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?

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

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".)

Hide actual cursor when capturing cursor

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"

Request: Custom Aspect Ratios

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.

Issue with Windows 10 Scaling Settings. Unable to override

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.

Make it easier to add shaders to ShaderGlass

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.

[Request] Add specialK info to readme

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

How does window not capture itself in glass mode

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.

Hide Windows cursor in Capture Cursor mode.

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.

Output Scale - add more options e.g. 125%, 115%.

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.

Hiding the interface

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.

Request: Target Framerate

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.