system
1
system
4
|
|
|
|
Reply From: |
Zylann |
Just delete the white pixels and leave it transparent in an image editor?
is there a way i can do it with shaders?
rustyStriker | 2016-08-15 18:05
Do you really need the white part of the image?
Anyways, here is a simple CanvasItemMaterial fragment shader that makes white pixels transparent:
vec4 col = tex(TEXTURE, UV);
if(col.rgb == vec3(1,1,1)) {
col.a = 0;
}
COLOR = col * SRC_COLOR;
But I still think it would be much simpler if you open the image in Paint.NET / Photoshop / Gimp and make the areas you want transparent.
Zylann | 2016-08-15 19:06
Literally doesn’t work
PizzaMaker | 2022-11-27 15:15
This answer is 6 years old. It was for Godot 2.
Zylann | 2022-11-27 15:19