Hi @MajorPainTheCactus
I’m loving the Megatron shader, been doing some more extensive testing with various cores and overal everything works great, but yes I did find one thing that could possibly be improved. Not a bug I think but more something feature related
The bottom line is that interlaced content does not look right. For example there are many Playstation 1 games that mix low-res (320x240) with hi-res (640x240) and hi-res interlaced (640x480i) content, and this hi-res interlaced content does not look right.
I’ll explain a bit more thoroughly, hopefully it is something that you could look into.
I’m seeing two issues happening:
-
Interlaced content does not look right as scanlines dissappear completely.
-
What I would call “medium-res” (i.e. 640x240) is looking too sharp. I think this is because the shader “sharpness” setting is tweaked for low-res (320x240), but when a game switches to 640x240 in-game the horizontal filtering is not adjusted to this new resolution.
On issue 1 a bit of extra explanation may help. There are some cores that support real-time resolution switching just like the hardware did. Some cores that do this are for example the Mednafen PSX core, BlueMSX core, the Commodore Amiga PUAE core and some others.
As an example of the many oddbal resolutions that may occur here’s a video that lists all PS1 games that use interlaced as the base resolution - in the entire game - (he leaves out games that only occasionaly switch to interlace for title screens etc):
Playstation 1 ALL (?!) Interlaced (Hi-Res) Games
The resolution table that is mentioned in the readme “more” link below the video is interesting:
00:00 Intro
00:05 Hi-Res Mode?
00:35 Debunking 480i Myths
02:18 320x240
02:45 256x480
03:11 312x448
03:34 320x480
04:39 368x480
07:15 382x480
07:45 384x480
08:14 512x478
09:36 512x480
13:52 640x448
14:09 640x480
To not make this post too long and not knowing if you’re already familiar with the technicalities of CRT interlacing the summary is that for correct CRT interlacing simulation you need to weed out the odd and even lines fields from the emulator frames output and have the odd and even lines fields alternating at a slight offset from eachother.
Note that in a CRT the offset is about 0.5 lines. You and I know this is possible because it’s analog television and the phoshpors of the previous field have already died out when the half line offsetted other field is displayed. Rinse and repeat. Through persistence of vision the human eye and brain then sees a 480 tall picture. If you’re interested I could provide more info on CRT interlacing.
As an example this guy explains it nicely. It’s a simple explanation just using his hands and it’s for 1080p/1080i but the idea is the same for 480i CRT:
TV Explained: Progressive and Interlaced . The interesting part is from 3:34, at which the previous link starts.
I know guest.r has done a great job implementing interlacing into his advanced shader that’s virtuously indistinguishable from a real CRT. I’m hoping something similar could be achieved for the Megatron shader.
Possibly the de-interlacing.slang shader from HunterK in the misc folder could also provide some additional idea what’s happening, although this seems to be only for “normal” content and not directly applicable in a shader that has scanlines simulated etc…
I think this could really put the icing on the cake. As always thanks again for the superb Megatron!