Uborder shaders

In Koko-ambi presets, there’s a little detail you need to know. The first bunch of shaders are for koko-ambi. Then there’s an ‘original.slang’ shader, this is the real source for the content and posterior crt shader. So, you need to apply grade after this shader. So, it should be like this:

koko-shaders -> original -> grade -> crt-shaders and so on

Original shader is a modified stock shader that get the first native source spat by Retroarch. So it can be put on any pass and it still will output the native original source.

The easiest way for you is creating a small preset with the first 4 koko shaders, which are the 3 koko shaders and original.slang. Then prepend it to your preset (it already has grade). Then, open the result and look for the last gdv shader, which is deconvergence.slang. It should be loaded from inside koko-ambi folder instead uborder-bezel-reflections one.

I think that in the relative path the “-main” is not necessary

image

BORDER = "../../../../Mega_Bezel_Packs/Soqueroeu-TV-Backgrounds_V2.0-main/img/_Generic/G01_Gray.png"

BORDER = "../../../../Mega_Bezel_Packs/Soqueroeu-TV-Backgrounds_V2.0/img/_Generic/G01_Gray.png"
1 Like

@LetramChi my install of soquerou is also named Soqueroeu-TV-Backgrounds_V2.0-main that is what comes in the zip.

@Hyllian do you think that I can replace one of the stock pass in the guest advance chain?

1 Like

If you download it in zip it is like that, but looking at the documentation it shouldn’t be.

3 Likes

Retroarch/shaders/Mega_Bezel_Community/Soqueroeu-TV-Backgrounds_V2.0
    	/img
        /presets
3 Likes

yep you are right, it also makes more sense :+1:

You need to ask guest. I only put a copy of a crt shader preset, and gdv has two stock shaders. Maybe it has some functionality.

Yeah, it makes sense, but I thought most people wouldn’t bother changing the folder name that comes in the zip (or read instructions) and would use just as it comes. That’s why I use the same zip name on any pack that comes from github. And it work with MegaBezel in any case.

I can get rid of the ‘-main’ in the folder name if at least 50% of uborder users agree, which means three people in total. We have only two now. :upside_down_face:

Just kidding. I’ll change that in the next release.

3 Likes

well that worked for me :sweat_smile: :sweat_smile: :sweat_smile:

I just replaced shader4 = with grade, the universe didn’t implode and it seams to be working :nerd_face:

I think I remember @guest.r saying that one (both?) stock pass could be used to add something else by the user but not sure…

2 Likes

One stock pass is needed for the preset to function properly, but both can be replaced with proper full-fledged shaders as long as they output something “ordinary” and the 2nd pass alias is maintained.

2 Likes

Ok! so my random memory was almost correct :sweat_smile:

I went from this:

.
.
shader4 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear5 = "false"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "StockPass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"

to this

.
.
shader4 = "shaders_slang/misc/grade.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear5 = "false"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "StockPass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"

Should be alright?

2 Likes

Yeah, i have also tested it and it should be fine.

2 Likes

Now we are 3 :laughing:

Btw, is there a way to make the shader fit properly on a 16:10 screen? koko-aio and MBZ can do that. They sort of zoom the image, which is better than stretching it:

3 Likes

Someone else asked something similar about it and at the time I couldn’t find an easy way to include that feature. I’ll look again that issue.

Now I remember the problem of doing this: you need to lookup texture size for every fragment and its completely insane. It should be just an uniform as framebuffer sizes.

5 Likes

New release: uborder-v0.3.2

  • Add static params files. Now the user can define a param to keep border aspect ratio;
  • Fix SOQUEROEU main folder path.

I thought about how to keep aspect ratio of borders when the display resolution is different from the border. Texture size is only accessible through fragment shader, which is too demanding. So, as only a few people really need this feature, it’s enabled through a static param in the file ‘uborder/shaders/content_bezel_shaders/include/uborder_bezel_reflections_user_static_params.inc’. There you can enable KEEP_BORDER_ASPECT_RATIO, and even set the texture aspect (in some cases the shader adjust the content correctly, it needs more testings):

// Enable this option only if background image and display have different aspect ratios.
//#define KEEP_BORDER_ASPECT_RATIO

// Define the border texture aspect. If you don't know, put the texture size as the comment below. Default is 16:9.
#ifdef KEEP_BORDER_ASPECT_RATIO
    #define ASPECT_TEX_X  16.0   // It's equivalent to texture size, it could be X=1920.0 and Y=1080.
    #define ASPECT_TEX_Y   9.0
#endif

If you don’t need that feature, let it off there.

This aspect ratio management is insane! So, I’m oficially entering the rabbit hole! tumblr_o8d3ms6Q3G1v6y9nqo1_500

10 Likes

(Nevermind, I was talking about integer scaling but then I noticed the difference wasn’t that big)

Got an old glsl version running on a known mobile device:

Thanks to @LetramChi for the tests.

6 Likes

I’ve got a version (without ambilight) almost as advanced as the slang. Only missing the LAYER2 background. Auto-Rotation works, I had only to change some code.

I’ll be updating in this new repo: uborder-glsl


First glsl release: uborder-glsl-v0.2.4

  • First glsl version.;
  • Spooky TVs included;
  • It’s more or less the same features as the slang version v0.2.3;
  • Only crt-nobody is compatible. Given the way glsl works, some ports won’t be possible;
  • Only bezel-reflections flavor is available. No koko-ambi, unfortunately (maybe when @kokoko3k is interested in releasing a glsl version).
  • It works on android mobile devices compatible with glsl #version 120 and upwards. Border must be png in this case, because Android jpg library is buggy.
9 Likes

New release: Uborder-v0.3.3

  • Add a new param to turn Outer Bezel transparent even if inner bezel isn’t;
  • Add param to modify curvature radius between bezel and content;
  • Update crt-guest-advanced shaders and variants to the latest;
  • Update ‘Spooky TVs’ pack to use koko-ambi;
  • Add ‘classic-crt-collection’ presets to uborder_packs.

To use classic-crt-collection, get the overlays in this link: https://github.com/TreyM/classic-crt-collection

Put the ‘CRT’ folder in this path: ‘Retroarch/overlays/CRT’

00024-250301-112514 00024-250301-112459 00024-250301-112433 00024-250301-112317 00024-250301-112309 00024-250301-112239

aliens-250301-120711 aliens-250301-120502 aliens-250301-120159 aliens-250301-120039

Koko-ambi test video:

https://youtu.be/cTCtBXI-DrA

10 Likes

Awesomeness m8!! :heart_eyes::heart_eyes::heart_eyes:

1 Like

I can also see what looks to be an inner edge added. Is this an addition in this update or has it always been there? Or is that part of the overlay?

1 Like