GDScript - How to set a FixedShader's alpha flag?

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

Currently I’m trying to set a FixedShader’s alpha flag to create transparency. I’m using this:

my_shader.set_parameter(FixedMaterial.FLAG_USE_ALPHA, true)

When I get the parameter though, it seems to be a Color4. So I don’t know what’s going on, it doesn’t seem to be working, even I try putting in a color for it’s variant parameter. All my other parameters seem to be working fine, except the alpha flag for transparency.

Am I maybe missing another property as well?

Thanks. :slight_smile:

I have only used 2D shaders but I think is the same, maybe you mean set_fixed_flag ?

eons | 2016-10-27 01:33

Oh, quite right. Completely missed seeing that. Thank you very much.

avencherus | 2016-10-27 01:39

Is confusing with other nodes/resources that have a single set_parameter, i’ll make it an answer then

eons | 2016-10-27 01:55

:bust_in_silhouette: Reply From: eons

FixedMaterial has many types of constants, FLAG_ are for set_fixed_flag: