setMaterialForRendering ignored after window resize

Heya, it looks like there’s a bug where setMaterialForRendering() stops working after resize. In the below repro the highlight starts out red as expected, but when the window is resized the highlight becomes green as it’s now using the material created by the effect layer instead of the material that was passed to setMaterialForRendering().

PS, I tried calling setMaterialForRendering() again on resize, but that didn’t have any effect. The only way I could find to fix it so far is to dispose and re-create the HighlightLayer on each window resize… And the issue is the same for GlowLayer as well.

Thanks for reporting + the repro, here’s the fix:


Awesome Evgeni, thanks for the lightning fast fix! :beers: :smile:

1 Like