Hello again :-)
I just come back here, because I succeeded in my goal to reproduce the "None" filter and the "Clean" filter of Sonic Mania with a great help from a guy on the Doom9's Forum :-D
I just failed in the 1080p resolution in fullscreen :-(
I don't know what algorithm the game uses to put the picture in fullscreen, but it's more precise than a PointResize filter and a lot less blurry than with a LanczosResize filter (
don't forget than the picture has to be streched a bit).
But for the picture scaled 1X, 2X and 3X, it works and the "None" filter is applied in the exact same way !
The "Clean" filter is only available with the 3X scaling in-game, but it's the same principle.
Here is my source image (that I still found on internet, because the filters are active in-game) :
A screenshot in-game that I took in
windowed mode with window size 3X and the "None" filter (edit : it shouldn't be blurry) :
And the
"None" filter that I reproduce with an AviSynth script :
Language: AviSynth
A=Imagesource("H:\source image.png",end=0).convertToRGB24
A=A.PointResize(1272, 720)
## None Filter
x = 1.0
y = 0.0
OP= 0.25
B=PointResize(A,A.Width,A.Height,-x,-y,A.Width,A.Height)
A.Overlay(B,Opacity=OP)
A=Last # Make A as above
x = 0.0
y = 1.0
OP= 0.25
B=PointResize(A,A.Width,A.Height,-x,-y,A.Width,A.Height)
A.Overlay(B,Opacity=OP)
Screenshot in-game windowed mode 3X with the "Clean" filter :
The "Clean" filter reproduced with an AviSynth script :
Language: AviSynth
A=Imagesource("H:\source image.png",end=0).convertToRGB24
A=A.PointResize(1272, 720)
## Clean Filter
x = 1.0
y = 0.0
OP= 1.0/3.0
B=PointResize(A,A.Width,A.Height,-x,-y,A.Width,A.Height)
A.Overlay(B,Opacity=OP)
A=Last # Make A as above
x = 0.0
y = 1.0
OP= 1.0/3.0
B=PointResize(A,A.Width,A.Height,-x,-y,A.Width,A.Height)
A.Overlay(B,Opacity=OP)
But what's really interesting is this game is the "Fullscreen mode". I would even say that it is amazing, because I totally failed to try to recreate it !
Indeed, it looks like if there wasn't any interpolation to display the picture !
I tried with a PointResize filter, but it didn't match :
Here is the image in-game zoomed :
And my reproduction with the PointResize filter :
But as you can see, it's less accurate...
You can even try with a LanczosResize filter, it will look blurry and inaccurate.
But the most interesting thing about the game, to return to the subject of the thread, is that the picture has in addition to be stretched a bit, because the aspect ratio of the game isn't a perfect 16:9 AR.
So, could somebody explain to me how the developers did to create this miracle ? :-P
I'm really interested, because it looks like a perfect solution ! :-)
It's good to scale the image by a non integrer number and to display the image with another aspect ratio apparently.
Bonus :
Super Metroid with a Simple 3X filter only :
Super Metroid 3X with the "None" filter of Sonic Mania (it's wrong, because it already wasn't correct in Sonic Mania on my desktop PC) :
Note :
You just need to put this at the beginning of the script :
Language: AviSynth
A=A.PointResize(768, 672)
The rest is always the same.
Super Metroid 3X with the "Clean" filter of Sonic Mania :
I find this really interesting ! :-)
Personnally, it's the "Clean" filter that I prefer !
Edit : You were right Aktan, the picture shouldn't be blurry with the filter on "None", even with the windowed mode. Because on my laptop, I didn't notice any blur in Sonic Mania with no filter. So there is a strange problem with Sonic Mania on my desktop PC with the filter on "None" in the windowed mode.