diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index f053b2add1e..8da2905dbb0 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -71,6 +71,7 @@ "render-tests/circle-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", "render-tests/fill-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", "render-tests/line-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", + "render-tests/regressions/mapbox-gl-js#8817": "skip - https://github.com/mapbox/mapbox-gl-native/issues/15737", "query-tests/fill-extrusion/base-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139", "query-tests/fill-extrusion/box-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139", "query-tests/fill-extrusion/side-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139", diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index 1a36f8a2e58..db9f61411a8 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -370,11 +370,10 @@ class CompositeFunctionPaintPropertyBinder final : public PaintPropertyBinder interpolationFactor(float currentZoom) const override { - if (expression.useIntegerZoom) { - return std::tuple { expression.interpolationFactor(zoomRange, std::floor(currentZoom)) }; - } else { - return std::tuple { expression.interpolationFactor(zoomRange, currentZoom) }; - } + const float possiblyRoundedZoom = expression.useIntegerZoom ? std::floor(currentZoom) : currentZoom; + + return std::tuple{ + ::fmax(0.0, ::fmin(1.0, expression.interpolationFactor(zoomRange, possiblyRoundedZoom)))}; } std::tuple uniformValue(const PossiblyEvaluatedPropertyValue& currentValue) const override {