You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
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
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?
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
Activity
ansis commentedon Dec 2, 2015
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
jfirebaugh commentedon Dec 2, 2015
@kkaefer @ansis Is there any significance to the use of
2here:https://github.com/mapbox/mapbox-gl-js/blob/abe3512815032f02a0edefe38c732b4431535b3a/js/symbol/sprite_atlas.js#L114
While 1 is used everywhere else:
https://github.com/mapbox/mapbox-gl-js/blob/abe3512815032f02a0edefe38c732b4431535b3a/js/symbol/sprite_atlas.js#L91
https://github.com/mapbox/mapbox-gl-js/blob/abe3512815032f02a0edefe38c732b4431535b3a/js/symbol/sprite_atlas.js#L173
mapbox-gl-native/src/mbgl/sprite/sprite_atlas.cpp
Line 99 in 2a0d2b7
mapbox-gl-native/src/mbgl/sprite/sprite_atlas.cpp
Line 120 in 2a0d2b7
mapbox-gl-native/src/mbgl/sprite/sprite_atlas.cpp
Line 134 in 2a0d2b7
If not, I'm going to use
1everywhere and remove the duplication.ansis commentedon Dec 2, 2015
I'm not sure, but I think the
2means 1px padding on each of the two sides. I think it's correct but not clear.jfirebaugh commentedon Dec 2, 2015
native definitely uses 1 at the equivalent spot.
jfirebaugh commentedon Dec 7, 2015
This is getting bumped from my priorities.