shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Fri Nov 16, 2018 1:56 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 9:36 am 


User avatar

Joined: 18 Nov 2007
Posts: 17510
Location: Planet Dust Asia
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

ChurchOfSolipsism wrote:


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 10:42 am 


User avatar

Joined: 05 Nov 2013
Posts: 6243
Location: Craig's
This maybe ? http://libretro.com/forums/showthread.php?t=4937
_________________
mycophobia wrote:
have tyou ever played dodponpatchi


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 10:48 am 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
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 ??


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 11:35 am 


User avatar

Joined: 07 Jan 2014
Posts: 119
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 12:00 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
Quote:
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 12:32 pm 


User avatar

Joined: 07 Jan 2014
Posts: 119
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 1:42 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 2:26 pm 


User avatar

Joined: 07 Jan 2014
Posts: 119
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)


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 2:40 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
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!


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 3:05 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
And @Skykid: that's exactly the shader you're looking for!


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 3:34 pm 


User avatar

Joined: 07 Jan 2014
Posts: 119
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 4:21 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
Quote:
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 4:40 pm 



Joined: 22 Apr 2015
Posts: 104
Crt-Kurozumi is the one you want. I use either that or Crt-Royale.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 4:55 pm 


User avatar

Joined: 07 Jan 2014
Posts: 119
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 5:26 pm 



Joined: 22 Apr 2015
Posts: 104
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 5:33 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 5:36 pm 



Joined: 22 Apr 2015
Posts: 104
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Aug 17, 2016 5:41 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
Quote:
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.

Quote:
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Thu Aug 18, 2016 8:32 am 


User avatar

Joined: 11 May 2015
Posts: 658
Location: America
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.php?f=6&t=45026&p=1196201&hilit=+shader#p1196201

http://shmups.system11.org/viewtopic.php?f=6&t=45026&p=1198588&hilit=+shader#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: show
Image


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Thu Aug 18, 2016 8:52 am 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
Quote:
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!


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Thu Aug 18, 2016 11:56 am 


User avatar

Joined: 11 May 2015
Posts: 658
Location: America
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.

Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Thu Aug 18, 2016 11:59 am 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
Quote:
stacked shaders?

yes, you can just open the glsp file and see which "genuine" shaders are actually used.

Quote:
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Fri Aug 19, 2016 9:39 am 


User avatar

Joined: 07 Jan 2014
Posts: 119
Forgot to mention there is a glsl optimizer here that can make some shaders usable on the pi.
Something interesting to try.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Fri Aug 25, 2017 3:42 pm 



Joined: 05 Mar 2017
Posts: 315
Location: Woodinville, WA
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?


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Sat Aug 26, 2017 10:07 am 


User avatar

Joined: 11 May 2015
Posts: 658
Location: America
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?)


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Sat Aug 26, 2017 6:48 pm 



Joined: 05 Mar 2017
Posts: 315
Location: Woodinville, WA
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Sat Aug 26, 2017 7:05 pm 


User avatar

Joined: 06 Mar 2006
Posts: 11370
Location: Germany
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.


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Sat Aug 26, 2017 11:15 pm 


User avatar

Joined: 07 Jan 2014
Posts: 119
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).


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Sun Aug 27, 2017 1:13 am 



Joined: 05 Mar 2017
Posts: 315
Location: Woodinville, WA
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?


Top
 Offline Profile  
 
 Post subject: Re: Emulation Shader recommendations
PostPosted: Wed Oct 31, 2018 6:28 pm 



Joined: 01 Sep 2018
Posts: 12
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."

scanlines - perfect scanlines should be 1:1, or a 50% reduction in objective brightness per line.

Blur - most shaders add blur to the image to try to hide the scaling artifacts that result from non-integer scaling. This doesn't really work IMO and the result is just a blurry image with scaling artifacts. CRTs weren't really blurry; this is a total misconception regarding how CRTs worked and what they looked like. CRTs had a lower resolution, certainly, but a low resolution image is not the same as a blurry image. The correct way to deal with scaling artifacts is to always use integer scaling, and to set a custom aspect ratio. Both options are under "video settings" in Retroarch.

Fake glow/halation - I really don't get why people want this effect. I get REAL halation by simply cranking up the backlight on my TN panel to 100%, and turning off the room lights. IPS panels have obvious halation already. This has the added benefit of being "free," performance-wise. :P Fake glow effects are deliberately adding artifacts and degrading the objective image quality, and usually come with a high performance cost.

Aspect ratio - it's more important to eliminate scaling artifacts than it is to get a perfect 4:3 AR. It's not possible to get a perfect 4:3 AR using integer scaling.

Altered colors/brightness - to compensate for the loss of brightness that results from mask and scanline effects, most shaders alter the original colors or brightness, further degrading the objective image quality and usually resulting in clipping.

The correct way to compensate for lost brightness from RGB and mask effects on an LCD is to crank up the display backlight setting to 100% (or brightness if backlight is unavailable). This leaves the color values unaltered. If you want to emulate a CRT, you need all the brightness you can get out of an LCD.

With the right shader settings at 1080p we can emulate a "perfect" 360 TVL* RGB CRT with no color bleed and perfect sharpness, with brightness/luminance that matches that on a CRT. This can be done with a very lightweight approach that will work on low powered systems like the Pi.

*for reference, a 20" TV from the 80s or 90s had a TVL of around 300, pro monitors usually started at 400 TVL, and broadcast monitors are 900 TVL and higher.

First, we need to combine the scanlines from "zfast CRT" with the aperture grille effect from "dotmask." This is best done by combining the code into a single shader. Here is a link to the combined shader file:

https://www.dropbox.com/s/gduz08gnxqjxt ... .glsl?dl=0

Video options: We need to disable video smoothing/bilinear filter in the video options, and enable integer scaling. Then we need to select "custom aspect ratio" and set the "custom aspect ratio width/height."

Under shader settings:
shader pass #0: image-adjustment
shader #0 filter: don't care
shader #0 scale: 1x

changes to parameter settings:
input gamma - 2.20, output gamma - 2.40. This corrects the gamma to CRT gamma.

All other settings left at defaults.

shader pass #1: zfast_crt+dotmask
shader #1 filter: nearest
sahder #1 scale: don't care

parameter settings:
scanline darkness low - 9.00. This makes the scanlines as close to 1:1 as possible.
X-axis blur - 0.00. Any amount of added blur degrades the objective picture quality and increases eye strain.
dark pixel brightness boost - 1.00. This leaves the colors unaltered.
mask effect amount - 0.00. This disables the mask effect from zfast.
mask/scanline fade - 0.00. This leaves the brightness of the scanlines unaltered.
mask style - 2.00. This enables the aperture grille mask effect.
mask light- 2.00. This increases the brightness, but may lead to clipping on some displays. A color bars test pattern should be used to adjust this setting to the highest level possible with no clipping.

All other settings left at defaults.

Remember to adjust the display backlight to 100% when using these settings.

Limitations:
Brightness. Even though today's LED-lit LCDs are much brighter than CRTs were, the mask and scanline effects cause so much brightness to be lost that this is still a limiting factor. A compromise has to be made between mask strength/accuracy and brightness, even with the backlight at 100%. If we increase "mask light," this leads to clipping. If we decrease "mask dark," we get color bleed and an unacceptably dark image.

Resolutions. At 1080p, we run into problems with the RGB mask, which needs a horizontal integer scale that is a multiple of 3 to avoid introducing color bleed when the mask strength is increased. A 6x5 scale works very nicely for NES and SNES, but results in too much stretching with other systems. If we use a 3x scale at 1080p, it results in a huge amount of letterboxing which wastes a ridiculous amount of screen real estate (more than 50%).

To solve these problems we need a display with at least 1440p resolution and we need HDR, which is almost exclusive to 4k and higher displays. Today's 1080p displays are merely a stopgap technology when it comes to accurate CRT emulation. If we want to emulate a realistic glow effect in addition to the scanlines and RGB mask, we need at least 4k resolution, possibly higher.

Example:

Spoiler: show
Image


Last edited by Patrickbot on Sat Nov 10, 2018 11:04 pm, edited 7 times in total.

Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: Konsolkongen, Lawfer, MetalMilitia, Sirotaca and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group