UniVRM icon indicating copy to clipboard operation
UniVRM copied to clipboard

Incorrect metallicsmothness in URP WebGL build

Open Ethan-Zhu-code opened this issue 1 year ago • 2 comments

環境情報

  • 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: image

Loaded material: image

Render result in webgl build: image

  • 再現方法 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.

Ethan-Zhu-code avatar Jun 22 '23 14:06 Ethan-Zhu-code

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.

AitoD avatar Oct 10 '23 10:10 AitoD