English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.FS-UAE (http://eab.abime.net/forumdisplay.php?f=122)
-   -   xBRZ... shaders for FS-UAE (http://eab.abime.net/showthread.php?t=87030)

guest.r 04 May 2017 21:40

xBRZ... shaders for FS-UAE
 
1 Attachment(s)
Hi everyone!

I ported some fresh xBRZ (4x and 6x) shaders to the format FS-UAE uses.

Made them also much faster (simpler metrics; symmetry feature, works best with even scaling factors).

They work well with my old AMD card, hopefully they work in general. :D

If i produce something useful in the future, i'll post it here...

Edit: Some useful info:

Please copy the shaders into the

Code:

Data\Shaders
folder.

Example of setting up the shaders via the Custom Configuration option:
Code:

keep_aspect = 1.0
line_doubling = 0
low_resolution = 1
shader = scalefx-hybrid

FS-UAE (later versions) has some shaders built in, please check this link for the shader list:
https://github.com/FrodeSolheim/fs-u...fs-uae/shaders

I also made a collection of the nicest shaders around and hosted them on Github. These must be downloaded and put into the Data\Shaders folder.

https://github.com/guestrr/FS-UAE-Shaders

You can find more interesting shaders in this thread, so feel free to explore a bit.

ProfDrLuigi 05 May 2017 19:22

Where to install the files? PlugIns?

guest.r 06 May 2017 08:42

I think there's currently no dedicated folder for shaders, you can just install them anywhere convenient and then write the full path to the selected shader in custom config option like this:

line_doubling = 0
low_resolution = 1
shader = d:\xbrz6x.shader

...if you extract your shaders directly to d:\ for example.

ProfDrLuigi 06 May 2017 08:48

Thats the only thing I tried before ... but FS-AUE crashes on OSX. :( Seems to work only in Windows.

guest.r 06 May 2017 14:14

3 Attachment(s)
Sorry to hear the shaders don't work on OSX, hard to tell id it is a FS-UAE or OS/Driver issue i guess.

Meanwhile i managed to prepare another interesting shader. It's based on the excellent scalefx upscaler from spookyfox, which means superb shaping. I added some smoothing and pseudo-bump mapping sharpening.

Hope you have some fun with it. :)

Ian 06 May 2017 14:31

Excellent filters by the looks of those screenshots, any chance of some WinUAE friendly .fx versions?

jbl007 06 May 2017 16:42

Quote:

Originally Posted by guest.r (Post 1156121)
I ported some fresh xBRZ (4x and 6x) shaders to the format FS-UAE uses.

Thanks! :great

scalefx-aa-bump does not work unfortunately:
Code:

512 characters
[SHADERS] Initialize
[SHADERS] Checking shader scalefx-aa-bump
[SHADERS] Checking shader /home/stw/FS-UAE/Data/Shaders/scalefx-aa-bump.shader
[SHADERS] GL_INFO_LENGTH was 0
[SHADERS] Compiled vertex shader successfully
0:7(16): error: could not implicitly convert operands to arithmetic operator
0:7(11): error: cannot construct `vec3' from a non-numeric data type
0:9(22): warning: `c' used uninitialized
0:9(13): error: could not implicitly convert operands to arithmetic operator
0:9(9): error: operands to arithmetic operators must be numeric
0:9(2): error: `return' with wrong type error, in function `eq' returning float

WARNING: [SHADERS] Failed to compile fragment shader
WARNING: [SHADERS] No shader passes loaded
[SHADERS] Done loading shader

I'm using Linux, xorg "radeon" driver, mesa 17.04

BTW: If you create a directory
FS-UAE/Data/Shaders
and throw your shaders in here, you don't need to write the full path to your configs. A simple
shader = xbrz4x
will do it.

guest.r 06 May 2017 20:56

@Ian:
4xBRZ is an option the way Winuae handles scaling, i will test it and if it works properly also post it on the boards.
The scalefx-aa-bump shader uses 10 passes and it's impossible to implement it to the .fx atm.
The GLSL XML format is a bit aged but it still makes very complex shaders possible to implement.

@jbl007:
I'm very fond you cleared the 'shader folder' issue. Helps a lot.
I also reviewed the shader port, there were some constant integer numbers that refused to cooperate in float math. Fixed that.
Since both versions work in my case i'll be happy for more possible error reports.

Ian 06 May 2017 21:58

Thanks guest.r :)

jbl007 06 May 2017 22:13

Works fine now and it's looking great, thanks. Unfortunately my GPU is not "beefy" enough to output full FPS even at low res. uae_gfx_framerate=2 does help at least...

guest.r 07 May 2017 20:02

3 Attachment(s)
Yep the shader renders up to 6x resolution, that's why the output resolution doesn't make it faster.
This one is not much faster unfortunately, but could make super-xbr fans happy. :D
I think it's sharpening feature could make it a very good TV shader.
It comes in two versions, a clearer and a smoother one.

Feel free to post a nice screenie if you like it.

Edit: more compatible versions uploaded, thanks to jbl007.

Edit2: new versions with better anti-ringing and other settings.

PS: BONUS INCLUDED! ;)

jbl007 08 May 2017 18:42

Quote:

Originally Posted by guest.r (Post 1156607)
This one is not much faster unfortunately, but could make super-xbr fans happy. :D

Argh! My nitpicky shader compiler complains again:
Code:

[SHADERS] Compiled vertex shader successfully
0:71(40): error: could not implicitly convert operands to arithmetic operator
0:71(36): error: operands to arithmetic operators must be numeric
0:71(28): error: operands to arithmetic operators must be numeric
0:71(27): error: operands to arithmetic operators must be numeric
0:71(67): error: could not implicitly convert operands to arithmetic operator
0:71(63): error: operands to arithmetic operators must be numeric
0:71(55): error: operands to arithmetic operators must be numeric
0:71(77): error: could not implicitly convert operands to arithmetic operator
0:71(54): error: operands to arithmetic operators must be numeric
0:71(27): error: operands to arithmetic operators must be numeric
0:71(22): error: operands to arithmetic operators must be numeric
0:71(17): error: cannot construct `vec4' from a non-numeric data type

WARNING: [SHADERS] Failed to compile fragment shader
WARNING: [SHADERS] Error occured while loading shader


guest.r 08 May 2017 20:23

I have an idea where the problem may be. Thanks for reporting the 'bug'. :)
Could you test this version if it works?

jbl007 08 May 2017 21:09

Quote:

Originally Posted by guest.r (Post 1156785)
Could you test this version if it works?

It doesn't work. I get the same error messages as before plus several
warning: Float suffixes are invalid in GLSL 1.10

guest.r 08 May 2017 22:01

I hope it works now. Was all clear even on my old gf. :)

guest.r 09 May 2017 19:01

1 Attachment(s)
...back to the mainstream!
I prepared two more cool CRT shaders, a tweaked classic CRT Lottes and a version with xbr (super).
The classic version is quite fast, the latter might need some muscle to run in full speed.
Hope you like it. :)

jbl007 09 May 2017 19:50

Quote:

Originally Posted by guest.r (Post 1156815)
I hope it works now. Was all clear even on my old gf. :)

Yes, you got it, works ok now. :) I still prefer the scalefx-aa-bump. The bumpmapping effect looks super cool in games with simple gfx and/or much text.

Quote:

The classic version is quite fast,
Well, not really. :D It looks like it depends on the output resolution, it's ok in a smaller window but in fullscreen it's quite slow for me.
Anyway... it looks very CRTish :-)
Integer scaling is recommended here, scale_x=2, scale_y=2

guest.r 14 May 2017 20:04

4 Attachment(s)
Quote:

it's quite slow for me.
Challenge taken.:D

I've made it super fast now (at least 6x, means it runs in 5x5 resolution with same speed as before in 2x2), and it still looks good ole lottes.
The bloom effect was really slowing things down, not to mention power functions in gamma management.

I think it should be the default version here since it's really more usable with higher output resolutions.

IGP friendly...:p

Edit: New version (17.5.2017). Almost 20% faster, still accurate.

Edit2: New fast version (18.5.2017). Almost 2x faster and nice looking.

Edit3: Renamed and added original version so you can have all np.

jbl007 15 May 2017 21:54

Yes it's much faster now, it can output 50FPS in fullscreen (and >80FPS with warp mode enabled).

guest.r 17 May 2017 15:26

Glad to heat it works with full speed.
I've got it even faster and better looking in my new version (please download from above).

Here is a link how a crt-lottes shader looks in action...

https://s17.postimg.org/ub0x1ygr3/OVL-01.pngonline photo sharing

Edit: I developed a new fast version. The implemented XML shader format really worked as stated.

It's very fast even when compared with already speedy single pass shader. I have tested it with my old integrated radeon HD 4200 (40:4:4) in 1620x1050 resolution.

The results:

CRT-Lottes original: 3 FPS
CRT-Lottes classic: 25 FPS
CRT-Lottes fast : 47 FPS

I switched to 5x4 scale and got comfortable 60+ FPS, nice.

Curvature edges aren't getting any aliasing so i removed it in this version. The blur is of higher quality and a tiny bit more intensive (compensated with #hardpix adjustment), everything else looks/works the same.

Where is the catch? I used 2 passes which allows some neat speedup tricks.

So if you have a modest laptop/basic desktop machine you can still play with this shader full speed/high res.

Download at the post above.


All times are GMT +2. The time now is 14:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.

Page generated in 0.05202 seconds with 11 queries