Uborder shaders

Oh I have an off-topic question if you don’t mind Hyllian:

Did anyone by chance convert Mr. RetroLust’s Lights Out! Retroarch Bezels into a uborder shader pack yet? I’ve seen a couple of nice arcade conversions by @bitman and @Boz1978 and thought it would be cool to see these systems also get their own pack with ambilight and stuff:

3 Likes

Just some feedback once messing with Uborder a little. I would recommend a way to make the bezel longer on one side, blur the ends of the middle bezel and curve radius of bezel and screen independent of each other. If at all possible without affecting load times.

Uborder has been loading really fast for me.

2 Likes

I faced that as well, you can prepend a min() or clamp() function to the parameter before the cycle, so that the compiler will be able to unroll the loop and figure out by its own better what would happen, instead of spitting out hypotetical problems… geez! :stuck_out_tongue_closed_eyes:

2 Likes

So, is D3D that important? When you have vulkan and glcore available? Who uses d3d?

@Boz1978 is working on arcade overlays of the same author. I’m very busy working on uborder core now, so I expect volunteers take that chalenge of making overlays compatible.

2 Likes

Let me try to understand what you mean. Do you need the thickness on each side to be independent?

I’ll see if that’s easy to do.

It’s possible, though it affects performance, because I’d need calling warp function multiple times instead just one. I’ll evaluate this too. Thanks for the feedback.

1 Like

Yes, I mean how the OrionsAngel’s Candy Cabinet Aero City Horizontal Overlay bezel is different on each side.

Thanks for the considerations.

3 Likes

I made the one for Megadrive that you can try. It was more of a side quest though tbh. It’s upscaled to 4k and is modified.

3 Likes

This really workaround the D3D limitations, thanks!

I’ll drop support for ambient-light flavor and keep only koko-ambi. It’s too much time spending on redundant features, so I think koko’s is more developed and full- featured. So, if you’re using ambient-light flavor, I recommend switching to uborder-koko-ambi (look for it inside base_presets folder.

3 Likes

New release: Uborder-v0.2.3

  • Get rid of Ambient-Light in favor of Koko-Ambi shaders (they’re redundant in functionalities);
  • Fix D3D compatibility;
  • Update crt-guest-advanced to latest version.

Ok, now I think the structure is slim. Ambient-light was redundant, so now only koko-ambi compatible presets/shaders were left. That D3D limitation was fixed by a workaround.

I recommend deleting your uborder and unzip this new one. Make a backup for the older version before.

9 Likes

The main users of D3D are Xbox owners.

There’s also the possibility that your GPU is old and doesn’t support Vulkan, and glcore might be supported; but it has that longstanding flipping issue, while D3D doesn’t have the issue.

Actually it seems D3D works faster than glcore in some cases, and more consistent on older GPUs in my small experience, glcore stutters like crazy on a GT 540m GPU I have in one of my setups.

The blame is probably on Windows updates with this one, they broke OpenGl which used to work fine on Windows 7 and early versions of Win 10.

1 Like

For everyone who want to use most of duimon overlays with sonkuns uborder preset. For most of them i used this as a base it is a modified version of @Hyllian duimon tv preset. Here is a mediafire link to to my mod https://www.mediafire.com/file/bogng9qioioh3zb/Duimon-TVs.zip/file For most of duimon overlays change fr zoom to this fr_zoom = “46.599995” The ones that have smaller screen like the ibm 5051 & his handheld overlay this line does not work

Sorry if the last 2 look weird the forum his a file size limit. This does not all of duimon overlays but you just need to change the path to the overlay & add the for the ones you wanna use.

4 Likes

Do you think it would be useful adding a second layer to alpha mask the border?

This is something Mega Bezel supports.

Use case: let’s say you need to add some graphic/stamp/logo/marquee on a bunch of overlays and don’t wanna go through every file and copy/paste the same thing. Using a 2nd layer that alpha blends the overlay, you let the shader apply that for you and you just need to point the path to the LAYER2 inside the preset.

2 Likes

So, as neither of you “two” didn’t object anything, I suppose this is a welcomed feature. :stuck_out_tongue:

Major update: Uborder-v0.3.0

  • Now every preset may use mask to be alpha blended over the BORDER.
  • Added options to independently center bezels.

The new mask is called internally LAYER2 and is declared the same way as BORDER inside the presets. Existent presets aren’t affected (except the ones that do not depend on uborder internal presets), because a default LAYER2 texture (small png, only 89 bytes) is called to fill the placeholder. For now, the composition is just a mix (but can be improved later as an Add or Multiplier).

I tested with @soqueroeu graphics that use an extra Led png along the main background and it worked as expected (bonus: koko-ambi to get better results!):

mvsc-250220-194246 mvsc-250220-194241 mvsc-250220-194202 mvsc-250220-194156

The Bezels now can be centered independently from the content frame, which adress the need for asymmetric middle bezel/reflections.

If your preset call the uborder shaders directly, then you need a small update. For example, the old preset uborder-bezel-reflections-crt-nobody.slangp had these lines to load the BORDER:

textures = "BORDER"
BORDER = "../../textures/borders/default.jpg"
BORDER_linear = "true"
BORDER_wrap_mode = "clamp_to_border"
BORDER_mipmap = "false"

Now, it needs to load two images, a BORDER and LAYER2. So, those lines must be expanded to:

textures = "BORDER;LAYER2"
BORDER = "../../textures/borders/default.jpg"
BORDER_linear = "true"
BORDER_wrap_mode = "clamp_to_border"
BORDER_mipmap = "false"

LAYER2 = "../../textures/borders/default_layer2.png"
LAYER2_linear = "true"
LAYER2_wrap_mode = "clamp_to_border"
LAYER2_mipmap = "false"

That’s what you need to do to update your presets. The default_layer2.png is a blank png file. If you don’t use the mask resource, you need to use default_layer2.png that is inside textures/borders folder.

Just to be clear, YOU ONLY NEED to edit your preset if it calls uborder shaders directly! If they just call other uborder presets, you don’t need any changes.

Using Notepadd++ or VSCODE, it’s very easy to find and replace blocks of texts in multiple files in a folder (plus subfolders). I just did in all 405 sonkun presets using VSCODE and all worked.

10 Likes

I’m glad you got the params posted here, this will be a easy swap out to replace those params when I work on my next update.

4 Likes

Hey @Hari-82 checkout these changes by Hyllian.

I was not able to load your uborder presets even with the previous uborder version though, so I wanted to give you a double heads up.

3 Likes

yep, just noticed the new update, I will try to update and post a working version!

thanks for the heads-up!

3 Likes

I just downloaded your pack and saw that only five presets needed editing. I just edited. Here they are if you’re in a hurry: fix hari shaders

4 Likes

ahah thanks! already added the new texture reference, as you noticed I just had to change few files…

The only thing that had “trouble” was the game gear preset: it didn’t want to retain some values and couldn’t make it without curvature, not sure why :nerd_face:

Now all should be working I’ll upload the new zip.

3 Likes

@Hyllian fun new error [ERROR] [slang]: Texture name ‘LAYER2’ not found in semantic map, Probably the texture name or pass alias is not defined in the preset (Non-semantic textures not supported yet) [ERROR] [Vulkan]: Duplicate parameters found for “internal_res”, but arguments do not match. & this one

1 Like

Read this post and you’ll know how to fix it.