GUI Ellipse with a thickness value of 1

I’m getting a weird trailing effect from a GUI Ellipse Container that has a thickness set to 1. When multiple ellipse’s are in the scene it only seems to effects the top left most ellipse. When the ellipse is moved back over the trail it can be “erased”.

GUI Ellipse Bug | Babylon.js Playground (

It can also be seen in the examples on Set the ellipse thickness to 1 and comment out lines 41 and 63. I am also seeing signs of it if you only comment out line 41, but it doesn’t persist when you input camera movement.

I can not seem to be able to repro, are you well in 5.4 in the playground ?

also can you try advancedTexture.useInvalidateRectOptimization = false;

1 Like

Im using playground 5.4. Its like a burn-in effect, you have to move the camea slowly to see it build up. It was easer to see on my phone, I suspect since its running babylonjs at a higher frame rate.


Adding advancedTexture.useInvalidateRectOptimization = false; looks like it has fixed it.

What is your browser/version?
Tested on: Debian:

  • Chromium/101.0.4951.41
  • Firefox/91.8.0esr
  • Vivaldi/5.2.2623.41

And there’s no trailing effect in my tests :penguin:

Ok I have some more data.

I have reproduced this bug on windows 11 and 10 using:

  • Chrome/101.0.4951.54
  • Edge/101.0.1210.32

But Firefox version 100.0 is not effected. No trailing, It looks as expected.

I have added automatic camera movement to the example script to remove the variable of panning to quickly.
GUI Ellipse Bug | Babylon.js Playground (

1 Like

This is the result I’m getting when I let the updated script run for 10 minutes at 60fps.
It cuts out at around the 8 minute mark.


1 Like

should solve it as well in your case.

cc @DarraghBurke as I am wondering if we could improve our invalidate region ?

1 Like

Looks like in _additionalProcessing() inside ellipse.ts we are adding the thickness of the ellipse to _measureForChildren, but not to _currentMeasure. CurrentMeasure is what’s used as the region to invalidate. However, I do not think we can change currentMeasure here without breaking other things. Maybe @Deltakosh would have an idea?

Yeah most of the time we recommend to turn off invalidation optimization as dealing with all the sub cases could be counter productive

1 Like

Using your code I saw! :dizzy_face:

  • Chromium/101.0.4951.41 (Only in Chrome based browsers)
    Screenshot from 2022-05-07 18-14-50

Does this playground work for you? GUI Ellipse Bug | Babylon.js Playground (

The fix is just to turn off the invalidateRectOptimization on the ADT.