# GUI corner radius artifacts

**URL:** <https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497>\
**Category:** Questions\
**Created:** [October 12, 2021, 4:43am UTC](https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497 "2021-10-12T04:43:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianzinn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brianzinn/32/28013_2.png) [@brianzinn](https://forum.babylonjs.com/u/brianzinn)\
**Post date:** [October 12, 2021, 4:43am UTC](https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497/1 "2021-10-12T04:43:23Z")

</div>

I have a repro PG:  
[PGDemo | Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#3VMTI9#590)

This is likely a bug, but want to make sure I haven’t done something that is not supported. Is there a way to avoid these screen artifacts or am I tripping out? Notice tracer dots remain (same behaviour 4.2 and latest 5.0):  
 ![gui-artifact](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/3/038a8638d348f3d9afef4989f263304a5941866e.gif)

I remember having bugs like this when I wasn’t repainting enough of the screen (invalidate rect) when I used to write windows controls… yikes! If you scroll back left it will erase the artifacts, so that’s what made me think of that…

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [October 12, 2021, 8:58am UTC](https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497/2 "2021-10-12T08:58:04Z")

</div>

ping @msDestiny14

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 12, 2021, 1:03pm UTC](https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497/3 "2021-10-12T13:03:41Z")

</div>

You are right looks like the texture is not cleared big enough !!! like 0.5 px or smthg of the sort.

You can setup advancedTexture.useInvalidateRectOptimization = false; [https://www.babylonjs-playground.com/#3VMTI9#592](https://www.babylonjs-playground.com/#3VMTI9#592)

@Deltakosh might have an idea but I guess the rounded circle antialiased so it is reaching past the rect we should draw in (a shame there is no scissor rect in canvas2d ;-))?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [October 12, 2021, 3:22pm UTC](https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497/4 "2021-10-12T15:22:46Z")

</div>

I’ll check that today 🙂

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [October 12, 2021, 3:32pm UTC](https://forum.babylonjs.com/t/gui-corner-radius-artifacts/24497/5 "2021-10-12T15:32:36Z")

</div>

Will be fixed with next nightly 😉
