Skip to content

Commit c419179

Browse files
committed
Push touching candidate bounds to integer coords
1 parent cc5fea8 commit c419179

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/RenderWebGL.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,11 @@ class RenderWebGL extends EventEmitter {
13041304
drawable.updateMatrix();
13051305
drawable.skin.updateSilhouette();
13061306
const candidateBounds = drawable.getFastBounds();
1307+
1308+
// Push bounds out to integers. If a drawable extends out into half a pixel,
1309+
// that half-pixel still needs to be tested.
1310+
candidateBounds.snapToInt();
1311+
13071312
if (bounds.intersects(candidateBounds)) {
13081313
result.push({
13091314
id,

0 commit comments

Comments
 (0)