The negative effect of bilinear filter/smoothing on scanlines: a comparison

Welcome Page Forums RetroPie Project Video Output on RetroPie The negative effect of bilinear filter/smoothing on scanlines: a comparison

This topic contains 5 replies, has 2 voices, and was last updated by Profile photo of patl patl 2 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #98631
    Profile photo of patrickm
    patrickm
    Participant

    Here is a comparison showing the negative effect that bilinear filter/video smoothing has on scanlines.

    If you look at the image with bilinear filter, you can see that there are many pixels which bleed over the scanlines. This is most apparent when looking at the white text.

    A real CRT never does this. Real CRT scanlines always line up with the pixel edges, as in the image with nearest neighbor filtering. For the scanlines to work right/look right, they need to line up with the pixel edges.

    Therefore, if one cares about scanline emulation they should avoid the use of bilinear filter.

    Here is the image with nearest neighbor filtering:
    (note: you may need to save the image to view at original size)

    RetroArch-0528-210709

    Here is the image with bilinear filtering:

    RetroArch-0528-210637

    Attachments:
    #98635
    Profile photo of patrickm
    patrickm
    Participant

    What the crt shaders try to do is a little bit of blurring and scanlines at the same time, to overcome the limitations of bilinear filtering. But the shaders are too intense for the pi to run. So, one has to make a choice between accurate scanlines, a smooth image, or a smooth image with inaccurate scanlines.

    Personally, I think the inaccurate scanlines of the bilinear filter image look as bad as a misaligned scanline overlay and are very distracting, but some people might not be bothered by them.

    #98659
    Profile photo of patl
    patl
    Participant

    Maybe you can write your exact settings that you used during each test?
    Also , the overlay would be interesting to recreate the problem .

    #98666
    Profile photo of patrickm
    patrickm
    Participant

    Maybe you can write your exact settings that you used during each test?
    Also , the overlay would be interesting to recreate the problem .

    I used 5x scaling as described in the thread “how to get perfect video scaling,” and the 5x scanline overlay as described in “how to get scanlines”

    I get the same results with 4x, though.

    #98669
    Profile photo of patrickm
    patrickm
    Participant

    There are in fact still some artifacts in the image you posted, though I will admit that they are hard to detect- the most noticeable are the tips of the hearts. However, I’m not able to get an image that looks as good as that. I’m using the “stock” shader with filter set to “linear.”

    #98685
    Profile photo of patl
    patl
    Participant

    You’re right. I think because of the bilinear filter and the higher resolution of the emulated image. Therefore, more Y pixels of the emulated images (4,7) mix with each pixel of the actual resolution.
    If the contrast between 2 pixels is very high, for example, text, you can see it more clearly.
    With my method you can see it not so much because I use a smaller emulated resolution (4x) and each pixel of the scanlines has a different opacity.

Viewing 6 posts - 1 through 6 (of 6 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar