Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Some pretty heavy duty MAME HLSL changes incoming  (Read 28010 times)

0 Members and 1 Guest are viewing this topic.

bulbousbeard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 522
  • Last login:August 25, 2015, 11:58:25 pm
  • I want to build my own arcade controls!
Some pretty heavy duty MAME HLSL changes incoming
« on: May 12, 2015, 11:15:39 am »
I'll compile this tonight and see if HLSL is better than OpenGL with the Lottes shader now.

Sunday 3rd May, 2015 at 12:41:05 UTC by imjezze
HLSL shader improvements

- changed shadow mask implementation, shadow count XY now represent the
number of pixel the shadow UV sized tiles will take on the screen
- implemented rotation of the shadow mask texture depending on the
default landscape or portrait view of the screen
- removed prescale and pixel border of the shadow mask texture
- added option to change the shadow UV offset, to reduce the color
bleeding of the shadow mask
- adjusted presets to work with the changed mask implementation
- reduced defocus offset
- improved downsampling for better blurring
- improved alignment of bloom layers (raster and vector)
- applied bloom effect to the render output of screenshot and AVI
recording
- changed curvature effect to fit screen size
- changed scanlines to be not rendered into bloom layers
- changed shadow mask to be not rendered into bloom layers
- changed color floor to not light the bloom layers
- changed shadow mask to not dark the color floor
- added image vignetting simulation and option
- added round screen corner simulation and option
- added screen light reflection simulation and option
- made usage of unused brightness offset (additive)
- removed unused pincushion option
- removed duplicate shadow count Y options
- removed artwork/adapture.png
- added artwork/adapture-grill.png
- added artwork/shadow-mask.png
- added artwork/slot-mask.png
- added hlsl/simple.fx
- removed unused shaders::blit() function
- added shaders::screen_pass() function, which handles the
(raster-)rendering on screen, into screenshot and AVI recording
- added effect:set_bool() function

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:June 10, 2025, 10:17:56 am
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #1 on: May 12, 2015, 12:52:42 pm »
It's pretty nice and I quit using opengl for now.

Tell me what you think about these settings because I know that you know your stuff :)

Code: [Select]
hlsl_enable               1
hlslpath                  hlsl
hlsl_prescale_x           8
hlsl_prescale_y           8
hlsl_preset               -1
hlsl_write               
hlsl_snap_width           3200
hlsl_snap_height          1800
shadow_mask_alpha         0.5
shadow_mask_texture       shadow-mask.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.0
curvature                 0.0
round_corner              0.0
reflection                0.25
vignetting                0.25
scanline_alpha            0.75
scanline_size             1.0
scanline_height           1.0
scanline_bright_scale     2.0
scanline_bright_offset    0.0
scanline_jitter           0.0
defocus                   1.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.05,0.00,0.10
grn_ratio                 -0.10,1.00,0.25
blu_ratio                 -0.25,0.25,1.25
saturation                1.25
offset                    -0.30,-0.20,-0.05
scale                     1.15,1.05,0.90
power                     0.90,0.90,1.15
floor                     0.05,0.05,0.05
phosphor_life             0.5,0.5,0.5

#
# 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       40.0

#
# BLOOM POST-PROCESSING OPTIONS
#
vector_bloom_scale        0.3
raster_bloom_scale        0.220
bloom_lvl0_weight         1.000000
bloom_lvl1_weight         0.320000
bloom_lvl2_weight         0.16
bloom_lvl3_weight         0.08
bloom_lvl4_weight         0.04
bloom_lvl5_weight         0.02
bloom_lvl6_weight         0.02
bloom_lvl7_weight         0.01
bloom_lvl8_weight         0.01
bloom_lvl9_weight         0
bloom_lvl10_weight        0

Again all credits go to Jezze, u-man, and anyone else that made this work possible :D

example screens









curvature and round_corner values applied with sliders



Have Fun! :)

abispac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1625
  • Last login:July 07, 2025, 12:30:10 am
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #2 on: May 12, 2015, 02:03:31 pm »
Ive seen that HLSL thing around, can someone explain what this is please.

arquillos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 49
  • Last login:June 18, 2025, 07:03:59 am
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #3 on: May 12, 2015, 03:39:12 pm »
HLSL is MAME filtering software. It uses heavily the GPU (not CPU) so systems with integrated graphic cards may suffer from lost frames if HLSL is used.

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #4 on: May 12, 2015, 04:18:09 pm »
I still wish you could add screen curvature to vector games. I also wish the color vectors had a shadow mask like on a real color vector monitor. That's really the only thing keeping me from building a Tempest LCD cab at this point.

bulbousbeard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 522
  • Last login:August 25, 2015, 11:58:25 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #5 on: May 13, 2015, 12:20:40 am »
I experimented with it a bit. It is a big improvement over the previous iteration of HLSL. What hasn't changed, though, is how resolution-hungry HLSL is. The Lottes shader basically looks good at 1080p+.

Until you run HLSL at 4k, you're getting noticeable artifacts in the shadow mask. Even 2560x1440 isn't enough pixels for it.

At 4k, HLSL might be slightly better now just because it has more options and HLSL never had that weird scaling glitch with the Genesis MESS driver that OpenGL has, but if you're not running at that, I'd stick with OpenGL and the Lottes shader.

Here's a shot of my settings for comparison (note that imgur compression just butchers it). I like to soften the image slightly, add a touch more bloom, and basically go for "ideal" color settings.

« Last Edit: May 13, 2015, 01:34:31 am by bulbousbeard »

floob

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:January 11, 2023, 04:36:51 pm
  • Looking to buy a pre-made MAME cab.
    • Retrogaming on a Raspberry Pi
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #6 on: May 13, 2015, 04:27:21 pm »
I wish there was somethign as easy to use as this to get OpenGL working
http://mame-hlsl-gallery.blogspot.co.uk/

Do I have to use MAMEUIFX as opposed to MAME?

Is there a guide to getting the lottes shader working with this?

I'm loving the way HLSL makes the games look, but it seems to need tweaking on a per system basis, and the opengl route seems to be a one stop shop?

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 20, 2024, 03:53:16 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #7 on: May 13, 2015, 05:19:01 pm »
Hello Gentleman,

HLSL made a huge step forward, as the MAME devs finally agreed to include Jezze´s HLSL shader improvements. If they wouldnt agree, we had plans to do it with MAMEUIFX exclusively  :D  . We are all happy that this was not needed to do and that Jezze´s work found finally a way into the official MAME source, so that everyone can benefit from it and that coders can maybe even more improve HLSL as it is now on Github.

Jezze did a awesome job here, just look at the changes vs. old HLSL. There are still minor things left from the old version, but i guess the majority will not even notice them. Maximum respect here for this man.... good job, well played  :D

Is HLSL the way forward?

Good question... my main aim was to have shaders that suits to the hardware that a user have.
For low-end resources and graphicscards the community has now the CRT-geom shader, which runs without a big impact on frames, but misses bloom/glow .
For highend users, there is HLSL and Lotte´s shader now, which is slightly more hungry on resources.
I prefer HLSL over Lotte, because you have sliders for playing around and way more parameters to manipulate the final image and you can adjust it to run even on mid-range cards or good integrated graphics like Intel HD 2000 and up. Not to mention that OpenGL has drawbacks, because it will miss additional tweaks that people have done over the time for Direct3D. Open GL also has no options for Vector-shading other than brightness, contrast and gamma vs. many things which you can do with HLSL.

All in all, there where huge improvements over the last three months for LCD and shader fans outthere and I think, we can all be very happy with the results  :D

cheers u-man
« Last Edit: May 13, 2015, 08:06:09 pm by u-man »
"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."

cmoses

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:July 27, 2023, 05:19:00 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #8 on: May 13, 2015, 05:36:05 pm »
Enjoy seeing the new enhancements, will need to give them a try

bulbousbeard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 522
  • Last login:August 25, 2015, 11:58:25 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #9 on: May 13, 2015, 09:06:03 pm »
Played around with it some more at 4k. I definitely prefer the Lottes shader. It just looks more like a CRT. With HLSL, I just can't get a good defocus value that looks sharp like a CRT but not too sharp like an LCD.

With these improvements, HLSL is better than it was at least. The only problem with the Lottes shader is that MAME has that graphics corruption bug in the Genesis driver with OpenGL.

bulbousbeard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 522
  • Last login:August 25, 2015, 11:58:25 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #10 on: May 13, 2015, 09:08:29 pm »
I wish there was somethign as easy to use as this to get OpenGL working
http://mame-hlsl-gallery.blogspot.co.uk/

Do I have to use MAMEUIFX as opposed to MAME?

Is there a guide to getting the lottes shader working with this?

I'm loving the way HLSL makes the games look, but it seems to need tweaking on a per system basis, and the opengl route seems to be a one stop shop?

OpenGL/GLSL is actually simpler than Direct 3D/HLSL. The Lottes shader basically looks great in every game with the same settings. It's less of a nuisance than HLSL.

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 20, 2024, 03:53:16 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #11 on: May 13, 2015, 09:37:59 pm »
Played around with it some more at 4k. I definitely prefer the Lottes shader. It just looks more like a CRT. With HLSL, I just can't get a good defocus value that looks sharp like a CRT but not too sharp like an LCD.

With these improvements, HLSL is better than it was at least. The only problem with the Lottes shader is that MAME has that graphics corruption bug in the Genesis driver with OpenGL.

Cant agree with any of your arguments here...especially the Defocus, but I dont own a 4K screen  :P
If you got moire-artefacts then your prescale is to low, try to set it to 8 or higher and see if it gets better.
Without your settings, it is hard to tell, what you are doing wrong, but I am sure it can be better.
Lotte also has only one shadowmask, is way, way more heavy on GPU (and you cant do nothing against this) and if i add all my points posted before, it doesnt have the things I want for proper gaming.

OpenGL/GLSL is actually simpler than Direct 3D/HLSL. The Lottes shader basically looks great in every game with the same settings. It's less of a nuisance than HLSL.

Simply not true... period. With the new HLSL you can do the same.

Everyone has a opinion... and this is mine.
« Last Edit: May 14, 2015, 11:28:57 am by u-man »
"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."

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #12 on: May 13, 2015, 10:53:38 pm »
Why can't the aperture grill code in the Lottes shader be implemented in HLSL as an option?

BorgDog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 436
  • Last login:August 22, 2021, 02:22:52 pm
  • Not a hipster for over 50 years!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #13 on: May 14, 2015, 08:50:06 am »

For low-end resources and graphicscards the community has now the CRT-geom shader, which runs without a big impact on frames, but misses bloom/glow ...


Running low end hardware I was intrigued by this statement.  I've tried HLSL previously and liked the look better, my hardware just can't keep up.  So I googled around looking for how to setup CRT-geom and really couldn't find any straight forward setup instructions.  Does anybody have a link to some instructions on this?  I'm not looking for perfect, just better.

Thanks,
My Projects:
MisSpent Youth a Vigolix bartop,  Little Bastard a rotating tablet/display bartop,
Pin-Dog a mini pin-cab on vpforums.org  Star Wars a wedgehead pincab on vpinball.com

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 20, 2024, 03:53:16 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #14 on: May 14, 2015, 11:14:11 am »
Either install latest MAMEUIFX and configure easily via GUI interface or download the shader here and configure it manually:
https://www.dropbox.com/s/nadpowd7ekwfmat/CRT_Geom.zip?dl=0

There are four files in this archive. The only difference is that the "VERT" version rotates the shadow mask by default.
The idea here is that you use the VERT version in a "vertical.ini" so that it gets used for vertical games only.
Put the files of this zip into a folder of your choice (I recommend a OpenGL named folder inside your MAME installation).
 
To activate the shader, you need to change the following line of your mame.ini OSD VIDEO OPTIONS section :
 
Code: [Select]
video                     opengl
and put the path to the shader in this line of the # OpenGL-SPECIFIC OPTIONS and activate the shader by following line:
Code: [Select]
gl_glsl                   1
gl_glsl_filter            1
glsl_shader_mame0         put the path to the content of the zip-file here\CRT-geom

this is just a example :
 
Code: [Select]
gl_glsl                   1
gl_glsl_filter            1
glsl_shader_mame0         D:\GAMESTATION\OpenGL_MAME_0161_64\glsl\CRT-geom

Make a copy of your mame.ini and put it in the ini folder of your MAME installation, naming it vertical.ini
In your copy, change the path setting to point at CRT-geom_VERT.
 
this is just a example :
 
Code: [Select]
glsl_shader_mame0         D:\GAMESTATION\OpenGL_MAME_0161_64\glsl\CRT-geom_VERT
thats it.... try it and enjoy the shader :) .

Good tutorial for configuring the shader: http://mame32fx.altervista.org/forum/viewtopic.php?f=1&t=184
Credits goes to Hunter K., who did the main part of it .... ;) thx for help, dude.

PS: same applies to Lotte´s shader. You can grab it here, but you need a strong GPU :

https://www.dropbox.com/s/z873a41i5ty2qjc/331873-Lottes_CRT_VERT_SEP_10.zip?dl=0
« Last Edit: May 14, 2015, 11:25:04 am by u-man »
"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."

BorgDog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 436
  • Last login:August 22, 2021, 02:22:52 pm
  • Not a hipster for over 50 years!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #15 on: May 14, 2015, 12:41:41 pm »
Awesome, thanks man I'll check it out.
My Projects:
MisSpent Youth a Vigolix bartop,  Little Bastard a rotating tablet/display bartop,
Pin-Dog a mini pin-cab on vpforums.org  Star Wars a wedgehead pincab on vpinball.com

RxBrad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:May 31, 2023, 12:41:00 pm
  • I like burritos.
    • bit.ly/1GDVYUu
    • RxBrad.com
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #16 on: May 14, 2015, 01:23:25 pm »

example screens









curvature and round_corner values applied with sliders



Have Fun! :)

Probably a dumb question...  Your screenshots show SNES, NES, and Sega Genesis games..  How do you get the shaders to work on those?  Which emulator?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 10, 2025, 12:58:28 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #17 on: May 14, 2015, 01:27:32 pm »
(psssst  MESS is mame's console counterpart......  all things that apply to mame also apply to mess)

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:June 10, 2025, 10:17:56 am
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #18 on: May 14, 2015, 02:14:57 pm »

example screens









curvature and round_corner values applied with sliders



Have Fun! :)

Probably a dumb question...  Your screenshots show SNES, NES, and Sega Genesis games..  How do you get the shaders to work on those?  Which emulator?

If you don't know how to compile a GIT pull then wait for 0.162 to release which should be the last Wednesday of this month.

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #19 on: May 14, 2015, 04:05:00 pm »
(psssst  MESS is mame's console counterpart......  all things that apply to mame also apply to mess)

pssst, as of 0.162 MAME will support everything that MESS does out of the box, so your statement becomes redundant, but yeah, people have been enjoying a lot of these effects with the console parts of our code already.

Oh and 0.162 will also support Golden Tee Fore! thanks to the work of Ted Green (thread hijacking, but some people here have asked about it in the past)




« Last Edit: May 14, 2015, 04:07:57 pm by Haze »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 10, 2025, 12:58:28 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #20 on: May 14, 2015, 04:14:12 pm »
Nice to know after all this time Haze will still come out of hiding to "correct" things I've said that actually aren't incorrect.  :cheers: Nice to hear from you man. 

I haven't decided if I'm excited about the official merger yet or not.  If the listxml output isn't modified to flag all the various systems now it'll be a nightmare because many arcade games had console counterparts and vice-versa, but other than that I'm sure it eliminates a lot of hassle via a singular compile. 

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #21 on: May 14, 2015, 04:53:30 pm »
Nice to know after all this time Haze will still come out of hiding to "correct" things I've said that actually aren't incorrect.  :cheers: Nice to hear from you man. 

I haven't decided if I'm excited about the official merger yet or not.  If the listxml output isn't modified to flag all the various systems now it'll be a nightmare because many arcade games had console counterparts and vice-versa, but other than that I'm sure it eliminates a lot of hassle via a singular compile.

It'll be worked out over time, internally MAME knows if something is a computer / console / arcade, and any intelligent frontend could work out a good guess based on something having a keyboard / coinslot etc.

The majority of games in MESS are still in the softlists (think of them as user removable based media lists) so really the only thing you'll see listed as 'machines' in MAME are the actual consoles alongside the arcade 'machines', so it will be fairly obvious anyway.  There are a handful of games in MESS that were standalone units just like the arcade games, and will be treated as such (things like the Batman TV game) but again it's pretty obvious they're home games because they have no coin slot listed.

As I said tho, any kinks will be worked out over time as we move towards a more hardware driven rather than game driven project.  From a development point of view filtering by hardware used (the ultimate goal) makes more sense anyway; we've seen more and more cases where the arcade hardware is comprised mostly of home parts stuck together, eg. the Golden Tee Fore stuff is PC components (PCI bus, Voodoo, sound system etc.) but driven by a MIPS processor, they're even built on top of a bunch of Open Source software (some have claimed the original games are actually in violation of various Open Source licenses, but I can't comment, never researched the exact software they used)




« Last Edit: May 14, 2015, 05:12:21 pm by Haze »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 10, 2025, 12:58:28 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #22 on: May 14, 2015, 09:47:03 pm »
Yeah the softlist thing has always kind of annoyed me.  On the one hand I understand it, and it does allow for some flexibility when it comes to homebrew and hacks, but on the other I think it makes MESS more complex than it should be for the average noob to use.  Having one fixed romname for, oh I dunno, Sonic on the genesis that when selected automatically calls the right system and ect for the console would be more ideal from the useability standpoint.  Then you've got systems like the snes where carts contain more custom chips than you can shake a stick at, where game-based selection definitely makes more sense.  Then of course there is the obvious notion that we should have a pan-ultimate list of games, with verified rom crcs and all, for the older systems at this point, yet we don't and mess's softlists aren't exactly helping. 

I'm just saying.... system based sorting only makes sense if you only want to preserve the system hardware.... if you want to preserve the game hardware/software as well, it starts making less sense. 

RxBrad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:May 31, 2023, 12:41:00 pm
  • I like burritos.
    • bit.ly/1GDVYUu
    • RxBrad.com
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #23 on: May 15, 2015, 08:28:39 am »
(psssst  MESS is mame's console counterpart......  all things that apply to mame also apply to mess)

Yeah..  I figured it was something as easy as that.



Never used MESS before, so I'll hold off for the next version of MAMEUIFX that has all of this baked in.

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #24 on: May 15, 2015, 01:33:27 pm »
I wish there was somethign as easy to use as this to get OpenGL working
http://mame-hlsl-gallery.blogspot.co.uk/

Do I have to use MAMEUIFX as opposed to MAME?

Is there a guide to getting the lottes shader working with this?

I'm loving the way HLSL makes the games look, but it seems to need tweaking on a per system basis, and the opengl route seems to be a one stop shop?
Floob,

I don't want to derail this thread as it is more about the HLSL changes, so maybe it'd be better to start another thread asking for help setting up GLSL. But, are you having a particular issue getting GLSL to work with MAME?

I could be missing a step, but you really just need:
1. a build of MAME that supports GLSL (all new version do by default)
2. the shader files some place
3. then just point the mame.ini at the shader (with GLSL enabled) and you are good to go.

Here is an older thread that may help:
http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Board=mamechat&Number=332320

millercentral

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 99
  • Last login:March 07, 2024, 04:38:47 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #25 on: May 17, 2015, 12:19:28 pm »
Is it possible to simulate monitor curvature with OpenGL/Lottes like it is with the HLSL implementation?

cubadoo1

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:May 24, 2015, 04:07:11 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #26 on: May 19, 2015, 10:51:32 am »
HI FOLKS new to this forum . here are my settings for 161 mame . i use a 2560x1440 ips monitor and i think theses settings look nice  :)

# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  hlsl
hlsl_prescale_x           6.4286
hlsl_prescale_y           6.4286
hlsl_preset               -1
hlsl_write                1
hlsl_snap_width           2560
hlsl_snap_height          1440
shadow_mask_alpha         0.30
shadow_mask_texture       Real_Scanlines.png
shadow_mask_x_count       1
shadow_mask_y_count       1
shadow_mask_usize         0.375
shadow_mask_vsize         0.25
shadow_mask_uoffset       0.0
shadow_mask_voffset       0.0
curvature                 0.15
round_corner              0.03
reflection                0.03
vignetting                0.03
scanline_alpha            1.0
scanline_size             1.0
scanline_height           1.050
scanline_bright_scale     1.1
scanline_bright_offset    0.30
scanline_jitter           0.0
defocus                   3.5,3.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                1.01
offset                    -0.15,-0.15,-0.15
scale                     1.15,1.15,1.15
power                     1.05,0.95,0.8
floor                     0.02,0.02,0.02
phosphor_life             0.2,0.2,0.2

#
# 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.35
raster_bloom_scale        0.115
bloom_lvl0_weight         0.90
bloom_lvl1_weight         0.5
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

By the way what does the vignetting option do?

cubadoo1

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:May 24, 2015, 04:07:11 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #27 on: May 20, 2015, 05:44:57 am »
I experimented with it a bit. It is a big improvement over the previous iteration of HLSL. What hasn't changed, though, is how resolution-hungry HLSL is. The Lottes shader basically looks good at 1080p+.

Until you run HLSL at 4k, you're getting noticeable artifacts in the shadow mask. Even 2560x1440 isn't enough pixels for it.

At 4k, HLSL might be slightly better now just because it has more options and HLSL never had that weird scaling glitch with the Genesis MESS driver that OpenGL has, but if you're not running at that, I'd stick with OpenGL and the Lottes shader.

Here's a shot of my settings for comparison (note that imgur compression just butchers it). I like to soften the image slightly, add a touch more bloom, and basically go for "ideal" color settings.


Hi bulbousbeard can you post your ini settings at 4k for me to try please?

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #28 on: July 20, 2015, 05:04:32 pm »
I finally got a chance to play with the new HLSL in the latest releases. It's great for raster games but vector games seemed to have regressed. The new bloom effect is sterile as hell and looks nothing like a Vector monitor. How did this happen?

Phreakwars

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 597
  • Last login:June 24, 2025, 01:58:29 pm
  • Waka-Waka
    • forum.arcadecontrols.com/index.php/topic,146325.0.html
    • My Facebook Page
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #29 on: July 21, 2015, 02:01:59 am »
HLSL is MAME filtering software. It uses heavily the GPU (not CPU) so systems with integrated graphic cards may suffer from lost frames if HLSL is used.

I've toyed around with it as well. On my main PC, I use a GeForce GTX 960, so I have no issues at all with it slowing me down. On the cabinet I'm building I'm using integrated graphics from the A-6 5400 CPU. I'm hoping it will be decent enough to use HLSL. I wouldn't try it with Intel integrated, or even GeForce integrated, but AMD has really surprised me with their APU's performance. I've built several PC's utilizing them but haven't tried MAME with HLSL yet... guess I'll find out later this week how it performs.

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #30 on: July 21, 2015, 12:15:28 pm »
I finally got a chance to play with the new HLSL in the latest releases. It's great for raster games but vector games seemed to have regressed. The new bloom effect is sterile as hell and looks nothing like a Vector monitor. How did this happen?
I didn't seem like it changed that much. But, you can still adjust it to look like it did before. It never looked much like a real vector monitor anyway so, until the dev team improves the vector simulation, it is what it is.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19959
  • Last login:Yesterday at 12:36:46 am
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #31 on: July 21, 2015, 01:08:18 pm »
I bought a dedicated Asteroids because few things are cooler than the streaks and glow of the bullet trails on an authentic vector monitor.
***Build what you dig, bro. Build what you dig.***

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #32 on: July 21, 2015, 01:16:28 pm »
I bought a dedicated Asteroids because few things are cooler than the streaks and glow of the bullet trails on an authentic vector monitor.
Same. I picked up an Asteroids Deluxe a few weeks ago. The 3D affect with the mirror and the black-light.. way cool.

floob

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:January 11, 2023, 04:36:51 pm
  • Looking to buy a pre-made MAME cab.
    • Retrogaming on a Raspberry Pi
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #33 on: July 21, 2015, 02:48:48 pm »
I bought a dedicated Asteroids because few things are cooler than the streaks and glow of the bullet trails on an authentic vector monitor.

Thats what makes me want to buy a Vectrex


dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #34 on: July 21, 2015, 03:19:13 pm »
I didn't seem like it changed that much. But, you can still adjust it to look like it did before. It never looked much like a real vector monitor anyway so, until the dev team improves the vector simulation, it is what it is.

All the bleed and flicker is gone. I played with the settings for quite a while and couldn't get it back.

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #35 on: July 21, 2015, 03:22:52 pm »
I bought a dedicated Asteroids because few things are cooler than the streaks and glow of the bullet trails on an authentic vector monitor.

The B&W vectors are especially impressive, I would love a Star Castle.

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #36 on: July 21, 2015, 03:37:54 pm »
I didn't seem like it changed that much. But, you can still adjust it to look like it did before. It never looked much like a real vector monitor anyway so, until the dev team improves the vector simulation, it is what it is.

All the bleed and flicker is gone. I played with the settings for quite a while and couldn't get it back.
You can try looking at this thread from mameworld. Uman posted some settings that might help. I'm not sure about the flicker as I don't use that option, but the bloom and such should still be doable:
http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=341593
 

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #37 on: July 21, 2015, 05:11:09 pm »
Yeah, it looks like you just have to adjust it above 1.0 for the bleed to start. You can't do that with the slider controls any more, it has to be done in the .ini file. It's a lot more GPU intensive though, I wonder why.
« Last Edit: July 21, 2015, 05:16:43 pm by dmckean »

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4134
  • Last login:June 11, 2025, 11:55:17 pm
  • NOM NOM NOM
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #38 on: July 23, 2015, 10:59:38 pm »
You may wish to consider selectable monitor models...  meaning... a user can select a certain monitor type, and there are settings that match that particular monitors specs.

 The idea being similar to how they make guitar effects pedals these days, that simulate various kinds of Amps.

 For example, there are monitors with lower dot pitch than others.
 Some monitors have different color output specs
 Some have different shadowmask patterns

 And because there are now console games in mame...  one can have things like:

 Amiga 1024s monitor
 C64 1702 monitor
 etc.
« Last Edit: July 23, 2015, 11:01:22 pm by Xiaou2 »

8BitMonk

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 989
  • Last login:March 15, 2025, 10:47:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #39 on: July 24, 2015, 12:06:28 am »
Still prefer the Lottes shader over any HLSL settings I've seen.
Games: Asteroids Deluxe | Atomiswave | Centipede | Championship Sprint | Defender | Donkey Kong | Dig Dug | Frogger | Ikari Warriors | Missile Command | Pac-Man | Pole Position | Robotron | Spy Hunter | Tempest | Super Mario Strikers