Replica of N64 VI-Filter

I had made a replica of the N64 VI filter that was in Angrylion’s plugin. It tries to blur the dither that was in the raw RDRAM screenshot and add antiailasing postprocessing and scales the horizontal 320px to 640px by something like 2xsai or interpolate filter. Although, the only thing missing in the replica is the lack of antiailasing since there wasn’t any antiailasing postprocessing shader and the N64 VI Filter only masked the 3D edges and antiailasing it. There are five variants of the replica. The regular one is for pure 240p source, the 480i tries to look like how the VI Filter looks on the source that is 480i except the shader deinterlaces it, the Angrylion-force240p one is for using the plugin in Mupen64plus core since it only works when setting the resolution at 640x480, and the last two makes it either have scanlines or use CRT shader on it to look like how 240p N64 game looks like on CRT TV.

Image: http://imgur.com/cNcw9DD

That’s looking really good.

The fx-aa.cg shader didn’t do what you needed for antialiasing?

[QUOTE=hunterk;20663]That’s looking really good.

The fx-aa.cg shader didn’t do what you needed for antialiasing?[/QUOTE]

It somewhats looks broken and it darkens the screen. Also, it blurs diagonally like this: http://emulation.gametechwiki.com/index.php/File:Fx-aa.png The shader also flickers and blurs on sprites randomly that sometimes make the fonts blend in.

Though, the bilateral.cg shader helps a lot.

You can get something like supersample antialiasing if you turn up the internal rendering resolution to something like 1280x960 and then make a first (and second shader pass; it apparently looks better if you downsample by half res twice instead of all at once) using the stock shader at absolute scale factor down to 320x240. This has the added benefit of making scanline and CRT effects not look terrible.

Something like this: shaders = 2 shader0 = stock.cg shader1 = stock.cg

scale_type0 = absolute scale_x0 = 640 scale_y0 = 480 filter_linear0 = true

scale_type1 = absolute scale_x1 = 320 scale_y1 = 240 filter_linear1 = true

[QUOTE=hunterk;20795]You can get something like supersample antialiasing if you turn up the internal rendering resolution to something like 1280x960 and then make a first (and second shader pass; it apparently looks better if you downsample by half res twice instead of all at once) using the stock shader at absolute scale factor down to 320x240. This has the added benefit of making scanline and CRT effects not look terrible.

Something like this: shaders = 2 shader0 = stock.cg shader1 = stock.cg

scale_type0 = absolute scale_x0 = 640 scale_y0 = 480 filter_linear0 = true

scale_type1 = absolute scale_x1 = 320 scale_y1 = 240 filter_linear1 = true[/QUOTE]

Thanks, but it blurs the 2d texture when I tried it. Though, I had to use xbr and scale down to try to get some antiailasing. It is a small length of antiailasing and slightly blurs the sprites, but not bad. Though, it’s the solution for now. Also, I didn’t know the .cgp system has a fixed pixel resolution for scaling, thanks. The VI filter is somewhat like 2xsai but does horizontal scaling to 640px. I will upload the update soon.

Sorry to bring this topic back up, but I can’t get these specific shaders to work. They look awfully interesting for what they seek to achieve. Is there something I need to do to make them functional?

I’ve figured out why these filters don’t work for me. Most blur shaders don’t work with AMD/ATI graphics cards.

Just thought I’d bring this topic up again with an update. Using OpenGL drivers and official graphics drivers, this shader preset only works with NVIDIA cards. I didn’t think to test it with Intel integrated graphics until now, but I can confirm that it doesn’t work on that, either.

I can’t speak for others, but I think that having something like this available to all users is pretty important. The VI filter (or a replica of it) is just as essential to N64 video output as composite filtering is to most systems that came out before it, if not even moreso.

How can I use it?

The VI filter is used, even with RGB and UltraHDMI (minus the scale filter), but on certain games like Doom 64 and Quake 2 doesn’t use the filter at all. It looks crisp like what you expect and no dithering or noticeable banding as far as I saw. Quake 64 has an option to turn off the filter, and it removes the blur except the scale filter which isn’t a big deal as much, but even with filter on, it doesn’t have anti ailasing nor the dithering when the filter is on or off. Games like Star Fox 64 uses the gamma boost from VI filter and it has a lot of blur.

Doom64 running in RGB on real console without VI gameshark codes.

Star Fox 64 VI filter. It applies gamma correction with blur on dithering.

There’s a thread to use gameshark codes or patches to remove the filter on the real hardware or on Angrylion’s plugin. It does bring more sharpness in the far depth. Also, the UltraHDMI has a deblur method that corrects the blur from scaling 320 horizontal to 640 since it uses similar method last like 2xsai or NEDI that interpolates the pixel instead of traditional bilinear you would scale from Photoshop. As for Antiailasing, It’s just like fxaa or smaa, but similar. It is masked so it only antiailas the polygons but temporal ailasing is still presented. In small parts of the ailasing, it may be missed from filtering so you get small ailased spots, and the masked filter does affect sprites and HUD by a pixel around it. Also, it has it’s own method to filter the spots that has black or dark ailasing around the textures and it blends it. I will have pics of it.

Super Mario 64 from UltraHDMI running with VI-Deblur.

Take a look at HUD on full motion scenes, and it shows the sprites flickering artifacts by AA post-processing.

As for my shader, I did make several new profiles for it to have different combination of how the VI filter works. I made it for games like Star Fox 64 and games that doesn’t use antiailasing like Quake 64. I will upload those profiles at some point.

Edit: I tried using my VI profiles and you are right. Bilateral filter doesn’t work on AMD cards. I tested this on my laptop. There isn’t an alternative for the blur the VI produces. Bilateral filter does its job the best compared to other denoisers and blur shaders.