xBR algorithm tutorial

thx for the link.

now works, but “weird” (maybe resolution problem?)

my .cfg

http://freetexthost.com/gv65psxign

tomorrow I will try in windows, good night (in Chile).

[QUOTE=ismajo;38309]thx for the link.

now works, but “weird” (maybe resolution problem?) [/QUOTE] Yes, this is the same bug reported by Belmont. I’ll test the latest RA build to see if I can reproduce it.

Sorry, that bug was my fault. I forgot to update some params before uploading to the repo. Now it’s correct and already there.

The error is that the scaling is swapped between passes 0 and 1. Pass 0 should scale only by 1x and second pass by 2x.

Could you two update your presets and test it?

The fixed preset should be like this:


shaders = "5"
shader0 = "../xbr/shaders/super-xbr/super-xbr-pass0.cg"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
float_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "../xbr/shaders/super-xbr/super-xbr-pass1.cg"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
float_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "2.000000"
scale_type_y1 = "source"
scale_y1 = "2.000000"
shader2 = "../xbr/shaders/super-xbr/super-xbr-pass2.cg"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
float_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "../windowed/shaders/jinc2-sharper.cg"
filter_linear3 = "false"
wrap_mode3 = "clamp_to_border"
float_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "0.500000"
shader4 = "shaders/crt-hyllian.cg"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
float_framebuffer4 = "false"

thank you very much! Not the same frame, but you can see the differences.

http://screenshotcomparison.com/comparison/171858

Now that I figured out that bug, it reminded me that the fast-bilateral+super-xbr preset was wrong too. So I fixed it too and added another crt combination to the ‘denoisers’ folder (very good for pre-rendered games like Resident Evil).

Some screens (without the crt portion, though): Super-xBR

Fast Bilateral + Super-xBR

Super-xBR

Fast Bilateral + Super-xBR

Super-xBR

Fast Bilateral + Super-xBR

Now the new crt preset: Fast-Bilateral + Super-xBR + crt-hyllian. This preset is already in common-shaders.

Nice! It’s almost like increasing the bit depth.

Gotta test this ASAP!! This looks Unholy GREAT Hylian :smiley:

EDIT: Super xBR works like it should on my end, no problems so far, thank You for help :slight_smile: Also what is the actual difference between cg shaders and glsl? On my end glsl are giving me some artifacts while cg works and looks like a charm (no graphical artifacts at all, also quite sharper image).

The new preset looks great too, now all we have to do is wait for rustation HW Ogl plugin to pair it up (higher internal resolution + new denoiser preset) and PSX will have yet another life, this time blending classic crt style with improved 3D and 2D graphics, option for every game.

One question: how can I increase the super xBR scaling factor. I am using 3 passes Super xbr fast pass0, pass 1 and pass 2, whereas pass 0 is set to scaling factor 2x (nearest). The other passes are factor 1x. I would like to increase the scaling by one more level.

The Super xBR algorithm is great. I have only one remark concerning the eyes in rpgs:

Unfortunately I don’t have a screenshot, but with that screenshot I hope I can describe it better.

Most eyes (especially in RPG or Action RPGs like Secret of mana, Final Fantasy, Seiken Densetsu 3, Terranigma etc.) are getting very thin with super xbr. They look like triangles and are very small. The character looks almost angry. Also the castles in Super Mario All Starts - Super Mario Bros 3, looks like angry faces, due to the algorithm of edge detection.

Is there a possibility to adjust the edge detection? Can it be configured?

There are some runtime parameters you could try fiddling with to see if you can find a setting that looks better to you.

Yes, I saw the parameters. [TABLE=“class: highlight tab-size js-file-line-container”]

XBR_EDGE_STR

[/TABLE] [TABLE=“class: highlight tab-size js-file-line-container”]

XBR_HV_EDGE_STR

[/TABLE] [TABLE=“class: highlight tab-size js-file-line-container”]

XBR_WEIGHT

[/TABLE] [TABLE=“class: highlight tab-size js-file-line-container”]

XBR_WEIGHT2

[/TABLE] XBR_ANTI_RINGING

But I don’t know what they mean.

Is there a way to apply xBR to video in KMPlayer (called pixel shaders) or VLC player?

They would have to be ported to whatever format they use, and it’s likely their shader backends lack features to port them completely. However, you can watch videos in RetroArch and apply them there.

Hi, I’m really new to this so i have a quick question before getting in any deeper! Is it possible to use the crt-super-xbr.cgp shader in MAME? I’m running it through RetroArch on a firestick.

I noticed that the other shader files are .glsl, i added the above to a shader folder i created via FTP, and the file doesn’t show up in the folder. I am struggling to find the proper directory to add the shader files to. Any help would be greatly appreciated as is all the hard work you guys put in to creating the ultimate gaming experience! Thanks

On a FireTV, you can only use glsl/glslp shaders. If you update your glsl shaders through the online updater, you should have that same preset in glslp format. It may or may not work. I haven’t tested it, and our GLSL shaders are converted by a script to GLSL, and some of them don’t convert properly.

Thanks hunterk, i’ll have a look for the online updater Greatly appreciated!

Edit : I created a thread and bugreport about specific gfx issue with some xbr shaders on my hardware (http://libretro.com/forums/showthread.php?t=7352) so this post is moot. Sorry for the noise.

I also created a thread regarding my performance issue with advanced shaders in double-buffering mode : http://libretro.com/forums/showthread.php?t=7372

Sorry again, I won’t cross-post again :wink:

There is one bug which is obvious in Super Mario World. If the users activates super xbr the right upper area of a round sprite is a triangle. In the overworld ‘Yoshis Island’ in Super Mario World, you can see the issues on the eyes of the hills (I used the preset super xbr 3p).

I’ve updated the Super-xBR filter with new parameters. It enhances the smoothness and small details preservation. Besides, it deals better with dithering (keeping most of it intact). I’ve only updated the Cg shaders in common-shaders Retroarch repo, though.

Some screenshots: