バグの内容
In WebGL build, gltf models that with _MetallicGlossMap texture don't look correctly with URP Lit material. However, it works perfectly in the Unity Editor. I try to debug the materials created with their textures and enabled keyword, it can be confirmed that _MetallicGlossMap is not null and _METALLICSPECGLOSSMAP keyword is enabled. My guess is that _MetallicGlossMap texture is not working on WebGL build, if I set the Metallic Map slot to none, it can reproduce the weird looking in the editor.
スクリーンショット
Render result in unity editor:
Loaded material:
Render result in webgl build:
再現方法
In URP project built for WebGL, use GltfUtility.LoadBytesAsync to load glb model that has MetallicSmoothness texture. The apple model can be downloaded from here.
The issue is also present when using the built in render pipeline, assets with texture assigned to the metallic slot will render incorrectly in WebGL build compared to running in editor.
環境情報
0.112.0
Unity-2021.3.26
Unity WebGL
バグについて
バグの内容 In WebGL build, gltf models that with
_MetallicGlossMap
texture don't look correctly with URP Lit material. However, it works perfectly in the Unity Editor. I try to debug the materials created with their textures and enabled keyword, it can be confirmed that_MetallicGlossMap
is not null and_METALLICSPECGLOSSMAP
keyword is enabled. My guess is that_MetallicGlossMap
texture is not working on WebGL build, if I set the Metallic Map slot to none, it can reproduce the weird looking in the editor.スクリーンショット Render result in unity editor:![image](https://github.com/vrm-c/UniVRM/assets/51185278/c015007b-46a3-4cd9-81d4-2c1b1f260f97)
Loaded material:![image](https://github.com/vrm-c/UniVRM/assets/51185278/86a09ab5-0fab-443f-a9db-5bd0c534d036)
Render result in webgl build:![image](https://github.com/vrm-c/UniVRM/assets/51185278/ca1f8f17-b359-4b29-a370-e80818f8d755)
GltfUtility.LoadBytesAsync
to load glb model that has MetallicSmoothness texture. The apple model can be downloaded from here.