Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

Recommended Posts

Posted

Hello Ladies and Gentlemen,

as a view might know, MAME supports OpenGL now, that means we can use OpenGL shaders (similar to HLSL) now in MAME. There are at least two OpenGL shaders ready for pure fun out now:

The Timothy Lotte shader and the CRT-geom shader.

Lotte´s version for highend-rigs and CRT-geom for lowend-rigs, so there is a solution for nearly everyone.

You can download both shaders here in the download-section or you can just install the latest version of MAMEUIFX v0.161, which also contains the latest upcoming huge improvements of HLSL, done by the awesome dude Jezze.

So if you cant wait untill the official release of v0.162, you have the opportunity to check the NEW HLSL right now.

Also MAMEUIFX has a wonderful and easy to use GUI, for the faint hearted fellows outthere ;) and is my recommendation for everyone who want it the easy way.

In the download section is also a basic tutorial, how to install and use the OpenGL shaders. A brief instruction how to use the CRT-geom shader, can be found in this thread.

Nice looking "default" HLSL presets with the new HLSL, will also be posted here:

Jezze´s prefered HLSL settings:

## CORE SCREEN OPTIONS#brightness                1.00contrast                  1.00gamma                     1.00## DIRECT3D POST-PROCESSING OPTIONS#hlsl_enable               1hlslpath                  hlslhlsl_prescale_x           8hlsl_prescale_y           8hlsl_preset               -1hlsl_write               hlsl_snap_width           3200hlsl_snap_height          1800shadow_mask_alpha         0.5shadow_mask_texture       shadow-mask.pngshadow_mask_x_count       6shadow_mask_y_count       4shadow_mask_usize         0.1875shadow_mask_vsize         0.25shadow_mask_uoffset       0.0shadow_mask_voffset       0.0curvature                 0.0round_corner              0.0reflection                0.25vignetting                0.25scanline_alpha            0.75scanline_size             1.0scanline_height           1.0scanline_bright_scale     2.0scanline_bright_offset    0.0scanline_jitter           0.0defocus                   1.0,0.0converge_x                0.0,0.0,0.0converge_y                0.0,0.0,0.0radial_converge_x         0.0,0.0,0.0radial_converge_y         0.0,0.0,0.0red_ratio                 1.05,0.00,0.10grn_ratio                 -0.10,1.00,0.25blu_ratio                 -0.25,0.25,1.25saturation                1.25offset                    -0.30,-0.20,-0.05scale                     1.15,1.05,0.90power                     0.90,0.90,1.15floor                     0.05,0.05,0.05phosphor_life             0.5,0.5,0.5## BLOOM POST-PROCESSING OPTIONS#vector_bloom_scale        0.50raster_bloom_scale        0.50bloom_lvl0_weight         1.00bloom_lvl1_weight         0.64bloom_lvl2_weight         0.32bloom_lvl3_weight         0.16bloom_lvl4_weight         0.08bloom_lvl5_weight         0.04bloom_lvl6_weight         0.04bloom_lvl7_weight         0.02bloom_lvl8_weight         0.02bloom_lvl9_weight         0.01bloom_lvl10_weight        0.01

My own HLSL settings:

## CORE SCREEN OPTIONS#brightness                1.00contrast                  1.00gamma                     1.00## DIRECT3D POST-PROCESSING OPTIONS#hlsl_enable               1hlslpath                  hlslhlsl_prescale_x           5hlsl_prescale_y           5hlsl_preset               -1hlsl_write                hlsl_snap_width           1920hlsl_snap_height          1080shadow_mask_alpha         0.35shadow_mask_texture       ShadowMask.pngshadow_mask_x_count       6shadow_mask_y_count       4shadow_mask_usize         0.1875shadow_mask_vsize         0.25shadow_mask_uoffset       0.0shadow_mask_voffset       0.0curvature                 0.10round_corner              0.18reflection                0.10vignetting                0.20scanline_alpha            0.45scanline_size             1.0scanline_height           1.0scanline_bright_scale     1.0scanline_bright_offset    0.0scanline_jitter           0.05defocus                   1.0,0.5converge_x                0.0,0.0,0.0converge_y                0.0,0.0,0.0radial_converge_x         0.0,0.0,0.0radial_converge_y         0.0,0.0,0.0red_ratio                 1.05,0.00,0.10grn_ratio                 -0.10,1.00,0.25blu_ratio                 -0.25,0.25,1.25saturation                1.25offset                    -0.30,-0.20,-0.05scale                     1.15,1.05,0.90power                     0.90,0.90,1.15floor                     0.02,0.02,0.02phosphor_life             0.4,0.4,0.4## NTSC POST-PROCESSING OPTIONS#yiq_enable                0yiq_cc                    3.59754545yiq_a                     0.5yiq_b                     0.5yiq_o                     1.570796325yiq_p                     1.0yiq_n                     1.0yiq_y                     6.0yiq_i                     1.2yiq_q                     0.6yiq_scan_time             52.6yiq_phase_count           2## VECTOR POST-PROCESSING OPTIONS#vector_length_scale       0.8vector_length_ratio       40.0## BLOOM POST-PROCESSING OPTIONS#vector_bloom_scale        0.3raster_bloom_scale        0.45bloom_lvl0_weight         1.00bloom_lvl1_weight         0.64bloom_lvl2_weight         0.32bloom_lvl3_weight         0.16bloom_lvl4_weight         0.08bloom_lvl5_weight         0.04bloom_lvl6_weight         0.04bloom_lvl7_weight         0.02bloom_lvl8_weight         0.02bloom_lvl9_weight         0.01bloom_lvl10_weight        0.01

and finally some vector-games based HLSL settings which create a nice glow, also done by Jezze:

## BLOOM POST-PROCESSING OPTIONS#vector_bloom_scale        1.00bloom_lvl0_weight         1.00bloom_lvl1_weight         0.16bloom_lvl2_weight         0.24bloom_lvl3_weight         0.32bloom_lvl4_weight         0.48bloom_lvl5_weight         0.00bloom_lvl6_weight         0.96bloom_lvl7_weight         0.72bloom_lvl8_weight         0.48bloom_lvl9_weight         0.24bloom_lvl10_weight        0.12


Please note, that you often will need to set the vector settings on a per game basis, as some vector parameters are really depending on the vector-game played. This is especially true for the vector_length_scale and the vector_length_ratio.
Feel free to experiment and to share your settings with us here :) .

cheers u-man :D

  • Like 2
Posted

wow! And just as I thought that updating to .158 would be futhure proof for a while :D

Will this also speed games up a bit from running shaders with direct3d?

Posted

hi, same question

I have problem with heavy slowdown in game using regular HLSL.

This shader work without problem ?

thanks

Posted

Shaders in MAME slow down in general. A shader is a additional FX, if you dont have a dedicated graphicscard, these FX are rendered by CPU. As MAME emulation is done 100% through CPU, you will likely get slow downs. Also HLSL settings are very important, especially the prescale filter. Silly settings result in poor performance.

HLSL is more resource friendly, i.e. I can play most roms with HLSL and a Intel HD 4000, but I cant do the same with OpenGL.

If you dont have a dedicated graphicscard and at least Intel HD 4000 or ATI equivalent, I wouldnt recommend HLSL or OpenGL at all. In this cases, its best to work with overlays, but thats it.

Posted

Shaders in MAME slow down in general. A shader is a additional FX, if you dont have a dedicated graphicscard, these FX are rendered by CPU. As MAME emulation is done 100% through CPU, you will likely get slow downs. Also HLSL settings are very important, especially the prescale filter. Silly settings result in poor performance.

HLSL is more resource friendly, i.e. I can play most roms with HLSL and a Intel HD 4000, but I cant do the same with OpenGL.

If you dont have a dedicated graphicscard and at least Intel HD 4000 or ATI equivalent, I wouldnt recommend HLSL or OpenGL at all. In this cases, its best to work with overlays, but thats it.

ok thank you for your advice, I will check it

Posted

Yesterday i have compared different shaders, OpenGL vs. HLSL (direct3d) and found out interesing things. It seems that OpenGL has way better handling of the graphiclayer than Direct3D and it doesnt matters, if you use shaders or not.

i.e. you can try Wonderboy Deluxe and compare the two different graphic-layers. At default Direct3D creates tearing and stutter. Now if you start the same game with default settings and OpenGL, all errors are gone. It seems that every game that runs at different speed from 60Hz, looks way better on OpenGL at default settings with audio synced.

I allready informed Calamity (GroovyMAME), to check this out too. I am really impressed how OpenGL turns out, especially with this nice shader.

  • Like 2
Posted

It needs to be noted that official 0.159 has GLSL options disabled. You need to pull from GIT after the linked commit or wait for 0.160 to use GLSL with a non SDL build.

http://git.redump.net/mame/commit/?id=f33d0614c397ad25b16523f96910cc8fdc1a8a00

Yeah, i know. I have put this allready in the description of the shader, in the downloadsection. If people cannot compile, they should wait for the next release, like you mentioned. Stay tuned, one MAME Distro will be greatly updated :D:P in the next update/release of MAME.

  • 3 weeks later...
Posted

I just bumped this thread to inform you, that MAME 0160 is out and in this case, MAMEUIFX 0160 is out too:

http://mame32fx.altervista.org/home.htm

The shader mentioned here in this thread, is now implemented right into MAMEUIFX and you can enable it easy via GUI.

1) Enable OpenGL Video Mode
2) Enable GLSL in OpenGL options
3) Select the Shader
4) Play a game

"You'll need a really powerful PC and a good video card with OpenGL 2.0 support for enjoying the experience...."


I am very happy about this release or mamesick (creator of MAMEUIFX) , there will be even more stuff coming out in the near future. It turns out that this collaboration is awesome and that I have found a person, that is really nice to work with.

Check it out folks :)

  • Like 1
  • 2 weeks later...
Posted

I`ve been playing around with MAMEUIFX64 V0.160.1, but it doesn`t seem to remember all the folders for ROMs, etc. So each time that I start it, I have to manually point it to all the folders. Any suggestions?

The 32 bit version doesn't have this issue, so I'm using that for the time being.

I'm also interested in where you enable OpenGL video mode. On the default game options tab, the OpenGL has all the options greyed out, so I can't enable GLSL in OpenGL options

Posted

I`ve been playing around with MAMEUIFX64 V0.160.1, but it doesn`t seem to remember all the folders for ROMs, etc. So each time that I start it, I have to manually point it to all the folders. Any suggestions?

The 32 bit version doesn't have this issue, so I'm using that for the time being.

I'm also interested in where you enable OpenGL video mode. On the default game options tab, the OpenGL has all the options greyed out, so I can't enable GLSL in OpenGL options

Not being sure of the OS you are running, I will go with the assumption you are running Windows 7 or higher. Are you running the 64-bit version as Administrator? For it to not remember it sounds like the config file for the app is not being overwritten.

Posted

as Draco says.... and for the opengl options: you need to set the video-mode in the display-section to opengl... then the opengl function are enabled and not greyed out anymore.

Posted

Yes, Draco you were right as to the problem. I'm using Windows 7 and I'm logged in with the administrator account. I'm a bit confused why I can't get the 64 bit version to save, but it does work properly when I right click and "run as administrator". Shouldn't this normally work with admin rules because it was installed in the administrator account?

Thanks U-man for the tip on the Open GL options, got it.

Posted

Unfortunately, when it comes to permissions with the applications, they have to be set to run as administrator. This is all part of the UAC that was implemented with Vista and refined with Win 7 and above.

Posted

The issue was that I had installed MAMEUIFX in Program Files, and there were issues with permissions / admin rights that didn't work, no matter what I tried. Once I reinstalled it in C:/Emulators, it worked fine.

The shader is absolutely fantastic! :). I was blown away with the analogue feel.

I'm curious though, I'm guessing that using MAMEUIFX with GameEx is always going to bring up the MAMEUI GUI?

Is it difficult to set this shader up with vanilla MAME 160, instead?

Posted

no it is not, you would need to alter the mame.ini properly , but it would work. follow the link in the first post into the downloadsection and read the instructions.

meanwhile, i will try to found out, how you can start straight into a game with MAMEUIFX and a commandline. I know this is possible too.

  • Like 1
Posted

If anyone would like to post some comparison screens D3D/OGL I would love to see the difference! :D

Posted

Its not a easy task to do this... because it depends on your HLSL settings, how the D3D part will look.

Basically the slotmask of OpenGL looks way better and fits for every game.

Downsides are missing sliders, so you dont have options for phosphor life, blur or focus, colorshifting, vector settings, other slotmasks etc. etc.

Also it is very resource hungry and you need a good graphicscard, if you intend to use it for all games.

So to say, the OpenGL shader is as it is... live with it or dont ;)

Wait the next release of MAMEUIFX, there will be some suprises :D

Posted

ok.... as i promised to look for a commandline for mameuifx... here it is:

The command line uses mame.ini for its rompath settings, in particular. If you use a non-standard path and have it set in UI, it will likely not carry over to normal command line operation.

You should be able to start i.e. dkong (Donkey Kong) as: mameuifx64 dkong -rompath path\to\roms with 'path\to\roms' being your location on drive for ROMS.

EXAMPLE: mameuifx64.exe dkong -rompath D:\GAMESTATION\MAME\ROMS_0160

  • Like 1
Posted

Thanks u-man, for the commandline usage for MAMEUIFX. Were you able to get this working in GameEx? I wasn't, although I was able to follow your instructions and was able to get the Lottes shader working just as well on regular Vanilla MAME in GameEx. Thanks! (64 bit MAME V160)

Here are some screenshots, so people can get a feel for it.

First, here is a screenshot WITHOUT the new OpenGL Lottes scanline effect. This is via Direct3D, without smoothing, so it's very sharp, almost like pixel art. But it really looks nothing like being in an Arcade and looking at an old CRT monitor back in the 80s. Not sure if anyone likes this type of image, but it's precise. Notice how bright the image is.

LjJRVDq.jpg

Below is a Direct3D output WITH bilinear filtering, which softens the pixels nicely. This is pretty standard on a typical MAME setup, I think. The dynamic range is reduced.

FZzMCmC.jpg

The new OpenGL Lottes scanline shader effect is below. It's awesome. And I've got it running quite easily on my MAME setup in GameEx.

Kegfe8X.jpg

  • Like 1
Posted

wow thanks for the comparision shots Macguvyer :wub::wub:

Looks super neat! hope that it gets as tweakable as the HLSL shaders.

Looks great

Posted

Thanks u-man, for the commandline usage for MAMEUIFX. Were you able to get this working in GameEx? I wasn't, although I was able to follow your instructions and was able to get the Lottes shader working just as well on regular Vanilla MAME in GameEx. Thanks! (64 bit MAME V160)

Yes, I was able to get it work with GameEx. My previous commandline assumed that you have setup MAME as a seperate emulator, if you want to use the mame section of GameEx, you should consider the following:

this is what I did...

- set up your mame.ini with the paths and settings you want

- make sure you have a folder called ini

- copy (not move) mame.ini to your ini folder.

- now it should all work as you expected it to.

wow thanks for the comparision shots Macguvyer :wub::wub:

Looks super neat! hope that it gets as tweakable as the HLSL shaders.

Looks great

Like I said there are no options for OpenGL, but you can change some stuff, if you open the shader with a textedit app and look inside of it. Its well documented inside and you can change some stuff like bloom or scanlines. Sadly, you need to do this manually and there will be no sliders. Hopefully in the next update of MAMEUIFX, there will be more HLSL stuff, keep your eyes open ;)

The included HLSL shader will be way better than the original MAME one, you can bet your ass on it and it will be a good competitive shader vs. OpenGL ... believe me... plus it will have sliders and more options to manipulate the final image than the OpenGL pendant.

  • Like 2
Guest
This topic is now closed to further replies.
×
×
  • Create New...