diff --git a/src/render/painter.js b/src/render/painter.js index ffdfec02cd5..9ad85b4179a 100644 --- a/src/render/painter.js +++ b/src/render/painter.js @@ -274,6 +274,8 @@ class Painter { } stencilModeFor3D(): StencilMode { + this.currentStencilSource = undefined; + if (this.nextStencilID + 1 > 256) { this.clearStencil(); } diff --git a/test/integration/render-tests/combinations/fill-extrusion--fill-opaque/expected.png b/test/integration/render-tests/combinations/fill-extrusion--fill-opaque/expected.png new file mode 100644 index 00000000000..32dc67dd0fd Binary files /dev/null and b/test/integration/render-tests/combinations/fill-extrusion--fill-opaque/expected.png differ diff --git a/test/integration/render-tests/combinations/fill-extrusion--fill-opaque/style.json b/test/integration/render-tests/combinations/fill-extrusion--fill-opaque/style.json new file mode 100644 index 00000000000..ef63e9c3da0 --- /dev/null +++ b/test/integration/render-tests/combinations/fill-extrusion--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/test/integration/render-tests/combinations/fill-extrusion--fill-translucent/expected.png b/test/integration/render-tests/combinations/fill-extrusion--fill-translucent/expected.png new file mode 100644 index 00000000000..b37e2ada066 Binary files /dev/null and b/test/integration/render-tests/combinations/fill-extrusion--fill-translucent/expected.png differ diff --git a/test/integration/render-tests/combinations/fill-extrusion--fill-translucent/style.json b/test/integration/render-tests/combinations/fill-extrusion--fill-translucent/style.json new file mode 100644 index 00000000000..ba22d1e0b8d --- /dev/null +++ b/test/integration/render-tests/combinations/fill-extrusion--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json b/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json index ef63e9c3da0..776b6c86944 100644 --- a/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json +++ b/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json @@ -49,6 +49,7 @@ "type": "fill-extrusion", "source": "geojson", "paint": { + "fill-extrusion-opacity": 0.5, "fill-extrusion-color": "red" } }, diff --git a/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png b/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png index b37e2ada066..84c0263e05c 100644 Binary files a/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png and b/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png differ diff --git a/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json b/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json index ba22d1e0b8d..04fe1149d95 100644 --- a/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json +++ b/test/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json @@ -49,6 +49,7 @@ "type": "fill-extrusion", "source": "geojson", "paint": { + "fill-extrusion-opacity": 0.5, "fill-extrusion-color": "red" } },