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

never scale images when copying them into the SpriteAtlas #3164

Closed
jfirebaugh opened this issue Dec 2, 2015 · 5 comments · Fixed by #3530
Closed

never scale images when copying them into the SpriteAtlas #3164

jfirebaugh opened this issue Dec 2, 2015 · 5 comments · Fixed by #3530
Assignees

Comments

@jfirebaugh
Copy link
Contributor

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?

@ansis
Copy link
Contributor

ansis commented Dec 2, 2015

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

@ansis
Copy link
Contributor

ansis commented Dec 2, 2015

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.

@jfirebaugh
Copy link
Contributor Author

native definitely uses 1 at the equivalent spot.

@jfirebaugh
Copy link
Contributor Author

This is getting bumped from my priorities.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants