Why does TextureSample map transparency to black?

I am trying to reapply one of my blender materials to a mesh in UE5. I made a glass vial with some text on the outside and I want to create a material which uses a glass shader onto which I can map my texture, which has a transparent background.

For some reason, when I use the RGBA output of TextureSample and plug that into the BaseColor for a translucent material with Surface TranslucentVolume lighting model, my texture doesn’t remain transparent where it is transparent, but turns black…

I did manage to create a transparent material with the logo (big red A) on top, but then I could only toggle the opacity of the glass shader and the logo at once.

How can I specify to either:
A) Not map transparent pixels to black
B) (even better) specify a glass shader as the base material and only add the logo on top of it, so I can make the glass as transparent as I want without affecting the opacity of my logo?

Because the albedo is black.

You could use the red channel to dictate the opacity. You can probably also correct the A then also.

Ok, but how do I do that? Like which pin goes into what?

It looks terrible because I just copied your A to make the texture…

nevermind, I solved it.

1 Like

You can just multiply texture R channel with opacity value