Skip to content

Commit 9d74f09

Browse files
committed
Base clippingPolygonsState field on collection length
1 parent 956a6ab commit 9d74f09

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/engine/Source/Scene/ClippingPolygonCollection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
336336
/**
337337
* Returns a number encapsulating the state for this ClippingPolygonCollection.
338338
*
339-
* Clipping mode is encoded in the sign of the number, which is just the total position count.
339+
* Clipping mode is encoded in the sign of the number, and the magnitude is the polygon count.
340340
* If this value changes, then shader regeneration is necessary.
341341
*
342342
* @memberof ClippingPolygonCollection.prototype
@@ -346,7 +346,7 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
346346
*/
347347
clippingPolygonsState: {
348348
get: function () {
349-
return this.inverse ? -this.extentsCount : this.extentsCount;
349+
return this.inverse ? -this.length : this.length;
350350
},
351351
},
352352
});

0 commit comments

Comments
 (0)