bulbousbeard
Iconic Romhacker Analinguist
- Joined
- Jul 31, 2013
- Posts
- 481
I've spent a lot of time fiddling around with MAME's HLSL filter to get it to look more like an arcade monitor, but it was a lost cause because the image was always blurry and lacking the crispness of the real thing. Well, I dug into the shader programs and found out that the problem was really simple to fix. HLSL was applying linear filtering to everything when scaling up the image, so it was always going to look soft, blurry, and terrible.
This is the blurry nastiness of the default HLSL prescale shader:
http://i.imgur.com/eQuL43p.jpg
This is how it looks with a simple tweak to the prescale shader:
http://i.imgur.com/PrQ3MTp.jpg
If you're interested in trying it, look at your hlsl folder in your MAME directory, open prescale.fx and find this:
sampler DiffuseSampler = sampler_state
{
Texture = <Diffuse>;
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;
Change it to this:
Texture = <Diffuse>;
MipFilter = NONE;
MinFilter = NONE;
MagFilter = NONE;
Now that the image is actually sharp, you can use HLSL's defocus setting to find the sweet spot between PC and arcade sharpness; before, the image was already so blurry to begin with that the defocus setting was pointless.
I took some screenshots of more games so you can see how big of a difference it makes. Note: imgur converted these images to JPG and reduced the quality significantly. It actually looks a lot more awesome when running MAME.
Marvel Superheroes
http://i.imgur.com/pG4oMoU.jpg
Ninja Baseball Batman
http://i.imgur.com/3fcItKP.jpg
Mystic Riders
http://i.imgur.com/lEDzFyh.jpg
Final Fight
http://i.imgur.com/B1VPyFe.jpg
Street Fighter 3: Third Strike
http://i.imgur.com/wNlg83e.jpg
Samurai Shodown 3
http://i.imgur.com/Rs67ZUr.jpg
Metal Slug 2
http://i.imgur.com/bs7c6Ai.jpg
http://memegenerator.net/instance/42680609
This is the blurry nastiness of the default HLSL prescale shader:
http://i.imgur.com/eQuL43p.jpg
This is how it looks with a simple tweak to the prescale shader:
http://i.imgur.com/PrQ3MTp.jpg
If you're interested in trying it, look at your hlsl folder in your MAME directory, open prescale.fx and find this:
sampler DiffuseSampler = sampler_state
{
Texture = <Diffuse>;
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;
Change it to this:
Texture = <Diffuse>;
MipFilter = NONE;
MinFilter = NONE;
MagFilter = NONE;
Now that the image is actually sharp, you can use HLSL's defocus setting to find the sweet spot between PC and arcade sharpness; before, the image was already so blurry to begin with that the defocus setting was pointless.
I took some screenshots of more games so you can see how big of a difference it makes. Note: imgur converted these images to JPG and reduced the quality significantly. It actually looks a lot more awesome when running MAME.
Marvel Superheroes
http://i.imgur.com/pG4oMoU.jpg
Ninja Baseball Batman
http://i.imgur.com/3fcItKP.jpg
Mystic Riders
http://i.imgur.com/lEDzFyh.jpg
Final Fight
http://i.imgur.com/B1VPyFe.jpg
Street Fighter 3: Third Strike
http://i.imgur.com/wNlg83e.jpg
Samurai Shodown 3
http://i.imgur.com/Rs67ZUr.jpg
Metal Slug 2
http://i.imgur.com/bs7c6Ai.jpg
http://memegenerator.net/instance/42680609
Last edited: