Uborder shaders

Wow! That’s impressive!!! Did you do it one by one?

I assume you have your windows desktop in 16:9, I mean, not rotated, that’s why you use border_allow_rot = "1.000000" and Vertical Mode has to be ON. I can’t speak for everybody, but most likely people who use vertical overlays, use the monitor rotated in 9:16 portrait mode. I tried with Vertical Mode OFF and border_allow_rot = "0 but doesn’t seems to work out of the box.

PS: I guess it’s because the way you precalculate the CRT screen size. In portrait mode the AR of the monitor is inverted (1080x1920 instead of 1920x1080), that’s why a 4:3 game starts with a 3:4 AR.

Anyhow, It’s a big headstart!!! How did you do it?

1 Like

Hmm, I didn’t know that. I’ll have to change those presets to consider this info. Do you rotate your screen through OS or using Retroarch Screen options?

Using python scripts to ‘guess’ where in the overlay the frame should align. Not a perfect process, but it works for the most files. Now I have to change the algorithm to consider an inverted aspect ratio.

1 Like

Trough OS, so I don’t have to physically rotate mi monitor everytime I use RA. I use my PC that way Just imagine a custom Cabinet with a big TV (43") in portrait mode.

Not perfect, but a good point of reference!!! Yeah, I guess you need to introduce the 9:16 aspect ratio.

1 Like

Ok, I made the changes (suggested by @K-rnivoro ) and remade the presets. Now you don’t need to turn Vertical Mode to ON. You just need to change your OS to portrait.

Vertical Arcade - uborder pack v2

2 Likes

I like that simple grille border you are using.

2 Likes

That comes from Duimon’s potato set (TV folder), I use it as a generic border with uborder.

2 Likes

Oh, cool… I actually already have his set (might need to get the potato stuff if the images are different)… so thanks Hari, and Duimon. I’m using a TV grille image for my MegaBezel set, but this one looks a little more hi-ressy than the one I have.

1 Like

What pack is that border from?

1 Like

This one is from @Boz1978. I think he’ll release soon.

3 Likes

Will try and get through em this weekend as I’m not in work. What variations would do you think for each one? So far I’ve got full overlay and zoomed. I could do glass over bezel/screen and glass over screen only variants of those two also. Or I could just let you choose one variant and only do that.

2 Likes

If you’re asking me, it’s up to you to do what you like the time you decide. I’m not demanding anything.

2 Likes

Ok m8 I’ll have a think :+1:

2 Likes

Not sure if this helps, but it’s pretty easy to viewport zoom in or out if you just want to do one and let the user replace the viewport setting. I keep my set zoomed in, but it wouldn’t be to hard to change it.

1 Like

Yeah it’s only the positioning really. One thing I will say is because the viewports on these overlays aren’t all central you will also need to move the overlay and bezel in y.

1 Like

Yeah, that’s true. It would be cool if there was a way to automate “resetting” the center of monitor and then zooming in a set amount.

1 Like

I’m releasing a command line tool I was using to analyze transparent overlays (32-bit png file) and calculate or guess the location of the transparent portion (a rectangle). Obviously, it only works if there’s only one transparent portion, which is the majority of the overlays out there.

It’s a python script, so you need to know how to use python.

uborder-tool v1.0.0

To know how to use the script, open a prompt and call the script with -h or -help to get some instructions. There’s only one required parameter: the image file (a 32-bit png). The rest is optional.

python.exe uborder-tool.py -h

usage: uborder-tool.exe [-h] [-o OUTPUT] [-s INT[1,100]] [-t INT[1,255]] [-p] image_file

Estimates coordinates from the inner rectangle based on alpha transparent image.

positional arguments:
  image_file            input file (32-bit png)

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output file (file to output uborder params)
  -s INT[1,100], --step INT[1,100]
                        search step size (bigger is faster, though less precise).
  -t INT[1,255], --threshold INT[1,255]
                        threshold below which transparent pixel is detected.
  -p, --preview         print results and show an image with detected points in green.

If you use the option -o, it’ll print some results in a file with name and path defined by the user. The output file is optional and it’ll print scaling and aspect ratio params recommended to be used with uborder. So I usually save the output as a *.params or *.slangp file. If you know how to edit the script you can change what the script will write to the output.

Example of usage with image.png and output.params as output file:

python.exe uborder-tool.py "image.png" -o "output.params"

If you know how to process in batch, you can analyze hundreds of overlays in seconds or minutes and get all params you need.

OBS1: I may distribute a windows executable made by pyinstaller if python is a limitation and someone is interested.

OBS2: if you use the --preview option, it’ll open your default image app to load a temporary png identical to the input with the points detected in green.

Practical example: From Orionsangel-Original-Console pack, let’s analyze the atariplain.png overlay.

The overlay:

Using the script with default params and printing preview:

After running, it’ll show the input image with green point where the rectangle was detected:

It works with default params. If the showed points don’t make sense, you need to adjust params or see if the image has transparent watermarks in some hidden places. In this case you need to lower the threshold below the watermark alpha values or just delete the watermark just temporarily to get correct results.

9 Likes

I just noticed, while making presets for system specific bezel, that the background get flipped in flycast @480.

probably not related to uborder: I guess something similar was reported here:

1 Like

Yes, some cores run mirrored. Swanstation using hardware and internal upscaled does that too.

Use the background mirror option to adjust the backgorund.

1 Like

oh, I didn’t realize that option was there :nerd_face:, that solved it!

2 Likes

This problem only occurs with glcore driver, try Vulkan or D3D.

2 Likes