-
Notifications
You must be signed in to change notification settings - Fork 7
Pairing with ShaderGlass and Special K
The whole point of this port was to make it possible to use CRT-Royale on any retro game, not just the ones that work in RetroArch. Unfortunately some games and applications don’t play nicely with ReShade out of the box. Some games don’t have good UI scaling. Others don’t do fullscreen very well. Some even predate DX9.
We can usually beat them into submission persuade them to cooperate with either Special K, ShaderGlass, or a combination of the two.
ShaderGlass is usually all we need. Instead of injecting ReShade into our game, we can use ShaderGlass to capture and display our game’s window. ShaderGlass uses DX11, so we can inject ReShade into it instead. Done correctly, this has the added benefit of letting us run the game in its original resolution, while CRT-Royale can render in high resolution. If you’re encountering performance issues with ReShade in a DX9 game, have a game that doesn’t do fullscreen right, or have a game that just plain can’t work with ReShade, then ShaderGlass is probably what you’re looking for.
You’ll only need to do this once, or at least not very often. Bear in mind, ShaderGlass isn’t specific to any games; so I recommend keeping it generic. That way you can use it for multiple games without too many headaches.
-
Download and install the latest release of ShaderGlass, whatever version that may be. Unzip it and move it somewhere you like. I recommend against putting it in Program Files, though, because that’ll cause problems with ReShade later.
-
Install ReShade to ShaderGlass.exe. Currently it uses the DX11 API. You’ll need the following shaders:
-
CRT-Royale, obviously. Since you’re probably trying to use it.
-
AspectRatio.fx from fubax-shaders. Available in the ReShade installer and important for fixing scaling issues with ShaderGlass when in fullscreen.
-
Alternatively, Unstretch.fx from my other repo. You’ll have to install it manually in
reshade-shaders/Shaders
, but I made it for this exact use case.
-
-
Save a ShaderGlass profile for yourself. I recommend the following settings:
-
Pixel Size: x1
-
Aspect Ratio Correction: none
-
Frame Skip: none
-
Shader: none
-
You’ll have to do these steps every time you launch your game. I recommend defining a different ReShade preset for each game you want to use ShaderGlass with because they can be quite different.
My usual strategy is to run the game in a low-res window, clone it to a fullscreen ShaderGlass, and use another shader to fix the aspect ratio.
-
Launch your game at your desired resolution. You’ll probably need to launch it in windowed mode, or at least in borderless fullscreen mode. It probably won’t work correctly in true fullscreen mode.
-
Launch ShaderGlass. Load your base profile from before. Then set the following in this order:
-
Input: <your game’s window> (refresh if you don’t see the window)
-
Scale: Free
-
Fullscreen (press M to show/hide the menu bar, so you can leave fullscreen)
-
-
You can click the ShaderGlass window, and it’ll bring your game into focus. And you can use Alt-Tab to focus back on the ShaderGlass window itself.
-
With the ShaderGlass window in focus, press Home to open ReShade and start configuring stuff.
-
Place AspectRatio.fx or Unstretch.fx first. Make sure they’re configured correctly, so your game’s content isn’t stretched or compressed. Only activate one or the other, not both.
-
Configure CRT-Royale’s Content Box correctly, or it won’t look right.
-
Configure the rest of CRT-Royale however you like. Remember that it’ll be running at your display’s resolution, while your game will be running at some other resolution.
-
Configure whatever other shaders you decide you want to use. As a rule of thumb, place effects before CRT-Royale if you want to modify the appearance of the game (i.e. the CRT’s input). Place effects after CRT-Royale if you want to modify the appearance of the CRT itself (i.e. the CRT’s output).
-
Special K describes itself quite accurately as a Swiss Army knife for gaming. It does a little bit of everything.
A common issue with ShaderGlass and retro games is that the game doesn’t capture the mouse correctly, or the game forces itself to the front every time you click on the ShaderGlass window. Or both, or some other annoying thing. We can use Special K to force the two applications to get along.
Special K already has detailed installation instructions, so I’m not going to rewrite them. You can either use the global or the local installation method, whichever one works for your game. If you don’t see a big obnoxious Special K banner at the top of the game, then it probably didn’t work.
If your game uses DX8 or older or DirectDraw or something of that sort, you’ll probably need dgVoodoo 2. Follow Special K’s instructions for installing it. You might need to mess around with the SwapChain Management settings to make it behave, but that’ll be game-specific.
Install Special K to ShaderGlass itself too, using whatever method works.
If you choose to use the global installation method, you’ll likely have to use the "+ Add Game" button in the bottom left of the window to add ShaderGlass to SKIF’s library. Then use SKIF to launch ShaderGlass like you would any other game.
If you opt for the local installation method, you’ll need to use the plugin system to inject ReShade. After you copy/paste their [Import.ReShade64]
snippet, you’ll need to set When=Early
in order for it to work.
When you launch ShaderGlass, you should see banners for both Special K and ReShade at the start. Make sure that you can open both of their UI’s, and make sure they don’t break after you load a ShaderGlass profile.
Now we have Special K installed to both the game and to ShaderGlass. This gives us control over both windows' behaviors, but pay close attention to which one you’re dealing with. It’ll be easy to get mixed up.
-
Launch your game with Special K running inside it. Open the Special K UI inside the game.
-
Find the setting Window Management → Style and Position → Window Layering. Set it to "Prevent Always-On-Top".
-
Find the setting Window Management → Input/Output Behavior → Cursor Boundaries. Set it to "Keep Inside Window".
-
-
Launch ShaderGlass with both Special K and ReShade running. Hook it into your game like normal (i.e. the way I described in the ShaderGlass section.)
-
After ShaderGlass is in fullscreen mode, open the SpecialK UI inside ShaderGlass.
-
Find the setting Window Management → Style and Position → Window Layering. Set it to "Force Always-On-Top".
-
When you’re done playing, you can set this back to "No Preference" before closing ShaderGlass.
-
Now, when you click on ShaderGlass’s viewport, it’ll pass focus through to your game. When that happens, your game will capture your cursor and prevent you from clicking outside the game; and it’ll feel like the game itself is fullscreen. Simultaneously, ShaderGlass will be forced to always display on top; so your game won’t pop up to the front and obstruct ShaderGlass.