From 3900e01b49259bb35ba8a80b0518b311c444ba69 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Thu, 1 Aug 2024 01:34:22 +0900 Subject: [PATCH] importing SmoothnessTextureChannel is always SpecularMetallicAlpha --- .../URP/Import/Materials/UrpGltfPbrMaterialImporter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Import/Materials/UrpGltfPbrMaterialImporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Import/Materials/UrpGltfPbrMaterialImporter.cs index 3f86cda37..d39185d6d 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Import/Materials/UrpGltfPbrMaterialImporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Import/Materials/UrpGltfPbrMaterialImporter.cs @@ -103,6 +103,7 @@ namespace UniGLTF public static async Task ImportMetallicSmoothnessAsync(GltfData data, glTFMaterial src, UrpLitContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) { context.WorkflowType = UrpLitWorkflowType.Metallic; + context.SmoothnessTextureChannel = UrpLitSmoothnessMapChannel.SpecularMetallicAlpha; context.Metallic = src.pbrMetallicRoughness.metallicFactor; context.Smoothness = 1.0f - src.pbrMetallicRoughness.roughnessFactor; @@ -111,7 +112,6 @@ namespace UniGLTF if (GltfPbrTextureImporter.TryStandardTexture(data, src, out _, out var desc)) { context.MetallicGlossMap = await getTextureAsync(desc, awaitCaller); - context.SmoothnessTextureChannel = UrpLitSmoothnessMapChannel.SpecularMetallicAlpha; context.Metallic = 1; context.Smoothness = 1; }