Emulation Shader recommendations

The place for all discussion on gaming hardware
User avatar
Skykid
Posts: 17646
Joined: Sun Nov 18, 2007 2:16 pm
Location: Planet Dust Asia

Emulation Shader recommendations

Post by Skykid »

Hi guys,

I'm looking into Shaders for use on Retroarch mainly, and I think this is a great forum for advice since we're probably likeminded about what looks good.

I'd like to find shaders that simulate PVM/BVM style RGB displays, but I'm open to tinkering with others too. I already found a few that basically make the picture look like shitty component, but boy, there's nostalgia there still! It's a kind of magic on an LCD display.

Lightweight is preferred of course. I noticed certain shaders slow my Mac emulation right down, whereas others make no perceptible difference.

I also heard shaders can have their settings tweaked, but I have no idea how to do this.

Anyway, your recommendations would be appreciated!
Always outnumbered, never outgunned - No zuo no die

User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: Emulation Shader recommendations

Post by Xyga »

Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

a related question: I'm trying to increase the scanline density on the shader I usually use on my Pi, but Retroarch on the Pi doesn't offer the options. Doesn't the PC version of Retroarch have options that will alter the glsl shader file for your accordingly ??
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

I think there's no parameters for the glsl format.
You need to tweak the cg shader and then convert it to glsl.

You can follow this method here:
http://libretro.com/forums/showthread.p ... #post28176

edit: I see parameters in crt-pi so I wonder after all! I'm using cg usually so I dont know.
Can you see something when inside a game, going to the quick menu -> shaders -> Preview Shader Parameters?

I should explain here as that's a question from the 1st post:
-this Preview Shader Parameters Menu can be used to display the changes in real time
-then Menu Shader Parameters is where you make your changes before pushing "Save Shader Preset as" to get them saved (Preview changes are ignored)

Yeah it's a bit convoluted.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

Can you see something when inside a game, going to the quick menu -> shaders -> Preview Shader Parameters?
no. Retroarch quits when I choose this option.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

Try to go to "Online Updater" -> "Update GLSL Shaders"

Then launch a game, in Quick Menu -> Shaders -> Load Shader Preset -> \shaders_glsl\crt\crt-pi.glslp

If now you don't have the parameters perhaps you could try to update Retroarch.

I loaded that crt-pi.glslp and the parameters are working.
I'm on windows but people seem to have no problem on the Pi.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

Recalbox is kind of streamlined version of RetroPie which removed quite a bit of excessive coding and options. I wanted to try the CRT_PI shader anyway though and will do that. Maybe it depends on the shader in question wether the options are available or not.

Do you have CRT_CALIGARI on your setup ? Maybe you could try it. I like it lot and really would just to increase the scanlines density bit a little bit.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

I see, you want a more Nearest filtering/BVM look?
Then you'll think crt-pi is too blurry.

crt-caligari is one of those that has parameters in cg but is then converted with the script in glsl and loses them.
But as I have everything set-up I converted it with thicker lines:

See if that's OK for you.

(you select it by clicking the "Shader #0" line as it's not a preset but the shader directly)
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

huh, thanks! I'll try that ASAP and report back.

EDIT: and I just tried. Exactly what I was looking for - thanks! Maybe a bit too strong, but I already checked which parameter got changed and will try a few other values between the original value and yours. Thanks a lot!
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

And @Skykid: that's exactly the shader you're looking for!
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

No problem, I can remake it if you want.
I'm not sure if changing values in that unreadable code will be good at all!

I just changed "CRTCaligari Spot Height" from 0.65 to 0.5.
I could put 0.55 or 0.6?

Or you could also try crt-hyllian if you can tweak the parameters to make it sharper with thicker scanlines.
Should be a bit more BVM alike.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

I just changed "CRTCaligari Spot Height" from 0.65 to 0.5.
I know, it's there in the file

original: _v_weight_10 = _dy/6.49999976E-01;
yours: _v_weight_10 = _dy/5.00000000E-001;

I can manage that :mrgreen:

I tried almost all of the other shaders. This one offers the best balance between looks and CPU/GPU limitations by the Pi hardware.
Chocograph
Posts: 104
Joined: Wed Apr 22, 2015 8:43 am

Re: Emulation Shader recommendations

Post by Chocograph »

Crt-Kurozumi is the one you want. I use either that or Crt-Royale.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

Chocograph wrote:Crt-Kurozumi is the one you want. I use either that or Crt-Royale.
It's the most expensive of them all though.
Chocograph
Posts: 104
Joined: Wed Apr 22, 2015 8:43 am

Re: Emulation Shader recommendations

Post by Chocograph »

I have the i7 3770k, msi 970 and I guess that's good enough because I don't notice performance issues no matter what shader I try. I'm also amazed at what FEELS like non-existing input lag on my 144hz benq. I love it. I also put homebrew on my 3DS for fun and set up retroarch for the NES and SNES library. looks ace. 1:1. OPTIONS.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

haha, yeah, I'm with you. Unfortunately the Pi doesn't have anywhere the power of your rig. Even 1080p with CRT-Caligari isn't flawless with all emus.
Chocograph
Posts: 104
Joined: Wed Apr 22, 2015 8:43 am

Re: Emulation Shader recommendations

Post by Chocograph »

I've looked at the PI models because I wanted one of those too but I was just checking prices on ebay. I have zero clue how to set it up and I can only speculate (or google) about the input lag. Input lag is a huge deal for me. It's why I got the framemeister so I could put away the crt. I might get a PI one day. It's got cool cases.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

I have zero clue how to set it up
couldn't be easier. You download the Recalbox (or Retropie) image, put it onto a Micro SD card, insert it into your Pi, switch it on and wait for a few minutes. Done. You don't even need a keyboard.
and I can only speculate (or google) about the input lag.
heavily depends on the systems. With PCE I get barely a single frame above my display's lag (which makes it faster than the Framemeister). NeoGeo feels great as well. SNES is more laggy and can be fine tuned.
User avatar
Blair
Posts: 681
Joined: Mon May 11, 2015 5:59 am
Location: America

Re: Emulation Shader recommendations

Post by Blair »

Fudoh, I haven't used to the raspberry pie version of retroarch but but I do have quite a bit of experience with the x86 and console versions.

(are you connecting this to your main gaming TV?)

does your version have the "tvout+interlacing" shader? (in my opinion it's the best way to create that BVM/PVM look and it also has an alternating scanline feature like the OSSC) I made a few post about it in the HLSL CRT SCANLINE EMULATION thread (with some pictures comparing it to actual CRTs)

http://shmups.system11.org/viewtopic.ph ... r#p1196201

http://shmups.system11.org/viewtopic.ph ... r#p1198588

once again I'm not sure how the pie version handles it but I've noticed with retroarch (in general), that I have to turn on and off integer scaling every time you load a new game to get the settings just perfect (as some games have different resolutions even on the same system). (so whenever I load a game, I make sure to adjust the integer settings)

whenever I use retroarch to adjust the internal options of shaders, I always go to the shader menu and adjust the "Preview Shader Parameters" setting on a game by game basis. (but this is only because I mess around with dithering options, most people will find a specific combination they like and just dial it in by saving the shader preset).

it has an option you can adjust to approximate the TVL or lines of resolution to match the tube your attempting to emulate (for instance most of the time I use 800 to emulate a Sony PVM 20L5 which has 800TVL) (although most people usually set it to 1024 TVL for the most razor-sharp image possible)

if your integers are correct, it should give you the proper scanline pattern for whatever game you're using, but the default scanlines are similar to the OSSC's 720P mode (little thin for my tastes) enabling the mode "Top Field First Enable" creates the thicker, more natural looking scanlines (on older versions of the shader I believe this was enabled by default)

(here's a picture of the shader tvout+interlacing being used on a Sony FW900 at sextuple PCE resolution)
Spoiler
Image
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

does your version have the "tvout+interlacing" shader?
that's a shader package that uses three stacked shaders. The Pi isn't able to handle this.

But I agree, your pics look very nice!
User avatar
Blair
Posts: 681
Joined: Mon May 11, 2015 5:59 am
Location: America

Re: Emulation Shader recommendations

Post by Blair »

thank you! it was a pretty fun project I must say.

and it definitely helped me figure out what look I wanted to achieve with my retro games. (as long as I have decent scanlines on a monitor with good motion resolution I'm not really concerned with emulating dot structure, or any of the more "fuzzy" aspects of older nonprofessional CRTs)

stacked shaders? that's interesting. would you be able to just download the regular tvout+interlacing cg file from the repository and use that? ( from what I remember it's pretty lightweight, especially if you turn off alternating scanlines).

how many shader passes can the pie use?


this has me thinking about those refurbished Nvidia shield TV android consoles. they have tons of power and would probably make for some excellent little emulation boxes (retroarch seems to run pretty well on android). some of them should be able to use integer scaling at 4K resolutions. (the video chips on those should allow for some fairly advanced shaders) and for $99 (for a refurbished model that is, brand-new I think they cost $199) that might just be the ticket for a similar project. although the raspberry pie and orange pie are definitely much more budget friendly.
Last edited by Blair on Thu Aug 18, 2016 12:06 pm, edited 3 times in total.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

stacked shaders?
yes, you can just open the glsp file and see which "genuine" shaders are actually used.
that's interesting. would you be able to just download the regular tvout+interlacing cg file from the repository and use that? ( from what I remember it's pretty lightweight, especially if you turn off alternating scanlines).
sure, I'll give it a try.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

Forgot to mention there is a glsl optimizer here that can make some shaders usable on the pi.
Something interesting to try.
strygo
Posts: 506
Joined: Sun Mar 05, 2017 5:47 am
Location: Snohomish, WA

Re: Emulation Shader recommendations

Post by strygo »

The wealth of info buried in these forums continues to impress me. The shader you guys have discussed in this thread is definitely my favorite so far, but this thread is quite old. Have there been any major developments in the meantime?

Like the OP, I'm looking for a shader that looks like a PVM.

Fudoh: what value did you end up settling on?
User avatar
Blair
Posts: 681
Joined: Mon May 11, 2015 5:59 am
Location: America

Re: Emulation Shader recommendations

Post by Blair »

strygo wrote: Like the OP, I'm looking for a shader that looks like a PVM.
on what hardware config? (raspberry-pi or a pc?)
strygo
Posts: 506
Joined: Sun Mar 05, 2017 5:47 am
Location: Snohomish, WA

Re: Emulation Shader recommendations

Post by strygo »

A RaspberryPi running RetroPie. The one that is discussed in the thread is nice. I'm just wondering if anyone has improved upon it in the last year or so.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Emulation Shader recommendations

Post by Fudoh »

I stacked a little gamme correction on top and sometimes I use CRT-pi instead because of the barrel effect.

I would like to see CRT Caligari stacked with a barrel effect though.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Emulation Shader recommendations

Post by Tatsuya79 »

Not many options with a Pi sadly.

What I use on my phone which has the same crappy Mali400 GPU is retro/quilez.glsp.
It's in between nearest and bilinear to fix the shimmering without getting too blurry.
It's good on a small screen where you don't really need scanlines (or if you simply don't like them).
strygo
Posts: 506
Joined: Sun Mar 05, 2017 5:47 am
Location: Snohomish, WA

Re: Emulation Shader recommendations

Post by strygo »

I'm not a big fan of the barrel effect, but I do find the scanlines to be a must.

The CRT caligari thicker is my favorite across the ones I've tested.

Fudoh: what gamma correction have you applied?
Patrickbot
Posts: 19
Joined: Sat Sep 01, 2018 4:23 pm

Re: Emulation Shader recommendations

Post by Patrickbot »

EDITED 3/13/2019
My perspective. Most CRT shaders are either greatly exaggerating certain aspects of a CRT, or they aren't going for objective picture quality. Most shaders deliberately add artifacts or exaggerate what a CRT does for the sake of nostalgia or some dubious notion of "authenticity." A lot of shaders try to emulate both scanlines AND the RGB mask, which even the brightest LED-lit LCDs are incapable of compensating for, so shaders try to compensate for the lost brightness by jacking with color levels, black level, contrast, gamma, etc.- all of which compromises the image quality. Most shaders also add a lot of blur to the image to try to replicate a CRT's phosphor glow and natural gaussian blur. None of them accomplish this very well IMO and they all make the motion blur on an LCD even worse to the point where I can't tolerate it.

Currently, I just do the following on an LCD:
I avoid adding any additional blur and just use nearest neighbor and integer scaling. 5x vertical scale will crop some of the image, but the amount that is cropped is outside of the CRT safe zone.

I add 1:1 scanlines using the scanline-fract shader and then adjust my backlight to 100% to compensate. At 80% scanline strength and 3 pixels wide, the scanlines are a 50% reduction in brightness per line at 5x scale.

The only other thing I do to the image is gamma correction, using the image-adjustment shader. The output of the CRT shaders I've tried is too blurry when things are in motion on an LCD, even with a 2 ms response time.
Last edited by Patrickbot on Wed Mar 13, 2019 11:03 pm, edited 9 times in total.
Post Reply