Page 1 of 1
Filters / Scanlines
Posted: Mon Jul 13, 2020 4:13 pm
by Fallon
I'm curious why custom scan-lines don't seem to have any obvious effect on HDMI output with this core?
Everything still looks pixellated whatever filter I apply.
Re: Filters / Scanlines
Posted: Mon Jul 13, 2020 6:58 pm
by SuperBabyHix
I would guess the core is functioning like a real VGA card in that all low resolution signals are linedoubled. So 200p/240p is output as 400p/480p, which is probably what the scaler is getting.
Re: Filters / Scanlines
Posted: Tue Jul 14, 2020 12:24 am
by Fallon
That would make sense, thanks.
Re: Filters / Scanlines
Posted: Tue Jul 14, 2020 1:10 am
by NightShadowPT
Unfortunately, the output is being doubled automatically by the core, making the scanline implementation broken.
It's kind of a pity this has been implemented like this, but it may be possible at some point (developers wanting) to change the way the core outputs video, making scanlines usable...
Re: Filters / Scanlines
Posted: Tue Jul 14, 2020 1:19 am
by Coffea
Fallon wrote: ↑Mon Jul 13, 2020 4:13 pm
I'm curious why custom scan-lines don't seem to have any obvious effect on HDMI output with this core?
Everything still looks pixellated whatever filter I apply.
Try the SNES specific filter.
Re: Filters / Scanlines
Posted: Tue Jul 14, 2020 2:40 pm
by ash2fpga
From what the internets tell me, SuperBabyHix is correct here -- VGA hardware would scandouble 320x200 to 640x400. (On a CRT you would still get thin scanlines, but not "chunky" ones like 200p would have given you.)
I found an example of "chunky" scanlines from a computer game on a CRT (composite / CGA):
https://www.youtube.com/watch?v=8tZe5Go0jz0 (Most results I was finding were either not pictures of actual CRTs, hacks of games that did not actually have composite output originally, or too blurry to see the scanlines well.)
I think it looks really nice, and would love to get some sort of "chunky" scanline rendering. Special composite handling would be lovely, too (one can dream).
For what I understand, filters render earlier in the pipeline, as part of the resampling (resizing) the video, and Scandoubler FX renders later in the pipeline as part of the already resampled (resized) video. Neither appear to be either doing anything, or not effective with the core (most likely) rendering a 640x400 resolution (for 320x200).
I am not sure if we would ever get the ability to "downsample" to 200p, and then "upsample" with a filter (or Scandoubler FX), or if we would need an option in the core to pass raw(?) 320x200 to the filter stage of the pipeline.
Re: Filters / Scanlines
Posted: Tue Jul 14, 2020 3:45 pm
by akeley
There are scanlines on a real VGA 640x400 but much subtler than on usual CRT TVs or CGA. It also depends on monitor size (more inches=more pronounced scanlines).
Re: Filters / Scanlines
Posted: Wed Jul 15, 2020 5:52 am
by ericgus09
Some of them do work but you have to tinker with them to find one that does..
Re: Filters / Scanlines
Posted: Wed Jul 15, 2020 10:29 pm
by Chris23235
The scanline filters work fine for me in the AO486 core.
Re: Filters / Scanlines
Posted: Thu Jul 16, 2020 12:46 am
by Soltan_G42
There are two issues:
(1) Scanlines don't work at 2x integer scaling because at 2x the scaler ends up darkening both upscaled pixels by the same amount due to symmetry.
(2) Everything is too sharp in ao486 because of the double-scanned nature of VGA, Similar to the SNES core's 512 wide output for 256 wide video modes.
Both of those issues can be fixed or at least worked around. I need to probably sharpen the scanlines up a little from the linked versions. And I think mixing in a little lancsoz kernel (will add a slight sharpening effect) to the filters will make them look better.
So once I take care of that I'll add some filters meant for "high res" systems like ao486 to the repo for everyone. In the meant time you can try these filters. But ao486 is still double scanned (400 lines instead of 200, 480 instead of 240, etc) so scanlines are thin and you probably should stick to vscale_mode=1 if you use them.
edit link:
https://drive.google.com/file/d/1e5nrYX ... sp=sharing
Re: Filters / Scanlines
Posted: Sat Aug 15, 2020 4:35 pm
by NightShadowPT
This has been fixed in the 14 August 2020 version of this core, turning this discussion obsolete.
Putting it here for posterity.
Maybe a moderator can lock the thread.
Re: Filters / Scanlines
Posted: Sun Jan 03, 2021 4:48 pm
by EeK
Soltan_G42 wrote: ↑Thu Jul 16, 2020 12:46 am
There are two issues:
(1) Scanlines don't work at 2x integer scaling because at 2x the scaler ends up darkening both upscaled pixels by the same amount due to symmetry.
Hey, Soltan. Sorry for digging up this old thread, but I was looking for info on video modes and found your post.
I have a 4K LG C9 and have been using the MiSTer in 1920x1080@60Hz, since 2160 is 2x 1080. Does that mean that if I go with integer scaling, no scanlines filter will work properly?