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.
With a red outputting icon.fragment.glsl I get red squares. The actual shader is simple pass through of the texture colour. So it apppears to be either an issue with creating the GL texture or bad texture data.
It appears the GL code to create and load the SpiteAtlas is OK. Thus it might be the underlying SpriteAtlas data that is wrong.
@tmpsantos and @kkaefer Were you able to figure out why on linux adding 0.0001 to device density causes icons to show up with regular colors instead of black and white? Is it possible to do the same experiment on the Android device that shows black and white icons?
I wonder if there is something wrong in the code that scales up sprites from the original image to the size required by the GL texture (which is set based on density) that causes it to not correctly copy the data.
Just FYI, the Espresso tests for the test app include now a way to take screenshots of the map that could help track this kind of issue in the future.
For example, this test switches to the Streets style, and perform two double clicks (to zoom in). Then it takes a screenshot named testMapboxStreetsBlackAndWhite.png. This works on AWS Device Farm, so we could check the resulting screen in dozens of devices automatically.
Activity
ljbade commentedon Jun 1, 2015
On my Sony Xperia Z3 it is even worse, I just get a white filled shape the same outline as those markers with no black fill.
Some sort of GL issue?
bleege commentedon Jun 1, 2015
This look similar to #843.
ljbade commentedon Jun 3, 2015
Did some testing.
With a red outputting
icon.fragment.glslI get red squares. The actual shader is simple pass through of the texture colour. So it apppears to be either an issue with creating the GL texture or bad texture data.It appears the GL code to create and load the
SpiteAtlasis OK. Thus it might be the underlying SpriteAtlas data that is wrong.I also experimented with hard coding the pixel ratio at https://github.com/mapbox/mapbox-gl-native/blob/master/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java#L139
With
1.0f,2.0f,3.0f,4.0fthe icons load fine.ljbade commentedon Jun 3, 2015
Ignore above for the moment
@kkaefer can you test again with latest master, icons loading fine on my Sony now. Not sure what got changed recently.
tmpsantos commentedon Jun 4, 2015
Funny that I hit something similar on QMapboxGL (on Linux only) that I fixed with a nasty hack:
https://github.com/tmpsantos/qmapboxgl/blob/master/src/qmapboxgl.cpp#L118-L122
ljbade commentedon Jun 4, 2015
Perhaps there is a bug in the code that scales sprite data as it gets copied to the sprite atlas
kkaefer commentedon Jun 9, 2015
Just checked, this problem still exists with current master.
ljbade commentedon Jun 10, 2015
Hmm I wonder what is specific to your phone
mb12 commentedon Jun 10, 2015
@kkaefer What is the screen density on your device (Devicemetrics.density)? Android devices can have fractional densities (1.5, 2.5 etc.).
kkaefer commentedon Jun 10, 2015
@mb12 it's 2.0
ljbade commentedon Jun 15, 2015
@kkaefer what happens if you try a suggestion I got to change the spite fragment shader to output red pixels?
mb12 commentedon Jun 18, 2015
@tmpsantos and @kkaefer Were you able to figure out why on linux adding 0.0001 to device density causes icons to show up with regular colors instead of black and white? Is it possible to do the same experiment on the Android device that shows black and white icons?
ljbade commentedon Jun 19, 2015
I wonder if there is something wrong in the code that scales up sprites from the original image to the size required by the GL texture (which is set based on density) that causes it to not correctly copy the data.
zugaldia commentedon Jun 30, 2015
Just in case it helps, I can see color icons on a Nexus 5 with current master:
bleege commentedon Aug 19, 2015
I also haven't seen this recently. @kkaefer @ljbade can you 👀 things again on your devices. If things are good we can close this ticket.
bleege commentedon Aug 26, 2015
Haven't seen this recently and no one is talking about it. We also just bumped to V8 styles as of 24-Aug-2015 via 6966add.
kkaefer commentedon Sep 15, 2015
I can't reproduce this anymore on my Moto G2.
zugaldia commentedon Sep 16, 2015
Just FYI, the Espresso tests for the test app include now a way to take screenshots of the map that could help track this kind of issue in the future.
For example, this test switches to the Streets style, and perform two double clicks (to zoom in). Then it takes a screenshot named
testMapboxStreetsBlackAndWhite.png. This works on AWS Device Farm, so we could check the resulting screen in dozens of devices automatically.zugaldia commentedon Sep 16, 2015
Forgot to add, AWS also let's you mock the user location to any lat/lon.
ljbade commentedon Sep 16, 2015
@zugaldia: Nice, perhaps you can script an image compare test? Then we could add test cases as we find and fix render bugs.
ljbade commentedon Sep 16, 2015
@zugaldia: Nice, perhaps you can script an image compare test? Then we could add test cases as we find and fix render bugs.