Filters / Scanlines
- SuperBabyHix
- Posts: 152
- Joined: Sun May 24, 2020 8:26 pm
- Has thanked: 45 times
- Been thanked: 36 times
Re: Filters / Scanlines
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.
- NightShadowPT
- Posts: 224
- Joined: Mon May 25, 2020 9:56 am
- Has thanked: 5 times
- Been thanked: 12 times
Re: Filters / Scanlines
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...
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
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.
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.
-
- Top Contributor
- Posts: 1441
- Joined: Mon May 25, 2020 7:54 pm
- Has thanked: 497 times
- Been thanked: 467 times
Re: Filters / Scanlines
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).
CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos
- Chris23235
- Top Contributor
- Posts: 983
- Joined: Sun May 24, 2020 8:45 pm
- Has thanked: 127 times
- Been thanked: 197 times
-
- Posts: 6
- Joined: Thu Jul 16, 2020 12:31 am
- Been thanked: 2 times
Re: Filters / Scanlines
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
(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
- NightShadowPT
- Posts: 224
- Joined: Mon May 25, 2020 9:56 am
- Has thanked: 5 times
- Been thanked: 12 times
Re: Filters / Scanlines
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.
Putting it here for posterity.
Maybe a moderator can lock the thread.
Re: Filters / Scanlines
Hey, Soltan. Sorry for digging up this old thread, but I was looking for info on video modes and found your post.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.
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?