MAME HLSL CRT SCANLINE EMULATION PRESETS

The place for all discussion on gaming hardware
MonkeyJug
Posts: 6
Joined: Fri May 20, 2011 11:46 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by MonkeyJug »

anyone got any nice hlsl settings for mame 0.153?

i'm not sure why, but the default ones (enabled by just turning hlsl from 0 to 1 in mame.ini) are rubbish!

i had a little tinker with wonderboy and thought they looked ok on my 1080 plasma, then fired up my cabinet - not even close!!

i'm struggling to get the blackness inbetween the scanlines to be jet black like on my cabinet - it's hard to explain!
User avatar
Overkill
Posts: 513
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

Just use Nueda's INI Creator v0.3 (50 systems + 51 ROMs + EXTRA), it's on page 12 of this thread http://shmups.system11.org/viewtopic.ph ... &start=330 It's from MAME 0.152 but is working great on MAME 0.153.
MonkeyJug
Posts: 6
Joined: Fri May 20, 2011 11:46 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by MonkeyJug »

thanks - the links are broken though... :(
User avatar
Overkill
Posts: 513
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

argh, didn't notice that :( i will try to found it on my computer and send it through email
jedman
Posts: 99
Joined: Wed May 07, 2014 8:09 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by jedman »

Hi

I just read through this thread, would be interested to try out Nueda's settings, any chance someone could send them to me, or reupload them.

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

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

Been using a new shader for retroarch, has a nice bloom effect.....


Image

Image

Image Image

Image
Last edited by lettuce on Sat May 24, 2014 5:56 pm, edited 10 times in total.
User avatar
Overkill
Posts: 513
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

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

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

Image
User avatar
Overkill
Posts: 513
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

Hi

I just read through this thread, would be interested to try out Nueda's settings, any chance someone could send them to me, or reupload them.

Many thanks
Download in instructions here: http://mame-hlsl-gallery.blogspot.pt/p/blog-page.html

all credits goes to Nueda
mremulator
Posts: 26
Joined: Mon May 26, 2014 10:05 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mremulator »

I've read this very interesting thread a few times through over the weekend and registered to clarify a few things.

I translated this thread:

http://www.google.com/translate?hl=en&i ... 18991.html

The OP of the aforementioned thread has modified the post.fx file (as mentioned here a few times), however, nobody has mentioned that if you set the shadow_mask_x / y_count values to "-2" it sets the Mask-Count automatically, therefore, you no longer have to set the correct resolution for each game/driver.

He also states that shadow_mask_u / v size should be set to "0.375" for both. The general consensus here is that "shadow_mask_usize" should be something like "0.09375" and "shadow_mask_vsize" set to "109375". Basically, both different values from each other and also much higher?

In addition, has anyone noticed that if you set "hlsl_prescale_x" & "hlsl_prescale_y" to "0", it forces linear filtering? Even if you set this MipFiler, MinFilter % MagFilter to "NONE;" under "sampler DiffuseSampler = sampler_state" in the post.fx file?? So basically, even with these values set to "NONE;" AND defocus set to "0" it STILL filters/blurs the image? Is this a bug perhaps?

Anyway, these are the settings I'm using globally at the moment, which look VERY close to my brand new 19" Hantarex 15Khz CRT inside my fully restored OutRun cabinet:

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 1
hlslpath hlsl
hlsl_prescale_x 0
hlsl_prescale_y 0
hlsl_preset -1
hlsl_write
hlsl_snap_width 1920
hlsl_snap_height 1080
shadow_mask_alpha 0.05
shadow_mask_texture crt_slot_mask.png
shadow_mask_x_count -2
shadow_mask_y_count -2
shadow_mask_usize 0.375000
shadow_mask_vsize 0.375000
curvature 0.150000
pincushion 0.030000
scanline_alpha 0.40
scanline_size 1.0
scanline_height 1.5
scanline_bright_scale 1.0
scanline_bright_offset 0.60
scanline_jitter 0.05
defocus 0.0,0.0
converge_x -0.1,0.0,0.1
converge_y 0.1,0.0,-0.1
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 1.0
offset 0.0,0.0,0.0
scale 1.0,1.0,1.0
power 1.0,1.0,1.0
floor 0.01,0.01,0.01
phosphor_life 0.0,0.0,0.0

I've also turned the gamma down to "0.90" globally and set the "scanline_height" to "1.5".

Rgds.

8)
Last edited by mremulator on Mon May 26, 2014 7:09 pm, edited 2 times in total.
robneal81
Posts: 43
Joined: Sun Oct 07, 2012 1:45 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by robneal81 »

I downloaded this and it looks great, however it slows mame down to a crawl. I even tried a fresh install of mame and it ran perfect...but as soon as I installed this, it runs so slow, it's unplayable. Has this happened to anyone else?
mremulator
Posts: 26
Joined: Mon May 26, 2014 10:05 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mremulator »

robneal81 wrote:I downloaded this and it looks great, however it slows mame down to a crawl. I even tried a fresh install of mame and it ran perfect...but as soon as I installed this, it runs so slow, it's unplayable. Has this happened to anyone else?
What GPU are you using?
robneal81
Posts: 43
Joined: Sun Oct 07, 2012 1:45 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by robneal81 »

mremulator wrote:What GPU are you using?
NVidia GeFore GT 740M, that's built into my laptop.

Edit: If I create a profile for Mame in the NVidia Control Panel, it works better, but still choppy. Without the filters, it runs perfectly smooth.
mremulator
Posts: 26
Joined: Mon May 26, 2014 10:05 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mremulator »

robneal81 wrote:
mremulator wrote:What GPU are you using?
NVidia GeFore GT 740M, that's built into my laptop.

Edit: If I create a profile for Mame in the NVidia Control Panel, it works better, but still choppy. Without the filters, it runs perfectly smooth.
Try this:

hlsl_prescale_x 3
hlsl_prescale_y 3

Should be fine though, as I'm using the above on my other little bartop cab, which has the same GT 740 as you are using.

Oh... also if you have throttle disabled, sync to monitor refresh & refresh speed enabled you will get choppy audio (smooth scrolling though) for games that do not run at the same refresh rate as your monitor.

For example... R-Type runs natively at 55Hz; if you disable throttle, enable sync to monitor refresh / refresh speed the game will run 10% faster at 60Hz and have choppy audio too.

You could also try updating DirectX.

Hope this helps.
fagin
Posts: 1654
Joined: Fri Mar 19, 2010 2:29 pm
Location: UK

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by fagin »

One thing that grips my **** is the presentation of the scanlines themselves. Way too precise and sharp, which anything other than a BVM (for instance) is so far removed from reality (of arcade type hardware in any case). Lettuce's screen-shots are a prime example. Lack of apparent shadowmask is also evident and I suspect not helping the end results.

Lettuce - not meant to single you out mate, just as an example. :oops:
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

What bugs me most are the unevenly thick/thin lines.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Fudoh »

I think that's the point of this particular shader. The brightness of each pixel affects the thickness of the visible pixel lines (or the scanlines if you want) - emulating bloom this way.
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

mremulator wrote:I translated this thread:

http://www.google.com/translate?hl=en&i ... 18991.html

The OP of the aforementioned thread has modified the post.fx file (as mentioned here a few times), however, nobody has mentioned that if you set the shadow_mask_x / y_count values to "-2" it sets the Mask-Count automatically, therefore, you no longer have to set the correct resolution for each game/driver.
Yes, if using his post.fx then -2 works, it doesn't with a standard installation.
fagin wrote:One thing that grips my **** is the presentation of the scanlines themselves. Way too precise and sharp, which anything other than a BVM (for instance) is so far removed from reality (of arcade type hardware in any case). Lettuce's screen-shots are a prime example. Lack of apparent shadowmask is also evident and I suspect not helping the end results.

Lettuce - not meant to single you out mate, just as an example. :oops:
The Retroarch stuff should be off in its own thread, this is the MAME one...

I've had good results simulating a smaller CRT using a 1080p small LCD, but once the LCD size increases the effect is lost. Shadowmask is essential, and bloom needs to be minimised - it's important but what's apparent in those shots is that whoever has made the shader is working from a photograph of a CRT rather than using their own eyes directly. A photo exagerrates the bloom massively, it's a property of the amount of light being emitted, not light "bleed" around the brighter areas.
Image
robneal81
Posts: 43
Joined: Sun Oct 07, 2012 1:45 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by robneal81 »

mremulator wrote: Try this:

hlsl_prescale_x 3
hlsl_prescale_y 3

Should be fine though, as I'm using the above on my other little bartop cab, which has the same GT 740 as you are using.

Oh... also if you have throttle disabled, sync to monitor refresh & refresh speed enabled you will get choppy audio (smooth scrolling though) for games that do not run at the same refresh rate as your monitor.

For example... R-Type runs natively at 55Hz; if you disable throttle, enable sync to monitor refresh / refresh speed the game will run 10% faster at 60Hz and have choppy audio too.

You could also try updating DirectX.

Hope this helps.
I appreciate the help, but it didn't seem to work. The only thing I didn't fully understand was "sync to monitor refresh & refresh speed" - Is that "syncrefresh" in the Mame\INI\mame.ini file?
User avatar
kelvinml
Posts: 6
Joined: Tue Jun 25, 2013 12:35 am
Location: USA

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by kelvinml »

lettuce wrote:Been using a new shader for retroarch, has a nice bloom effect.....

I'm curious which one of the new shaders for retroarch that is as I think it looks great?
Scarhelm
Posts: 8
Joined: Mon Apr 15, 2013 3:53 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Scarhelm »

it does indeed look great, some amazing shaders coming out of retroarch at the moment.

its in the latest nightly of retroarch linked to by lettuce i think in a previous post, called glow
User avatar
cham0mile
Posts: 65
Joined: Fri Apr 11, 2014 7:12 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cham0mile »

Scarhelm wrote:it does indeed look great, some amazing shaders coming out of retroarch at the moment.

its in the latest nightly of retroarch linked to by lettuce i think in a previous post, called glow
The shader options in crt seem to do the trick.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

kelvinml wrote:
lettuce wrote:Been using a new shader for retroarch, has a nice bloom effect.....

I'm curious which one of the new shaders for retroarch that is as I think it looks great?
This one, http://www.libretro.com/forums/viewtopic.php?f=6&t=1843

this ones also rather pleasing, http://www.libretro.com/forums/viewtopi ... &start=150
User avatar
kelvinml
Posts: 6
Joined: Tue Jun 25, 2013 12:35 am
Location: USA

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by kelvinml »

lettuce wrote:
kelvinml wrote:
lettuce wrote:Been using a new shader for retroarch, has a nice bloom effect.....

I'm curious which one of the new shaders for retroarch that is as I think it looks great?
This one, http://www.libretro.com/forums/viewtopic.php?f=6&t=1843

this ones also rather pleasing, http://www.libretro.com/forums/viewtopi ... &start=150
Ah yes....thanks for the links, I look forward to using them.
mikty
Posts: 1
Joined: Sat May 31, 2014 5:59 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mikty »

lettuce wrote:
kelvinml wrote:
lettuce wrote:Been using a new shader for retroarch, has a nice bloom effect.....

I'm curious which one of the new shaders for retroarch that is as I think it looks great?
This one, http://www.libretro.com/forums/viewtopic.php?f=6&t=1843

this ones also rather pleasing, http://www.libretro.com/forums/viewtopi ... &start=150

thank you for these.
is there a way to work on mameui64?
it seem to be .cg file and i don't know if mame use it ?
thank you for your answers.
bye
epsx
Posts: 2
Joined: Wed Jun 18, 2014 12:03 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by epsx »

For Black Tiger there is a good hlsl ? :)
Or where should i put in (i talk about INI Creator, i put in 86 year ).
User avatar
BuckoA51
Posts: 3365
Joined: Sat Oct 02, 2010 10:08 am
Location: Ireland
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by BuckoA51 »

I think we need a new Wiki section for all of this...
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
Dogway
Posts: 16
Joined: Sun Jun 29, 2014 2:18 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Dogway »

NUeda wrote: In your case you should indeed be using 0 (auto) for hlsl_prescale_x, y.
It would be the same as using

Code: Select all

hlsl_prescale_x 6
hlsl_prescale_y 6.4286
1920 = 320 x 6
1440 = 224 x 6.42857..
(1920:1440 = 4:3)

On top that, for 240 resolution games, you would be getting PERFECT scaling of scanlines.
1440 = 240 x 6
1440 = 480 x 3 (240 + scanlines)
I'm getting uneven scanlines on the TV, no matter what prescale I set it to. It's being a pain to set up HLSL. I thought the reason was because my TV is HDReady (1176x664) and probably not enough resolution but RetroArch shows scanlines fine, and my PC monitor shows it fine too for both and is also 1280x1024.

Also how do you take a MAME screenshot in one piece instead of 4?

By following this thread about the modded post.fx, I understood how you configure shadow mask count.
For crt_slot_mask.png it's -2 for both dimensions. I analised the default aperture.png and I counted 10 pixels for a one tileable pattern. Is this right?

Code: Select all

shadow_mask_alpha         0.10
shadow_mask_texture       aperture.png
shadow_mask_x_count       -10
shadow_mask_y_count       -10
shadow_mask_usize         0.484
shadow_mask_vsize         0.484
Another strange thing is shadow_mask_uvsize. On the above link is explained (texture size / GPU tile size), so 31 / 64 = 0.484 but it shows wrong until I set to 0.375.
Dogway
Posts: 16
Joined: Sun Jun 29, 2014 2:18 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Dogway »

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.)
That's pity, haven't you realised that RetroArch uses MAME romset 0.78? For me that's unacceptable, there have been many improvements in emulation since then, I understand they shoot for compability across system, and newer versions are heavier on CPU, but we are playing on PC here and well, CPU can't improve enough in so little time (quad core in cell phones, etc).
One thing I use RetroArch for are NeoGeo and CPS1,2,3 games, through the fba core, I think it's better for playing, better response, and shader, that's right, although it doesn't support auto-save and hence no hi-score.

I think you should continue with MAME but maybe using the modded post.fx? By doing so you are not restrained to one display resolution. Some folks in the RetroArch forums even praise the HLSL capabilities.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

Dogway wrote:
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.)
That's pity, haven't you realised that RetroArch uses MAME romset 0.78? For me that's unacceptable, there have been many improvements in emulation since then, I understand they shoot for compability across system, and newer versions are heavier on CPU, but we are playing on PC here and well, CPU can't improve enough in so little time (quad core in cell phones, etc).
One thing I use RetroArch for are NeoGeo and CPS1,2,3 games, through the fba core, I think it's better for playing, better response, and shader, that's right, although it doesn't support auto-save and hence no hi-score.

I think you should continue with MAME but maybe using the modded post.fx? By doing so you are not restrained to one display resolution. Some folks in the RetroArch forums even praise the HLSL capabilities.
There is also a MAME 2010 and MAME 2013 emulation cores. I think the 2013 core uses 0.150 version of MAME.

But NUeda hasnt been about for months now so i doubt any of this really matters
Post Reply