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.
Odd and undesired behavior when adding a semi-transparent background layer above other layers #5832
I tried setting the color to have an alpha channel instead of the layer, and Studio rendered it correctly (however, rendering a semi-transparent background layer should still be supported):
Unfortunately, doing a background layer with opacity 1 and fill color with an alpha channel looks like this on the device (and still has the visual glitches from the gifs above):
[ERROR] {mapbox-glfw}[OpenGL]: GL_DEBUG_SOURCE_API GL_DEBUG_TYPE_ERROR 54 GL_DEBUG_SEVERITY_HIGH - GL_INVALID_OPERATION in glUniform4("u_ratio"@1 has 1 components, not 4)
terminate called after throwing an instance of 'mbgl::gl::Error'
what(): glUniform4fv(location, 1, t.data()): Error GL_INVALID_OPERATION - ../../src/mbgl/shader/uniform.cpp:27
Closing this ticket since the bug was fixed on the master branch.
Created a ticket on our test suite to add a test case like this, so I can also verify if this got fixed on mapbox-gl-js too. I would say probably yes since we share the same shaders.
Activity
danielamitay commentedon Jul 29, 2016
Some more info:
Here is what it looks like in Studio:
I tried setting the color to have an alpha channel instead of the layer, and Studio rendered it correctly (however, rendering a semi-transparent background layer should still be supported):

Unfortunately, doing a background layer with opacity 1 and fill color with an alpha channel looks like this on the device (and still has the visual glitches from the gifs above):
tmpsantos commentedon Aug 1, 2016
Trying to repro here. On the editor it is exactly how you described. Same goes for android
android-v4.1.1.Good news is it works just fine on native with the tip of the tree (472ab74).
tmpsantos commentedon Aug 1, 2016
This issue was a problem with a shader.
Closing this ticket since the bug was fixed on the master branch.
tmpsantos commentedon Aug 1, 2016
Created a ticket on our test suite to add a test case like this, so I can also verify if this got fixed on mapbox-gl-js too. I would say probably yes since we share the same shaders.
Paint background layer as topmost layer with opacity
tmpsantos commentedon Aug 1, 2016
For the record, it was fixed by a17b0bc.
danielamitay commentedon Aug 1, 2016
Perfect, thank you! And good to know about the test suite repo too.
Paint background layer as topmost layer with opacity (#130)