Disable the bilinear filtering in the VDP?

Official support forum for the Exodus Emulation Platform

Moderator: Nemesis

Post Reply
eggerman
Newbie
Posts: 3
Joined: Wed Jul 03, 2013 9:16 pm

Disable the bilinear filtering in the VDP?

Post by eggerman » Wed Jul 03, 2013 9:17 pm

Any way to disable this or was this native to the megadrive/genesis?

User avatar
TmEE co.(TM)
Very interested
Posts: 2286
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Jul 04, 2013 7:32 am

There is none of such happening on the hardware. Your emulator is the one that blurs out the image for whatever reason.
...Unless you consider something such filtered bilinearly :
http://www.tmeeco.eu/BitShit/S3%26KfuckerDead.jpg
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

eggerman
Newbie
Posts: 3
Joined: Wed Jul 03, 2013 9:16 pm

Post by eggerman » Thu Jul 04, 2013 11:46 am

Well, comparing the shot to to regen genesis emulator, the VDP window in exodus has a blurred (and ugly) look to it:

Image

SoullessSentinel
Interested
Posts: 24
Joined: Wed Feb 03, 2010 12:53 am
Location: Grimsby, England

Post by SoullessSentinel » Fri Jul 05, 2013 10:07 pm

That appears to be filtering to allow the graphics to appear closer to how it would on a traditional CRT TV.

This is a GOOD thing, it's not an 'ugly' filter. It allows for visual effects that depend on it, such as the transparency of the waterfalls in Green Hill Zone to function correctly.

Example:

Clean:
Image

Filtered:
Image
.
Notice how in the second screenshot, the waterfall and the shield are fully transparent.

The same thing happens with the 'tubes' in Chemical Plant zone in Sonic 3.

User avatar
TmEE co.(TM)
Very interested
Posts: 2286
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Jul 06, 2013 7:22 am

^ This above has nothing to do with CRT and more to do with NTSC and/or PAL video signal simulation.

The filtering kicks in whenever your window is not exact intended size of the image. When the window is supposed to be 640 x 480 and you resize it to 600 x 400 it'll be filtered.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

eggerman
Newbie
Posts: 3
Joined: Wed Jul 03, 2013 9:16 pm

Post by eggerman » Thu Jul 11, 2013 4:49 am

Regardless of whether it's a good thing or not, I'd like to humbly suggest it be optional.

User avatar
Stef
Very interested
Posts: 2630
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Jul 11, 2013 7:55 am

Depending the API you use to blit the screen surface the filter can happen automatically, i remember i experienced that with GDI blit API and depending the graphics driver. To avoid that it's better to use the DirectX methods which are much more versatile.

User avatar
Nemesis
Very interested
Posts: 670
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Fri Jul 12, 2013 3:16 am

I fully understand why you'd want the filtering to be optional. There's a bit of a problem with that though that you may not realize. In H32 mode, the Mega Drive actually generates non-square pixels. Of course, the real system doesn't have "pixels", it has scanlines, where each line is effectively an analog voltage waveform for the R, G, and B signals, and it can change at any point and in any way along that line. In H32 mode, you basically have 4:3 aspect ratio pixels. This can't be visualized on a computer monitor without displaying them at the incorrect aspect ratio (like gens does), or resampling them (Like Exodus and Kega do).

I could add an option to force H32 pixels to be square, which would generate an incorrect image, but give you the non-filtered look you're going for, but there's a further problem: Exodus is the only Mega Drive emulator that supports changing the screen mode mid-frame, IE, having the top half of the screen in H32 mode, and the bottom half in H40 mode, or even alternating every line if you want to. For each line the VDP renders, that line is actually being resampled to the display width, to ensure the entire image is displayed in the correct aspect ratio. If I allow resampling to be turned off, what should I do with mixed-mode images like this? Should I center H32 scanlines horizontally? That will severely break the image though.

I can add an option to disable filtering, and center H32 lines rather than resampling them, but it would need to be well understood that could actually be displaying an incorrect screen image, not only at the wrong aspect ratio, but also potentially with incorrect relative alignment for scanlines within the image.

User avatar
Huge
Very interested
Posts: 171
Joined: Sat Dec 13, 2008 11:50 pm

Post by Huge » Sat Jul 13, 2013 2:30 pm

One intermediate solution could be to output to 1280x960 (plus the overscan), in which mode H40 pixels are drawn 4 times bigger in both direction, while H32 ones are drawn 5 times wider and 4 times taller.

Of course, the huge window size could be a problem for some users, but this would be the only pixel correct way.

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Mon Jul 15, 2013 12:30 am

Another possible solution could be to only apply bilinear filtering horizontally, while applying nearest-neighbor resampling vertically (and locking window height to integer multiples of 240, with width locked to create an appropriate aspect ratio as Exodus already does in both video modes). This would more accurately model the signal output from the MD in RGB mode.

panzeroceania
Interested
Posts: 27
Joined: Sat Sep 12, 2009 4:02 am
Location: Salem, OR

Post by panzeroceania » Mon Aug 12, 2013 6:58 pm

Huge wrote:One intermediate solution could be to output to 1280x960 (plus the overscan), in which mode H40 pixels are drawn 4 times bigger in both direction, while H32 ones are drawn 5 times wider and 4 times taller.

Of course, the huge window size could be a problem for some users, but this would be the only pixel correct way.
I really like this idea

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest