Uborder shaders

Thought so, just wanted to check to make sure.

2 Likes

New release: Uborder-v0.2.0

  • Add uborder-ambient-light flavor
  • Update crt-guest-advanced, hd and ntsc to the latest.
  • Add append preset.
  • Add ports of: crt-geom, crt-pi, crt-sines, crt-hyllian-sinc, fakelottes, crt-lottes, crt-gdv-mini, crt-aperture and crt-easymode.

Important to inform that existent preset packs aren’t affected. uborder-ambient-light is a completely new flavor that uses a parallel folder structure mirrored on the main one. So, if you desire to test how a pack would work with ambient-light flavor, you just need to edit the path to point to the presets inside uborder-ambient-light folder. Beware that using ambient-light presets has a performance cost, so use it only if needed.

9 Likes

Amazing work! It’s everything I was looking for :smiley:

I’ll see if I can make an ambilight version of some of my presets.

Off

On

I think I’ll need to make the image brighter though!

2 Likes

You won’t need that. I was thinking about it and next version I’ll put some way to adjust the brightness in the composition. For now it’s hardcoded. If you wanna increase it to see if it works, open the file “include/uborder_bezel_reflections_main.inc” and look for this line:

border.rgb = border.rgb*(ambi + 0.5.xxx);

Increase/Decrease that 0.5 value in the interval (0.0, 1.0) and see how it changes the results.

2 Likes

Blessed be your keyboard, that works!

2 Likes

So, which value did you use?

1.0, though I’d raise it even more if I could :laughing:

1 Like

You should try the Glow Brightness user param too. It does something like that, though not exactly the same.

1 Like

Yep! Raised it to 3.0 and made the fadeout 0.75 (and lowered bezel reflection strength).

Coolest shader ever

2 Likes

New release: Uborder-v0.2.1

  • Add support for koko-ambi shaders;
  • Add user param to control border brightness over ambient-light.

In order to make koko-ambi works with uborder, you need koko-aio installed, or at least its standalone ambi shaders in the original folder.

The default ambient-light will be the standard, because it’s faster. If you desire to use koko’s implementation, inside ‘base_presets/uborder-ambient-light’ folder there’s a uborder-koko-ambi preset as an example on how easy it is to modify any other ambient-light preset to insert koko-ambi. You just need to swap the first three shaders from any preset.

7 Likes

Editing the image paid off:

Hands down, I couldn’t ask for more in a shader. Nice work, Hylian!

Edit: I’ve updated my pack, in case anyone wants it!

2 Likes

I’ve had the chance to take a look to your slangp files incorporating the standalone version of ambient-light from koko-aio, and noticed this:

       shader2 = "../../../koko-aio/_standalone-shaders/koko-ambi-standalone/2_koko-ambi-temporal.slang"
        alias2 = ambi_temporal_pass
filter_linear2 = true
 mipmap_input2 = false
   scale_type2 = source
        scale2 = 4.0
float_framebuffer2 = true

But if you look at mine:

       shader2 = 2_koko-ambi-temporal.slang
        alias2 = ambi_temporal_pass
filter_linear2 = true
 mipmap_input2 = false
   scale_type2 = viewport
        scale2 = 0.1
float_framebuffer2 = true

I opted for a “0.1 * viewport”, which translates to “384 × 216” on a 2160p and “192x180” for a 1080p output resolution, where yours “4.0 * source” translates to “1280*896” even on low res content, where it means a 3x+ to 6x+ increase in gpu resource use, just for that pass.

I don’t know if that 4x scaling is absolutely needed by your pass strategy, but if not, I strongly suggest you to reconsider :wink:

3 Likes

If you look at the next shader, it downscale by 0.25, which means the sourcesize. That’s because uborder shader needs native res after the ambient shader chain. It was the easiest way to make koko easy to be compatible without changing any shader.

I could use x2 and 0.5x after. Maybe it works the same way and much faster. I’ll do some tests. Better yet, using just 1.0x on both passes. I don’t kbow why I concluded it was necessary some upscale followed by downscale.

4 Likes

Yes I noticed the scale invertion afterwards!

Indeed, by nature, koko ambilight needs very low resolution, even 0.5x source suffices

3 Likes

Just tested here using 1x 1x and it works very fast! Using 0.5x 2x doesn’t work correctly, though, so I think 1x 1x is the best for this case. I think it can be the default now. I’ll put the shaders inside support folder in the next release.

3 Likes

Oh, that’s untested by my side; the intended use would be 0.5x->viewport with a bit of noise to hide banding, but I understand it could be troublesome to integrate then.

2 Likes

New release: Uborder-v0.2.2

  • Add koko-ambi flavor.

Now koko-ambi is a new flavor in parallel to the main folder. It is well optimized now (thanks to @kokoko3k). The standalone shaders were incorporated inside support shaders, so that you don’t need to download koko’s shaders now.

So, there are two ambient-light versions for each preset you can use. Each one has its own implementation and params.

7 Likes

It seems D3D stopped working with uborder, is that normal? I’m aware that D3D is problematic with other shaders as well.

2 Likes

Indeed, looks like D3D is gone for good. I don’t know which kind of error is that. So, only vulkan and glcore for now. Looks like D3D has some restrictions and it isn’t easy to debug, because it doesn’t point the line where the error happens. Those lines are internal I think.

EDIT: Just found the problem.

There’s a loop that I changed when inserting the reflection quality/performance param. It’s like this:

for(int i = 0; i < bz_blur_iter; i++)

bz_blur_iter is now a user param and looks like D3D doesn’t ‘like’ this. Vulkan and glcore does. I don’t know why D3D doesn’t work with that loop.

The only way to fix this is fixing the number of iterations and getting rid of that user param. Would you trade that user param in exchange for D3D compatibility?

3 Likes

I’m honestly not sure, the D3D compatibility issues will probably not just end here; as your shader grows in the future.

I think @kokoko3k can give you more insight on this. He provides D3D as an optional static param, and turning it on will disable some features:

	* Performance optimizations when drawing anything outside the game content area
	* Delta render
	* Luminosity tied zoom
	* Leds scene change detection
1 Like