Smoothing for the CPP target.



  • Can I somehow improve the smoothing for the desktop cpp target?
    The smoothing is very awkward and sharp and glitchy.

    Here's an example, cpp target, maximized window, camera.antialiasing = true
    alt text

    Notice that the edges of the orange boxes are sharply cut and there's bleeding on the top portion of the enemy,
    it's displaying some pixels from the neighboring area in the tilesheet .

    alt text

    It seems that everything has been smoothed out first, then cut and placed into the window buffer.
    This also applies to the NEKO target, exact same graphics treatment.

    Flash Target on the other hand, behaves just like it's expected to.

    Everything is evenly blurred, no hard edges, like so:
    alt text

    Is there something I can do? A compiler flag I am missing? I don't want to alter my assets.
    320x240 internal resolution.
    Haxe dev, openfl [3.6.1] , lime [2.9.1], windows build with VS2015

    Anyone knows anything? Thanks!!!! :smile:



  • I remember having this problem (or something similar) that I solved by leaving a 1 pixel margin around each sprite on my spritesheet.



  • Also you can hack OpenFl to get sharper results: https://github.com/HaxeFlixel/flixel/issues/1861



  • @caiosouza I don't want to do that!

    @starry-abyss Thanks, so it seems that the issue is with openfl.

    As a temp/not so temp/good fix I used a Blur Shader which seems to do the job right.

    alt text
    ^ Blur Shader, no smoothing on cameras

    alt text
    ^ As opposed to no shader & smoothing = Terrible!

    Also yes, the pixels when the window gets streched up do seem mis-oriented and skewed. Perhaps someone with a good openfl code knowledge will fix this issue! I tried to look into it for a bit but I got swarmed :crying_cat_face:

    :smile_cat: :smile_cat: :smile_cat:


Log in to reply