How to create rounded(Circular) image

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Shailesh dhaduk

I use textureRect node in godot 3.1 and load image from url like this one,

it’s get square image (from url)
But how to create round image and set textureRect: Texture rounded(circular) image

:bust_in_silhouette: Reply From: Dlean Jeans
  • Create a Light2D with the Texture as a circle sprite.
  • Create a CanvasItemMaterial for the Material of the TextureRect and set its Light Mode to Light Only

I’ll use my avatar as an example :stuck_out_tongue:


If you’re still lost check out the Light2D as Mask demo.

In android devices i get blank(black colour) image, while properly display image in ios devices and godot simulator.

Shailesh dhaduk | 2019-06-07 11:23

It works fine on my Redmi 6 Pro.

Dlean Jeans | 2019-06-07 11:47

Are you sure you use image is get from url.

like this one :

Shailesh dhaduk | 2019-06-07 12:02