GUI artefacts (rectangle)

Hello everyone,
I came into those weird artefacts that GUI rectangle does. I am making those measurements and there’s the description with text in the middle of it. Sometimes when I move camera or hide those measurement’s they leave those artefacts like in the second picture.


picture 1

picture 2

Another example:
It’s happening when I move camera then stop for a mili sec and move again etc…

Can I somehow prevent it?

Hi Symlis,

Those two dots on the left probably shouldn’t be there; can you reproduce this in a playground? I think those dots aren’t taken into account with the rectangle measurement, and are outside the clearing area because of that. If so, then setting useInvalidateRectOptimization to false on your AdvancedDynamicTexture should fix it.

https://www.babylonjs-playground.com/#XCPP9Y#2499

4 Likes

advancedTexture.useInvalidateRectOptimization = false did the job, thanks!