Skip to content

Filter options #3

@mbrc12

Description

@mbrc12

It would be great to have Filter support for Sprites, similar to ebiten.FilterNearest and ebiten.FilterLinear. As far as I understand, it is useful in conjunction with scaling (or other operations on textures that require more than translation). For instance, here is a small repository showing the difference when scaled (see screenshot.png). The top line of the images use ebiten.FilterLinear, and the bottom uses the current Sprite type in this library.

https://gitlab.com/subwave/antialias-test

P.S: I am also curious as to how one may remove the jagged borders you see in both cases, presumably because only the texture is antialiased and not how it interacts with the environment (i.e., the destination screen in this case). I am not sure if that can be easily incorporated into the current design without having your own screen to write to (and then draw that image onto the true ebiten screen), but it might be good to have!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions