no, I prefer IPS. I don't mind LCD persistence at all.Are we all basically saying that IPS panels are awful?
MAME HLSL CRT SCANLINE EMULATION PRESETS
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
On plasma I prefer scanlines off, scaled with no filtering. On LCD my preference (with MAME at least) is a low prescale value (2) with filtering enabled just to soften the edges slightly.
CRT > Plasma > LCD
Until we can simulate this amount of detail, I suspect:

CRT > Plasma > LCD
Until we can simulate this amount of detail, I suspect:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
totally depends on the type of panel. My Sony's Sharp panel looks just like a Full HD plasma set.
On better CRTs you can hardly see the individual RGB dots/pixel pattern, so at some point you have to get pretty precise about what kind of CRT you want to emulate.
On better CRTs you can hardly see the individual RGB dots/pixel pattern, so at some point you have to get pretty precise about what kind of CRT you want to emulate.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Lol ok that's confusing.BuckoA51 wrote:Colour me completely confused here then, because I thought you needed to use the Libretro port of Mame to use it with Retroarch. Since Libretro works just fine on Windows it should work?@BuckoA51:
You mean using shaders in Mame?
It doesn't work with Mame for windows, it's only possible with SDLMame for Linux/OSX as far as I know.
In Retroarch you can use shaders for all implementations. Mame being one of them, that works. And on all platforms I believe.
In Mame stand-alone for windows, it's HLSL only.
For SDL Mame stand-alone for Linux / OsX, it's GLSL. A bit like for Retroarch, just slightly different format.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
I always use the nightly version of retroarch, found here...
https://www.dropbox.com/sh/91sakv0qdyxjx9f/cGOfV7ZOKd
I use the 'crt-interlaced-halation' shader, which produces affects like this.....


But i still get that circular moire effect, that is really noticeable on white screens. Im not sure, i still think i like the way MAME HLSL settings look over RetroArch......but maybe theres a better shader to use?

https://www.dropbox.com/sh/91sakv0qdyxjx9f/cGOfV7ZOKd
I use the 'crt-interlaced-halation' shader, which produces affects like this.....


But i still get that circular moire effect, that is really noticeable on white screens. Im not sure, i still think i like the way MAME HLSL settings look over RetroArch......but maybe theres a better shader to use?

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
I think that circular effect is on purpose. I remember seeing it on some TVs with real consoles back in the days.lettuce wrote: But i still get that circular moire effect, that is really noticeable on white screens. Im not sure, i still think i like the way MAME HLSL settings look over RetroArch......but maybe theres a better shader to use?
But the black dot on the bottom of the letter C in your 3rd screenshot is a bug though.
Can be fixed by editing in your shader folder:
crt\crt-interlaced-halation\crt-interlaced-halation-pass2.cg
float r = R*acos(a);
has to be changed into
float r = FIX(R*acos(a));
(thanks to CGWG for this tip, he's the author)
For a better shader, well, depends what you're looking for.
Seems you want some light halo and bloom on top of your rendering and it's true there's nothing really better than the one you're using atm.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Tatsuya79 wrote:I think that circular effect is on purpose. I remember seeing it on some TVs with real consoles back in the days.lettuce wrote: But i still get that circular moire effect, that is really noticeable on white screens. Im not sure, i still think i like the way MAME HLSL settings look over RetroArch......but maybe theres a better shader to use?
But the black dot on the bottom of the letter C in your 3rd screenshot is a bug though.
Can be fixed by editing in your shader folder:
crt\crt-interlaced-halation\crt-interlaced-halation-pass2.cg
float r = R*acos(a);
has to be changed into
float r = FIX(R*acos(a));
(thanks to CGWG for this tip, he's the author)
For a better shader, well, depends what you're looking for.
Seems you want some light halo and bloom on top of your rendering and it's true there's nothing really better than the one you're using atm.
Ah thanks that black spot was bugging the crap out of me. Only problem with this shader is for games that have progressive sections the shader has a sort of artifact that appear and disappear rapidly, kind of like the scanlines 'jump'. Strider 2 title screen on the arcade is a good example
Last edited by lettuce on Thu Jan 09, 2014 7:19 pm, edited 2 times in total.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
For anything 480p or above anything with scanlines is terrible on my screen.lettuce wrote:Only problem with this shader is for games that have progressive sections the shader has a sort of artifact that appear and disappear rapidly, kind of like the scanlines 'jump'. Strider 2 title screen on the arcade is a good example
I just revert to a simple bilinear. That's the same for me in Mame with HLSL.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
No more black spot, yay!. But that Moire effect is bugging me.....

You can really see it on the clouds in the top right of the screen, is there anyway to remove that effect??
And a close up of the shader.....


You can really see it on the clouds in the top right of the screen, is there anyway to remove that effect??
And a close up of the shader.....

Last edited by lettuce on Thu Jan 09, 2014 7:36 pm, edited 2 times in total.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
4K Oled, no lag, something like a very customizable g-sync, + always correct scaling (ouch) = something that may beat crts at least on paper and pure figures.bulbousbeard wrote:A healthy dosage of reality? Do you honestly think that any given technology is going to be the best forever?trap15 wrote:Hahahaha what the hell are you on.bulbousbeard wrote:I have absolutely no doubts that such a display will be better than any CRT arcade monitor ever was.
Reasons CRT monitors were the best for arcade games:
* Little to no lag
* Low persistence
* Variable refresh rate
* Color quality
One by one, these are being addressed by new display technology along with the added benefits of perfect geometry, which was impossible with CRTs.
Still, crts are all about their nature: creation of lines on demand with unmatched refresh rates adaptability and per-pixel variable shape of glowing phosphors.
Fixed native resolution and lighting display technologies can't do this.
Digital technologies all have very strict limitations and there's nothing we can do about it for now.
Maybe at some point emulation combined with those fancy upcoming oled screens will be able to provide a more or less convincing imitation of the behaviour of a crt, but that would require extremely advanced algorythms that are not yet available in any existing filter/shader program.
Some extremist guy of the Cathodic Church with whom I've discussed this matter extensively believes 4K is actually not enough a resolution to run an efficient program for this.
Just writing this for science, because I'd actually love to try a (good)? 4K oled with HLSL.

But never with this silly curvature effect that messes everything.
The pics up there look awful. Lines looks like long thin torsades = wrong.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
-
- Posts: 110
- Joined: Sun Nov 03, 2013 5:17 pm
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
"If you're not lighting them up they can't persist, surely?"cools wrote:Just tried it tated. It's fine.bulbousbeard wrote:Try it on an IPS panel. It's persistence city™. Some people are more sensitive to it than others, too.
Wait a minute, were you running Varth tate'd? You have to run it tate'd to really see the effect.
I think my home laptop has an IPS panel. Not sure what's in these NECs.
Okay - I can see them blur on the really fast scrolling MK title screen (the light sky is fine). My eyes have trouble staying tracked on the scrolling parts of that though. I've checked SF2, and the upwards scrolling part of that is fine - but I'm able to focus on that properly.
But what you're saying won't be solved with anything other than high resolution so the pixels can be truly inactive. If you're not lighting them up they can't persist, surely?
My only experience is with arcade hardware (on CRTs) and MAME/emulation (on both).Fudoh wrote:interesting. Are you talking emulation or actual consoles running with something like a XRGB ?Yes, I've noticed this on big CRTs and low res games. I don't see it at all on an LCD though.
Are we all basically saying that IPS panels are awful?
You seem to be missing out on the fact that your LCD's backlight is always on. That's why you experience persistence. That's what a strobed backlight does. It turns the backlight on and off really quickly and eliminates the persistence.
You can also fake this effect in software by doubling the frames of a game (running Mortal Kombat at 108hz, for example), and making every other frame a black frame. That's similar to what GroovyMAME's strobed feature does.
Eliminating persistence has absolutely nothing to do with resolution.
I have a 144hz monitor, and strobed backlights do almost entirely eliminate all persistence on LCD screens. Go the BlurBusters site and read about it. It's confirmed. It works. Some companies have already started shipping built-in strobed backlight monitors.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Well, use crt-geom-flat.cg like me.lettuce wrote: You can really see it on the clouds in the top right of the screen, is there anyway to remove that effect??
You'll gain better contrast and crispness but no halo effect.
When you want to compare shaders easily, just copy them at the root of the shaders folder with a naming like "01- crt-halation" "02- crt-geom"...
You can then switch between them while playing with keys "n" and "m" (on qwerty keyboard).
If you're using a cgp preset you need to edit the location of the shaders of that preset.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Tatsuya79 wrote:Well, use crt-geom-flat.cg like me.lettuce wrote: You can really see it on the clouds in the top right of the screen, is there anyway to remove that effect??
You'll gain better contrast and crispness but no halo effect.
When you want to compare shaders easily, just copy them at the root of the shaders folder with a naming like "01- crt-halation" "02- crt-geom"...
You can then switch between them while playing with keys "n" and "m" (on qwerty keyboard).
If you're using a cgp preset you need to edit the location of the shaders of that preset.
the only thing with the crt-interlaced-halation shader is there inst just the 1 cgp file theres 3 passes for it.
Any way i dont appear to be able to select any shaders that have the .cg file type only .cgp
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Quote from previous page:lettuce wrote: the only thing with the crt-interlaced-halation shader is there inst just the 1 cgp file theres 3 passes for it.
Any way i dont appear to be able to select any shaders that have the .cg file type only .cgp
...you also have plenty of single pass shaders (cg files) you can use directly by changing the option of the 1st pass shader.
In settings -> video -> shader you specify "1 pass" and then click on "shader #0" to select a single pass shader.
For your cgp file, open it in a text editor and change the path to the files. (alternatively, copy the files/folder at the same level)
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
I got retroarch going last night has alot of potential looks rly good, i was using the default ntsc filters, managed to turn off the flickering after some digging into the files. now to figure out the rest lol.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Download and played with Retroarch a little. When I tried the crt-interlaced-halation filter it only displayed in a small portion of the screen. Is there something I don't have setup right?
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Could be several things.cmoses wrote:Download and played with Retroarch a little. When I tried the crt-interlaced-halation filter it only displayed in a small portion of the screen. Is there something I don't have setup right?
Perhaps it doesn't play well with the resolution of your screen.
If that's with bsnes core I think there are some issues with shaders atm.
GPU driver issue, try to update or use d3d instead of opengl in retroarch "drivers" menu.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Tested on a laptop running at 1366x768. Using MAME core. Tried OpenGL and d3d. Both worked the same. The NTSC file worked fine and displayed in full screen, but the CRT one does not.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
I'm not sure NUeda, RetroArch is in no way as user friendly as MAME, for instance just search for Roms they are all listed as there rom file names not game names, the button configurations for mame seem to be messed up (I think for the analog triggers, and stick push buttons they seem to be hard coded to keyboard inputs and are not recognised as pad buttons). Your unable to assign different shaders to specific games, so for a game where a certain shader doesn't look right you'd physically have to change the shader in the video options there's no 'on the fly' swapping like there is in mame thanks to your ini creator program. Basically RetroArch just isn't as configurable as Mame can be at this point in time.NUeda wrote:I'm about 90% convinced that I will be switching over to retroarch for good.
(I put up a fight for about a day, but I can't resist it anymore.)
The range of options and functionality in Retroarch is like
using different HLSL engines,
and using multiple instances of them at the same time.
It works with any emulator
(if someone has imported the emulator core)
and
it will work on any platform.
(Windows, Linux, OS X, Android, Wii, PS3, Xbox, Xbox 360, BlackBerry 10)
Granted, switching over will force me to
drop the MAME + HLSL setup I've been using and get accustomed to MAME + Retroarch's setup and UI,
which I feel is rather user-unfriendly at this point,
but what can I do,
Retroarch simply has more options for tweaking the visual look of my games.
It finally sold me when I learned Retroarch can do 60 Hz CRT flicker if you are using a 120 Hz monitor.
I hate to say this,
but I think I will be switching over to Retroarch preset development
once I finish up on supporting the games that were requested for INI creator.
The next release of INI creator will be the last. (and maybe one more after that to correct any issues)
If you have any game that you want supported, please mention its name now.
MAME can also play all the console games RetroArch does as well by using either MESS or UME, and HLSL settings can be applied to these systems also. This would probably be a lot easier as the majority of console games only use 2-3 res modes so not many different HLSL setups would be needed. I'm not say don't working with RetroArch I'm just suggesting don't drop MAME and the work you have done so far in favour for RetroArch, as I think when you consider all the pros and cons MAME is still the better solution.
Regarding the CRT 60hz flicker on a 120hz display, I think you should look up GroovyMAME, I'm sure that has a option for a similar effect, as for me is probably one of the best MAME variants
Last edited by lettuce on Sat Jan 11, 2014 2:39 pm, edited 1 time in total.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Went back to my Retroarch today, fired it up and it crashed instantly, spent the better part of an hour trying to figure out how to download the latest version, cores etc, bouncing around Github (am I supposed to download and complie this myself?) about ready to give up now. It really isn't user friendly at all.
OSSC Forums - http://www.videogameperfection.com/forums
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
BuckoA51, use this nightly build.....
https://www.dropbox.com/sh/91sakv0qdyxjx9f/cGOfV7ZOKd
Has all the popular shaders and all the cores included
https://www.dropbox.com/sh/91sakv0qdyxjx9f/cGOfV7ZOKd
Has all the popular shaders and all the cores included
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Oh it happened to me at first.BuckoA51 wrote:Went back to my Retroarch today, fired it up and it crashed instantly, spent the better part of an hour trying to figure out how to download the latest version, cores etc, bouncing around Github (am I supposed to download and complie this myself?) about ready to give up now. It really isn't user friendly at all.
Usually try to delete \shaders\retroarch.cgp
It's the savefile of your last shader setting. If the last shader you tried had issues and crashed, retroarch will try to load it again because of that file.
It's recreated when you select a new shader.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
I have tried downloading this build referenced in a couple of posts, but keep getting an error 500 from Dropbox. Any idea why?lettuce wrote:BuckoA51, use this nightly build.....
https://www.dropbox.com/sh/91sakv0qdyxjx9f/cGOfV7ZOKd
Has all the popular shaders and all the cores included
Thanks!
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Nightly builds! Fun! I'll give those suggestions a go, thanks. For now I think I'll stick to regular Mame for Mame though.
OSSC Forums - http://www.videogameperfection.com/forums
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Hi folks been messing with the hlsl in mamplus 152 with dangun feveron for a while on a 1440p monitor . Heres what i come up with =
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 1
hlslpath hlsl
hlsl_prescale_x 7
hlsl_prescale_y 7
hlsl_preset -1
hlsl_write 1
hlsl_snap_width 2560
hlsl_snap_height 1440
shadow_mask_alpha 0.20
shadow_mask_texture Shadowmask_Twisty.png
shadow_mask_x_count 320
shadow_mask_y_count 240
shadow_mask_usize 0.18750
shadow_mask_vsize 0.21875
curvature 0.03
pincushion 0.03
scanline_alpha 1.0
scanline_size 1.0
scanline_height 0.6566
scanline_bright_scale 1.15
scanline_bright_offset 0.0
scanline_jitter 0.05
defocus 1.5,1.5
converge_x -0.3,0.0,0.3
converge_y -0.3,0.0,0.3
radial_converge_x 0.0,0.0,0.0
radial_converge_y 0.0,0.0,0.0
red_ratio 1.0,0.0,0.0
grn_ratio 0.0,1.0,0.0
blu_ratio 0.0,0.0,1.0
saturation 0.95
offset -0.15,-0.16,-0.16
scale 1.15,1.16,1.16
power 1.1,0.95,0.8
floor 0.01,0.01,0.01
phosphor_life 0.0,0.0,0.0
#
# NTSC POST-PROCESSING OPTIONS
#
yiq_enable 0
yiq_cc 3.59754545
yiq_a 0.5
yiq_b 0.5
yiq_o 1.570796325
yiq_p 1.0
yiq_n 1.0
yiq_y 6.0
yiq_i 1.2
yiq_q 0.6
yiq_scan_time 52.6
yiq_phase_count 2
#
# VECTOR POST-PROCESSING OPTIONS
#
vector_length_scale 0.8
vector_length_ratio 500.0
#
# BLOOM POST-PROCESSING OPTIONS
#
vector_bloom_scale 0.3
raster_bloom_scale 0.17
bloom_lvl0_weight 1.0
bloom_lvl1_weight 0.21
bloom_lvl2_weight 0.19
bloom_lvl3_weight 0.17
bloom_lvl4_weight 0.15
bloom_lvl5_weight 0.14
bloom_lvl6_weight 0.13
bloom_lvl7_weight 0.12
bloom_lvl8_weight 0.11
bloom_lvl9_weight 0.10
bloom_lvl10_weight 0.09
# CORE SCREEN OPTIONS
#
brightness 0.99
contrast 0.85
gamma 0.75
pause_brightness 1.0

# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 1
hlslpath hlsl
hlsl_prescale_x 7
hlsl_prescale_y 7
hlsl_preset -1
hlsl_write 1
hlsl_snap_width 2560
hlsl_snap_height 1440
shadow_mask_alpha 0.20
shadow_mask_texture Shadowmask_Twisty.png
shadow_mask_x_count 320
shadow_mask_y_count 240
shadow_mask_usize 0.18750
shadow_mask_vsize 0.21875
curvature 0.03
pincushion 0.03
scanline_alpha 1.0
scanline_size 1.0
scanline_height 0.6566
scanline_bright_scale 1.15
scanline_bright_offset 0.0
scanline_jitter 0.05
defocus 1.5,1.5
converge_x -0.3,0.0,0.3
converge_y -0.3,0.0,0.3
radial_converge_x 0.0,0.0,0.0
radial_converge_y 0.0,0.0,0.0
red_ratio 1.0,0.0,0.0
grn_ratio 0.0,1.0,0.0
blu_ratio 0.0,0.0,1.0
saturation 0.95
offset -0.15,-0.16,-0.16
scale 1.15,1.16,1.16
power 1.1,0.95,0.8
floor 0.01,0.01,0.01
phosphor_life 0.0,0.0,0.0
#
# NTSC POST-PROCESSING OPTIONS
#
yiq_enable 0
yiq_cc 3.59754545
yiq_a 0.5
yiq_b 0.5
yiq_o 1.570796325
yiq_p 1.0
yiq_n 1.0
yiq_y 6.0
yiq_i 1.2
yiq_q 0.6
yiq_scan_time 52.6
yiq_phase_count 2
#
# VECTOR POST-PROCESSING OPTIONS
#
vector_length_scale 0.8
vector_length_ratio 500.0
#
# BLOOM POST-PROCESSING OPTIONS
#
vector_bloom_scale 0.3
raster_bloom_scale 0.17
bloom_lvl0_weight 1.0
bloom_lvl1_weight 0.21
bloom_lvl2_weight 0.19
bloom_lvl3_weight 0.17
bloom_lvl4_weight 0.15
bloom_lvl5_weight 0.14
bloom_lvl6_weight 0.13
bloom_lvl7_weight 0.12
bloom_lvl8_weight 0.11
bloom_lvl9_weight 0.10
bloom_lvl10_weight 0.09
# CORE SCREEN OPTIONS
#
brightness 0.99
contrast 0.85
gamma 0.75
pause_brightness 1.0

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Btw, is there a similar pack for mess consoles like NUeda's arcade ini's?
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Quoting myself to come back to this point as I found a page about those old RGB monitors.Tatsuya79 wrote:...
But to come back to this CRT emulation subject, cgwg crt-geom-flat shader has some advantages over HLSL:
-it does interpolation in linear gamma, that's a really great feature which makes brighter colors wider than darker ones (I believe, something like that!).
It gives a feeling I never had in emulation before, see those pictures here: this is bilinear + scanline, here cgwg shader with this effect.
That looks a lot like what I remember on a real snes with one of those CRT low res monitors we had at this time. Best picture quality I remember.
I experienced using one of those more than 20 years ago, something that makes you wonder "Am I idealizing this now?".
But this guy here made some comparison shots on the real hardware that confirms the memories I had.
So, yes, that's really close to what I wanted: best signal possible while keeping those black edges in check with the linear interpolation in gamma.
Of course, if you want the RGB rendering of a TV that's something quite different.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
I signed up just to say thanks for this guide. I'm currently battling getting rid of the moire effect on a few games. It shows up real bad on kung fu master and elevator action. I'm using a 1080p Samsung lcd. I'll post what I did if I find a solution. Reducing the brightness has helped. It doesn't show up too badly on killer instinct and other games with darker pixels.
Re: MAME HLSL CRT SCANLINE EMULATION PRESETS
Any updates NUeda on what you'll be doing carrying on with Mame or moving over to RetroArch?