diff --git a/src/render/draw_fill_extrusion.js b/src/render/draw_fill_extrusion.js index 6e57faa03f4..c10f3a1efa2 100644 --- a/src/render/draw_fill_extrusion.js +++ b/src/render/draw_fill_extrusion.js @@ -12,7 +12,9 @@ const vec3 = glMatrix.vec3; module.exports = draw; function draw(painter, source, layer, coords) { + if (painter.isOpaquePass) return; if (layer.paint['fill-extrusion-opacity'] === 0) return; + const gl = painter.gl; gl.disable(gl.STENCIL_TEST); gl.enable(gl.DEPTH_TEST); @@ -102,8 +104,6 @@ function renderTextureToMap(gl, painter, layer, texture) { } function drawExtrusion(painter, source, layer, coord) { - if (painter.isOpaquePass) return; - const tile = source.getTile(coord); const bucket = tile.getBucket(layer); if (!bucket) return;