Pages: [1]
|
|
|
Author
|
Topic: "Bilinear plus" filter (Read 4714 times)
|
geoslake
Zebranky food
Offline
Posts: 3
|
hi, and thanks for the amazing port of this amazing game
just wonder, while the filters are already very nice, could you consider ading the "bilinear plus" one shot here : http://img212.imageshack.us/my.php?image=bilinpluszv1.png
its used in exult engine, visual boy advance...and looks very good to me thanks
|
|
« Last Edit: November 09, 2007, 02:49:50 pm by geoslake »
|
Logged
|
|
|
|
Novus
Enlightened
Offline
Gender:
Posts: 1938
Fot or not?
|
Looks like a rather simple variant of bilinear to me. Start with a typical bilinear filter, where each pixel (a in this example) is expanded to four pixels (s, t, u and v) based on the neighbouring pixels (b, c, d):
a|b => st| -- uv| c d --- The classic bilinear goes:
s=a t=(a+b)/2 u=(a+c)/2 v=(a+b+c+d)/4
Bilinear plus, in Exult, appears to substitute:
s=(5*a+b+c)/8
This would give a slight "dark dot-matrix" effect, as seen on the screenshot (checked by eye, not mathematically).
Or, in the "original" (dot-matrix-less) version:
s=(5*a+2*b+c)/8
|
|
|
Logged
|
|
|
|
|
|
Defender
Enlightened
Offline
Gender:
Posts: 817
|
I do like this filter. It's from the VisualBoyAdvance, correct?.
|
|
|
Logged
|
|
|
|
Novus
Enlightened
Offline
Gender:
Posts: 1938
Fot or not?
|
Im kinda confused by what this discussion is about? Is this "bilinear filter" a way of resizing or something? So confused lol
Exactly. The graphics in 3DO SC2 are at a resolution of 320x240 pixels. By modern standards (and on modern monitors), this results in some very blocky (or, with some modern LCD monitors, very blurry) graphics in fullscreen mode (or a tiny window at desktop resolutions). In order to mitigate this, UQM (optionally) rescales the graphics up to 640x480 using a wide range of 2x scalers (implemented in software) and then (again, optionally) rescales the graphics using OpenGL bilinear interpolation to the screen or window resolution (which may require fractional scaling, which would be a bit on the slow side in software).
The scalers (often referred to as "filters") supported by UQM (see Setup/Graphics Options) are:
- Nearest ("none"): Each pixel converted into a 2x2 block of the same colour. Quick but looks awful.
- Bilinear: Slightly different in UQM to the version I described above. In both cases, each output pixel is interpolated linearly in both X and Y directions from the neighbouring original pixels (4 of them). The Exult variant places the output pixels at (0,0), (0,0.5), (0.5,0) and (0.5,0.5) relative to the original pixels, UQM uses (0.25,0.25), (0.75,0.25), (0.25,0.75) and (0.75,0.75) instead (resulting in a blurrier look).
- Biadapt: Like bilinear, but tries to maintain sharp edges by using the sharper version of bilinear and changing the bottom-right pixel in each block if it's in the middle of a diagonal line of solid colour.
- Biadv: Like biadapt, but with more special cases (lines at other angles).
- Triscan: uses pixels above and below (and left and right) to check for edges (highly dissimilar colours). Outside edges, just copy the pixel to a 2x2 block. On edges, blend diagonally pixels that seem to be on the same side of the edge.
- HQ2x: Check whether all 8 neighbouring pixels are similar in colour and use a carefully set-up table of best guesses of what each combination means in terms of edges to determine what should be there.
|
|
|
Logged
|
|
|
|
|
|
Novus
Enlightened
Offline
Gender:
Posts: 1938
Fot or not?
|
Added to Bugzilla as bug 1020.
|
|
|
Logged
|
|
|
|
geoslake
Zebranky food
Offline
Posts: 3
|
thanks for having it added
|
|
|
Logged
|
|
|
|
Pages: [1]
|
|
|
|
|