Skip to content

Commit

Permalink
fix tile's stencil value (#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhenn authored Apr 28, 2023
1 parent 81e4245 commit 70a43de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/layer/tilelayer/TileLayerGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TileLayerGLRenderer extends ImageGLRenderable(TileLayerCanvasRenderer) {
debugInfo = this.getDebugInfo(tileInfo.id);
}
const gl = this.gl;
gl.stencilFunc(gl.LESS, this.drawingCurrentTiles ? 0 : 1 + Math.abs(this.getCurrentTileZoom() - tileInfo.z), 0xFF);
gl.stencilFunc(gl.LEQUAL, Math.abs(this.getCurrentTileZoom() - tileInfo.z), 0xFF);
const layerPolygonOffset = this.layer.getPolygonOffset();
const polygonOffset = this.drawingCurrentTiles ? layerPolygonOffset - 1 : layerPolygonOffset;
gl.polygonOffset(polygonOffset, polygonOffset);
Expand Down

0 comments on commit 70a43de

Please sign in to comment.