Texture from web is not working on shader?

Hi. I’m working on masking shader which download mask texture from www.
Here is my code snippet.

var request = UnityWebRequestTexture.GetTexture(url);
await request.SendWebRequest();
var maskTexture = DownloadHandlerTexture.GetContent(request);
mat.SetTexture("Texture2D_76EB197C", maskTexture );

and here is my shader graph.

It’s very weird because only imported texture is working.

There is one difference that format of texture from www is ARGB and from imported is RGB.
But I didn’t use alpha channel in my shader.

This is texture from www

and here is imported texture

Can anyone tell me why and how to fix this issue.
Thanks for in advance.

the import is RGB ETC2 compressed
the web pull makes ARGB 8bit

can you unify the web pull to use 24bit RGB(888) instead?

alpha order might be your issue —it could be setting things to 0 making it invisible.

maybe also simplify to only 1 channel


I’ve fixed my issue finally.
AlphaClipThreashold works differently what i think.
So I change AlphaClipThreashold to 0.5, get alpha from mask texture.
Thanks @Torbach78 for help!

1 Like