Thanks for the reply. I tried out regular MAME in the same directory and it worked. I went back to MAMEUI and it didn't work and then neither did regular MAME after that.
I figured out that some of my ini files were messed up and probably in too many places. I noticed in my ini file the HLSL setting was set to use shadow-mask while BGFX was set to use slot-mask. I changed them both to the same and deleted the extra inis, re-specified my ini path and it seems to work now. I don't know if it was the settings I changed or the extra inis I deleted even though they all said the same info.