
Greatest screen filter ever
Re: Greatest screen filter ever
Slight adjustment on the shadowmask settings......


Re: Greatest screen filter ever
not looking bad, but the scanlines don't match the game's resolution. On the timer you can see how the scanlines cut pixels apart (lowest scanline within the "95").
Re: Greatest screen filter ever
Agreed.... There appears to be a fair few issues with the scanlines in general. Need to carry on playing.
-
BPzeBanshee
- Posts: 4859
- Joined: Sun Feb 08, 2009 3:59 am
Re: Greatest screen filter ever
That's weird. It seems to be working for me with MAMEUI but I'm using XP. I might check it out later.emphatic wrote:Thanks. It doesn't work for me still (I have installed DirectX 9C on my Windows7 32 bit). MAME UI even wipes all the stuff I put in the .ini each time I start it. If i make the .ini write-protected, the settings are ignored.
Re: Greatest screen filter ever
Right.... after some more adjustments and it's certainly getting there:


Re: Greatest screen filter ever
looking quite nice, but would you say that it's worth the effort in comparison to a standard hardware scanline emulation ?
The (much hated) Sharp U2VA panel of my current Sony TV still looks more like a CRT than your screenshot
The (much hated) Sharp U2VA panel of my current Sony TV still looks more like a CRT than your screenshot

Re: Greatest screen filter ever
Well it's worth the effort if you have nothing else to use!
It certainly looks better than any other type of "effect" I have tried with MAME..... not that I use MAME that much in reality. It will certainly need "tweaks" for groups of all the different ROM resolutions, especially for the shadowmask I suspect.
Dare I say the biggest use of this filtering will be for people that insist, unless you see crap convergence, pincushion and basically a blurry RF type image.... it won't be classed as near CRT emulation. Any device won't please those "special" people! roflol
It even has a "NTSC" filter..... I mean WTF will want to replicate that!!!!!

It certainly looks better than any other type of "effect" I have tried with MAME..... not that I use MAME that much in reality. It will certainly need "tweaks" for groups of all the different ROM resolutions, especially for the shadowmask I suspect.
Dare I say the biggest use of this filtering will be for people that insist, unless you see crap convergence, pincushion and basically a blurry RF type image.... it won't be classed as near CRT emulation. Any device won't please those "special" people! roflol
It even has a "NTSC" filter..... I mean WTF will want to replicate that!!!!!

Re: Greatest screen filter ever
How exactly did you fix/change the scanline to pixel alignment between the last two shots ? the proper alignment has been one of MAME's biggest problems since they switched from DirectDraw to D3D.
Re: Greatest screen filter ever
I cheated a bit! lol
I added "defocus" to both the x & y axis and then added "oversample" to both the x & y axis. However, with the settings I have you will need a decent graphics card.
I have played with the scanline size and alpha settings, but could not get them to be pixel perfect no matter what I tried. Not saying it can't be done, but I couldn't get it working properly with the time I spent.
In all honesty the changing of the previously mentioned options has added other benefits to the image, so it's not all bad.
Here are my settings:
#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 1
hlslpath hlsl
shadow_mask_alpha 0.2
shadow_mask_texture aperture.png
shadow_mask_x_count 384
shadow_mask_y_count 224
shadow_mask_usize 0.09375
shadow_mask_vsize 0.09375
oversample_x 2.5
oversample_y 2.5
curvature 0.0
screen_scale_top 1.0
screen_scale_bottom 1.0
pincushion 0.0
scanline_alpha 0.6
scanline_size 1.0
scanline_bright_scale 1.0
scanline_bright_offset 0.6
scanline_jitter 0.0
defocus_x 1.0
defocus_y 1.0
red_converge_x 0.0
red_converge_y 0.0
green_converge_x 0.0
green_converge_y 0.0
blue_converge_x 0.0
blue_converge_y 0.0
red_radial_converge_x 0.0
red_radial_converge_y 0.0
green_radial_converge_x 0.0
green_radial_converge_y 0.0
blue_radial_converge_x 0.0
blue_radial_converge_y 0.0
red_from_r 1.0
red_from_g 0.0
red_from_b 0.0
green_from_r 0.0
green_from_g 1.0
green_from_b 0.0
blue_from_r 0.0
blue_from_g 0.0
blue_from_b 1.0
saturation 1.0
red_offset 0.0
green_offset 0.0
blue_offset 0.0
red_scale 1.0
green_scale 1.0
blue_scale 1.0
red_power 2.2
green_power 2.2
blue_power 2.2
red_floor 0.02
green_floor 0.02
blue_floor 0.02
red_phosphor_life 0.4
green_phosphor_life 0.4
blue_phosphor_life 0.4
yiq_enable 0
yiq_w 4.1187867
yiq_a 0.5
yiq_b 0.5
yiq_fsc 1.5
yiq_fsc_scale 1.0
yiq_phase_count 2
I added "defocus" to both the x & y axis and then added "oversample" to both the x & y axis. However, with the settings I have you will need a decent graphics card.
I have played with the scanline size and alpha settings, but could not get them to be pixel perfect no matter what I tried. Not saying it can't be done, but I couldn't get it working properly with the time I spent.
In all honesty the changing of the previously mentioned options has added other benefits to the image, so it's not all bad.
Here are my settings:
#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 1
hlslpath hlsl
shadow_mask_alpha 0.2
shadow_mask_texture aperture.png
shadow_mask_x_count 384
shadow_mask_y_count 224
shadow_mask_usize 0.09375
shadow_mask_vsize 0.09375
oversample_x 2.5
oversample_y 2.5
curvature 0.0
screen_scale_top 1.0
screen_scale_bottom 1.0
pincushion 0.0
scanline_alpha 0.6
scanline_size 1.0
scanline_bright_scale 1.0
scanline_bright_offset 0.6
scanline_jitter 0.0
defocus_x 1.0
defocus_y 1.0
red_converge_x 0.0
red_converge_y 0.0
green_converge_x 0.0
green_converge_y 0.0
blue_converge_x 0.0
blue_converge_y 0.0
red_radial_converge_x 0.0
red_radial_converge_y 0.0
green_radial_converge_x 0.0
green_radial_converge_y 0.0
blue_radial_converge_x 0.0
blue_radial_converge_y 0.0
red_from_r 1.0
red_from_g 0.0
red_from_b 0.0
green_from_r 0.0
green_from_g 1.0
green_from_b 0.0
blue_from_r 0.0
blue_from_g 0.0
blue_from_b 1.0
saturation 1.0
red_offset 0.0
green_offset 0.0
blue_offset 0.0
red_scale 1.0
green_scale 1.0
blue_scale 1.0
red_power 2.2
green_power 2.2
blue_power 2.2
red_floor 0.02
green_floor 0.02
blue_floor 0.02
red_phosphor_life 0.4
green_phosphor_life 0.4
blue_phosphor_life 0.4
yiq_enable 0
yiq_w 4.1187867
yiq_a 0.5
yiq_b 0.5
yiq_fsc 1.5
yiq_fsc_scale 1.0
yiq_phase_count 2
Re: Greatest screen filter ever
Sanity check.....
This is what the same game looks like with the previous "Scanline / Shadowmask" filter I was using before this new functionality came out. Quite a difference in overall "CRT Simulation" between the old - quite frankly crap in comparison - filtering techniques.

This is what the same game looks like with the previous "Scanline / Shadowmask" filter I was using before this new functionality came out. Quite a difference in overall "CRT Simulation" between the old - quite frankly crap in comparison - filtering techniques.

Re: Greatest screen filter ever
But to be honest, who used this particular filter ? MAME has always been able to display a CRT-like image (to my standards). Here's what my settings usually look like:


Re: Greatest screen filter ever
Can't argue with that one lol..... but I feel this has always been a case of most people "thinking" what a CRT should look like is poles apart from what it "actually" looks like. I have fallen in to that catagory in the past. Luckily I have a couple of good CRT set-ups now, so at least when doing stuff I can actually compare like for like.
You only have to see some of the demo shots of this new filtering by others to realise that most are way off the mark.
It's a good job I stick to retro displays.... saves all the flaming aggro!
You only have to see some of the demo shots of this new filtering by others to realise that most are way off the mark.
It's a good job I stick to retro displays.... saves all the flaming aggro!

Re: Greatest screen filter ever
Some old console games had graphics designed assuming they would be shown on a crappy monitor. Certain dithering patterns result in smooth(ish) gradients on an NTSC display when composite video (or worse, RF!) is used, giving the illusion of an expanded palette because of the colour bleeding. When anything better than composite is used, these dithering patterns look like, well, dithering.fagin wrote:It even has a "NTSC" filter..... I mean WTF will want to replicate that!!!!!
The NES has a few games like this... While I think the Mario games look better by far in crisp RGB, I prefer the look of games like Blaster Master and Faxanadu with NTSC muddiness in place. It improves games that have an earthen look, in my opinion. Here are a few examples of an NTSC filter that improves the picture, if slightly; note the grass in Snake's Revenge, the lava in Metroid, and the rocks in Blaster Master.
Even some (many?) games on the Genesis used dithering to gloss over the fact that the system didn't have hardware translucency support like the SNES, and over composite video the effect doesn't look hugely worse than real translucency... except for the rainbow artifacts, that is. Though on the Genesis I'd rather have rich colours via RGB than half-decent fake translucency via composite any day.
The nice thing about NTSC filters in an emulator is that the better ones can simulate the colours as they would have looked originally, without the dotcrawl or other horrid NTSC artifacts.
Sorry if I'm drifting off-topic...
Re: Greatest screen filter ever
^^That's true - The PCE/TGCD version of Ys shows that effect in the tileset used for the grass-tiles just outside Minea; With CVBS and a bit of blurrines the dithering looks much more akin to grass straws than the accurate pixeling shown with RGBs. (which just looks like random brown-ish pixels in a mostly flat green tile)
That all said, having this "special FX" simulated with a filter on a LCD still looks much crappier than compo video on a CRT. In fact it looks so crappy that I'd just wouldn't care about that particular effect and rather play it pixelsharp with scanlines on, *if* played on a LCD.
That all said, having this "special FX" simulated with a filter on a LCD still looks much crappier than compo video on a CRT. In fact it looks so crappy that I'd just wouldn't care about that particular effect and rather play it pixelsharp with scanlines on, *if* played on a LCD.
.

.

.
Re: Greatest screen filter ever
Heh, I've been working on this part with MooglyGuy. To add to blargg's page and your post, its not just a matter of adding artifacts and band-limiting (some people mistakenly BLUR the output, giving the incorrect result) to make games look a little bit closer to what is intended.fagin wrote:It even has a "NTSC" filter..... I mean WTF will want to replicate that!!!!!
Take this raw bitmap output from the TRS-80/CC2:

Here's the output (from my own program not the HLSL shader), where I've tripled the scanlines to make the effect more clear horizontally while maintaining the correct aspect ratio:

The fact that the luma signal is modulated at the colour subcarrier results in exactly this effect, the pixel width in time being half a cycle. Note that as long as your resolution is high enough, handling the NTSC signals in a band-limited manner scales quite well, even if you need to do anisotropic scaling. You can of course "fake it" with a ad hoc filter, but that's no fun and hopeless if you want to display the Apple II hi-res mode accurately.
Band-limiting luma values can be quite important as well. Take this screenshot from a Megadrive game:

Most toy filters will display this screen in a hilarious fashion. Here's something closer to what its meant to look like (usual cavaets apply, this time quadrupled... sorry, old debugging image):

Yeah, they modulated the tiles to get a different shaded using the fact that the signal was band-limited. Last but not least, the very reason I got involved:

What, did you forget the rainbow?


Active scanline time isn't exactly right because I don't have any measurements of it (my Megadrive is PAL). Also, I'm not too confident about the colorburst phase but anyway, you get the idea. When you treat the "emulator" video output as a time signal, you can always increase your overall accuracy at the cost of a bit more computation. In Moogly's version, he's implemented a FIR notch filter that I designed for him that might make my scanline-quadrupled/tripled output look better since the Y signal bandwidth can be increased.
There's even more dramatic examples, so don't discount the importance of accurate NTSC emulation! Once we get down to the voltage level, jitter, etc., we'll even need tint, hue and saturation controls like on a TV receiver.
<RegalSin> It does not matter, which programming language you use, you will be up your neck in math.
Re: Greatest screen filter ever
Don't get me wrong I appreciate the effort you guys have / continue to put in to this. It's just that I wouldn't hurt my eyes trying to replicate a signal type that only my nightmares are made of.
However we are all different and I can certainly understand those that do want this functionality, especially for the non RGB based sources.
