Jump to content
LaunchBox Community Forums

Mame BGFX Shaders - Tutorial


Lordmonkus

Recommended Posts

Just getting started playing around with this... thanks for the info.  I'm having a problem though.  When I use the ~ menu I can select the various effects like crt-geom.  Then I edited the mame.ini file in the 2 places you mentioned (video and bgfx screen chains) but when I launch a game the bgfx effects don't stick.  Any idea what I'm doing wrong?  Also, is there a way to increase the brightness in crt-geom?  I'd love it to be brighter if possible.  Thanks again!

Link to comment
Share on other sites

BGFX shaders are not very flexible to the end user since they are basically hard coded in the .json files.

At the time when I did this guide HLSL was a total mess and BGFX was the superior shader with less hassle but since then HLSL has undergone a massive improvement and is much better and easier to tweak to your liking. I would suggest looking into those. I posted my presets here:

You can preview changes using the ` menu but to make them permanent simply edit the raster.ini file in the \ini\presets folder.

  • Thanks 3
Link to comment
Share on other sites

24 minutes ago, Lordmonkus said:

BGFX shaders are not very flexible to the end user since they are basically hard coded in the .json files.

At the time when I did this guide HLSL was a total mess and BGFX was the superior shader with less hassle but since then HLSL has undergone a massive improvement and is much better and easier to tweak to your liking. I would suggest looking into those. I posted my presets here:

You can preview changes using the ` menu but to make them permanent simply edit the raster.ini file in the \ini\presets folder.

This is working great, thanks.  Is there any way to toggle hlsl_enable on and off during a game?

Link to comment
Share on other sites

4 hours ago, alnyden said:

Just getting started playing around with this... thanks for the info.  I'm having a problem though.  When I use the ~ menu I can select the various effects like crt-geom.  Then I edited the mame.ini file in the 2 places you mentioned (video and bgfx screen chains) but when I launch a game the bgfx effects don't stick.  Any idea what I'm doing wrong?  Also, is there a way to increase the brightness in crt-geom?  I'd love it to be brighter if possible.  Thanks again!

If you set bgfx_screen_chains option to crt-geom in mame.ini then it should stick as long as you're running -video bgfx. If you're running video d3d then that setting isn't used.

 

In your MAME\bgfx\chains folder, if you open crt-geom.json or deluxe version with notepad ++ you can change values. You can also create several different copies that are differently named and cycle through them while the emulation is running.

Link to comment
Share on other sites

  • 1 month later...

Hi, first of all thanks a lot Lordmonkus for your guides (this one and the others, I'm new here and it's a gold mine!).

I tried the BGFX shaders and it's much better than naked MAME. Now if I want to try your HLSL setup, do I have to set the "OSD VIDEO OPTION" and "bgfx_screen_chains" back to "auto" before switching HLSL to 1?

I guess it's a stupid question but do you know if your settings work fine on a 1080p VA screen?

 

Thank you.

Edited by Nocta
Link to comment
Share on other sites

I think if you just set video to "auto"

# OSD VIDEO OPTIONS
#
video                     auto

and then enable HLSL

# DIRECT3D POST-PROCESSING OPTIONS
#
hlslpath                  hlsl
hlsl_enable               1

Setting the video to Auto instead of BGFX should tell Mame to ignore the BGFX settings.

6 minutes ago, Nocta said:

I guess it's a stupid question but do you know if your settings work fine on a 1080p VA screen?

Yeah, should work just fine.

  • Thanks 1
Link to comment
Share on other sites

Hi guys I am wondering if you can help me please. I am trying to apply these HLSL or BGFX settings to my mame and its just not working at all.

I am running my mame folder inside \Emulators\Mame
I am running mameui64.exe and its version 0.181
1st I tried the BGFX by creating the mame.ini (also tried creating a mameui64.ini and made no difference), made the changes necessary to ini file and then played a game, pressed P to pause then tilde for the menu options,scrolled through the options but Window 0, Screen 0 Effect:  options didnt appear as an option at all?
I then read HLSL v2 was now better than BGFX so downloaded the new raster.ini file, edited the mame.ini file to point to Auto and HLSL enable to 1 and i have copied both the mame.ini and the raster.ini into 3 places (root mame folder, mame\ini folder and finally mame\ini\presets folder and it makes no difference.

this is driving me crazy, has anyone got any ideas where i am going wrong please?

thanks in advance

Edited by Hasslehogg
Link to comment
Share on other sites

Yes, command-line version is the absolute best especially if using a front-end like LaunchBox because that is your UI. You don't need MAME itself to have it.

If you have further issues then I'd suggest using the official build at mamedev.org

LaunchBox has filters already you can configure during it's import process. You don't need the binary itself to have it.

Link to comment
Share on other sites

  • 2 weeks later...

Hey guys. I'm running MAMEUI64, 0.181. None of these options are sticking for me for some reason. I've changed the two lines in Lordmonkus' original post, but crt-geom is not starting when I launch a game. I've also scrolled through the shader settings once Mame is loaded, and am able to see the crt-geom effection, but when I close Mame, it's gone. Lastly, I've tried switching to HLSL and using the modified vector above, but this too isn't working.

Am I having problems because I'm running MameUI? Should I switch? 

Thanks much.

Link to comment
Share on other sites

8 hours ago, noiseordinance said:

I've tried switching to HLSL and using the modified vector above, but this too isn't working.

You need the raster.ini file and enable hlsl in the mame.ini file.

8 hours ago, noiseordinance said:

Am I having problems because I'm running MameUI? Should I switch? 

This stuff should work with MameUI as well as the command line version but I stopped using the UI version a long time ago now so I don't know for sure.

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...