The RetroArch Shader Thread

The place for all discussion on gaming hardware
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

The RetroArch Shader Thread

Post by blizzz »

I recently tried out some shaders from the current SVN version of RetroArch after I read a blog post about a new shader.

One problem of emulation is that if you just take a 320x240px screen and make it big, it will look anything from kinda cool (e.g. Super Mario World) to absolutely rubish (e.g. Einhänder).
Image

So, how does this new "CRT Royale" shader look? Well... I'd say it looks pretty bad. There's the obvious black borders around all sub-pixels, but also the glow from white pixels looks really bad.
Edit: Have a look at the next posts for some big improvements with the shader.
Image

The next shader I tried was "CRT Hyllian Glow", which looked quite nice after some tweaking. The thing that bugs me is that it looks like someone turned up the sharpness levels on a TV all the way up.
Image

In the end I think the simple "CRT Glow" looks the best. It has scanlines and glow and makes the image much more pleasant. Maybe it's a bit too soft though.
Image

The shaders are all available in SVN, so I won't post any download links. For the CRT Glow shader I used the gaussian version and changed the following settings:
Gaussian Width 0.46
Glow Rolloff 4.20
Glow Strength 0.45

Are there any better shaders available for RetroArch?
Last edited by blizzz on Sat Aug 16, 2014 3:49 pm, edited 1 time in total.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: The RetroArch Shader Thread

Post by lettuce »

Hmm, maybe you should alter your CRT-Royale shader settings....

Image
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

Re: The RetroArch Shader Thread

Post by blizzz »

I used the SVN version and I couldn't find out what I have to change to make it look any better. Can you upload the version you use or describe what exactly needs to be changed?
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: The RetroArch Shader Thread

Post by lettuce »

Grab the nighly build form here...

https://www.dropbox.com/sh/91sakv0qdyxjx9f/cGOfV7ZOKd

When you have the CRT-Royale shader loaded, entre the Shader Parameter option and these are the values i changed everything else was left as default values.....

CRT_Gamma 2.40
LCD_Gamma 2.10
Halation_Weight 0.05
Diffusion_Weight 0.15
Bloom_Underestimate_Levels 0.55
Bloom_excess 0.35
Beam_Max_Sigma 0.20
Beam_Max_Sharp 2.50
Beam_Sharp_Power 0.80
Border_size 0.00
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

Re: The RetroArch Shader Thread

Post by blizzz »

It doesn't look much different with these settings. I also tried it on my 2560x1440 screen and this is how it looks: https://dl.dropboxusercontent.com/u/345 ... 160707.png

Maybe yours just looks better because of the jpeg compression?
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: The RetroArch Shader Thread

Post by lettuce »

Nah looks just like the picture posted, not sure whats going on then, after altering the settings did you apply shader settings again?

EDIT: what CRT-Royale preset shader are you using, im using the CRT-Royale-Intel.cgp.

also

Integer scale: off
Aspect ration: (1:1 PAR)
Hard GPU Sync: On

EDIT 2: Did you by chance edit anything in the user_settings.h file in the CRT-Royale shader folder, specifically....

#define RUNTIME_SHADER_PARAMS_ENABLE"

??
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

Re: The RetroArch Shader Thread

Post by blizzz »

Got it to look quite nice with the CRT Royale shader. (standard, not Intel setting)

Integer scale: on (off will result in uneven scanlines on 1080p monitors)
Aspect ratio: Core defined
Hard GPU Sync: on (this will lower the input lag to acceptable levels)

Shader options:
crt_gamma 2.60
lcd_gamma 2.20
halation_weight 0.05
diffusion_weight 0.15
bloom_underestimate_levels 0.55
bloom_excess 0.60
beam_max_sigma 0.20
beam_max_shape 2.50
beam_shape_power 0.80
mask_type 1
mask_sample_mode 1 (< this improved it a lot)
mask_specify_num_triads 1

Image
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: The RetroArch Shader Thread

Post by lettuce »

blizzz wrote:Got it to look quite nice with the CRT Royale shader. (standard, not Intel setting)

Integer scale: on (off will result in uneven scanlines on 1080p monitors)
Aspect ratio: Core defined
Hard GPU Sync: on (this will lower the input lag to acceptable levels)

Shader options:
crt_gamma 2.60
lcd_gamma 2.20
halation_weight 0.05
diffusion_weight 0.15
bloom_underestimate_levels 0.55
bloom_excess 0.60
beam_max_sigma 0.20
beam_max_shape 2.50
beam_shape_power 0.80
mask_type 1
mask_sample_mode 1 (< this improved it a lot)
mask_specify_num_triads 1

Image
Thats looks good!

I tried my settings on my LCD TV (1080p) and didnt look no where near as nice as on my 1440p monitor which is a shame. I'll give your settings a try on my LCD TV later on
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

Re: The RetroArch Shader Thread

Post by blizzz »

A few additions:
bloom_underestimate_levels should be 0.80 (according to the dev)
bloom_excess might be a bit high, maybe 0.50
border_size 0.00 (this setting is for rounded corners, 0 = no corners)

On my i3-2100T (2.5GHz dual core with HT) + GTX 750Ti machine I have to set the hard gpu sync frames to 1 to get 60fps. On my normal gaming rig it works fine when left at 0.

This shader seems to work fine with PSX games, but looks horrible on games like Super Mario World. I wish there was a CRT shader that made all games look as good as a real CRT.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: The RetroArch Shader Thread

Post by lettuce »

blizzz wrote:A few additions:
bloom_underestimate_levels should be 0.80 (according to the dev)
bloom_excess might be a bit high, maybe 0.50
border_size 0.00 (this setting is for rounded corners, 0 = no corners)

On my i3-2100T (2.5GHz dual core with HT) + GTX 750Ti machine I have to set the hard gpu sync frames to 1 to get 60fps. On my normal gaming rig it works fine when left at 0.

This shader seems to work fine with PSX games, but looks horrible on games like Super Mario World. I wish there was a CRT shader that made all games look as good as a real CRT.
I believe with retroarch you can save configs for each core, so you can set your shader settings different for the PSX than what they would be for say the SNES core
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

Anyone here would be able to port those to the .slv/.slf format used by Pete's OGL2 pluging for ePSXe please ?

Actually there's one that has already been ported, I think it is cgwg's CRT shader, probably an old version.
Here's the discussion http://www.razyboard.com/system/morethr ... 077-0.html
Links for downloading useable files are on second page.

Well on my shit old PC those consistently crash on start, error: [Fragment shaders(s) failed to link, vertex shader(s) linked]

Curiously a non-complete port of this shader works okay (I've copied the files from the bottom of page one of that thread and created slv/slf files)...

Still, this shader working or not is too heavy for my poor 512Mb video card. Even with frame-skipping.
Then I read about the Hyllian shader and its version for lower end systems; https://github.com/libretro/common-shad ... lian-lq.cg

I've been trying to understand how a port could be done but I'm afraid this is beyond my skills. :(
Of course this would be for use on low-end Xp machines, outside of RA.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
SGGG2
Posts: 747
Joined: Thu Dec 31, 2009 1:03 am
Location: East Coast, US

Re: The RetroArch Shader Thread

Post by SGGG2 »

Best shader for 8-bit and 16-bit titles @ 1080p? I like the CRT shaders on PSP/PS1 titles but I don't like the way it looks at all with retro stuff.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: The RetroArch Shader Thread

Post by Tatsuya79 »

Still loving crt-geom above everything else.

LINEAR_PROCESSING ON
OVERSAMPLE OFF
USEGAUSSIAN ON
DOTMASK OFF

Great for most systems with a clean fullscreen upscaling.

lcd-grid from lcd-cgwg for handeld.

Yeah, CGWG all the way! :mrgreen:
Spoiler
Image
They removed this beautiful sprite in sf2'. :cry:
User avatar
evil_ash_xero
Posts: 6181
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: The RetroArch Shader Thread

Post by evil_ash_xero »

This RetroArch thing confuses me completely. I've looked into it, and I just don't understand it.

This thing emulates PSX as well, and has low latency?

I'd like to get into it, but it doesn't seem user friendly at all.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: The RetroArch Shader Thread

Post by lettuce »

User avatar
SGGG2
Posts: 747
Joined: Thu Dec 31, 2009 1:03 am
Location: East Coast, US

Re: The RetroArch Shader Thread

Post by SGGG2 »

evil_ash_xero wrote:This RetroArch thing confuses me completely. I've looked into it, and I just don't understand it.

This thing emulates PSX as well, and has low latency?

I'd like to get into it, but it doesn't seem user friendly at all.
It's not exactly difficult, there's just a lot to absorb and unfortunately, it's not spelled out for beginners. Lettuce has a wonderful "how-to" video, complete with downloads: http://www.youtube.com/watch?v=EHXyGK9DNX4

PSX works great, although you'll need to track down right BIOS's (and verify the MD5 checksums match the recommended values in "Core info" after loading the PSX core).

My biggest complaint's the CRT shaders, IMO, 1080p doesn't have enough detail to render them properly and it usually ends up looking like a grid with 8 and 16-bit stuff. Affordable 4K, 120hz, non-TN, passive 3D panels can't get here soon enough :)

(And there's no Xinput option for joystick controls??? :evil: )
User avatar
evil_ash_xero
Posts: 6181
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: The RetroArch Shader Thread

Post by evil_ash_xero »

With the above shader, about how much input latency is there?

Cause that looks nice.
User avatar
Floob
Posts: 81
Joined: Fri Jul 25, 2014 10:58 am
Location: UK

Re: The RetroArch Shader Thread

Post by Floob »

evil_ash_xero wrote:This RetroArch thing confuses me completely. I've looked into it, and I just don't understand it.

This thing emulates PSX as well, and has low latency?

I'd like to get into it, but it doesn't seem user friendly at all.
Here is a very brief overview running RetroArch on a Raspberry Pi:
https://www.youtube.com/watch?v=SAEiicKff-8
screamingtrees
Posts: 9
Joined: Wed Apr 30, 2014 2:19 am

Re: The RetroArch Shader Thread

Post by screamingtrees »

I see that no one has posted in this topic for a couple months now, but I'll try my question anyway. I've been working with the CRT-geom-flat-sharpness shader, and I'm wondering if the scanlines on Ocarina of Time are displaying on odd lines when they should be on even or vice versa. I've got retroarch using an initial resolution of 320x240 for mupen64plus and have integer scaling turned on. The only change I've made to the shader is turning down the scanline brightness. Anyone know what this game should look like with scanlines? http://i.imgur.com/V6hcUuY.png
User avatar
austin532
Posts: 842
Joined: Wed Mar 12, 2014 12:44 am
Location: Arizona, US

Re: The RetroArch Shader Thread

Post by austin532 »

That definitely looks like the scanlines are too dark.
Framemeister 240p scanline settings: http://shmups.system11.org/viewtopic.ph ... start=9600
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

Been fiddling with RA for a couple of hours (1.0.0.3-beta x86-64 build) and By Satan this is one of the least functional and intuitive things I have ever used in my digital life !

Basically several things like shaders configuration, some video settings, gamepad configuration, paths... simply won't save or load.

That thing is such a mess ! :lol:

Couldn't find any well-documented FAQ/Wiki/Troubleshooting anywhere, if you know some good place to visit please advise ! ^^"
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Floob
Posts: 81
Joined: Fri Jul 25, 2014 10:58 am
Location: UK

Re: The RetroArch Shader Thread

Post by Floob »

Here is a guide based on the Pi, but its mostly applying shaders as opposed to creating them.
https://www.youtube.com/watch?v=owsdsyIDU6A
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

Thanks Floob but I'm using using the Windows version which is nowhere near like what's on your video, and what I want to do is simply customize crt-royale and have the changes actually apply and save (which doesn't seem to work at all at the moment).

Other funny thing is I've tried setting in fullscreen tate 3:4 ... OMG it's impossible ! :lol:

EDIT: I'm starting to think RA is as bad as QMC2 (the frontend you need to study a entire year before you can even think about playing a game).

EDIT2: slowly getting used to it... is it normal that I still get slowdowns with gpu hard sync with 'sync frames: 0' on my i5 4690k (3.5-3.9GHz) + GTX 750 Ti rig ?
it works okay if i set it to '1' though...

EDIT3: somehow I managed to get this working. Too many issues though, dude told me that 1.0.0.3-beta I'm using might be too unstable. I'll try older builds.
Those terrible framerate drops I've experienced are some kind of bug, a quick fullscreen>windowed>fullscreen fixes it though, but it's tedious.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
BONKERS
Posts: 417
Joined: Thu Dec 11, 2014 10:41 am

Re: The RetroArch Shader Thread

Post by BONKERS »

You can edit the shaders themselves most times to adjust settings. (Navigate to the shaders, find the one you want. Open it with Notepad++ or something. They usually spell it out pretty well in the shaders themselves)

If a shader chain is saved you can also change/replace or remove parts of it as well in the menus.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

BONKERS wrote:If a shader chain is saved you can also change/replace or remove parts of it as well in the menus.
I see, but how do you remove a pass individually in the menu without going by the predetermined order ?

For instance there are 12 passes by default on crt-royale, decreasing the number of passes to 11 gets rid of #12 (the round/shadow border geom effect), but if I want to remove for instance pass #5, I have to follow the decremetal order down to it, removing #11 #10 #9 etc in the process. which disables things that should stay.

Maybe I don't have full control over the chain via that menu and a file edit like you recommend is the only proper way ?

PS: also i'm not sure about which mask type I am using since there are only numbers, the readme tells about aperture grille, slot mak and shadow mak, but doesn't tell which is 0, 1 and 2 in the settings.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

Re: The RetroArch Shader Thread

Post by blizzz »

Xyga wrote:PS: also i'm not sure about which mask type I am using since there are only numbers, the readme tells about aperture grille, slot mak and shadow mak, but doesn't tell which is 0, 1 and 2 in the settings.
If I remember correctly, that's written as a comment in the shader file. Personally I've given up on RetroArch.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

blizzz wrote:
Xyga wrote:PS: also i'm not sure about which mask type I am using since there are only numbers, the readme tells about aperture grille, slot mak and shadow mak, but doesn't tell which is 0, 1 and 2 in the settings.
If I remember correctly, that's written as a comment in the shader file. Personally I've given up on RetroArch.
Well I couldn't find that comment but from the looks 0 is the aperture grille, which is much more obvious when mask_specify_num_triads is set to 0 (it's more sharp and clean like this).

I'm still using the 1.0.0.3-beta build, apparently some settings names have been changed and the readme hasn't been updated yet so it's kind of confusing.

You gave up because it's too buggy and messy or sumthin ?
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
blizzz
Posts: 1150
Joined: Fri Sep 16, 2011 6:19 pm
Location: Germany
Contact:

Re: The RetroArch Shader Thread

Post by blizzz »

Code: Select all

//  Mask type: 0 = aperture grille, 1 = slot mask, 2 = EDP shadow mask
I was never really happy with the shaders. It might have looked nice for one game, but others would look horrible. The UI is also kinda annoying to navigate. All these settings just get in the way of the gameplay. I bought a new PSone which I use on my CRT now.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

Thanks.

Well yes the more I play with it the more I understand what you mean, it would require precise optimal settings for each emulated hardware/game, maybe even depending on the display's type and performance.

A lot of work indeed and not really fun. Except maybe if one likes the tuning/fiddling itself. :p

Still, when it works well it's nice, more convincing than anything I could achieve with HLSL.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: The RetroArch Shader Thread

Post by Xyga »

So, today with a pal we wanted to try and understand more about RA and that crt-royale thing.

Turned out we spend half of our time battling the disastrous interface, and the other half trying to modify the shader with no success.
Via the menus or editing the many different configuration files: NOTHING changed, no visible alterations nor any values saved.
Whatever you guys did on gamma, bloom, mask, etc...nothing worked.
(that's still 1.0.0.3-beta x64)

Older builds we got don't have royale, on beta only default settings work, and we grabbed a January build and it didn't even have a MAME core.

So if any of you guys have any reliable explanation or guide you can link to (not just bits), or a build that's complete and featuring an actually editable crt-royale (also how it can really be edited and changes saved) please I beg you: HALP! :cry:
That thing is Hell and totally under-documented/under-discussed on the interwebs.

Lettuce, if you visit please. :mrgreen:
Strikers1945guy wrote:"Do we....eat chicken balls?!"
Post Reply