CRT shader for Steam Deck (and possibly low res display)

Welcome to the forum!

Really nice stuff :star_struck: you got a really nice look even on a low-ish resolution display. @guest.r’s shaders really are amazing for their tweak-ability to taste.

Also the DMG gameboy shader looks great, it seems like it would feel really cool to have it handheld on the steam deck!

For @duimon’s graphics and presets I wanted to mention that if you still want to use them but need higher performance and are ok with no reflections there are a couple of options. You can switch the base Mega Bezel preset they reference to a no-reflect version, and there are the potato versions which have a baked image for the background rather than the auto-generated bezel.

For anyone following this if you want to use @Duimon’s awesome graphics/preset pack, you will also need the Mega Bezel shader pack which you can find here:

Below are a couple of examples of @Duimon’s Mega Bezel setups which might be helpful on the Steam Deck:

4 Likes

That’s actually a really good tip, thanks for that. In fact, I have trouble to get an overlay working with Nintendo DS games because the screen alignment can’t be customized in the core options of MelonDS in the way your screenshot shows. So I’ll take a look at that. One question though:

Is the newest shader from Guest already integrated in your awesome shader pack? My settings are kind of depending on it because of the new sharpening parameters in the ntsc shader.

3 Likes

The very newest is up on my Github, but not yet in the download package, the next release with the updated download package will come in the next couple of weeks.

In the current package there are simple dual screen nds presets in the variations folder, and of course Duimon has some great nds presets in his package, either screens top & bottom or left and right.

3 Likes

Thanks again, managed to do what you suggested (changing the reference) and customized the presets with my settings. DS is looking nice now. :slight_smile:

4 Likes

looks great! im particularly fan of the gba one.

1 Like

I put your slangp files in the guest’s shader pack, which is what I’m assuming I am supposed to do. Guest’s work for me but yours fail to load no matter where I put them. I just can’t seem to figure out how to load them, is there something special I do with them? Thank you for your time!

Hi,

you’ve put it in the wrong place. :sweat_smile: But I guess that’s my fault as after looking over my initial post I realize there is information about where to actually put my slangp files, sorry for that. I’ll do an edit about this (if I find out how to do that haha).

The slangp files I provide go to your “shader” folder, so before “/shaders_slang/

Keep in mind that I created and tested my files with the version 2022-06-02- release_1 of Guest shader, which is quoted and linked to in my first post. I also use this version personally as i never looked back after settling with it :smiley: . As I see, there is already a 2022-07-17- release_1, so I don’t know what effect and possible changes / addition it has. Could be none, but i can’t guarantee it for now. I should probably look into it at some day and check it out.

Have fun!

2 Likes

Thank you so much! Can’t believe I didn’t think to move it there after trying other places lol

Works great and looks great on the deck, great job.

Hi @schM0ggi, great work here! What settings would you recommand for european people that were used to RGB (via SCART) instead of NTSC?

Hi Tromzy, as said in the starting post, sadly I can’t give you any tipps or recommendations beside the ones listed above because the whole shader topic is a great mystery to me. I didn’t even bother tinkering with it further after finding the settings to my liking and just play my games because I’m satisfied with the look. The files I provide are basically the result of messing around with the parameters and comparing to other shaders I personally like. The whole purpose was to give other people, especially people like me, who own a Steam Deck and / or play with smaller resolutions a “to go” configuration with the possibility to develop it further for those who have more knowledge about this stuff. Sorry :confused: . I suggest you ask around in for example Guest’s topic. I am sure, people around there can give you qualified answers and hints and help you out.

Hello! New forum user here.

I recently got a Steam Deck and I used Emudeck to install Retroarch.

I really like how 8 and 16 bit console games look while using the 2xBRZ shader (shaders_slang/xbrz/2xbrz-linear.slangp), but I have noticed it doesn’t have any effect on DS games when using the melonDS core.

Is there a way to apply 2xBRZ or a similar effect to 2D screen elements in DS games?

Thanks in advance!

1 Like

If you’re increasing the internal resolution, it will break any shaders that use pixel pattern detection algorithms, such as hqx or xbr. However, there is a set of super-*xbr-3d shaders that will compensate for the internal res boost (pick the preset that matches your scale factor) and skip the up-rezzed polygons while smoothing the pixelated HUDs and menus, etc.

1 Like

Thank you very much for the information, @hunterk! The internal resolution upscaling was definitely messing with the shaders.

Once I changed the internal resolution to 1x (native), I saw some pretty good results using the super-8xbr-3d-6p.slangp shader. However, there was a big FPS dip, from 60 to around 45, so the emulation got choppy. That was despite the GPU and CPU utilization were nowhere close to 100%.

I then disabled the OpenGL renderer in melonDS so it switched to Vulkan. The GPU utilization went way down, but now the image while using super-8xbr-3d-6p.slangp had a lot of artifacts. I had better results with the super-2xbr-3d-2p.slangp shader: great image quality while keeping the emulation going smoothly.

While the polygons look sharper when using the OpenGL internal resolution upscaling, I’d rather have the improved 2D text and backgrounds. So far I have not been able to find a combination to “have it all”, despite testing with every shader preset in the shaders_slang/xbr folder. The shaders in the xbrz folder didn’t have any effect.

I have attached a couple of screenshots, one with no shaders applied and another one using super-2xbr-3d-2p.slangp. Both were captured at the Steam Deck native resolution (1280x800).

No shaders

super-2xbr-3d-2p.slangp

3 Likes

ah, yes, the hybrid layout causes issues, too, since it’s doing scaling there, as well.

In the ‘handheld’ directory, I have some called “ds-hybrid-view-…” for sabr and scalefx. Those will take the normal over/under image layout, do a hybrid view layout beside and scale the big image with the selected scaler. I, personally, think it’s the best way to handle this.

4 Likes

That’s a neat idea! And the new sxbr looks surprisingly good on DS games, though you have to choose both screens to appear at the same size (left/right). To work on hybrid layout I had to develop a new version specifically for that.

super-xbr (latest on repo, run in linear gamma):

And a ddt-jinc shader I’m working (gamma not corrected):

5 Likes

I went ahead and edited those hybrid presets from @hunterk and added the new xbr and super-xbr to work like that, get here:

xbr and sxbr hybrid presets.zip

To use it you need to:

  • unzip these presets inside “handheld” folder;
  • update your slang shaders to latest using update online inside retroarch;
  • Use 16:9 aspect ratio and integer scale OFF;
  • In DS CORE option choose TOP/BOTTOM layout.

Now you can load any of these presets and get this:

OBS: I’d like to know if they run fullspeed on steam deck, as I don’t have one.

EDIT2: Added the two 3D old xbr and super-xbr too (now called hd versions). They work with CORE at 2x Internal Res, so the 3D games look better (though the 2D uses old code, so the new ones are better):

I still have to rework these old “3d” versions to use new xbr and sxbr code.

7 Likes

Thanks a lot for all your help, @Hyllian!

I installed the files and followed your procedure. The graphics look good! Using Vulkan, the CPU and GPU utilization stay below 25%. The emulation runs smoothly.

There is a problem though, probably specific to the Steam Deck: when you modify the screen layout using the ds-hybrid-* shaders, the touchscreen does not work properly, as the touch zones do not match the DS screens anymore. While it wouldn’t be a big deal if you’re playing mostly on a TV, it kind of breaks using touch for handheld gaming.

When you use the melonDS built-in hybrid mode, the touch zones work properly.

1 Like

ah, yeah, this is a known thing. If you use a mouse or the analog sticks to emulate the pointer, it will still work, since you can watch the crosshairs move, but touch uses absolute coordinates that are not tracked in the shader redirection.

2 Likes

Hi @pickless83,

sorry for the late reply. Yeah, that one I had to understand myself in the beginning. Emudeck does install Retroarch from the Discovery Store, so it’s a flatpak. The mounted directory on the Steam Deck, where flatpaks are installed, is called “var” and is read only per default for the deck user, like the root directory. You could disable that, but i don’t recommend it so it’s fine.

Under your home directory, the place where you have full access and where games etc. are installed, you can find more directories and files from your flatpaks. There are in ~/.var/lib/app/. Make sure you can see hidden files in Dolphin. There, you’ll find a Retroarch directory and subdirectories for different stuff like configs and shaders. Just copy all the content in the shader directory from the read only directory into the Retroarch shader directory in your home directory. Next step is to place the shaders you like into that same directory. Then, you have to change the directory path in Retroarch for shaders to the shader directory in your home directory. That will make sure that you see als those shaders in the Quick Menu and, when updating shaders in Retroarch, they get downloaded to your home directory and you don’t need to copy them over again.

Hope I did describe it well :smiley:

4 Likes

Hi,

a little update.

RetroArch is shipping with new shaders and the new ones from Guest Advanced are also part of it by default. Therefore, I updated and simplifed my presets. They are now using the shaders coming with RetroArch as a base. This makes things easier. As a bonus, I provide a list of updated shaders at the end, that look fantastic on the Steam Deck out of the box for retro handheld systems.

ps. I’d like to restructure my first post but couldn’t figure out how edit (any help?), so I’ll post the stuff here for now.


Let’s get started with some screenshots for comparison:

Sega Mega Drive / Genesis

Super Nintendo

Nintendo 64

Playstation

Sega Dreamcast

I must say, screenshots don’t do justice, especially due to the low resolution. The mask might look odd in some examples and the overall look in 3D games is darker than actually in game, for whatever reason. Brightness can be tweaked within the shader parameters if it is actually too dark for you. Just give the presets a try and see for yourself how it looks. Bezels are not part of the presets. I’m using the ones from Duimon.


USAGE:

Important - Update your shaders in RetroArch so you have the current version - Important

>>>>>> Download shader presets <<<<<<

  • Deactivate any kind of video / display enhancement, e.g. NTSC filter etc., in the core options or it will mess things up. The shader does provide everything you need.
  • The presets give you an aperture grill rgb Trinitron look. If you want something different and more prominent scanlines, change the mask type from 6 to 5 or 0 within the shader parameters.

The presets do reference the original shader in its respective directory and only include tweaked parameters. They should be placed in the shaders directory, just above the shaders_slang directory. If you want to place them elsewhere , make sure you change the path in the preset file. There are 2 presets in total.

- schM0ggi_steam-deck_guest-ntsc

This is for Super Nintendo, Sega Megadrive, Nintendo 64 and Playstation.

- schM0ggi_steam-deck_hires_guest-ntsc

This is for Sega Dreamcast and other cases where a higher resolution is being used.

Why the split? Well, games on Dreamcast run with a higher native resolution (640 x 480) compared to the other systems, therefore additional tweaks are needed. Though, bear in mind that some Nintendo 64 games offer high resolution modes - Turok 3 being one example - which, if used, might also need the “hires” shader preset. This is unfortunately a case by case basis as high resolution modes in Nintendo 64 don’t use the same resolution. It depends on the game. Again, Turok 3 is one of these examples.

IMPORTANT NOTICE:

As some systems (Sega Megadrive for example) have special characteristics, like transparency effects, there are (for easy usage) 2 parameters of interest you can tweak to change the overall look. These are:

- NTSC Merge Fields

Personally, I like 1. Set it to 0 for some flickering and rainbow effect.

- NTSC Phase

Personally, I use 2 and 4, depending on the system. 2 gives you a composite blurry picture. 3 resembles a more sharper RGB look and 4, to my observation, combines both (good transparency and color/sharpness).

Here is a comparison of Sonic and the famous waterfall with different settings. The flickering, that comes with NTSC Merge Fields set to 0, is obviously only visible in real gameplay:

NTSC Merge Fields = 0 | NTSC Phase = 2

NTSC Merge Fields = 0 | NTSC Phase = 3

NTSC Merge Fields = 0 | NTSC Phase = 4

NTSC Merge Fields = 1 | NTSC Phase = 2

NTSC Merge Fields = 1 | NTSC Phase = 3

NTSC Merge Fields = 1 | NTSC Phase = 4

CLOSING WORDS:

For Gen 5 consoles, I previously used Guest Advanced 3D. This shader does also work fine after some tuning. So, if you don’t like the 16 bit NTSC look for 3D games, give this shader a try.

SHADERS FOR HANDHELD SYSTEMS (BONUS):

As mentioned, here are the shaders for handheld systems that also come with RetroArch and work out of the box for the Steam Deck. They do look fantastic:

- dmg.slangp

For Gameboy under shaders_slang/handheld/console-border/

Deactivate colorizing option and ghosting effect. Shader does provied everything you need. Set aspect ratio in your video settings to Full. You can scale the image and overlay withing the shsader parameters.

- gbc-lcd-grid-v2.slangp

For Gameboy Color and Advance under shaders_slang/handheld/console-border/

Deactivate color correction option and ghosting effect. Shader does provied everything you need. Set aspect ratio in your video settings to Full. You can scale the image and overlay withing the shader parameters.

- lcd1x.slangp

For Nintendo DS under shaders_slang/handheld/


Happy retro gaming!

7 Likes