Here are the Mame HLSL settings I use. HLSL has the advantage of working for both horizontal and vertical games.
These settings are for use in Mame version 0.172 or later. Older versions will not look right, there were changes made in Mame 0.172 that made HLSL a much better shader choice.
There are 3 text files inside, one is a readme with simple instructions. As always when making edits and changes make a backup of your files you are about ti edit first just in case you do not like the changes.
Copy the text from "mameini.txt" and paste it into the mame.ini file replacing the block of text that is already in it. Don't simply add it to the end.
Copy the text from rasterini.txt into the "raster.ini" file located in the /ini/presets folder in the Mame folder. Overwrite everything that is there.
As always with shader settings they may look better or worse on your monitor depending on size, resolution and calibration. These settings I think look really good on my monitor which is a 27" 1440 resolution TN panel from Asus.