Opacity doesn't seem to work when making material attributes

Take a look at the following material function. Can anyone tell me why the opacity isn’t doing anything?

There doesn’t look to be anything wrong with the material function - but just because the information is there, doesn’t mean the material will actually use it. Do you have your material shading model set to ‘Masked’ or ‘Translucent’? The standard opaque material will just ignore opacity information, even if it’s connected.

As far as I can tell, there’s no way to set the shading model on the attribute. I have it set to translucent on the actual material, though.