Handheld Border Shaders


I just wanted to give extreme thanks to you for these. They have really spruced up my setup. I am enjoying them immensely! I did a little editing on the borders so there would be something in the background instead of just a black canvas.

Link ----> https://mega.nz/#F!7UJyEKwD!2U3PKfxI3LO9ppOGPUaXqw


Nice work, added them in first post. :slight_smile:


Added a new shader for the WonderSwan Color, it’s in the pack on the 1st post.

Had to twist the perspective around as the photo wasn’t perfectly from the front.


Hi everybody! :slight_smile:

I have a problem with the DS shader. The boarder image is cut off and looks like this: http://picload.org/image/wlwcipa/nds.jpg

I´m using Retroarch 1.3.0 and desmume_libretro.dll

Any idea whats wrong with my settings?


i think you need to go to settings > video and change your aspect ratio to something wider. 4:3 or 16:10/9, etc


Thank you! That solved my problem! Aspect Ratio was on “Core provided”. After switching to “16:9” everything works just fine! :slight_smile:


These are really nice. I particularly love the DSi 90 2x. I have some ideas to create some very unique ones, but I am having a hard time understanding how to incorporate a border into a .cgp and scale it properly. I can get the 4K images and do it as an overlay but I want to do it this way. I’m pretty confused looking at these as examples. I’m also wondering what about something like CRT-Royale that needs an integer scale?

Would matching the scale X and Y to the same as the core’s integer have the same effect? What I want to do first, is start with my modified crt-royale and add the border to that .cgp. Thanks in advance for any hot tips and information.


I haven’t had good luck getting crt-royale to play nicely with a border pass added on. It always gets uneven scanlines, even prescaled to an integer. Dunno what’s up :confused:


ohh, dang. well I’ll use a different shader setup if it doesn’t look good with royale. is the border pass something you have to type manually in the cgp or can you select it from within retroarch?

EDIT: Oops… I see the border folder, nevermind I’ll give it a try. lol. Thanks for the tip man I didn’t notice that. :stuck_out_tongue:

That’s the whole thing that was confusing me, I thought you had to type all that stuff manually.


What do you change to fix one of these when you use a core that has resolution upscaling, like DS for example? When you bump the resolution up, the game screen enlarges. How would I get it back to the size where it fits in the border?


You can set a first pass with an absolute scale of the system’s native res or you can just let people find out on their own :wink:


Well I’m asking for me because when I’m trying to play DS or PSP with the shaders that have borders. I like to bump the resolution up so the game looks better. With PSP it screws up the lcd shader I use and with DS it screws up that and the screen size. Is there a way to get the shader like lcd-grid to look right again after you bump resolution in core options? Sucks if you cant.

In regards to previous post, I can’t find cg files to add a “border pass” or “scaling pass” to make my own from scratch. So much stuff in there. Not sure where to start other than copying a pre-made border cgp and editing it manually to “try” and get it to look right.


For the screen size, edit your DS-shader-X.cgp, find the line corresponding to the lcd pass, change the scale. It should be:

scale_x1 = “4.000000” scale_y1 = “4.000000”

If you’re using 2x internal resolution in DesMuME change it to:

scale_x1 = “2.000000” scale_y1 = “2.000000”

But yes, the lcd shader will look bad. Replace it by whatever works for you. example: shader1 = “resources/lcd_cgwg_2.cg” change it to shader1 = “resources/stock.cg” (copy the cg file there too)

Other limitation, the vertical gap between the 2 DS screens will not scale with the internal resolution multiplier.


Thank you for the info bro. the lcd shader is the only one I know of that makes lcd handhelds look authentic. I don’t know what the stock.cg does, I didn’t notice it doing anything on PSP. I figured there would be a way to change internal resolution of a core without changing the resolution of the shader you use, but I guess not. that’s a shame.


If you do like I described and set an absolute res for the first pass, it will shrink your up-rezzed image back down, which works sort of like MSAA but still lets you use the LCD shader.


stock.cg is just an empty pass to disable the lcd shader.


I don’t understand which .cg shader to put in the first pass to do that? I’m not very knowledgeable on creating shader combinations. I’ve only really tweaked parameters so far. Half of the stuff I try doesn’t work as intended. Is there some readme txt files or something I can learn more basic information from? You’ve said to add a border pass and a first pass with an absolute res, but I don’t know how exactly to do that, sorry.


No, what you would do is add a stock.cg (or image-adjustment.cg works, too) first pass like this:

shader0 = "../../misc/image-adjustment.cg"
scale_type_x0 = absolute
scale_x0 = 480
scale_type_y0 = absolute
scale_y0 = 272

The last pass needs to be the modified gb-pass-5.cg or whatever that all of the console-border shader presets use, but you can put whatever you want in between. For CRT shaders, you want the pass before the gb-pass-5 to be at a specific integer scale factor.


Thank you hunterk for explaining in more detail. I didn’t realize I needed to use the gb-pass-5, but I’ve seen them all use it in the shaders.


That’s the shader that actually puts the border image around the game screen. You’ll also need to include the bit from the cgp that points to the image file, etc.

That in mind, you’re probably best off working from an existing console-border shader and just change the shader passes instead of trying to start from scratch and have to reverse engineer how it all fits together.