Jump to content
LaunchBox Community Forums

Mame 241 HLSL/Shaders


Runamukk

Recommended Posts

Can anyone tell me how to enable hlsl shaders in mame 241?   I cant figure it out.  I looked for a master mame ini file but it seems it is broken into multiple files inside ini\presets there seem to be like 7 or so ini files like raster, vector, vector-mono, lcd, lcd-matrix GBA, gameboy. The only 2 that seem to mention hlsl are the 2 vector ones.   I want to basically launch mame hit this button "~" and play with the different parameters until I get it how I want then change my configs in the ini file.  I dont even know which one to to change or what to change initially to get the different setting to pop up in game.  It looks really blocky right now and I want it to look smoother like an old school nice crt...I'm open to other shaders if there is a better option fyi.  Thanks in advance.  

Link to comment
Share on other sites

40 minutes ago, Runamukk said:

Can anyone tell me how to enable hlsl shaders in mame 241?   I cant figure it out.  I looked for a master mame ini file but it seems it is broken into multiple files inside ini\presets there seem to be like 7 or so ini files like raster, vector, vector-mono, lcd, lcd-matrix GBA, gameboy. The only 2 that seem to mention hlsl are the 2 vector ones.   I want to basically launch mame hit this button "~" and play with the different parameters until I get it how I want then change my configs in the ini file.  I dont even know which one to to change or what to change initially to get the different setting to pop up in game.  It looks really blocky right now and I want it to look smoother like an old school nice crt...I'm open to other shaders if there is a better option fyi.  Thanks in advance.  

HLSL is controlled (primarily) via your MAME.ini file around line 363.

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlslpath                  hlsl
hlsl_enable               1
hlsl_oversampling         1
hlsl_write                auto
hlsl_snap_width           640
hlsl_snap_height          480
shadow_mask_tile_mode     0
shadow_mask_alpha         0.1
shadow_mask_texture       shadow-mask.png
shadow_mask_x_count       12
shadow_mask_y_count       6
shadow_mask_usize         0.5
shadow_mask_vsize         0.5
shadow_mask_uoffset       0.0
shadow_mask_voffset       0.0
distortion                0.0
cubic_distortion          0.10
distort_corner            0.0

OpenGL shaders are around 298.  

#
# OpenGL-SPECIFIC OPTIONS
#
gl_forcepow2texture       0
gl_notexturerect          0
gl_vbo                    1
gl_pbo                    1
gl_glsl                   0
gl_glsl_filter            1
glsl_shader_mame0         glsl\crt-easymode-halation\linear
glsl_shader_mame1         glsl\crt-easymode-halation\blurx
glsl_shader_mame2         glsl\crt-easymode-halation\blury
glsl_shader_mame3         glsl\crt-easymode-halation\thresh
glsl_shader_mame4         glsl\crt-easymode-halation\easyh
glsl_shader_mame5         none

The other files you mentioned such as raster.ini and vector.ini can be used to load custom settings only for those particular system types. They take priority/override what is in your MAME.INI if they are located in your INI folder.  If you wanted special settings that only apply to raster games, you can have those included in the raster.ini file (you only need to put the deltas from the MAME.ini).  Correspondingly, an INI named after the game will take priority for settings over the MAME.ini (qbert.ini as example).  

The MAME docs go into more gory detail on ini order priority here

Edited by sundogak
Added MAME link
Link to comment
Share on other sites

Thank you but where is the mame.ini file?  I looked through the mame root folder and the other folders within root and can't find it. Is it somewhere else or do I have to create it somehow after downloading a fresh version of mame.241?

 

Fyi I used the launchbox full set importer to download and configure mame241.

Edited by Runamukk
Link to comment
Share on other sites

Thank you all very much. I've got the ini file, have d3d enabled, set hlsl to 1, set hlsl oversampling to 1and it still looks the same and when I push the squiggly button to pull up the different settings it's just monitor and audio stuff with no hlsl options. What am I missing? I've cycled back and forth with control/alt/f5 and nothing changes...still looking blocky. Here's my ini file.  Is there anything else I need to change within it or somewhere else? FYI my monitor is only 720p if that makes a difference.  Thanks again in advance. 

164834088742522036522530094053.jpg

Edited by Runamukk
Link to comment
Share on other sites

I just noticed it works in mame directly but not when I launch the game through launchbox to open the game with mame.  Also, in neither scenario does pushing ~ bring up the different hlsl options to adjust the various settings.  My mame forlder is in the launchbox\emulators\mame.241 that was imported using the romset importer auto download mame tool.

Edited by Runamukk
Link to comment
Share on other sites

Got it working mostly....I uninstalled mame completely and reinstalled it with a direct download instead of going through the full romset downloader which downloaded mame for me.  I set the pathway in Launchbox for the emulator and the roms, with both being located within the emulators folder.  I turned on hlsl and it all works.  It appears the launchbox mame downloader is the culprit with all my woes and somehow corrupted mame when it downloaded.  I still cannot access the slider controls via "~" that adust hlsl settings in real time and if anyone knows why Im happy to get a solution but thats a mame thing so I'm going to a mame forum.  It seems like I had 2 separate issues...Launchbox downloading a gimped version of mame.241 and mame not bringing up hlsl settings through the slider settings.  Thanks to all and if Launchbox or anyone else with the same issue is out there I hope this helps.

Link to comment
Share on other sites

Launchbox downloads the same Mame you get from the official site, it is not gimped in any way.

The HLSL sliders from the ~ menu have to be cycled through to get to each setting and they are temporary, they go away after you shut down Mame. You need to edit the raster or vector ini files to make the settings permanent.

Link to comment
Share on other sites

The issue I'm having is that when I open a game in mame and push ~ to cycle up or down through the slider settings it's only about 10 settings like brightness, gamma, speaker etc....none of the hlsl specific settings are there...and I have hlsl enabled.

Link to comment
Share on other sites

22 minutes ago, Runamukk said:

The issue I'm having is that when I open a game in mame and push ~ to cycle up or down through the slider settings it's only about 10 settings like brightness, gamma, speaker etc....none of the hlsl specific settings are there...and I have hlsl enabled.

They are under Slider Controls - Tab Key by default

131756914_Image4.thumb.png.213cc318a34af26e549cf9f29410379c.png

1450452003_Image3.thumb.png.150d476353ac7bdc35d9f7e9c3fb2124.png

Edited by sundogak
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...