Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

never scale images when copying them into the SpriteAtlas #3164

Closed

Description

@jfirebaugh

Currently we bilinearly scale images that are not at the native pixel ratio up or down when adding them to the SpriteAtlas. This has led to code that is more complex than necessary and produced issues like #3031 and #2198.

Instead, we should copy images into the SpriteAtlas pixel-for-pixel, and let up/down sampling happen in the shaders.

@kkaefer @ansis -- am I missing anything that would make this non-viable?

Activity

  1. ansis commented on Dec 2, 2015

    @ansis
    Contributor

    Instead, we should copy images into the SpriteAtlas pixel-for-pixel, and let up/down sampling happen in the shaders.
    @kkaefer @ansis -- am I missing anything that would make this non-viable?

    I agree that we should do it this way. This is what we're still doing in -js. The scaling was never ported. relevant discussion: mapbox/mapbox-gl-js#1124

  2. self-assigned this
    on Dec 2, 2015
  3. ansis commented on Dec 2, 2015

    @ansis
    Contributor

    I'm not sure, but I think the 2 means 1px padding on each of the two sides. I think it's correct but not clear.

  4. jfirebaugh commented on Dec 2, 2015

    @jfirebaugh
    ContributorAuthor

    native definitely uses 1 at the equivalent spot.

  5. jfirebaugh commented on Dec 7, 2015

    @jfirebaugh
    ContributorAuthor

    This is getting bumped from my priorities.

  6. removed their assignment
    on Dec 7, 2015
  7. self-assigned this
    on Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions