Transparency issues in png texture

Hello,

I have a texture applied to a plane with an emissive/opacity texture:

https://www.babylonjs-playground.com/#YTHP9D#4

Thing is, there are white outlines around the shape, that are not visible in Photoshop, nor when viewing the texture directly in the browser.

The texture is clamped, but the outline is not located in the edges of the plane, so that’s not the issue it seems

Could someone shed any light on this please ?

Thanks !

Welcome Max.

I know this isn’t the most helpful, but going in to the inspector and changing the Mode for the texture around a few times ended up getting rid of the issue. But it isn’t consistent at all.

Really interesting issue.

It seems to be inside the opacity texture
https://www.babylonjs-playground.com/#YTHP9D#5

Great, I’ll try that in my project tomorrow morning and get back to you !

1 Like

So I plugged those settings in my app and it does in fact fix the white outline on this pillar, I have some textures with concave shapes and transparency and that doesn’t work, I’ll resize my base textures to be power of 2, just to see if the resampling is the cause.

So I switched it up, I made black and white (by setting the lightness to 0) of my textures in photoshop, and setting opacityTexture.getAlphaFromRGB = true; for those textures. It’s working now.

Thanks !

1 Like

excellent!

1 Like