简体   繁体   中英

Unity WebGL Download normal map texture from server using www

I'm developing a WebGL program with Unity 5.3.1

    WWW www = new WWW(System.Uri.EscapeUriString(nrmUrl));
    while (!www.isDone)
    {
        yield return null;
    }
    materailBall.GetComponent<Renderer>().material.SetTexture("_BumpMap", www.texture);

And the result is

在此处输入图片说明

It seems that the property texture type is Texture

Please help me to change texture type of this nrm image to Normal map

Is there some good ideal to download normal map texture?

Or someone can tell me how to use TextureImporter with www ?

Thanks!!

Supplement:

If I create material with local file, here is the different

Texture type : Texture

在此处输入图片说明

Texture type : Normal map

在此处输入图片说明

若要使用命名着色器变体,必须在场景或资源文件夹中使用所需的“ _BumpMap”材质。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM