importing SmoothnessTextureChannel is always SpecularMetallicAlpha

This commit is contained in:
Masataka SUMI
2024-08-01 01:34:22 +09:00
parent ad712ce1ce
commit 3900e01b49

View File

@@ -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;
}