Filters / Scanlines

Fallon
Posts: 110
Joined: Mon May 25, 2020 1:48 am
Has thanked: 50 times
Been thanked: 22 times

Filters / Scanlines

Unread post 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.
User avatar
SuperBabyHix
Posts: 152
Joined: Sun May 24, 2020 8:26 pm
Has thanked: 44 times
Been thanked: 34 times

Re: Filters / Scanlines

Unread post 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.
Fallon
Posts: 110
Joined: Mon May 25, 2020 1:48 am
Has thanked: 50 times
Been thanked: 22 times

Re: Filters / Scanlines

Unread post by Fallon »

That would make sense, thanks.
User avatar
NightShadowPT
Posts: 208
Joined: Mon May 25, 2020 9:56 am
Has thanked: 5 times
Been thanked: 9 times

Re: Filters / Scanlines

Unread post 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...
User avatar
Coffea
Posts: 32
Joined: Thu May 28, 2020 8:35 pm
Has thanked: 6 times
Been thanked: 5 times

Re: Filters / Scanlines

Unread post 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.
ash2fpga
Posts: 237
Joined: Tue May 26, 2020 6:20 pm
Has thanked: 62 times
Been thanked: 28 times

Re: Filters / Scanlines

Unread post 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.
akeley
Top Contributor
Posts: 1311
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 424 times
Been thanked: 409 times

Re: Filters / Scanlines

Unread post 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).
User avatar
ericgus09
Posts: 208
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: Filters / Scanlines

Unread post by ericgus09 »

Some of them do work but you have to tinker with them to find one that does..
User avatar
Chris23235
Top Contributor
Posts: 860
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 112 times
Been thanked: 177 times

Re: Filters / Scanlines

Unread post by Chris23235 »

The scanline filters work fine for me in the AO486 core.
Soltan_G42
Posts: 6
Joined: Thu Jul 16, 2020 12:31 am
Been thanked: 2 times

Re: Filters / Scanlines

Unread post 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
User avatar
NightShadowPT
Posts: 208
Joined: Mon May 25, 2020 9:56 am
Has thanked: 5 times
Been thanked: 9 times

Re: Filters / Scanlines

Unread post 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.
EeK
Posts: 14
Joined: Thu Nov 12, 2020 9:11 am
Has thanked: 7 times
Been thanked: 2 times

Re: Filters / Scanlines

Unread post 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?
Post Reply