Setting the opacity of a material

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mudley
:warning: Old Version Published before Godot 3 was released.

Simple question, how to change the opacity of a material?

:bust_in_silhouette: Reply From: Kovalski

Material override → fixed material → use alpha

Material override → fixed material → diffuse → alpha channel(A)

or

Material override → shader material → new MaterialShader

color col = color(1.0, 1.0, 1.0, 0.5);
DIFFUSE_ALPHA = col;

or

Material override → shader material → new MaterialShaderGraph. Create ColorUniform and connect RGB with Diffuse and Alpha connect with DiffuseAlpha.

Thanks, but when enabling the alpha, it seems to turn off the glow, is this normal?

Mudley | 2017-07-12 00:31

I have just tested. Everything works. I can load my example if you want.

Kovalski | 2017-07-12 15:57

If you wouldn’t mind.

Mudley | 2017-07-12 19:29

Alpha and Glow effect

Kovalski | 2017-07-12 21:42

I’m talking about a material glowing individually, not the entire environment.

Mudley | 2017-07-12 22:22

i’m sorry! I see this problem. Glow works with pre-pass alpha, but only with 1.0(255) alpha-channel. Probably it’s a bug.

Kovalski | 2017-07-13 09:40