Uborder shaders

Forgive my ignorance bitman but where exactly do I put this? in what folder? Thank you

Inside uborder_packs

(if you don’t have it, create a uboder_packs folder inside your shaders directory. Not inside shaders_slang, but its parent folder “shaders”)

Let me know if it works

1 Like

Oh wow! This looks awesome! From someone who’s highly critical of the strange distortion of horizontal lines and fishbowl effect when scrolling in many examples of curvature emulation, I found something about this image to be very tasteful!

It “sells” the curvature effect but the horizontal lines look straight for the most part. The horizon does look slightly bent though but most other lines seemed to have retained their straightness.

1 Like

This curvature was carefully developed to not distort while scrolling. It’s easier to see that using cylinder.

On the curvature, I think h_radius = 4.0 is the sweet spot. And a good range is between 3.0 and 5.0.

2 Likes

Hello bitman, I have placed the folder inside shaders\uborder_packs\ and it gives me an error. Does it happen to anyone else? Greetings

I tried uborder-tool and it’s fantastic!! It works with verticals too!!! It saves me a lot of time with the position and size adjustments. Of course, some fine tuning is necessary, for example this Neo-Geo overlay with plastic bezel. In this case, Bezel Curvature looks better OFF, and Cylindrical Shape instead of sphere. And of course, Bezel Transparent is ON. I had to install some PIL modules in Python too. Maybe the Windows Executable file would make things easier @Hyllian. Also, I don’t know how to make a batch process for all my vertical overlays stored in a folder (actually two, one for horizontal CRT and one for vertical, as the 4K Vertical Overlay Community Contributions demands). If you could guide me I’ll be greatful.

3 Likes

…Awesome stuff m8! :star_struck::star_struck::star_struck:

1 Like

An Windows executable would be like 40MB, because it just insert all libs in the package. But, I’ve already got it running by installing the libs.

The easiest way to do that is creating a .bat file and put the command lines one after one for each file. Use the option -o to save the output file to some folder and don’t enable preview (-p).

Example of a .bat content I’ve used for some vertical overlays:

python.exe uborder-tool.py "D:\apps\emu\RetroArch-1.19.1\shaders\Mega_Bezel_Packs\VerticalArcade\CORE-ASPECT-ORIENT-HORZ\1944.png" -s 10 -o "params\1944.params"
python.exe uborder-tool.py "D:\apps\emu\RetroArch-1.19.1\shaders\Mega_Bezel_Packs\VerticalArcade\CORE-ASPECT-ORIENT-HORZ\2020bb.png" -s 10 -o "params\2020bb.params"
python.exe uborder-tool.py "D:\apps\emu\RetroArch-1.19.1\shaders\Mega_Bezel_Packs\VerticalArcade\CORE-ASPECT-ORIENT-HORZ\3countb.png" -s 10 -o "params\3countb.params"
1 Like

Ok. My specific question if there is a way to “read” all the .png files in a specific folder, and generates that .bat file with all the instructions. Or maybe something like python.exe uborder-tool.py "D:\apps\emu\RetroArch-1.19.1\shaders\Mega_Bezel_Packs\VerticalArcade\CORE-ASPECT-ORIENT-HORZ\*.png" -s 10 -o "params\*.params" where the * is replaced by the png file name.

I really don’t know how to build that batch file. Sorry bothering you.

1 Like

Nope (not by uborder-tool, it would need that functionality), you need to create the bat.

There are two easy ways to do that:

  1. Just from the command prompt you go to the path where the png files are and digit dir > filenames.txt. It’ll direct al the path to that txt. So you can edit that.

OR

  1. In Windows, visually you can do this:
  • Select the file/files.
  • Hold the shift key and then right-click on the selected file/files.
  • You will see Copy as Path . Click that.
  • Open a Notepad++ file and paste and you will be good to go.

Using Notepad++ (replace features) you can create the bat content, then just save as bat.

2 Likes

Ok, my last answer wasn’t very good, because I’m very noob when it comes to making batch scripts. The batch syntax is alien to me, so I tend to always making naive solutions by just repeating commands and changing names.

But, in this age, AI is our friend and I called Deepseek to make a batch script to do what you need. I made a prompt based on your needs and Deepseek gave me this:

@echo off
setlocal enabledelayedexpansion

:: Set the paths
set "INPUT_DIR=C:\path\to\input\png\files"
set "OUTPUT_DIR=C:\path\to\output\txt\files"
set "APP_PATH=C:\path\to\your\app.exe"

:: Check if directories exist
if not exist "%INPUT_DIR%" (
    echo Input directory does not exist: %INPUT_DIR%
    pause
    exit /b
)

if not exist "%OUTPUT_DIR%" (
    echo Output directory does not exist: %OUTPUT_DIR%
    pause
    exit /b
)

:: Process each PNG file in the input directory
for %%F in ("%INPUT_DIR%\*.png") do (
    :: Get the base name of the file (without extension)
    set "BASENAME=%%~nF"

    :: Define the output TXT file path
    set "OUTPUT_FILE=%OUTPUT_DIR%\!BASENAME!.txt"

    :: Run the app with the input PNG and output TXT paths
    echo Processing "%%F" to "!OUTPUT_FILE!"...
    "%APP_PATH%" "%%F" "!OUTPUT_FILE!"
)

echo All files processed.
pause

Still not useful, but is a very good starting point. Although I don’t have knowledge of the syntax, I used my mimic skills and went ahead to edit that to something useful:

@echo off
setlocal enabledelayedexpansion

:: Set the paths and other params
set "INPUT_DIR=C:\path\to\input\png\files"
set "OUTPUT_DIR=C:\path\to\output\txt\files"
set "APP_PATH=python.exe"
set "PY_SCRIPT=uborder-tool.py"
set "OPTIONAL_PARAMS=-t 50"
set "OUTPUT_FILE_EXT=slangp"

:: Check if directories exist
if not exist "%INPUT_DIR%" (
    echo Input directory does not exist: %INPUT_DIR%
    pause
    exit /b
)

if not exist "%OUTPUT_DIR%" (
    echo Output directory does not exist: %OUTPUT_DIR%
    pause
    exit /b
)

:: Process each PNG file in the input directory
for %%F in ("%INPUT_DIR%\*.png") do (
    :: Get the base name of the file (without extension)
    set "BASENAME=%%~nF"

    :: Define the output file path
    set "OUTPUT_FILE=%OUTPUT_DIR%\!BASENAME!.!OUTPUT_FILE_EXT!"

    :: Run the app with the input PNG and output paths
    echo Processing "%%F" to "!OUTPUT_FILE!"...
    "%APP_PATH%" "!PY_SCRIPT!" "%%F" -o "!OUTPUT_FILE!" "!OPTIONAL_PARAMS!"
)

echo All files processed.
pause

That works as a batch model for uborder-tool, so that you can edit the first chunk of params to your needs. You can get here: uborder-tool.bat (model)

I made a test and it WORKS! Here’s my edited batch:

@echo off
setlocal enabledelayedexpansion

:: Set the paths and other params
set "INPUT_DIR=D:\apps\emu\RetroArch-1.19.1\shaders\Mega_Bezel_Packs\Duimon-Mega-Bezel-Potato\Graphics\_Potato\TV"
set "OUTPUT_DIR=D:\apps\emu\RetroArch-1.19.1\shaders\uborder_packs\Duimon-Mega-Bezel-Potato\presets\TV"
set "APP_PATH=python.exe"
set "PY_SCRIPT=uborder-tool.py"
set "OPTIONAL_PARAMS=-t 50"
set "OUTPUT_FILE_EXT=slangp"

:: Check if directories exist
if not exist "%INPUT_DIR%" (
    echo Input directory does not exist: %INPUT_DIR%
    pause
    exit /b
)

if not exist "%OUTPUT_DIR%" (
    echo Output directory does not exist: %OUTPUT_DIR%
    pause
    exit /b
)

:: Process each PNG file in the input directory
for %%F in ("%INPUT_DIR%\*.png") do (
    :: Get the base name of the file (without extension)
    set "BASENAME=%%~nF"

    :: Define the output file path
    set "OUTPUT_FILE=%OUTPUT_DIR%\!BASENAME!.!OUTPUT_FILE_EXT!"

    :: Run the app with the input PNG and output paths
    echo Processing "%%F" to "!OUTPUT_FILE!"...
    "%APP_PATH%" "!PY_SCRIPT!" "%%F" -o "!OUTPUT_FILE!" "!OPTIONAL_PARAMS!"
)

echo All files processed.
pause

Note that you can save “.params” too or any other extension.

3 Likes

Seems like I had a leftover line.

Please download from this new link:

https://mega.nz/folder/aegwmKBA#a6hCwasJThG-01GqxJb_pQ

Sorry about the delay - power outage

1 Like

I also included a vertical one:

And an opaque variant (no transparent bezel):

Just paste the generic-arcade folder in uborder_packs and load “auto-arcade-overlay-loader.slangp”. It will automatically choose either the horizontal or vertical overlay according to the game.

(if you want to use the opaque variant as default, just rename the file)

1 Like

Wow it works and looks incredible, thank you very much and there is no problem with the delay at all. It makes me want to use this configuration with all the systems with how good it looks :grin:. Greetings, awesome work

2 Likes

Thanks @Hyllian for the script!!! And thanks chinese AI!!! :rofl:

1 Like

Config’d a few Retrolust TVs

70s:

70s Night:

90s:

Link:

https://mega.nz/folder/afh0TLLA#vkiCmBbK5hfc2XwTVC35GA

5 Likes

I like that! Do you have anything to enter Spooky TV’ style?

90s (but opaque bezels and flat):

3 Likes

Hmm :thinking:

Not really, but perhaps we could have another category? Something like “All-rounder TVs”, or Generic

2 Likes

Great work here bitman! :slight_smile:

2 Likes