Why do my textures have white bars on them?

I have multiple textures with transparency. They look correct in the texture viewer as well as when I use them in the UI. In both the material editor and on texture selectors in the editor, they end up with white bars around them.

All of the textures are 128x128. The places where the white bars appear is any uninterrupted vertical or horizontal line of transparent pixels. You can see that clearly in the last image where I’ve intentionally scaled down the art in the image while leaving the image itself at 128x128.

Anyone know why it’s doing this or how to fix it?

Hey there @ddbrown30! As long as the textures themselves are the correct size and have a clean alpha layer, it’s more than likely just that the engine previews are incorrect. When in game UI or sprite, are the textures working correctly?

They are not. If I pipe the tex sample RGB into the emissive, the white bars appear. Weirdly, the alpha channel is correct so I can get around it by manually masking the texture with an If node but that’s obviously not great.

this seems like a normal behavior to me.

the color of a pixel is still set even for alpha 0.

so what you’re seeing is the color of the image when it was edited.

you have make a float4 and add the alpha.

eg rgb, a → append → output color

or use the alpha in the mask or opacity pin.

or multiply the rgb by the alpha.

or i think sometimes you can get the 4 rgba in one pin.

there’s also premultiplied alpha but i don’t think that will help you and i cant remember if you can specify as format in ue.

note that if the material is masked/translucent/opaque it changes how this needs to be set up.

if you’re going for pixel art, masked is more efficient. unless you want pixels with an alpha between 0/1 (e.g. 0.35 or 0.8 etc)

if this happens on the texture but not in a material, then maybe the format is incorrect in the settings.