Open lbud opened 6 years ago
+1
This is still an issue. Workaround by setting opacity of the layer that supposed to be in front of the heatmap to 0.99.
This is still an issue. Workaround by setting opacity of the layer that supposed to be in front of the heatmap to 0.99.
Thanks @willrbc, will give this a try
Layers drawn during the opaque pass (opaque background + opaque fill layers) cannot render correctly above offscreen texture-based layers (heatmap + fill-extrusion layers): they expect layers "under" them in the layer stack, drawn after them, to use depth testing. When rendering heatmap and fill-extrusion textures back to the map, depth testing is turned off, but it's not as simple as turning depth testing on because projections are done in the offscreen pass, so in the translucent pass the texture copies use a very simple viewport matrix, not the same projection matrices as the rest of the layers, so their depth comparison values wouldn't be relevant anyway. As in https://github.com/mapbox/mapbox-gl-js/issues/2074, a workaround is to set the opaque layers' opacity to 0.99 so as to render them in the translucent pass, but the better fix would be to eliminate the opaque pass (https://github.com/mapbox/mapbox-gl-js/issues/2074#issuecomment-293433951).