From 6170074faa203f2d00f2aed8cbb4460019c2c08c Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Thu, 1 Aug 2024 00:57:22 +0900 Subject: [PATCH] set emission flag --- .../URP/Import/Materials/UrpGltfPbrMaterialImporter.cs | 5 +++++ 1 file changed, 5 insertions(+) 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 0f9689af7..3f86cda37 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 @@ -157,6 +157,11 @@ namespace UniGLTF context.EmissionTexture = await getTextureAsync(desc, awaitCaller); } } + + if (context.EmissionColorLinear is {maxColorComponent: > 0} || context.EmissionTexture != null) + { + context.IsEmissionEnabled = true; + } } } }