Some shader announcements

r5 and I have been porting a lot of shaders over to the slang format that the vulkan context uses. We’ve been having trouble with the more intelligent smoothing shaders, such as xBR, hqx and ScaleFx, but most of the other stuff is coming along well. I’ve only just started working on crt-royale and it’s going to be a real bear, so you’ll have to be patient there. I also created a multipass version of crt-lottes that should work on even very weak machines, if anyone who couldn’t get full speed before wants to try it (I also ported it to Cg, so you don’t need vulkan to try it).

I just started on the console-borders, if anyone wants to pitch in there. The old gb-pass-5 shader was a clunky, unintuitive way of making them, so I replaced it with a more general border shader that lets you put in the actual scale you want and the actual resolution of the target console rather than trial-and-erroring a bunch of funky scale factors:

Thank you (and Themaister) for this - I’ve very much been appreciating parameterized shaders on my Shield TV the past few days. :slight_smile: Any idea how much longer until the slang-shaders are bundled in RA and / or made available through the online updater?

No, but it should be soon. We just need to write a script that pulls them from the repo and re-hosts them on our server.

Nice thanks for your work!

Truth is I’ve been testing those slang shaders yesterday to see if I could make a handheld borders pack with them (just tweaking here, I don’t really understand the code). But I had some issues that made me think it’s a bit too early.

CGWG lcd v2 isn’t working (on nvidia here, v1 is fine), the gameboy one has some issues.

I just did a little change to the gameboy shader, so try it again and see if it looks better.

I actually just finished up all of the console-borders except for psp, which isn’t going to work in vulkan (yet) anyway :stuck_out_tongue:

I’ll take another look at the lcd-cgwg-v2. it didn’t work on my shield but I think it works on my AMD…

Thanks, GB shader looks ok now.

Great work on the new border pass, really easy to use! …but, I noticed the lighting effect on the top corner is displayed behind the game picture (with cgwg lcd in the gbc shader).

There’s also a little issue in the path where I had to change shader0 = “…/lcd-cgwg/lcd-grid.slang” instead of “…/shaders//lcd-cgwg/lcd-grid.slang”.

Something strange with retroarch too when you confirm “apply shader changes” multiple times. The current profile gets reapplied on top of itself or something?

edit: There’s some scaling problem (?) with the gb pocket shader: I just loaded the 4x one here and you can see some strange squares everywhere.

Is your video aspect ratio set to 16:9?

And yeah, the “…/shaders/” thing was extraneous. My local structure was different from the repo and I forgot to change it. r5 has a PR for it, apparently, so I’ll merge it as soon as it comes in.

If the lighting is behind the game, you can toggle the ‘show viewport’ parameter to 0 and it will put it behind the image. I think only the gb-pocket and dmg shaders are currently behind the image, so if you want to add that parameter = 0 to all and send a PR, I’ll merge it.

Yes I’m using 16:9. Don’t know where the issue comes from.

I’ll look into that viewport setting.

Isn’t it strange that border_on_top = “0.000000” shows the border? not the other way around?

Should we change the border_zoom settings in those presets or is it dependant of the monitor resolution?

bah, it looks like the border zoom settings I chose looked right on my 16:10 monitor but look horrible at 16:9. I’ll have to go through and find better values that actually work on standard 1080p displays (unless you want to beat me to it, wink wink).

I can do this but I’m going crazy with github.

I just want to take those files, edit them locally with notepad++, then push a commit with all of them. Which method do you use for that?

I use git from a command line, which is pretty straightforward. However, if you want to just upload a zip somewhere, I’ll handle committing them.

That’s what I was trying to do too, but I found it:

git commit -a -m “I did a commit… I guess?”

git push

(just writing it for any noob like myself)

I’ve never used -a (dunno what it does; i’m definitely not a git expert :P). I use: git add [files] git commit -m “message” git push

-a takes everything that has changed.

I wonder about that scaling issue with the gameboy shader. I’m not sure why it has:

in_res_x = “279.0” in_res_y = “158.0”

The gameboy is 144*160.

Shouldn’t the emulated resolution be sent without alteration at an integer scale by default? (not that I have any idea how to change the code though)

Yeah, ideally, but the gameboy shader itself does some weird scaling stuff that has to be compensated for in the border pass. If you put it to the actual resolution, it’s all squished up in the middle of the screen :frowning:

I got one of the xBRs working properly and fixed Hq234x, so there are actually some working smoothing shaders in there now :slight_smile:

Hi, just tweaking around without much understanding… I found that on my 1080p laptop screen, the dmg and gb-pocket borders were squished in the middle until I set the resolution back to the dmg original.

in_res_x = “160.0” in_res_y = “144.0” border_zoom_x = “0.42” border_zoom_y = “0.77”

this is for the dmg-4x preset

P

Even with these settings it’s not good. Compare it to what you get under gl or to the game boy shader without border in slang.

I tried to adjust the in_res parameters by steps of 0.01 and couldn’t find something that looked accurate.

So I tried to disable those (bypassing the corrected_size variable) and I saw that small black square in the middle. Then I allowed to multiply the scaling by 500 or something: you see the gameboy picture but its scale is bad too.

So there’s something that should be different in that border.slang pass, but I don’t have the answer. :frowning:

That’s why I didn’t go into making new border profiles for 1080p yet as the size is likely to change if someone can fix that issue.