UniVRM
UniVRM copied to clipboard
Incorrect metallicsmothness in URP WebGL build
環境情報
- UniVRM version:
0.112.0
- Unity version:
Unity-2021.3.26
- OS:
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:
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.