MAME HLSL CRT SCANLINE EMULATION PRESETS

The place for all discussion on gaming hardware
User avatar
u-man
Posts: 18
Joined: Mon Feb 24, 2014 7:17 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by u-man »

grendelrt wrote:Yeah I have been thinking SLG or Extron to downscale. Wanted to try some software solutions as well just see how it works. Not sure how slg and mame handle vertical games on a horizontal monitor as well.
Physically impossible to do for a SLG ;) .
Xyga wrote: I can't think of an internal 'raw scanlines' solution without any sort of smoothing, it did exist in the old builds up to v0.106 but you're not going to use such an old version.
One would have to write new shader for this.
Maybe I dont understand you correctly, but "raw" scanlines are possible with HLSL.
Just set scanline_bright_scale and scanline_bright_offset to zero and they should appear pretty raw ^^.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
topherlee72
Posts: 1
Joined: Tue Jun 23, 2015 4:26 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by topherlee72 »

I recently found a solution that I think looks about as close to a good late 90's SD CRT as can be. I use HLSL with bright vertical scanlines at 1920 by 1080. I reduce the brightness from the 1.00 down to approximately 75% of that(this depends on the game, some are ultra bright and need this but some are WAY too dark to do this with). I then drop the bloom from .225 to about .15. The result basically ends up looking like my late 90's model RCA TV I used to play my Sega Saturn on, except without dot crawl. I'll try to come back with some pics later.
User avatar
mnneurope
Posts: 100
Joined: Fri Feb 28, 2014 9:02 am
Location: Bosnia and Herzegovina
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mnneurope »

I was wondering is it possible to have same "effects" in the latest version of MAME (0.163), as it is with older, let say 0.147 (which Im using instructions from the first post to make a mame.ini file and have that "old arcade monitor feel")

Im using:
0.147 17 Sep 2012 mame0147b.exe
0.163 24 Jun 2015 mame0163b.exe

as u can see, 0.147 looks beautiful with code from 1st page put in mame.ini file and then into mame directory
but if I do the same with 0.163 screen looks more bright, there is some color change, no round edges, there are huge lines that split the screen vert, and everything looks not good :D

so, is it possible to make code for games to look like how they do in 0.147? i dont use any fancy UIs or shmup version of mame or anything like that

I have 1 game which I cant play in older version of MAME (Raiden DX), so it would be nice if someone made a code for this newer version of MAME, and could share it

thx for any help U can provide, much appreciated

Image Image
User avatar
Floob
Posts: 81
Joined: Fri Jul 25, 2014 10:58 am
Location: UK

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Floob »

If it helps, I'm using these with 0.160 and it works well (looks like your first pic):
http://mame-hlsl-gallery.blogspot.co.uk ... -page.html
User avatar
mnneurope
Posts: 100
Joined: Fri Feb 28, 2014 9:02 am
Location: Bosnia and Herzegovina
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mnneurope »

@ Floob

I rly dont understand what to do by Ur instructions, but I could try Ur file if u could just create what U use and upload mame.ini file to the internet so I can download it and put it in my mame folder and see if it works?

as I said, I used that code from 1st page in all games in mame 0147, and every game looked great, but in newer versions of mame, it doesnt work

so if some1 have working file "mame.ini" with working code and link to it, would be of great help, thx

or just copy/paste ur code...
User avatar
u-man
Posts: 18
Joined: Mon Feb 24, 2014 7:17 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by u-man »

try this with 0163:

Code: Select all

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  hlsl
hlsl_prescale_x           6
hlsl_prescale_y           6
hlsl_preset               -1
hlsl_write                
hlsl_snap_width           2048
hlsl_snap_height          1536
shadow_mask_alpha         0.3
shadow_mask_texture       shadowmask.png
shadow_mask_x_count       6
shadow_mask_y_count       4
shadow_mask_usize         0.1875
shadow_mask_vsize         0.25
shadow_mask_uoffset       0.0
shadow_mask_voffset       0.0s
curvature                 0.2
round_corner              0.2
reflection                0.03
vignetting                0.3
scanline_alpha            0.4
scanline_size             1.0
scanline_height           1.0
scanline_bright_scale     1.0
scanline_bright_offset    0.0
scanline_jitter           0.0
defocus                   0.0,0.0
converge_x                0.3,0.0,-0.3
converge_y                0.0,0.3,-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                1.4
offset                    0.0,0.0,0.0
scale                     0.95,0.95,0.95
power                     0.8,0.8,0.8
floor                     0.05,0.05,0.05
phosphor_life             0.4,0.4,0.4
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
User avatar
mnneurope
Posts: 100
Joined: Fri Feb 28, 2014 9:02 am
Location: Bosnia and Herzegovina
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by mnneurope »

I think I got this :D

*there is a slight difference in color palette, but hey...

lettuce code in 1st post in MAME 0147 vs code I made for MAME 0163

Image Image

Image Image


and this is how Raiden DX looks like

Image Image

code for mame.ini
Spoiler
#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 1
hlslpath hlsl
hlsl_ini_read 0
hlsl_ini_write 0
hlslini %g
hlsl_prescale_x 0
hlsl_prescale_y 0
hlsl_preset -1
hlsl_write
hlsl_snap_width 1920
hlsl_snap_height 1080
gamma 0.750
contrast 0.850
shadow_mask_alpha 0.0
shadow_mask_texture aperture.png
shadow_mask_x_count 1280
shadow_mask_y_count 720
shadow_mask_usize 0.09375
shadow_mask_vsize 0.09375
curvature 0.3
pincushion 0.00
round_corner 0.05
scanline_alpha 1.00
scanline_size 1.00
scanline_height 0.7
scanline_bright_scale 1.5
scanline_bright_offset 0.60
scanline_jitter 0.05
defocus 0.0,0.0
converge_x 0.0,0.0,0.0
converge_y 0.0,0.0,0.0
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.4
offset 0.0,0.0,0.0
scale 1.0,1.0,1.0
power 1.0,1.0,1.0
floor 0.03,0.03,0.03
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 0.0
yiq_p 1.0
yiq_n 1.0
yiq_y 3.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.1
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
thx for help, and lets all work hard to make scanlines even better :D
User avatar
u-man
Posts: 18
Joined: Mon Feb 24, 2014 7:17 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by u-man »

To be honest, that mame.ini looks so wrong for me. You dont even use a shadowmask, which is a no-go for me. your mame.ini also dont include the new parameters available since version 0162.

As long as you are happy with your results... but i wouldnt recommend them.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
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 »

You seem to be getting scanline artifacts/unevenness!, maybe change canline_height from 0.7 to 1.0
Pitou
Posts: 1
Joined: Thu Jul 23, 2015 12:45 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Pitou »

Hello all,

My first post here. Great, great suggestions and settings. Thanks very much for the hard work, everyone!

I just setup a new mame cabinet using a CRT VGA svcreen in 1024x768 resolution. Now I'm trying to simulate as close as possible the donkey kong image. I own an original Donkey kong and took some pictures.

I've tried many settings but I'm trying to acheive or more faithful reproduction.

Anyone has any idea of what settings could do it?

Thank you very much.

Pitou!

Image

Image

Image

Image

Image

Image

Image

Image

Image
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 »

Anyone tried those ? http://github.com/douglaslassance/mame/tree/master/glsl

The 'Trinitron' one has a lot of perameters I don't quite understand yet.

Also not sure which file(s) I should use to modify stuff, each shader comes in 4 files including 'lut' variants.

Doesn't look very good yet.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Hey sorry for double posting but I have a few kweshtyonz;

I'm currently using the 'CRT-Scanlines' shader from the link I've posted above, it's similar to the CRT-Geom stuff except without any attempt as simulating a shadow mask or a grid, which I find better, clearer, for playing vertical shmups in yoko.

But I'm facing a few problems;

1) - Trying to eliminate the corner rounding and smoothing with similar values such as in CRT-Geom & CRT-Lottes doesn't work, it only disappears with a value such as
cornersize = 0.001;
-> but then the whole image becomes so dark it's useless.
Isn't there a way to completely turn this off without such consequence ?
Commenting out CURVATURE is easy, but it's not enough here as it doesn't eliminate the round corners and border smoothing.

Or can I just use CRT-Geom & CRT-Lottes and disable any mask effect instead ?

2) - Lines thickness not perfectly even in fullscreen (yoko or tate).
I appreciate that those shaders work much better than anything else I've tried before, especially for yoko.
But even with a source in 320x240 over a 1920x1080 display it doesn't scale perfectly.
Is there a preferred way to correct this using prescale or overscan ?
If so which are the correct values in regards of source->target resolution ?
(I'd imagine those would all need to be calculated and tested, both for yoko and tate with every major arcade hardwares resolutions in relation to all common flat panel resolutions, but I'm unable to do this honestly, I don't have the required math skills for it... :oops: )

3) - Anyone got okay V-Sync with OGL in MAME yet ?
waitvsync and triplebuffer don't work, my GPU won't force it either even if specified in nvcpl.
The only thing that syncs (though not completely eliminating tearing) is 'sync to monitor refresh', which sucks as it speeds up many of the games I play and fucks up audio that sounds wobbly and distorted with several games.

I love those GLSL shaders because they work much faster than D3D/HLSL for me, and are easier to use as well, I like the idea of separate configurable files with parameters I can actually understand a bit.
That's my choice for yoko now but I'd like to fix those little annoyances if possible.
Any help appreciated. :wink:
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Er... partially answering my own questions; :oops:

1) -> Found that I can use CRT-Lottes and disable any mask effect just by setting a zero value here;

Code: Select all

const float maskStrength = 0.0
My problem being that I want a good solution for 'yoko-tateing' with scanlines, but none of the CRT masks despite using the 'Vertical' versions of the shaders, look nearly as good as the normal hori version;
. CRT-Lottes with aperture grille on a 1920x1080 display => big bulky square pixels
. Same on a 1600x900 (cheap laptop) => unwatchable garbage
Once mask has been eliminated it's only simple scanlines, which isn't bad for clarity (in yoko).
leaving a touch of mask say 0.2 brings a little crt~ish shape back, but nothing realistic enough.
We'd need some 'Vertical' versions of the shaders specifically designed for yoko (not just rotated effects).

2) - nothing yet...

3) -> Well it's only my laptop's mobile GPU (a modest GeForce 820M) that seems unable to force v-sync, because my desktop GPU (750 Ti) can.
But I still need it to work on the laptop. :p
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Tatsuya79 »

For your CRt shader, if that's Crt-geom, I usually use:

Code: Select all

static float cornersize = 0.001;
static float cornersmooth = 8000.0;
when I disable curvature.

And if you want to get rid of the sub-pixels coloration you change:

Code: Select all

 float3 dotMaskWeights = lerp(
                            float3(1.0, 0.7, 1.0),
                            float3(0.7, 1.0, 0.7),
                            floor(fmod(VAR.mod_factor, 2.0))
                        );
to

Code: Select all

 float3 dotMaskWeights = lerp(
                            float3(1.0, 1.0, 1.0),
                            float3(1.0, 1.0, 1.0),
                            floor(fmod(VAR.mod_factor, 2.0))
                        );
...or perhaps this part is different in Mame (I'm used to Retroarch).
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 »

I'm actually using CRT-Lottes now because it gives me a sharper image in yoko, and I've found how to disbale the mask at once, although this isn't exactly what I'm aiming at for 1920x1080.

I'd like the vertically oriented CRT-Lottes (w/ #aperture) to look closer to what it is when default/horizontal.

Or something else achieving similar results, in OGL.

PS: I've tried with RA before but no crt shader gave any satisfying results in yoko again. And I got tired with rotating stuff evry time in the MAME OSD, RetroArch is not shmupper-friendly in that aspect.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Tatsuya79 »

Oh well, I post it anyway since I made that, if you wanna try it.
That's the CRT CGWG in flat, sub-pixels OFF.
With the gaussian beam code added back in, as it gives the best scanline approximation in fullscreen (non-integer)

Mame.ini needs to point to:

glsl_shader_mame0 "Your path"\glsl\shader\glsl_plain
glsl_shader_mame1 "Your path"\glsl\CRT-geom
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 »

Thanks Tatsuya79 !

Fails to load shaders though, dunno why...
Maybe because I'm using MAMEUIFX ? Here's my current mame.ini OGL portion;

Code: Select all

# OpenGL-SPECIFIC OPTIONS
#
glslpath                  glsl
gl_forcepow2texture       0
gl_notexturerect          0
gl_vbo                    1
gl_pbo                    1
gl_glsl                   1
gl_glsl_filter            1
gl_glsl_sync              0
glsl_shader_mame0         glsl_plain
glsl_shader_mame1         CRT-geom
glsl_shader_mame2         none
glsl_shader_mame3         none
glsl_shader_mame4         none
glsl_shader_mame5         none
glsl_shader_mame6         none
glsl_shader_mame7         none
glsl_shader_mame8         none
glsl_shader_mame9         none
glsl_shader_screen0       none
glsl_shader_screen1       none
glsl_shader_screen2       none
glsl_shader_screen3       none
glsl_shader_screen4       none
glsl_shader_screen5       none
glsl_shader_screen6       none
glsl_shader_screen7       none
glsl_shader_screen8       none
glsl_shader_screen9       none
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Tatsuya79 »

I don't have this glslpath line in standard Mame.

Just the full path for both of those lines:

glsl_shader_mame0 E:\Mame\glsl\shader\glsl_plain
glsl_shader_mame1 E:\Mame\glsl\CRT-geom
User avatar
u-man
Posts: 18
Joined: Mon Feb 24, 2014 7:17 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by u-man »

Xyga wrote:Thanks Tatsuya79 !

Fails to load shaders though, dunno why...
Maybe because I'm using MAMEUIFX ? Here's my current mame.ini OGL portion;
If you really use MAMEUIFX, did you use the vertical version of the Lotte shader?
You need to pick OpenGL video mode and to enable GLSL in the GLSL options of the GUI. Then you can select the Lottes_CRT_VERT.vsh file for the MAME shader 0. Then your shadowmask and your scanlines will be applied in correct orientation. Thats it, have fun.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
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 »

Thanks u-man I'm aware of that one, I was actually talking about a different shader; the one Tatsuya just posted which seems like it's in two passes, but i can't seem to be able to load the two files in MAMEUIFX.

I'm on a quest to get the best crt look possible in yoko with those GLSL shaders. If you read a few posts up I went and tweaked CRT-Lottes Vertical a bit already,
but in my eyes, even with mask strenght reduced it still doesn't look right.
A satisfying CRT effect in fullscreen yoko will require somewhat serious modifications I believe.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Anyone would be able to convert the sharp-bilinear shader to one useable in MAMEUIFX ? (.vsh)
http://pastebin.com/kiprgHbD
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Why does the dev team of MameUIFX continue to pursue the outdated '.vsh' type shaders and not move over to the more up to date and advanced '.cg' shaders??. RetroArch which uses .glsl and.cg shaders has like over 100 shaders already created and yet these are not usable in MameUIFX, it just seems crazy not to utilise these massive database of shaders!!??.

I would post this on the actual MameUIFX forums but that forum seems to be dead and my registration activation email is never sent no matter how many times i try and register!
fablog
Posts: 1
Joined: Mon Dec 28, 2015 6:34 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by fablog »

Hi guys,

I'm trying very hard to use HLSL in mame64, that I used with Hyperspin and Rocketlauncher. English is not my first language and when I read about HLSL I'm a bit lost. Could you direct me to a good up to date tutorial or tell me what I have to do to set it up please? I'm using an LCD in 1080p with an I3 3.5ghz and a HD6850.

Thanks :)
cybermat
Posts: 7
Joined: Tue Jan 12, 2016 8:56 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cybermat »

u-man wrote:try this with 0163:

Code: Select all

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  hlsl
hlsl_prescale_x           6
hlsl_prescale_y           6
hlsl_preset               -1
hlsl_write                
hlsl_snap_width           2048
hlsl_snap_height          1536
shadow_mask_alpha         0.3
shadow_mask_texture       shadowmask.png
shadow_mask_x_count       6
shadow_mask_y_count       4
shadow_mask_usize         0.1875
shadow_mask_vsize         0.25
shadow_mask_uoffset       0.0
shadow_mask_voffset       0.0s
curvature                 0.2
round_corner              0.2
reflection                0.03
vignetting                0.3
scanline_alpha            0.4
scanline_size             1.0
scanline_height           1.0
scanline_bright_scale     1.0
scanline_bright_offset    0.0
scanline_jitter           0.0
defocus                   0.0,0.0
converge_x                0.3,0.0,-0.3
converge_y                0.0,0.3,-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                1.4
offset                    0.0,0.0,0.0
scale                     0.95,0.95,0.95
power                     0.8,0.8,0.8
floor                     0.05,0.05,0.05
phosphor_life             0.4,0.4,0.4
Hi u-man ,
i tried your settings on mame 0.169 , but it's all slow with these settings.

I have an i7 and an ATI hd5770 with all recent drivers. I'm using Mameuifx 0.169 and i just copy and past your code. Do you think that my gpu should well support your settings ?

thanks!
Sub-zero
Posts: 1
Joined: Fri Jan 22, 2016 11:50 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Sub-zero »

mremulator wrote:Been tinkering for a few weeks on and off.

This is the first time I can actually say I'm happy with the way that all of my favorite 207x games actually now look.

I own a couple of original cab's, running original hardware on NOS Hantarex Polo 3 CRT's.

It's getting to the point now where I can barely tell that my MAME cab ain't rockin a CRT.

Image
Can you please link the shader files through Dropbox or other? editing them if giving me a damn headache and yours look great!!
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 »

So seeings as i kicked this thread off WAYYYYYYYYYYYYYY back in 2011 i'd thought i share my latest HLSL settings as of MAME 0.171 (GroovyMAME)

DIRECT3D POST-PROCESSING OPTIONS

Code: Select all

hlsl_enable               1
hlslpath                  hlsl
hlsl_prescale_x           6
hlsl_prescale_y           6
hlsl_write                1
hlsl_snap_width           2048
hlsl_snap_height          1536
shadow_mask_tile_mode     0
shadow_mask_alpha         0.15
shadow_mask_texture       slot-mask.png
shadow_mask_x_count       6
shadow_mask_y_count       4
shadow_mask_usize         0.1875
shadow_mask_vsize         0.1875
shadow_mask_uoffset       0.0
shadow_mask_voffset       0.0
curvature                 0.10
round_corner              0.10
smooth_border             0.03
reflection                0.0
vignetting                0.20
scanline_alpha            1.50
scanline_size             1.0
scanline_height           1.0
scanline_bright_scale     1.15
scanline_bright_offset    0.0
scanline_jitter           0.1
hum_bar_alpha             0.0
defocus                   0.20,0.0
converge_x                0.25,0.00,-0.25
converge_y                0.0,0.25,-0.25
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.4
offset                    0.0,0.0,0.0
scale                     0.95,0.95,0.95
power                     0.8,0.8,0.8
floor                     0.01,0.01,0.01
phosphor_life             0.4,0.4,0.4
BLOOM POST-PROCESSING OPTIONS

Code: Select all

bloom_blend_mode          0
bloom_scale               0.28
bloom_overdrive           1.0,1.0,1.0
bloom_lvl0_weight         1.0
bloom_lvl1_weight         0.64
bloom_lvl2_weight         0.32
bloom_lvl3_weight         0.16
bloom_lvl4_weight         0.08
bloom_lvl5_weight         0.04
bloom_lvl6_weight         0.04
bloom_lvl7_weight         0.02
bloom_lvl8_weight         0.02
bloom_lvl9_weight         0.01
bloom_lvl10_weight        0.01
Just copy over the above settings to a fresh mame.ini file.

And now the screen shots....

Image Image

Image Image

Im using an, ASUS ROG Swift PG279Q 1440p monitor, so your 'mileage may vary'....but i would love to see how HLSL settings would look on a 4K display!!
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

Lettuce,

Those look great. Any chance of posting a few other game screenshots? Maybe Metal Slug, Donkey Kong, Ms. Pac Man or Joust?

Thanks
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 »

Using your settings the output came out much too bright and washed out for me (using a 1600x1200 VA monitor) in particular gamma which I had to reduce down to 0.650 and contrast too by a step.
Then since I like rather sharp looking monitors I've turned defocus off and pushed the mask's darkness up.
Also slightly reduced the curvature since I like it but am not a big fan either.

I had not used HLSL in a while and it seems slightly more efficient than what I remembered, the uneven scanlines distribution when it happens is not as obvious as before it seems.
Integer scaling is still required in cases though.

One thing I'm still not quite certain about when using HLSL is lag; I'm currently using D3D9ex with GM and it's supposed not to queue the hell out of things like 'stock' D3D, but what happens when I turn HLSL on ?
Is it my brain playing me tricks or does the delay increase by something like 1 frame ?
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Xyga wrote:Using your settings the output came out much too bright and washed out for me (using a 1600x1200 VA monitor) in particular gamma which I had to reduce down to 0.650 and contrast too by a step.
Then since I like rather sharp looking monitors I've turned defocus off and pushed the mask's darkness up.
Also slightly reduced the curvature since I like it but am not a big fan either.
That might be related to the 'scanline_bright_scale' setting, maybe turning that down would sort the washed out look.

And some more pictures....

Image Image Image

Image Image

Image Image
cybermat
Posts: 7
Joined: Tue Jan 12, 2016 8:56 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cybermat »

Hi Lettuce,
thanks for sharing your settings! You've already answered to this question but i didn't understand... these settings are just for horizontal games ? Could be fine for vertical ?

I'm using GLSL shaders and i have dedicated shaders for vertical and horizontal.
Post Reply