From b343e3aba4288d88b609ba7f7b0a5e425e21e78a Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Sat, 18 Jul 2026 18:18:01 +0900 Subject: [PATCH] Implements glTF PBR spec compatible shader with ShaderGraph includes - Editor Import - Editor Export - Runtime Export TBD - Runtime Import --- Packages/UniGLTF/Editor/UniGLTF.Editor.asmdef | 20 +- .../ScriptedImporter/GlbScriptedImporter.cs | 2 +- .../ScriptedImporter/GltfScriptedImporter.cs | 2 +- .../GltfScriptedImporterBase.cs | 17 +- .../ZipArchivedGltfScriptedImporter.cs | 2 +- Packages/UniGLTF/Runtime/UniGLTF.asmdef | 1 + .../Export/BuiltInGltfMaterialExporter.cs | 4 + .../UniGLTF/IO/MaterialIO/InvariantRP.meta | 8 + .../IO/MaterialIO/InvariantRP/Export.meta | 3 + .../InvariantRP/Export/Materials.meta | 3 + .../InvariantRpUniGltfPbrMaterialExporter.cs | 173 + ...ariantRpUniGltfPbrMaterialExporter.cs.meta | 3 + .../IO/MaterialIO/InvariantRP/Import.meta | 3 + ...nvariantGltfMaterialDescriptorGenerator.cs | 41 + ...antGltfMaterialDescriptorGenerator.cs.meta | 11 + .../InvariantRP/Import/Materials.meta | 3 + .../InvariantRpUniGltfPbrMaterialImporter.cs | 199 + ...ariantRpUniGltfPbrMaterialImporter.cs.meta | 11 + .../IO/MaterialIO/PbrMaterialImportType.cs | 24 + .../MaterialIO/PbrMaterialImportType.cs.meta | 11 + .../URP/Export/UrpGltfMaterialExporter.cs | 2 + Packages/UniGLTF/Tests/UniGLTF.Tests.asmdef | 3 +- .../InvariantRpUniGltfPbrMaterialTests.cs | 69 + ...InvariantRpUniGltfPbrMaterialTests.cs.meta | 11 + Packages/UniGLTF/UniGltfPbr.meta | 8 + Packages/UniGLTF/UniGltfPbr/Editor.meta | 8 + .../Editor/UniGLTF.UniGltfPbr.Editor.asmdef | 19 + .../UniGLTF.UniGltfPbr.Editor.asmdef.meta | 7 + .../UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs | 239 + .../Editor/UniGltfPbrShaderGUI.cs.meta | 11 + Packages/UniGLTF/UniGltfPbr/Runtime.meta | 8 + .../Runtime/UniGLTF.UniGltfPbr.asmdef | 14 + .../Runtime/UniGLTF.UniGltfPbr.asmdef.meta | 7 + .../UniGltfPbr/Runtime/UniGltfPbrContext.cs | 372 ++ .../Runtime/UniGltfPbrContext.cs.meta | 11 + .../Runtime/UniGltfPbrSurfaceType.cs | 8 + .../Runtime/UniGltfPbrSurfaceType.cs.meta | 3 + Packages/UniGLTF/UniGltfPbr/Shaders.meta | 8 + .../UniGltfPbr/Shaders/UniGltfPbr.shadergraph | 4870 +++++++++++++++++ .../Shaders/UniGltfPbr.shadergraph.meta | 10 + Packages/UniGLTF/package.json | 3 +- Packages/packages-lock.json | 3 +- 42 files changed, 6216 insertions(+), 19 deletions(-) create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs.meta create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs create mode 100644 Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs.meta create mode 100644 Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs create mode 100644 Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs.meta create mode 100644 Packages/UniGLTF/UniGltfPbr.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Editor.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef create mode 100644 Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs create mode 100644 Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs create mode 100644 Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Shaders.meta create mode 100644 Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph create mode 100644 Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph.meta diff --git a/Packages/UniGLTF/Editor/UniGLTF.Editor.asmdef b/Packages/UniGLTF/Editor/UniGLTF.Editor.asmdef index b3736347e..4c2feb6ec 100644 --- a/Packages/UniGLTF/Editor/UniGLTF.Editor.asmdef +++ b/Packages/UniGLTF/Editor/UniGLTF.Editor.asmdef @@ -38,16 +38,16 @@ "expression": "", "define": "UNIGLTF_DISABLE_DEFAULT_GLTF_IMPORTER" }, - { - "name": "com.unity.cloud.gltfast", - "expression": "", - "define": "UNIGLTF_DISABLE_DEFAULT_GLB_IMPORTER" - }, - { - "name": "com.unity.cloud.gltfast", - "expression": "", - "define": "UNIGLTF_DISABLE_DEFAULT_GLTF_IMPORTER" - } + { + "name": "com.unity.cloud.gltfast", + "expression": "", + "define": "UNIGLTF_DISABLE_DEFAULT_GLB_IMPORTER" + }, + { + "name": "com.unity.cloud.gltfast", + "expression": "", + "define": "UNIGLTF_DISABLE_DEFAULT_GLTF_IMPORTER" + } ], "noEngineReferences": false } \ No newline at end of file diff --git a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GlbScriptedImporter.cs b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GlbScriptedImporter.cs index 640d3ef87..2ea281cdb 100644 --- a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GlbScriptedImporter.cs +++ b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GlbScriptedImporter.cs @@ -20,7 +20,7 @@ namespace UniGLTF { public override void OnImportAsset(AssetImportContext ctx) { - Import(this, ctx, m_reverseAxis.ToAxes(), m_renderPipeline); + Import(this, ctx, m_reverseAxis.ToAxes(), m_renderPipeline, m_pbrMaterialImportType); } } } diff --git a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs index d99f3f1e0..3f621e477 100644 --- a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs +++ b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs @@ -20,7 +20,7 @@ namespace UniGLTF { public override void OnImportAsset(AssetImportContext ctx) { - Import(this, ctx, m_reverseAxis.ToAxes(), m_renderPipeline); + Import(this, ctx, m_reverseAxis.ToAxes(), m_renderPipeline, m_pbrMaterialImportType); } } } diff --git a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs index 83dd81993..0cbcf4131 100644 --- a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs +++ b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs @@ -21,6 +21,9 @@ namespace UniGLTF [SerializeField] public ImporterRenderPipelineTypes m_renderPipeline; + [SerializeField] + public PbrMaterialImportType m_pbrMaterialImportType; + /// /// glb をパースして、UnityObject化、さらにAsset化する /// @@ -28,7 +31,8 @@ namespace UniGLTF /// /// /// - protected static void Import(ScriptedImporter scriptedImporter, AssetImportContext context, Axes reverseAxis, ImporterRenderPipelineTypes renderPipeline) + /// + protected static void Import(ScriptedImporter scriptedImporter, AssetImportContext context, Axes reverseAxis, ImporterRenderPipelineTypes renderPipeline, PbrMaterialImportType pbrMaterialImportType = PbrMaterialImportType.UnityStandard) { UniGLTFLogger.Log("OnImportAsset to " + scriptedImporter.assetPath); @@ -41,7 +45,7 @@ namespace UniGLTF .Where(x => x.Value != null) .ToDictionary(kv => new SubAssetKey(kv.Value.GetType(), kv.Key.name), kv => kv.Value); - var materialGenerator = GetMaterialDescriptorGenerator(renderPipeline); + var materialGenerator = GetMaterialDescriptorGenerator(renderPipeline, pbrMaterialImportType); var importerContextSettings = new ImporterContextSettings(loadAnimation: true, invertAxis: reverseAxis); using (var data = new AutoGltfFileParser(scriptedImporter.assetPath).Parse()) @@ -68,8 +72,15 @@ namespace UniGLTF } } - private static IMaterialDescriptorGenerator GetMaterialDescriptorGenerator(ImporterRenderPipelineTypes renderPipeline) + private static IMaterialDescriptorGenerator GetMaterialDescriptorGenerator(ImporterRenderPipelineTypes renderPipeline, PbrMaterialImportType pbrMaterialImportType) { + if (pbrMaterialImportType == PbrMaterialImportType.GltfCompatible) + { + // NOTE: UniVRM 最適化 PBR (ShaderGraph) は 1 つのシェーダで Built-In / URP 両対応のため + // RenderPipeline による分岐を行わない。 + return new InvariantGltfMaterialDescriptorGenerator(); + } + return renderPipeline switch { ImporterRenderPipelineTypes.Auto => MaterialDescriptorGeneratorUtility .GetValidGltfMaterialDescriptorGenerator(), diff --git a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/ZipArchivedGltfScriptedImporter.cs b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/ZipArchivedGltfScriptedImporter.cs index 518019a0c..d99c72ce3 100644 --- a/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/ZipArchivedGltfScriptedImporter.cs +++ b/Packages/UniGLTF/Editor/UniGLTF/ScriptedImporter/ZipArchivedGltfScriptedImporter.cs @@ -14,7 +14,7 @@ namespace UniGLTF { public override void OnImportAsset(AssetImportContext ctx) { - Import(this, ctx, m_reverseAxis.ToAxes(), m_renderPipeline); + Import(this, ctx, m_reverseAxis.ToAxes(), m_renderPipeline, m_pbrMaterialImportType); } } } diff --git a/Packages/UniGLTF/Runtime/UniGLTF.asmdef b/Packages/UniGLTF/Runtime/UniGLTF.asmdef index c561cf1b7..4d7965e5d 100644 --- a/Packages/UniGLTF/Runtime/UniGLTF.asmdef +++ b/Packages/UniGLTF/Runtime/UniGLTF.asmdef @@ -5,6 +5,7 @@ "GUID:da3e51d19d51a544fa14d43fee843098", "GUID:60c8346e00a8ddd4cafc5a02eceeec57", "GUID:1cd941934d098654fa21a13f28346412", + "GUID:9fe7352e1c749b94aa9194a537b768e6", "GUID:3d354272d3f2f4c3387dbccbaebd0f60" ], "includePlatforms": [], diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/BuiltInRP/Export/BuiltInGltfMaterialExporter.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/BuiltInRP/Export/BuiltInGltfMaterialExporter.cs index c8d753913..019c618a9 100644 --- a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/BuiltInRP/Export/BuiltInGltfMaterialExporter.cs +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/BuiltInRP/Export/BuiltInGltfMaterialExporter.cs @@ -12,6 +12,7 @@ namespace UniGLTF "Unlit/Texture", "Unlit/Transparent", "Unlit/Transparent Cutout", + UniGltfPbrContext.ShaderName, }; public glTFMaterial ExportMaterial(Material m, ITextureExporter textureExporter, GltfExportSettings settings) @@ -37,6 +38,9 @@ namespace UniGLTF case "Unlit/Transparent Cutout": if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(m, glTFBlendMode.MASK, textureExporter, out dst)) return dst; break; + case UniGltfPbrContext.ShaderName: + if (new InvariantRpUniGltfPbrMaterialExporter().TryExportMaterial(m, textureExporter, out dst)) return dst; + break; } UniGLTFLogger.Log($"Material `{m.name}` fallbacks."); diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP.meta new file mode 100644 index 000000000..19c457dc5 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a1a30880fa75f3749950bf8be0a89e32 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export.meta new file mode 100644 index 000000000..137e80bd8 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: da9bfbc669de45209e81fc260129d117 +timeCreated: 1784359347 \ No newline at end of file diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials.meta new file mode 100644 index 000000000..232a1fd33 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 457a0388491c4f41b3017a75679ad870 +timeCreated: 1784359510 \ No newline at end of file diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs new file mode 100644 index 000000000..38fb87475 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs @@ -0,0 +1,173 @@ +using UnityEngine; +using UnityEngine.Rendering; + +namespace UniGLTF +{ + public class InvariantRpUniGltfPbrMaterialExporter + { + public Shader Shader { get; set; } + + public InvariantRpUniGltfPbrMaterialExporter(Shader shader = null) + { + Shader = shader ?? UniGltfPbrContext.GetShader(); + } + + public bool TryExportMaterial(Material src, ITextureExporter textureExporter, out glTFMaterial dst) + { + if (src == null || src.shader == null || src.shader != Shader) + { + dst = default; + return false; + } + + dst = new glTFMaterial + { + name = src.name, + pbrMetallicRoughness = new glTFPbrMetallicRoughness(), + }; + + var context = new UniGltfPbrContext(src); + + ExportSurfaceSettings(context, dst); + ExportBaseColor(context, dst, textureExporter); + ExportMetallicRoughness(context, dst, textureExporter); + ExportOcclusion(context, dst, textureExporter); + ExportNormal(context, dst, textureExporter); + ExportEmission(context, dst, textureExporter); + + return true; + } + + private static void ExportSurfaceSettings(UniGltfPbrContext context, glTFMaterial dst) + { + dst.alphaMode = (context.SurfaceType, context.IsAlphaClipEnabled) switch + { + (UniGltfPbrSurfaceType.Opaque, false) => glTFBlendMode.OPAQUE.ToString(), + (UniGltfPbrSurfaceType.Opaque, true) => glTFBlendMode.MASK.ToString(), + (UniGltfPbrSurfaceType.Transparent, _) => glTFBlendMode.BLEND.ToString(), + _ => glTFBlendMode.OPAQUE.ToString(), + }; + dst.alphaCutoff = context.AlphaCutoff; + dst.doubleSided = context.CullMode != CullMode.Back; // NOTE: cull front は glTF 非対応 + } + + private static void ExportBaseColor(UniGltfPbrContext context, glTFMaterial dst, ITextureExporter textureExporter) + { + // _baseColorFactor は sRGB 格納なので sRGB->Linear で glTF に戻す + dst.pbrMetallicRoughness.baseColorFactor = context.BaseColorSrgb.ToFloat4(ColorSpace.sRGB, ColorSpace.Linear); + + if (context.BaseColorTexture != null) + { + var needsAlpha = context.SurfaceType != UniGltfPbrSurfaceType.Opaque; + var index = textureExporter.RegisterExportingAsSRgb(context.BaseColorTexture, needsAlpha); + if (index >= 0) + { + dst.pbrMetallicRoughness.baseColorTexture = new glTFMaterialBaseColorTextureInfo + { + index = index, + texCoord = 0, + }; + ExportTextureTransform(context.BaseColorTextureOffset, context.BaseColorTextureScale, dst.pbrMetallicRoughness.baseColorTexture); + } + } + } + + private static void ExportMetallicRoughness(UniGltfPbrContext context, glTFMaterial dst, ITextureExporter textureExporter) + { + // 反転・1 固定なし。factor とテクスチャは独立 (glTF セマンティクス通り) + dst.pbrMetallicRoughness.metallicFactor = context.MetallicFactor; + dst.pbrMetallicRoughness.roughnessFactor = context.RoughnessFactor; + + if (context.MetallicRoughnessTexture != null) + { + // 既に glTF ネイティブ ORM パッキング -> Linear passthrough (チャンネル入替なし) + var index = textureExporter.RegisterExportingAsLinear(context.MetallicRoughnessTexture, false); + if (index >= 0) + { + dst.pbrMetallicRoughness.metallicRoughnessTexture = new glTFMaterialMetallicRoughnessTextureInfo + { + index = index, + texCoord = 0, + }; + ExportTextureTransform(context.MetallicRoughnessTextureOffset, context.MetallicRoughnessTextureScale, dst.pbrMetallicRoughness.metallicRoughnessTexture); + } + } + } + + private static void ExportOcclusion(UniGltfPbrContext context, glTFMaterial dst, ITextureExporter textureExporter) + { + if (context.OcclusionTexture != null) + { + // metallicRoughnessTexture と同一 Texture の場合は TextureExporter が index を dedupe する + var index = textureExporter.RegisterExportingAsLinear(context.OcclusionTexture, false); + if (index >= 0) + { + dst.occlusionTexture = new glTFMaterialOcclusionTextureInfo + { + index = index, + texCoord = 0, + strength = context.OcclusionStrength, + }; + ExportTextureTransform(context.OcclusionTextureOffset, context.OcclusionTextureScale, dst.occlusionTexture); + } + } + } + + private static void ExportNormal(UniGltfPbrContext context, glTFMaterial dst, ITextureExporter textureExporter) + { + if (context.NormalTexture == null) return; + + var index = textureExporter.RegisterExportingAsNormal(context.NormalTexture); + if (index >= 0) + { + dst.normalTexture = new glTFMaterialNormalTextureInfo + { + index = index, + texCoord = 0, + scale = context.NormalScale, + }; + ExportTextureTransform(context.NormalTextureOffset, context.NormalTextureScale, dst.normalTexture); + } + } + + private static void ExportEmission(UniGltfPbrContext context, glTFMaterial dst, ITextureExporter textureExporter) + { + var emissive = context.EmissiveFactorLinear; // linear + var strength = context.EmissiveStrength; + + // emissiveFactor * emissiveStrength を放射輝度とし、glTF-valid (factor<=1) になるよう正規化する。 + // maxComponent が 1 を超える分は KHR_materials_emissive_strength に逃がす。 + var total = new Vector3(emissive.r * strength, emissive.g * strength, emissive.b * strength); + var maxComp = Mathf.Max(total.x, Mathf.Max(total.y, total.z)); + if (maxComp > 1.0f) + { + dst.emissiveFactor = new[] { total.x / maxComp, total.y / maxComp, total.z / maxComp }; + glTF_KHR_materials_emissive_strength.Serialize(ref dst.extensions, maxComp); + } + else + { + dst.emissiveFactor = new[] { total.x, total.y, total.z }; + } + + if (context.EmissiveTexture != null) + { + var index = textureExporter.RegisterExportingAsSRgb(context.EmissiveTexture, true); + if (index >= 0) + { + dst.emissiveTexture = new glTFMaterialEmissiveTextureInfo + { + index = index, + texCoord = 0, + }; + ExportTextureTransform(context.EmissiveTextureOffset, context.EmissiveTextureScale, dst.emissiveTexture); + } + } + } + + private static void ExportTextureTransform(Vector2 offset, Vector2 scale, glTFTextureInfo dst) + { + // NOTE: シェーダは全テクスチャに ScaleOffset を持つため、各テクスチャ固有の transform を出力する + GltfMaterialExportUtils.ExportTextureTransform(offset, scale, dst); + } + } +} \ No newline at end of file diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs.meta new file mode 100644 index 000000000..ab893d98e --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Export/Materials/InvariantRpUniGltfPbrMaterialExporter.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7347686cba894aef8e19cffcf0bd2b86 +timeCreated: 1784359580 \ No newline at end of file diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import.meta new file mode 100644 index 000000000..32db94e45 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ce9e54afa9854733b9366f41c62aac2b +timeCreated: 1784359298 \ No newline at end of file diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs new file mode 100644 index 000000000..392777910 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs @@ -0,0 +1,41 @@ +using UnityEngine; + +namespace UniGLTF +{ + /// + /// glTF 準拠 PBR ShaderGraph (UniGltfPbr) を用いる IMaterialDescriptorGenerator。 + /// + /// オプトイン用。ImporterContext の materialGenerator 引数に渡して使う。 + /// RenderPipeline 非依存 (1 つの ShaderGraph が Built-In / URP の両 Target を持つ) なので + /// 既定の RenderPipeline 分岐 (MaterialDescriptorGeneratorUtility) は経由しない。 + /// + /// 分岐順は既存 generator と同じ unlit -> pbr -> default。 + /// unlit は既存の BuiltInGltfUnlitMaterialImporter (UniGLTF/UniUnlit) を再利用する。 + /// + public sealed class InvariantGltfMaterialDescriptorGenerator : IMaterialDescriptorGenerator + { + public InvariantRpUniGltfPbrMaterialImporter PbrMaterialImporter { get; } + public BuiltInGltfUnlitMaterialImporter UnlitMaterialImporter { get; } = new(); + + public InvariantGltfMaterialDescriptorGenerator(Shader pbrShader = null) + { + PbrMaterialImporter = new InvariantRpUniGltfPbrMaterialImporter(pbrShader); + } + + public MaterialDescriptor Get(GltfData data, int i) + { + if (UnlitMaterialImporter.TryCreateParam(data, i, out var param)) return param; + if (PbrMaterialImporter.TryCreateParam(data, i, out param)) return param; + + // NOTE: Fallback to default material + if (Symbols.VRM_DEVELOP) + { + UniGLTFLogger.Warning($"material: {i} out of range. fallback"); + } + return GetGltfDefault(GltfMaterialImportUtils.ImportMaterialName(i, null)); + } + + public MaterialDescriptor GetGltfDefault(string materialName = null) + => PbrMaterialImporter.CreateDefaultParam(materialName); + } +} diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs.meta new file mode 100644 index 000000000..b1dcd0806 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/InvariantGltfMaterialDescriptorGenerator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3fa5e67f09fd71c4c92bcd538b25ece8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials.meta new file mode 100644 index 000000000..a054f3f9f --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3157f2650bb047adbc517f8cd35e962a +timeCreated: 1784359319 \ No newline at end of file diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs new file mode 100644 index 000000000..25888c797 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Rendering; + +namespace UniGLTF +{ + /// + /// glTF 準拠 PBR ShaderGraph (UniGltfPbr) 向けの MaterialDescriptor を生成する。 + /// + /// 既定の Standard / URP-Lit 経路との違い: + /// - metallicRoughnessTexture / occlusionTexture を glTF のパッキングのまま Linear で取り込む + /// (OcclusionMetallicRoughnessConverter による GPU blit + ReadPixels 変換を行わない) + /// - metallicFactor / roughnessFactor をそのまま格納する (1.0 固定や smoothness 反転をしない) + /// + /// 構造は UniGLTF.UrpGltfPbrMaterialImporter を踏襲する。 + /// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#materials + /// + public class InvariantRpUniGltfPbrMaterialImporter + { + public Shader Shader { get; set; } + + public InvariantRpUniGltfPbrMaterialImporter(Shader shader = null) + { + Shader = shader ?? UniGltfPbrContext.GetShader(); + } + + public bool TryCreateParam(GltfData data, int i, out MaterialDescriptor matDesc) + { + if (i < 0 || i >= data.GLTF.materials.Count) + { + matDesc = default; + return false; + } + + var src = data.GLTF.materials[i]; + matDesc = new MaterialDescriptor( + GltfMaterialImportUtils.ImportMaterialName(i, src), + Shader, + new[] { (MaterialDescriptor.MaterialGenerateAsyncFunc)AsyncAction } + ); + return true; + + Task AsyncAction(Material x, GetTextureAsyncFunc y, IAwaitCaller z) => GenerateMaterialAsync(data, src, x, y, z); + } + + /// + /// glTF default material (プロパティ既定値でシェーダを割り当てるだけ)。 + /// シェーダ側の既定値 (baseColor=white, metallic=1, roughness=1) が glTF default に一致する。 + /// + public MaterialDescriptor CreateDefaultParam(string materialName) + { + return new MaterialDescriptor( + materialName, + Shader, + new List() + ); + } + + public static async Task GenerateMaterialAsync(GltfData data, glTFMaterial src, Material dst, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + var context = new UniGltfPbrContext(dst); + + ImportSurfaceSettings(src, context); + await ImportBaseColorAsync(data, src, context, getTextureAsync, awaitCaller); + await ImportMetallicRoughnessAsync(data, src, context, getTextureAsync, awaitCaller); + await ImportOcclusionAsync(data, src, context, getTextureAsync, awaitCaller); + await ImportNormalAsync(data, src, context, getTextureAsync, awaitCaller); + await ImportEmissionAsync(data, src, context, getTextureAsync, awaitCaller); + + context.Validate(); + } + + public static void ImportSurfaceSettings(glTFMaterial src, UniGltfPbrContext context) + { + context.SurfaceType = src.alphaMode switch + { + "OPAQUE" => UniGltfPbrSurfaceType.Opaque, + "MASK" => UniGltfPbrSurfaceType.Opaque, // AlphaClip. Opaque queue (AlphaTest) + "BLEND" => UniGltfPbrSurfaceType.Transparent, + _ => UniGltfPbrSurfaceType.Opaque, + }; + context.IsAlphaClipEnabled = src.alphaMode == "MASK"; + context.AlphaCutoff = src.alphaCutoff; + context.CullMode = src.doubleSided ? CullMode.Off : CullMode.Back; + } + + public static async Task ImportBaseColorAsync(GltfData data, glTFMaterial src, UniGltfPbrContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + var baseColorFactor = GltfMaterialImportUtils.ImportLinearBaseColorFactor(data, src); + if (baseColorFactor.HasValue) + { + // _baseColorFactor は Default(sRGB) カラー想定なので .gamma で格納する + context.BaseColorSrgb = baseColorFactor.Value.gamma; + } + + if (src is { pbrMetallicRoughness: { baseColorTexture: { index: >= 0 } } }) + { + if (GltfPbrTextureImporter.TryBaseColorTexture(data, src, out _, out var desc)) + { + context.BaseColorTexture = await getTextureAsync(desc, awaitCaller); + context.BaseColorTextureOffset = desc.Offset; + context.BaseColorTextureScale = desc.Scale; + } + } + } + + public static async Task ImportMetallicRoughnessAsync(GltfData data, glTFMaterial src, UniGltfPbrContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + if (src.pbrMetallicRoughness != null) + { + context.MetallicFactor = src.pbrMetallicRoughness.metallicFactor; + context.RoughnessFactor = src.pbrMetallicRoughness.roughnessFactor; + } + + if (src is { pbrMetallicRoughness: { metallicRoughnessTexture: { index: >= 0 } } }) + { + var info = src.pbrMetallicRoughness.metallicRoughnessTexture; + var (offset, scale) = GltfTextureImporter.GetTextureOffsetAndScale(info); + // NOTE: glTF の ORM パッキングをそのまま Linear で取り込む (変換なし) + if (GltfTextureImporter.TryCreateLinear(data, info.index, offset, scale, out _, out var desc)) + { + context.MetallicRoughnessTexture = await getTextureAsync(desc, awaitCaller); + context.MetallicRoughnessTextureOffset = desc.Offset; + context.MetallicRoughnessTextureScale = desc.Scale; + } + } + } + + public static async Task ImportOcclusionAsync(GltfData data, glTFMaterial src, UniGltfPbrContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + if (src is { occlusionTexture: { index: >= 0 } }) + { + context.OcclusionStrength = src.occlusionTexture.strength; + + var (offset, scale) = GltfTextureImporter.GetTextureOffsetAndScale(src.occlusionTexture); + if (GltfTextureImporter.TryCreateLinear(data, src.occlusionTexture.index, offset, scale, out _, out var desc)) + { + context.OcclusionTexture = await getTextureAsync(desc, awaitCaller); + context.OcclusionTextureOffset = desc.Offset; + context.OcclusionTextureScale = desc.Scale; + } + } + } + + private static async Task ImportNormalAsync(GltfData data, glTFMaterial src, UniGltfPbrContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + if (src.normalTexture is { index: >= 0 }) + { + if (GltfPbrTextureImporter.TryNormalTexture(data, src, out _, out var desc)) + { + context.NormalTexture = await getTextureAsync(desc, awaitCaller); + context.NormalScale = src.normalTexture.scale; + context.NormalTextureOffset = desc.Offset; + context.NormalTextureScale = desc.Scale; + } + } + } + + /// + /// emissiveFactor と KHR_materials_emissive_strength を分離して取り込む。 + /// (GltfMaterialImportUtils.ImportLinearEmissiveFactor は strength を factor に畳み込むため使わない) + /// + private static async Task ImportEmissionAsync(GltfData data, glTFMaterial src, UniGltfPbrContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + if (src.emissiveFactor != null && src.emissiveFactor.Length == 3) + { + var emissive = new Vector3(src.emissiveFactor[0], src.emissiveFactor[1], src.emissiveFactor[2]); + var linear = data.MigrationFlags.IsEmissiveFactorGamma + ? emissive.ToColor3(ColorSpace.sRGB, ColorSpace.Linear) + : emissive.ToColor3(ColorSpace.Linear, ColorSpace.Linear); + context.EmissiveFactorLinear = linear; + } + + var strength = 1.0f; + if (glTF_KHR_materials_emissive_strength.TryGet(src.extensions, out var emissiveStrength)) + { + strength = emissiveStrength.emissiveStrength; + } + context.EmissiveStrength = strength; + + if (src is { emissiveTexture: { index: >= 0 } }) + { + if (GltfPbrTextureImporter.TryEmissiveTexture(data, src, out _, out var desc)) + { + context.EmissiveTexture = await getTextureAsync(desc, awaitCaller); + context.EmissiveTextureOffset = desc.Offset; + context.EmissiveTextureScale = desc.Scale; + } + } + + var isEmissive = context.EmissiveFactorLinear.maxColorComponent > 0 || context.EmissiveTexture != null; + context.Material.globalIlluminationFlags = isEmissive + ? context.Material.globalIlluminationFlags & ~MaterialGlobalIlluminationFlags.EmissiveIsBlack + : context.Material.globalIlluminationFlags | MaterialGlobalIlluminationFlags.EmissiveIsBlack; + } + } +} diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs.meta new file mode 100644 index 000000000..76d5ec0e6 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/InvariantRP/Import/Materials/InvariantRpUniGltfPbrMaterialImporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63c674962a3b65c4c910f8656909a10f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs new file mode 100644 index 000000000..5c20d760a --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs @@ -0,0 +1,24 @@ +namespace UniGLTF +{ + /// + /// glTF PBR マテリアルの import 実装の選択。 + /// + /// RenderPipeline や具体的なシェーダ実装 (ShaderGraph 等) に依存しない名前とする。 + /// + public enum PbrMaterialImportType + { + /// + /// 既定。Unity 標準の PBR マテリアル実装を用いる。 + /// (Built-In: Unity "Standard" / URP: "Universal Render Pipeline/Lit") + /// metallicRoughness/occlusion は import 時にテクスチャ変換される。 + /// + UnityStandard = 0, + + /// + /// glTF 仕様に最適化 PBR マテリアル実装。 + /// glTF の ORM を無変換で取り込み、単一シェーダで複数 RenderPipeline をカバーする。 + /// (現状の実装は glTF 準拠 PBR ShaderGraph "UniGltfPbr") + /// + GltfCompatible = 1, + } +} diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs.meta b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs.meta new file mode 100644 index 000000000..d591ece59 --- /dev/null +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/PbrMaterialImportType.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9daab18aa43e3714d9d39cadd243c5b1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Export/UrpGltfMaterialExporter.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Export/UrpGltfMaterialExporter.cs index f7721eca9..2752a5304 100644 --- a/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Export/UrpGltfMaterialExporter.cs +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/URP/Export/UrpGltfMaterialExporter.cs @@ -7,6 +7,7 @@ namespace UniGLTF public UrpLitMaterialExporter UrpLitExporter { get; set; } = new(); public UrpUnlitMaterialExporter UrpUnlitExporter { get; set; } = new(); public UrpUniUnlitMaterialExporter UrpUniUnlitExporter { get; set; } = new(); + public InvariantRpUniGltfPbrMaterialExporter InvariantRpUniGltfPbrMaterialExporter { get; set; } = new(); public UrpFallbackMaterialExporter FallbackExporter { get; set; } = new(); public glTFMaterial ExportMaterial(Material m, ITextureExporter textureExporter, GltfExportSettings settings) @@ -14,6 +15,7 @@ namespace UniGLTF if (UrpLitExporter.TryExportMaterial(m, textureExporter, out var dst)) return dst; if (UrpUnlitExporter.TryExportMaterial(m, textureExporter, out dst)) return dst; if (UrpUniUnlitExporter.TryExportMaterial(m, textureExporter, out dst)) return dst; + if (InvariantRpUniGltfPbrMaterialExporter.TryExportMaterial(m, textureExporter, out dst)) return dst; UniGLTFLogger.Log($"Material `{m.name}` fallbacks."); return FallbackExporter.ExportMaterial(m, textureExporter); diff --git a/Packages/UniGLTF/Tests/UniGLTF.Tests.asmdef b/Packages/UniGLTF/Tests/UniGLTF.Tests.asmdef index d5dfef6ec..a265a02a1 100644 --- a/Packages/UniGLTF/Tests/UniGLTF.Tests.asmdef +++ b/Packages/UniGLTF/Tests/UniGLTF.Tests.asmdef @@ -7,7 +7,8 @@ "GUID:27619889b8ba8c24980f49ee34dbb44a", "GUID:0acc523941302664db1f4e527237feb3", "GUID:1cd941934d098654fa21a13f28346412", - "GUID:d8b63aba1907145bea998dd612889d6b" + "GUID:d8b63aba1907145bea998dd612889d6b", + "GUID:9fe7352e1c749b94aa9194a537b768e6" ], "includePlatforms": [ "Editor" diff --git a/Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs b/Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs new file mode 100644 index 000000000..95381c2da --- /dev/null +++ b/Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs @@ -0,0 +1,69 @@ +using NUnit.Framework; +using UnityEngine; +using UniJSON; + +namespace UniGLTF +{ + /// + /// glTF 準拠 PBR ShaderGraph (UniGltfPbr) の export パススルー検証。 + /// + /// ShaderGraph アセット (UniGltfPbr.shadergraph) が未作成の間は Assert.Ignore で + /// スキップする。作成後に有効化される。仕様は Shaders/GltfPbr/README.md を参照。 + /// + public class InvariantRpUniGltfPbrMaterialTests + { + private static Material TryCreateMaterialOrIgnore() + { + var material = new Material(UniGltfPbrContext.GetShader()); + if (!material.HasProperty("_metallicFactor") || !material.HasProperty("_roughnessFactor")) + { + Assert.Ignore("UniGltfPbr shader lacks glTF-native properties (_metallicFactor / _roughnessFactor). See README.md."); + } + return material; + } + + [Test] + public void MetallicRoughnessFactorPassthroughTest() + { + var material = TryCreateMaterialOrIgnore(); + var context = new UniGltfPbrContext(material) + { + MetallicFactor = 0.3f, + RoughnessFactor = 0.7f, + }; + + var textureExporter = new TextureExporter(new EditorTextureSerializer()); + Assert.IsTrue(new InvariantRpUniGltfPbrMaterialExporter().TryExportMaterial(material, textureExporter, out var dst)); + + // 反転しない / 1.0 に固定しない (glTF セマンティクスそのまま) + Assert.AreEqual(0.3f, dst.pbrMetallicRoughness.metallicFactor, 1e-4f); + Assert.AreEqual(0.7f, dst.pbrMetallicRoughness.roughnessFactor, 1e-4f); + } + + [Test] + public void EmissiveStrengthExportTest() + { + var material = TryCreateMaterialOrIgnore(); + var context = new UniGltfPbrContext(material) + { + EmissiveFactorLinear = new Color(0f, 0.5f, 0f), + EmissiveStrength = 4.0f, + }; + + var textureExporter = new TextureExporter(new EditorTextureSerializer()); + Assert.IsTrue(new InvariantRpUniGltfPbrMaterialExporter().TryExportMaterial(material, textureExporter, out var dst)); + + // emissiveFactor * strength = (0, 2, 0) -> 正規化して factor=(0,1,0), strength=2 + Assert.AreEqual(0f, dst.emissiveFactor[0], 1e-4f); + Assert.AreEqual(1f, dst.emissiveFactor[1], 1e-4f); + Assert.AreEqual(0f, dst.emissiveFactor[2], 1e-4f); + + var json = dst.ToJson(); + var parsed = json.ParseAsJson(); + Assert.AreEqual( + 2.0f, + parsed["extensions"]["KHR_materials_emissive_strength"]["emissiveStrength"].GetSingle(), + 1e-4f); + } + } +} diff --git a/Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs.meta b/Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs.meta new file mode 100644 index 000000000..f382cc1b8 --- /dev/null +++ b/Packages/UniGLTF/Tests/UniGLTF/InvariantRpUniGltfPbrMaterialTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 53ffd3dc3e180594e91a4009b7d66471 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr.meta b/Packages/UniGLTF/UniGltfPbr.meta new file mode 100644 index 000000000..fef589b7b --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5dcbf6fd16720e14a825ae89d0654d04 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Editor.meta b/Packages/UniGLTF/UniGltfPbr/Editor.meta new file mode 100644 index 000000000..70a3c5195 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5bcc8913bbc87ef4d97c6c49948be2d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef b/Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef new file mode 100644 index 000000000..d82de5e7f --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef @@ -0,0 +1,19 @@ +{ + "name": "UniGLTF.UniGltfPbr.Editor", + "rootNamespace": "", + "references": [ + "GUID:9fe7352e1c749b94aa9194a537b768e6", + "GUID:3eae0364be2026648bf74846acb8a731" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef.meta b/Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef.meta new file mode 100644 index 000000000..0fa4a8059 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Editor/UniGLTF.UniGltfPbr.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1559e7155b5ec8240bd4abf00fdb3d4d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs b/Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs new file mode 100644 index 000000000..451d8edb0 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs @@ -0,0 +1,239 @@ +using System.Linq; +using UnityEditor; +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Rendering; + +namespace UniGLTF +{ + /// + /// glTF 準拠 PBR ShaderGraph (UniGltfPbr) 用の Custom ShaderGUI。 + /// + /// - 見た目は URP/Lit に近づけ、CoreEditorUtils.DrawHeaderFoldout でセクション分けする。 + /// - 不透明/透明・Alpha Clip・Render Face の切替は副作用 (blend/zwrite/renderQueue/keyword) を伴うため、 + /// 生プロパティ (_Surface / _Blend / _SrcBlend ...) を直接露出せず、 + /// の SurfaceType / IsAlphaClipEnabled / CullMode + Validate() に + /// 委譲して自動適用・隠蔽する。 + /// + /// アタッチ: UniGltfPbr.shadergraph の各 Target の Custom Editor GUI に "UniGLTF.UniGltfPbrShaderGUI" を設定。 + /// + public class UniGltfPbrShaderGUI : ShaderGUI + { + private static class Styles + { + public static readonly GUIContent SurfaceType = new GUIContent("Surface Type", "Opaque / Transparent の切替。関連する Blend / ZWrite / RenderQueue は自動設定されます。"); + public static readonly GUIContent RenderFace = new GUIContent("Render Face", "描画する面。Front(片面 / doubleSided=false) または Both(doubleSided=true)。"); + public static readonly GUIContent AlphaClip = new GUIContent("Alpha Clipping", "Alpha が閾値未満のピクセルを破棄します (glTF MASK)。"); + public static readonly GUIContent Threshold = new GUIContent("Threshold", "Alpha Clipping の閾値 (alphaCutoff)。"); + + public static readonly GUIContent BaseMap = new GUIContent("Base Map", "baseColorTexture (sRGB) と baseColorFactor。"); + public static readonly GUIContent Metallic = new GUIContent("Metallic", "metallicFactor。"); + public static readonly GUIContent Roughness = new GUIContent("Roughness", "roughnessFactor。"); + public static readonly GUIContent MetallicRoughnessMap = new GUIContent("Metallic Roughness Map", "metallicRoughnessTexture (Linear, G:Roughness B:Metallic)。"); + public static readonly GUIContent OcclusionMap = new GUIContent("Occlusion Map", "occlusionTexture (Linear, R:Occlusion)。"); + public static readonly GUIContent OcclusionStrength = new GUIContent("Occlusion Strength", "occlusionTexture.strength。"); + public static readonly GUIContent NormalMap = new GUIContent("Normal Map", "normalTexture と normalScale。"); + public static readonly GUIContent Emission = new GUIContent("Emission", "emissiveFactor (HDR) と emissiveTexture (sRGB)。"); + public static readonly GUIContent EmissiveStrength = new GUIContent("Emissive Strength", "KHR_materials_emissive_strength。"); + } + + // Render Face popup。ラベルは「描画する面」、CullMode は「カリングする面」で逆になる点に注意: + // Front を描画 = 背面カリング = CullMode.Back (glTF: doubleSided=false) + // Both = CullMode.Off (glTF: doubleSided=true) + // 裏面のみ描画 (CullMode.Front) は glTF 非対応のため選択肢に用意しない。 + private static readonly string[] RenderFaceNames = { "Front", "Both" }; + private static readonly CullMode[] RenderFaceCull = { CullMode.Back, CullMode.Off }; + + // foldout state (editor セッション保持) + private static bool s_surfaceOptions = true; + private static bool s_surfaceInputs = true; + private static bool s_advanced = false; + + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) + { + var baseColorFactor = FindProperty("_baseColorFactor", properties, false); + var baseColorTexture = FindProperty("_baseColorTexture", properties, false); + var metallicFactor = FindProperty("_metallicFactor", properties, false); + var roughnessFactor = FindProperty("_roughnessFactor", properties, false); + var metallicRoughnessTexture = FindProperty("_metallicRoughnessTexture", properties, false); + var occlusionTexture = FindProperty("_occlusionTexture", properties, false); + var occlusionStrength = FindProperty("_occlusionStrength", properties, false); + var normalTexture = FindProperty("_normalTexture", properties, false); + var normalScale = FindProperty("_normalScale", properties, false); + var emissiveFactor = FindProperty("_emissiveFactor", properties, false); + var emissiveTexture = FindProperty("_emissiveTexture", properties, false); + var emissiveStrength = FindProperty("_emissiveStrength", properties, false); + var alphaCutoff = FindProperty("_alphaCutoff", properties, false); + + s_surfaceOptions = CoreEditorUtils.DrawHeaderFoldout("Surface Options", s_surfaceOptions); + if (s_surfaceOptions) + { + EditorGUI.indentLevel++; + DrawSurfaceOptions(materialEditor, alphaCutoff); + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + } + + s_surfaceInputs = CoreEditorUtils.DrawHeaderFoldout("Surface Inputs", s_surfaceInputs); + if (s_surfaceInputs) + { + EditorGUI.indentLevel++; + DrawSurfaceInputs( + materialEditor, + baseColorTexture, baseColorFactor, + metallicFactor, roughnessFactor, metallicRoughnessTexture, + occlusionTexture, occlusionStrength, + normalTexture, normalScale, + emissiveTexture, emissiveFactor, emissiveStrength); + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + } + + s_advanced = CoreEditorUtils.DrawHeaderFoldout("Advanced Options", s_advanced); + if (s_advanced) + { + EditorGUI.indentLevel++; + DrawAdvanced(materialEditor); + EditorGUI.indentLevel--; + } + } + + private static void DrawSurfaceOptions(MaterialEditor materialEditor, MaterialProperty alphaCutoff) + { + var materials = materialEditor.targets.OfType().ToArray(); + if (materials.Length == 0) return; + + // Surface Type (Opaque / Transparent) + { + var current = new UniGltfPbrContext(materials[0]).SurfaceType; + EditorGUI.showMixedValue = materials.Any(m => new UniGltfPbrContext(m).SurfaceType != current); + EditorGUI.BeginChangeCheck(); + var next = (UniGltfPbrSurfaceType)EditorGUILayout.EnumPopup(Styles.SurfaceType, current); + if (EditorGUI.EndChangeCheck()) + { + materialEditor.RegisterPropertyChangeUndo("Surface Type"); + foreach (var m in materials) + { + var context = new UniGltfPbrContext(m) { SurfaceType = next }; + context.Validate(); + } + } + EditorGUI.showMixedValue = false; + } + + // Render Face (cull) + { + var currentCull = new UniGltfPbrContext(materials[0]).CullMode; + var currentIndex = Mathf.Max(0, System.Array.IndexOf(RenderFaceCull, currentCull)); + EditorGUI.showMixedValue = materials.Any(m => new UniGltfPbrContext(m).CullMode != currentCull); + EditorGUI.BeginChangeCheck(); + var nextIndex = EditorGUILayout.Popup(Styles.RenderFace, currentIndex, RenderFaceNames); + if (EditorGUI.EndChangeCheck()) + { + materialEditor.RegisterPropertyChangeUndo("Render Face"); + foreach (var m in materials) + { + var context = new UniGltfPbrContext(m) { CullMode = RenderFaceCull[nextIndex] }; + context.Validate(); + } + } + EditorGUI.showMixedValue = false; + } + + // Alpha Clipping + var alphaClipEnabled = new UniGltfPbrContext(materials[0]).IsAlphaClipEnabled; + { + EditorGUI.showMixedValue = materials.Any(m => new UniGltfPbrContext(m).IsAlphaClipEnabled != alphaClipEnabled); + EditorGUI.BeginChangeCheck(); + var next = EditorGUILayout.Toggle(Styles.AlphaClip, alphaClipEnabled); + if (EditorGUI.EndChangeCheck()) + { + materialEditor.RegisterPropertyChangeUndo("Alpha Clipping"); + foreach (var m in materials) + { + var context = new UniGltfPbrContext(m) { IsAlphaClipEnabled = next }; + context.Validate(); + } + alphaClipEnabled = next; + } + EditorGUI.showMixedValue = false; + } + + // Threshold は Alpha Clipping 有効時のみ表示 (副作用のない単純プロパティ) + if (alphaClipEnabled && alphaCutoff != null) + { + EditorGUI.indentLevel++; + materialEditor.ShaderProperty(alphaCutoff, Styles.Threshold); + EditorGUI.indentLevel--; + } + } + + private static void DrawSurfaceInputs( + MaterialEditor materialEditor, + MaterialProperty baseColorTexture, MaterialProperty baseColorFactor, + MaterialProperty metallicFactor, MaterialProperty roughnessFactor, MaterialProperty metallicRoughnessTexture, + MaterialProperty occlusionTexture, MaterialProperty occlusionStrength, + MaterialProperty normalTexture, MaterialProperty normalScale, + MaterialProperty emissiveTexture, MaterialProperty emissiveFactor, MaterialProperty emissiveStrength) + { + // NOTE: シェーダは全テクスチャに Tiling/Offset (ScaleOffset) を持つため、 + // テクスチャ割当時に各マップの TextureScaleOffsetProperty を表示する。 + if (baseColorTexture != null && baseColorFactor != null) + { + materialEditor.TexturePropertySingleLine(Styles.BaseMap, baseColorTexture, baseColorFactor); + DrawScaleOffset(materialEditor, baseColorTexture); + } + + if (metallicFactor != null) materialEditor.ShaderProperty(metallicFactor, Styles.Metallic); + if (roughnessFactor != null) materialEditor.ShaderProperty(roughnessFactor, Styles.Roughness); + if (metallicRoughnessTexture != null) + { + materialEditor.TexturePropertySingleLine(Styles.MetallicRoughnessMap, metallicRoughnessTexture); + DrawScaleOffset(materialEditor, metallicRoughnessTexture); + } + + if (occlusionTexture != null) + { + var occExtra = occlusionTexture.textureValue != null ? occlusionStrength : null; + materialEditor.TexturePropertySingleLine(Styles.OcclusionMap, occlusionTexture, occExtra); + DrawScaleOffset(materialEditor, occlusionTexture); + } + + if (normalTexture != null) + { + var normalExtra = normalTexture.textureValue != null ? normalScale : null; + materialEditor.TexturePropertySingleLine(Styles.NormalMap, normalTexture, normalExtra); + DrawScaleOffset(materialEditor, normalTexture); + } + + if (emissiveTexture != null && emissiveFactor != null) + { + materialEditor.TexturePropertyWithHDRColor(Styles.Emission, emissiveTexture, emissiveFactor, false); + if (emissiveStrength != null) + { + EditorGUI.indentLevel++; + materialEditor.ShaderProperty(emissiveStrength, Styles.EmissiveStrength); + EditorGUI.indentLevel--; + } + DrawScaleOffset(materialEditor, emissiveTexture); + } + } + + /// + /// テクスチャが割り当てられている時のみ Tiling/Offset を表示する。 + /// + private static void DrawScaleOffset(MaterialEditor materialEditor, MaterialProperty textureProperty) + { + if (textureProperty.textureValue == null) return; + materialEditor.TextureScaleOffsetProperty(textureProperty); + GUILayout.Space(8); + } + + private static void DrawAdvanced(MaterialEditor materialEditor) + { + materialEditor.EnableInstancingField(); + materialEditor.DoubleSidedGIField(); + materialEditor.RenderQueueField(); + } + } +} diff --git a/Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs.meta b/Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs.meta new file mode 100644 index 000000000..371970d28 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Editor/UniGltfPbrShaderGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30276155ae5852f43887835dfb0c1c55 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime.meta b/Packages/UniGLTF/UniGltfPbr/Runtime.meta new file mode 100644 index 000000000..ea21a2aa8 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41730641437d69a4e8988676c461c280 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef new file mode 100644 index 000000000..5794b5898 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef @@ -0,0 +1,14 @@ +{ + "name": "UniGLTF.UniGltfPbr", + "rootNamespace": "", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef.meta b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef.meta new file mode 100644 index 000000000..fc7be5227 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGLTF.UniGltfPbr.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9fe7352e1c749b94aa9194a537b768e6 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs new file mode 100644 index 000000000..8091eec8d --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs @@ -0,0 +1,372 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +namespace UniGLTF +{ + /// + /// glTF 準拠 PBR ShaderGraph (UniGltfPbr) のマテリアルプロパティを操作するクラス。 + /// import (書き込み) / export (読み取り) の双方で使う。 + /// + /// プロパティ名は glTF 2.0 仕様ネイティブ (baseColorFactor / metallicRoughnessTexture ...)。 + /// テクスチャは glTF のパッキングをそのまま (roughness 未反転, ORM 未変換) 格納し、 + /// roughness->smoothness などの変換は ShaderGraph 内の per-fragment 演算で行う。 + /// + /// Surface(Opaque/Transparent) / Blend / Cull / AlphaClip は ShaderGraph の + /// "Allow Material Override" により露出するプロパティで制御する。 + /// 1 つの .shadergraph に Built-In / URP の 2 Target を同居させるため、 + /// URP 系 (_Surface ...) と Built-In 系 (_BUILTIN_* ...) の両方を HasProperty ガード付きで扱う。 + /// + /// 参考: UniGLTF.UrpLitContext / UniGLTF.UrpBaseShaderContext + /// + public sealed class UniGltfPbrContext + { + public const string ShaderName = "UniGLTF/UniGltfPbr"; + public static Shader GetShader() => Shader.Find(ShaderName); + + // --- glTF native pbr properties --- + private static readonly int BaseColorFactorProp = Shader.PropertyToID("_baseColorFactor"); + private static readonly int BaseColorTextureProp = Shader.PropertyToID("_baseColorTexture"); + private static readonly int MetallicFactorProp = Shader.PropertyToID("_metallicFactor"); + private static readonly int RoughnessFactorProp = Shader.PropertyToID("_roughnessFactor"); + private static readonly int MetallicRoughnessTextureProp = Shader.PropertyToID("_metallicRoughnessTexture"); + private static readonly int OcclusionTextureProp = Shader.PropertyToID("_occlusionTexture"); + private static readonly int OcclusionStrengthProp = Shader.PropertyToID("_occlusionStrength"); + private static readonly int NormalTextureProp = Shader.PropertyToID("_normalTexture"); + private static readonly int NormalScaleProp = Shader.PropertyToID("_normalScale"); + private static readonly int EmissiveFactorProp = Shader.PropertyToID("_emissiveFactor"); + private static readonly int EmissiveTextureProp = Shader.PropertyToID("_emissiveTexture"); + private static readonly int EmissiveStrengthProp = Shader.PropertyToID("_emissiveStrength"); + private static readonly int AlphaCutoffProp = Shader.PropertyToID("_alphaCutoff"); + + // --- surface state (URP ShaderGraph target / stock URP Lit compatible) --- + private static readonly int UrpSurfaceProp = Shader.PropertyToID("_Surface"); + private static readonly int UrpBlendProp = Shader.PropertyToID("_Blend"); + private static readonly int UrpAlphaClipProp = Shader.PropertyToID("_AlphaClip"); + private static readonly int UrpCullProp = Shader.PropertyToID("_Cull"); + private static readonly int UrpZWriteProp = Shader.PropertyToID("_ZWrite"); + private static readonly int UrpSrcBlendProp = Shader.PropertyToID("_SrcBlend"); + private static readonly int UrpDstBlendProp = Shader.PropertyToID("_DstBlend"); + private static readonly int UrpCutoffProp = Shader.PropertyToID("_Cutoff"); + private const string UrpSurfaceTypeTransparentKeyword = "_SURFACE_TYPE_TRANSPARENT"; + private const string UrpAlphaTestOnKeyword = "_ALPHATEST_ON"; + + // --- surface state (Built-In ShaderGraph target) --- + private static readonly int BuiltInSurfaceProp = Shader.PropertyToID("_BUILTIN_Surface"); + private static readonly int BuiltInBlendProp = Shader.PropertyToID("_BUILTIN_Blend"); + private static readonly int BuiltInAlphaClipProp = Shader.PropertyToID("_BUILTIN_AlphaClip"); + private static readonly int BuiltInCullProp = Shader.PropertyToID("_BUILTIN_CullMode"); + private static readonly int BuiltInZWriteProp = Shader.PropertyToID("_BUILTIN_ZWrite"); + private static readonly int BuiltInSrcBlendProp = Shader.PropertyToID("_BUILTIN_SrcBlend"); + private static readonly int BuiltInDstBlendProp = Shader.PropertyToID("_BUILTIN_DstBlend"); + private const string BuiltInSurfaceTypeTransparentKeyword = "_BUILTIN_SURFACE_TYPE_TRANSPARENT"; + private const string BuiltInAlphaTestOnKeyword = "_BUILTIN_ALPHATEST_ON"; + + public Material Material { get; } + + private readonly HashSet _declaredKeywords; + + public UniGltfPbrContext(Material material) + { + Material = material; + _declaredKeywords = new HashSet(); + if (material != null && material.shader != null) + { + foreach (var kw in material.shader.keywordSpace.keywordNames) + { + _declaredKeywords.Add(kw); + } + } + } + + // ---- base color ---- + + /// + /// _baseColorFactor は ShaderGraph "Default" カラー (sRGB 格納) 想定。 + /// glTF の linear baseColorFactor は .gamma して格納し、export 時に sRGB->Linear で戻す。 + /// (UniGLTF.UrpBaseShaderContext.BaseColorSrgb と同じ規約) + /// + public Color BaseColorSrgb + { + get => Material.GetColor(BaseColorFactorProp); + set => Material.SetColor(BaseColorFactorProp, value); + } + + public Texture BaseColorTexture + { + get => Material.GetTexture(BaseColorTextureProp); + set => Material.SetTexture(BaseColorTextureProp, value); + } + + public Vector2 BaseColorTextureOffset + { + get => Material.GetTextureOffset(BaseColorTextureProp); + set => Material.SetTextureOffset(BaseColorTextureProp, value); + } + + public Vector2 BaseColorTextureScale + { + get => Material.GetTextureScale(BaseColorTextureProp); + set => Material.SetTextureScale(BaseColorTextureProp, value); + } + + // ---- metallic roughness (glTF native packing, no conversion) ---- + + public float MetallicFactor + { + get => Material.GetFloat(MetallicFactorProp); + set => Material.SetFloat(MetallicFactorProp, value); + } + + public float RoughnessFactor + { + get => Material.GetFloat(RoughnessFactorProp); + set => Material.SetFloat(RoughnessFactorProp, value); + } + + /// + /// glTF metallicRoughnessTexture をそのまま (G=roughness, B=metallic) 格納する。 + /// + public Texture MetallicRoughnessTexture + { + get => Material.GetTexture(MetallicRoughnessTextureProp); + set => Material.SetTexture(MetallicRoughnessTextureProp, value); + } + + public Vector2 MetallicRoughnessTextureOffset + { + get => Material.GetTextureOffset(MetallicRoughnessTextureProp); + set => Material.SetTextureOffset(MetallicRoughnessTextureProp, value); + } + + public Vector2 MetallicRoughnessTextureScale + { + get => Material.GetTextureScale(MetallicRoughnessTextureProp); + set => Material.SetTextureScale(MetallicRoughnessTextureProp, value); + } + + // ---- occlusion ---- + + public float OcclusionStrength + { + get => Material.GetFloat(OcclusionStrengthProp); + set => Material.SetFloat(OcclusionStrengthProp, value); + } + + /// + /// glTF occlusionTexture をそのまま (R=occlusion) 格納する。 + /// metallicRoughnessTexture と同一テクスチャ (ORM 1 枚) の場合もある。 + /// + public Texture OcclusionTexture + { + get => Material.GetTexture(OcclusionTextureProp); + set => Material.SetTexture(OcclusionTextureProp, value); + } + + public Vector2 OcclusionTextureOffset + { + get => Material.GetTextureOffset(OcclusionTextureProp); + set => Material.SetTextureOffset(OcclusionTextureProp, value); + } + + public Vector2 OcclusionTextureScale + { + get => Material.GetTextureScale(OcclusionTextureProp); + set => Material.SetTextureScale(OcclusionTextureProp, value); + } + + // ---- normal ---- + + public float NormalScale + { + get => Material.GetFloat(NormalScaleProp); + set => Material.SetFloat(NormalScaleProp, value); + } + + public Texture NormalTexture + { + get => Material.GetTexture(NormalTextureProp); + set => Material.SetTexture(NormalTextureProp, value); + } + + public Vector2 NormalTextureOffset + { + get => Material.GetTextureOffset(NormalTextureProp); + set => Material.SetTextureOffset(NormalTextureProp, value); + } + + public Vector2 NormalTextureScale + { + get => Material.GetTextureScale(NormalTextureProp); + set => Material.SetTextureScale(NormalTextureProp, value); + } + + // ---- emissive ---- + + /// + /// _emissiveFactor は HDR カラー (linear 直格納) 想定。 + /// (UniGLTF.UrpLitContext.EmissionColorLinear と同じ規約) + /// + public Color EmissiveFactorLinear + { + get => Material.GetColor(EmissiveFactorProp); + set => Material.SetColor(EmissiveFactorProp, value); + } + + public Texture EmissiveTexture + { + get => Material.GetTexture(EmissiveTextureProp); + set => Material.SetTexture(EmissiveTextureProp, value); + } + + public Vector2 EmissiveTextureOffset + { + get => Material.GetTextureOffset(EmissiveTextureProp); + set => Material.SetTextureOffset(EmissiveTextureProp, value); + } + + public Vector2 EmissiveTextureScale + { + get => Material.GetTextureScale(EmissiveTextureProp); + set => Material.SetTextureScale(EmissiveTextureProp, value); + } + + /// + /// KHR_materials_emissive_strength の emissiveStrength (default 1)。 + /// + public float EmissiveStrength + { + get => Material.HasProperty(EmissiveStrengthProp) ? Material.GetFloat(EmissiveStrengthProp) : 1.0f; + set => Material.SetFloat(EmissiveStrengthProp, value); + } + + public float AlphaCutoff + { + get => Material.GetFloat(AlphaCutoffProp); + set => Material.SetFloat(AlphaCutoffProp, value); + } + + // ---- surface / alpha / cull (material-backed; URP と Built-In の両プロパティを設定) ---- + + public UniGltfPbrSurfaceType SurfaceType + { + get + { + if (Material.HasProperty(UrpSurfaceProp)) return (UniGltfPbrSurfaceType)(int)Material.GetFloat(UrpSurfaceProp); + if (Material.HasProperty(BuiltInSurfaceProp)) return (UniGltfPbrSurfaceType)(int)Material.GetFloat(BuiltInSurfaceProp); + return UniGltfPbrSurfaceType.Opaque; + } + set + { + SetFloatIfExists(UrpSurfaceProp, (float)value); + SetFloatIfExists(BuiltInSurfaceProp, (float)value); + } + } + + public bool IsAlphaClipEnabled + { + get + { + if (Material.HasProperty(UrpAlphaClipProp)) return Material.GetFloat(UrpAlphaClipProp) >= 0.5f; + if (Material.HasProperty(BuiltInAlphaClipProp)) return Material.GetFloat(BuiltInAlphaClipProp) >= 0.5f; + return false; + } + set + { + SetFloatIfExists(UrpAlphaClipProp, value ? 1.0f : 0.0f); + SetFloatIfExists(BuiltInAlphaClipProp, value ? 1.0f : 0.0f); + } + } + + public CullMode CullMode + { + get + { + if (Material.HasProperty(UrpCullProp)) return (CullMode)(int)Material.GetFloat(UrpCullProp); + if (Material.HasProperty(BuiltInCullProp)) return (CullMode)(int)Material.GetFloat(BuiltInCullProp); + return CullMode.Back; + } + set + { + SetFloatIfExists(UrpCullProp, (float)value); + SetFloatIfExists(BuiltInCullProp, (float)value); + Material.doubleSidedGI = value != CullMode.Back; + } + } + + /// + /// 現在の SurfaceType / IsAlphaClipEnabled から、派生するキーワード・ブレンド・renderQueue を反映する。 + /// (surface/cull の float 自体は setter で設定済み) + /// 存在しないプロパティは HasProperty で読み飛ばす。 + /// + public void Validate() + { + var isOpaque = SurfaceType == UniGltfPbrSurfaceType.Opaque; + var alphaClip = IsAlphaClipEnabled; + + Material.SetOverrideTag("RenderType", (isOpaque, alphaClip) switch + { + (true, false) => "Opaque", + (true, true) => "TransparentCutout", + (false, _) => "Transparent", + }); + Material.renderQueue = (isOpaque, alphaClip) switch + { + (true, false) => (int)RenderQueue.Geometry, + (true, true) => (int)RenderQueue.AlphaTest, + (false, _) => (int)RenderQueue.Transparent, + }; + + var srcBlend = isOpaque ? (float)BlendMode.One : (float)BlendMode.SrcAlpha; + var dstBlend = isOpaque ? (float)BlendMode.Zero : (float)BlendMode.OneMinusSrcAlpha; + var zWrite = isOpaque ? 1.0f : 0.0f; + + // URP target + SetFloatIfExists(UrpBlendProp, 0.0f); // 0 == Alpha + SetFloatIfExists(UrpZWriteProp, zWrite); + SetFloatIfExists(UrpSrcBlendProp, srcBlend); + SetFloatIfExists(UrpDstBlendProp, dstBlend); + SetKeywordIfDeclared(UrpSurfaceTypeTransparentKeyword, !isOpaque); + SetKeywordIfDeclared(UrpAlphaTestOnKeyword, alphaClip); + Material.SetShaderPassEnabled("DepthOnly", isOpaque); + Material.SetShaderPassEnabled("ShadowCaster", isOpaque); + + // Built-In target + SetFloatIfExists(BuiltInBlendProp, 0.0f); + SetFloatIfExists(BuiltInZWriteProp, zWrite); + SetFloatIfExists(BuiltInSrcBlendProp, srcBlend); + SetFloatIfExists(BuiltInDstBlendProp, dstBlend); + SetKeywordIfDeclared(BuiltInSurfaceTypeTransparentKeyword, !isOpaque); + SetKeywordIfDeclared(BuiltInAlphaTestOnKeyword, alphaClip); + + // cutoff: URP の _Cutoff と本シェーダ独自の _alphaCutoff の両方があれば揃える + if (Material.HasProperty(UrpCutoffProp) && Material.HasProperty(AlphaCutoffProp)) + { + Material.SetFloat(UrpCutoffProp, Material.GetFloat(AlphaCutoffProp)); + } + } + + private void SetFloatIfExists(int prop, float value) + { + if (Material.HasProperty(prop)) + { + Material.SetFloat(prop, value); + } + } + + private void SetKeywordIfDeclared(string keyword, bool enabled) + { + if (_declaredKeywords.Contains(keyword)) + { + if (enabled) + { + Material.EnableKeyword(keyword); + } + else + { + Material.DisableKeyword(keyword); + } + } + } + } +} diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs.meta b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs.meta new file mode 100644 index 000000000..c974c6eca --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 819191e09406ecb46b8513d6bb471e87 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs new file mode 100644 index 000000000..d4048a6cf --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs @@ -0,0 +1,8 @@ +namespace UniGLTF +{ + public enum UniGltfPbrSurfaceType + { + Opaque = 0, + Transparent = 1, + } +} \ No newline at end of file diff --git a/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs.meta b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs.meta new file mode 100644 index 000000000..28fb8df60 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Runtime/UniGltfPbrSurfaceType.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d009b34824a54913a3422fd5c1584ff6 +timeCreated: 1784357213 \ No newline at end of file diff --git a/Packages/UniGLTF/UniGltfPbr/Shaders.meta b/Packages/UniGLTF/UniGltfPbr/Shaders.meta new file mode 100644 index 000000000..aca9efd6b --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 433bd749d686e5940842f4c432afadcf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph b/Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph new file mode 100644 index 000000000..39403c56d --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph @@ -0,0 +1,4870 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "c1b0c50af8cb4e2cbafa857baf298a7e", + "m_Properties": [ + { + "m_Id": "06c5810661eb40aa81086456daffdda9" + }, + { + "m_Id": "df03bfd15b35413d9eacf5b7c7e08a2a" + }, + { + "m_Id": "0b9dbf9a826e406cb428d9f2734cedd6" + }, + { + "m_Id": "2c3ed33072204eb9a9749ca3079a1258" + }, + { + "m_Id": "675dcf3a44b741e3a1f7c7fd6d31959f" + }, + { + "m_Id": "3bcba134af7c4a309c27101d5d739ba3" + }, + { + "m_Id": "566bb291178a4347ac8c6645d5bee3c7" + }, + { + "m_Id": "a1f693aa60434103afd8315157b21be0" + }, + { + "m_Id": "24d2e32d29ee486d85e9b9a74ba32b83" + }, + { + "m_Id": "f57da91c59b04ddea01bf2973edd001d" + }, + { + "m_Id": "c8de150f709b4bbfa9954e921055fa24" + }, + { + "m_Id": "2fb28a6b3fc945008bebd31c58954d65" + }, + { + "m_Id": "8abf09023d5b4663a434fff492f8be30" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "0c7f8ad7aadc496d92bd5e4de258c855" + } + ], + "m_Nodes": [ + { + "m_Id": "93d7a74672954f48ae67fd3e8678fe88" + }, + { + "m_Id": "19dd7448f623430ebee29077a1c385a7" + }, + { + "m_Id": "b0c683a3101549d280ff18f02259441b" + }, + { + "m_Id": "03d0d9f1815248719b5b2d90f9ce8d95" + }, + { + "m_Id": "23e9c4e7c37d4b61bfabfa36a0952b1a" + }, + { + "m_Id": "4d4903974b78487881dcd3504822271a" + }, + { + "m_Id": "0691ecc442114cf99b74f20b91417a76" + }, + { + "m_Id": "d4fce1221fd24c28b9515b4bfc731fc3" + }, + { + "m_Id": "fe8a738ebe984823a55da8c5edd5317a" + }, + { + "m_Id": "7d67c05b881f49ae9703101619fbf842" + }, + { + "m_Id": "f6b49b2efb5b4816b7082c0dcfa4212b" + }, + { + "m_Id": "9320b381ea114db9a84599e5ad4282ea" + }, + { + "m_Id": "77c5515d3832411b93584c8167db055e" + }, + { + "m_Id": "5db8bde504364796a76600faf2f2751a" + }, + { + "m_Id": "a11fa829d41147c987c760ab7a60ed19" + }, + { + "m_Id": "b2aea46aa13f4a2bb2b04dd5110eb285" + }, + { + "m_Id": "43a2fa68027944319c6fa7d294711594" + }, + { + "m_Id": "8ed4570b58ac412ea16d8c78543edaf3" + }, + { + "m_Id": "285d2276b09c4a1681f8f9f88b97d8ab" + }, + { + "m_Id": "3970fe12dbf34099bb2c292d45e05f43" + }, + { + "m_Id": "7498efeedcd34b28b96acfb39a579115" + }, + { + "m_Id": "108ea205ad3e4bcb9770b004f93779bd" + }, + { + "m_Id": "e027a2ea937e40a9ac45605b0d5914c1" + }, + { + "m_Id": "73523c42c8b14aefb779579fd9823566" + }, + { + "m_Id": "3fbd1c3b72144c9bb0d4f447f665b812" + }, + { + "m_Id": "7cf8712800a4423e962f5e9a32d20c64" + }, + { + "m_Id": "82bd827f20f24671b5c497a11420e477" + }, + { + "m_Id": "d180d73921754d7692c3db0cb159bba5" + }, + { + "m_Id": "dd85aa0c29524f3ba03110f41b237375" + }, + { + "m_Id": "86767cf143e4482fb804a200d22786a9" + }, + { + "m_Id": "7930af29e6064d0687cd2dd42a4778ee" + }, + { + "m_Id": "6acbdacc76f34889a9d431c4ab98e2d9" + }, + { + "m_Id": "a59b0c75c11c46c986ce08821bcb206a" + }, + { + "m_Id": "f703a3ab8f94462bb20acee60da8424a" + }, + { + "m_Id": "e75c19fe6e7e4e3196ab5b5ed5ebafef" + }, + { + "m_Id": "4a68bd995d5d47218337b1992d85a607" + }, + { + "m_Id": "2f4174b8572b4d83a5af8ff41fc46fe2" + }, + { + "m_Id": "05983c80a35547d49e50ce504af38e7b" + }, + { + "m_Id": "4eb2fbf4531745d4a3a4771a69eace87" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "05983c80a35547d49e50ce504af38e7b" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b2aea46aa13f4a2bb2b04dd5110eb285" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "108ea205ad3e4bcb9770b004f93779bd" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7498efeedcd34b28b96acfb39a579115" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "285d2276b09c4a1681f8f9f88b97d8ab" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "fe8a738ebe984823a55da8c5edd5317a" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2f4174b8572b4d83a5af8ff41fc46fe2" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0691ecc442114cf99b74f20b91417a76" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3970fe12dbf34099bb2c292d45e05f43" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "285d2276b09c4a1681f8f9f88b97d8ab" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3fbd1c3b72144c9bb0d4f447f665b812" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7cf8712800a4423e962f5e9a32d20c64" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4a68bd995d5d47218337b1992d85a607" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f4174b8572b4d83a5af8ff41fc46fe2" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4eb2fbf4531745d4a3a4771a69eace87" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "43a2fa68027944319c6fa7d294711594" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5db8bde504364796a76600faf2f2751a" + }, + "m_SlotId": 5 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7498efeedcd34b28b96acfb39a579115" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5db8bde504364796a76600faf2f2751a" + }, + "m_SlotId": 6 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "285d2276b09c4a1681f8f9f88b97d8ab" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6acbdacc76f34889a9d431c4ab98e2d9" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4a68bd995d5d47218337b1992d85a607" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "73523c42c8b14aefb779579fd9823566" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3fbd1c3b72144c9bb0d4f447f665b812" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7498efeedcd34b28b96acfb39a579115" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e027a2ea937e40a9ac45605b0d5914c1" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "77c5515d3832411b93584c8167db055e" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "9320b381ea114db9a84599e5ad4282ea" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7930af29e6064d0687cd2dd42a4778ee" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4d4903974b78487881dcd3504822271a" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7cf8712800a4423e962f5e9a32d20c64" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d4fce1221fd24c28b9515b4bfc731fc3" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7d67c05b881f49ae9703101619fbf842" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "9320b381ea114db9a84599e5ad4282ea" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "82bd827f20f24671b5c497a11420e477" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7cf8712800a4423e962f5e9a32d20c64" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "86767cf143e4482fb804a200d22786a9" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7930af29e6064d0687cd2dd42a4778ee" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "8ed4570b58ac412ea16d8c78543edaf3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5db8bde504364796a76600faf2f2751a" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9320b381ea114db9a84599e5ad4282ea" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "03d0d9f1815248719b5b2d90f9ce8d95" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9320b381ea114db9a84599e5ad4282ea" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "05983c80a35547d49e50ce504af38e7b" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a59b0c75c11c46c986ce08821bcb206a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e75c19fe6e7e4e3196ab5b5ed5ebafef" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d180d73921754d7692c3db0cb159bba5" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "86767cf143e4482fb804a200d22786a9" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "dd85aa0c29524f3ba03110f41b237375" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7930af29e6064d0687cd2dd42a4778ee" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e027a2ea937e40a9ac45605b0d5914c1" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "23e9c4e7c37d4b61bfabfa36a0952b1a" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e75c19fe6e7e4e3196ab5b5ed5ebafef" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4a68bd995d5d47218337b1992d85a607" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f6b49b2efb5b4816b7082c0dcfa4212b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "77c5515d3832411b93584c8167db055e" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f703a3ab8f94462bb20acee60da8424a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f4174b8572b4d83a5af8ff41fc46fe2" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "93d7a74672954f48ae67fd3e8678fe88" + }, + { + "m_Id": "19dd7448f623430ebee29077a1c385a7" + }, + { + "m_Id": "b0c683a3101549d280ff18f02259441b" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "03d0d9f1815248719b5b2d90f9ce8d95" + }, + { + "m_Id": "23e9c4e7c37d4b61bfabfa36a0952b1a" + }, + { + "m_Id": "4d4903974b78487881dcd3504822271a" + }, + { + "m_Id": "0691ecc442114cf99b74f20b91417a76" + }, + { + "m_Id": "d4fce1221fd24c28b9515b4bfc731fc3" + }, + { + "m_Id": "fe8a738ebe984823a55da8c5edd5317a" + }, + { + "m_Id": "a11fa829d41147c987c760ab7a60ed19" + }, + { + "m_Id": "b2aea46aa13f4a2bb2b04dd5110eb285" + }, + { + "m_Id": "43a2fa68027944319c6fa7d294711594" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "UniGLTF", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "fb730e0eaa184092894f7bf6cea8b456" + }, + { + "m_Id": "4aa10038b58a4dd0b90b937782e8405e" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0224b0a2291949a6b648b11ddef37981", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "03103861de63421b9cef72e262a846ad", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "03d0d9f1815248719b5b2d90f9ce8d95", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4a12c23919544b11b0ba57290575b33a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "051a9ea5140c49d58bad8b322189feca", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "05983c80a35547d49e50ce504af38e7b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -372.00006103515627, + "y": -11.200010299682618, + "width": 119.2000732421875, + "height": 148.8000030517578 + } + }, + "m_Slots": [ + { + "m_Id": "8cb00d40a1024b0588423838d669dd7e" + }, + { + "m_Id": "13964729affe4b7eb96e6e388fcb3e70" + }, + { + "m_Id": "f7f1fad912a346de8928cda8fce008b6" + }, + { + "m_Id": "8bf5c3f2de0d42e3814f866c8c3a0e46" + }, + { + "m_Id": "ba347a3582e04bae92191d9b69caf0a5" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "05e5c79457a44aa19668d0aeeb214fb0", + "m_Id": 2, + "m_DisplayName": "T", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "T", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0691ecc442114cf99b74f20b91417a76", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "0acdfabb5368430588f27620254de5f9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "06c5810661eb40aa81086456daffdda9", + "m_Guid": { + "m_GuidSerialized": "ff6e0400-8471-4500-8ea8-c3d76baf0f7c" + }, + "m_Name": "_baseColorFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_baseColorFactor", + "m_DefaultReferenceName": "_baseColorFactor", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 1.0, + "g": 1.0, + "b": 1.0, + "a": 1.0 + }, + "isMainColor": false, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "08beaa9174034a44ad0a315b95829788", + "m_Id": 0, + "m_DisplayName": "_emissiveFactor", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "0acdfabb5368430588f27620254de5f9", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "0ad0a4560f3141d6aefc0320f273c796", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "0b9dbf9a826e406cb428d9f2734cedd6", + "m_Guid": { + "m_GuidSerialized": "4f8153c8-43c5-413b-bfb3-412d4ebdf9ac" + }, + "m_Name": "_metallicFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_metallicFactor", + "m_DefaultReferenceName": "_metallicFactor", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "0c7f8ad7aadc496d92bd5e4de258c855", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "06c5810661eb40aa81086456daffdda9" + }, + { + "m_Id": "df03bfd15b35413d9eacf5b7c7e08a2a" + }, + { + "m_Id": "0b9dbf9a826e406cb428d9f2734cedd6" + }, + { + "m_Id": "2c3ed33072204eb9a9749ca3079a1258" + }, + { + "m_Id": "675dcf3a44b741e3a1f7c7fd6d31959f" + }, + { + "m_Id": "3bcba134af7c4a309c27101d5d739ba3" + }, + { + "m_Id": "566bb291178a4347ac8c6645d5bee3c7" + }, + { + "m_Id": "a1f693aa60434103afd8315157b21be0" + }, + { + "m_Id": "24d2e32d29ee486d85e9b9a74ba32b83" + }, + { + "m_Id": "f57da91c59b04ddea01bf2973edd001d" + }, + { + "m_Id": "c8de150f709b4bbfa9954e921055fa24" + }, + { + "m_Id": "2fb28a6b3fc945008bebd31c58954d65" + }, + { + "m_Id": "8abf09023d5b4663a434fff492f8be30" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "108ea205ad3e4bcb9770b004f93779bd", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -597.6000366210938, + "y": 346.3999938964844, + "width": 168.79995727539063, + "height": 33.600006103515628 + } + }, + "m_Slots": [ + { + "m_Id": "2b8cc57be5f844a9a6d723ab37dd0e1c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "2c3ed33072204eb9a9749ca3079a1258" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "1125692cd5924bbfbb83fb123b9fa4e4", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "13964729affe4b7eb96e6e388fcb3e70", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "17842883ce76425d8f708a40de65dd7d", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "192685163ed648e8bcf9e06c89646dc7", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "198847d7b75a4718909b545acb955b51", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "19dd7448f623430ebee29077a1c385a7", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "71a758ed1bc447bda3079684f26d41da" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1ac6f1af7ec74a18bb6d1e0fddb854f2", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "1af67c77326d48feaeb40ddbb4ea17d2", + "m_Id": 0, + "m_DisplayName": "Specular Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Specular", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "1c12214258564748b13469dbe473a23a", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "23e9c4e7c37d4b61bfabfa36a0952b1a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "5bb662468a4c4c42a3cfefb34d794552" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "24d2e32d29ee486d85e9b9a74ba32b83", + "m_Guid": { + "m_GuidSerialized": "70aceb88-366f-4212-b5e0-e9fbad1d0cdc" + }, + "m_Name": "_normalScale", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_normalScale", + "m_DefaultReferenceName": "_normalScale", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2532166e595c4958b71e7478a4499919", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2558d1315fb6409ebafc4fa5992e60a3", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "266415980f5e43a099ec0b7f4e00f269", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "266b82833e2e44cb9cce75bdb77f22a9", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "285d2276b09c4a1681f8f9f88b97d8ab", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -383.1999816894531, + "y": 197.59999084472657, + "width": 125.5999755859375, + "height": 117.60002136230469 + } + }, + "m_Slots": [ + { + "m_Id": "7f64abf5ed134048b86b26c1ff10d87a" + }, + { + "m_Id": "9bc66639162543caab926afb9d7ce41c" + }, + { + "m_Id": "3baad8928376402aa732c95e9fecf039" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2b8cc57be5f844a9a6d723ab37dd0e1c", + "m_Id": 0, + "m_DisplayName": "_roughnessFactor", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "2c3ed33072204eb9a9749ca3079a1258", + "m_Guid": { + "m_GuidSerialized": "931b2a4b-9cbf-4098-8b69-6031d6fcf2d3" + }, + "m_Name": "_roughnessFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_roughnessFactor", + "m_DefaultReferenceName": "_roughnessFactor", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "2f4174b8572b4d83a5af8ff41fc46fe2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -390.3999938964844, + "y": 1459.2000732421875, + "width": 130.39996337890626, + "height": 117.60009765625 + } + }, + "m_Slots": [ + { + "m_Id": "952783ff61d145ea90271c0952debda6" + }, + { + "m_Id": "d143d755f017479a8c64deb22bef68e6" + }, + { + "m_Id": "a0bfd9a494b840c794cf0cd0026c78f8" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "2fb28a6b3fc945008bebd31c58954d65", + "m_Guid": { + "m_GuidSerialized": "a26657ec-cfde-467e-a150-5fcf13c4f8fe" + }, + "m_Name": "_emissiveStrength", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_emissiveStrength", + "m_DefaultReferenceName": "_emissiveStrength", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "3960aa3272934bea8af77a5708437dfd", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "3970fe12dbf34099bb2c292d45e05f43", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -584.0000610351563, + "y": 200.00001525878907, + "width": 154.40005493164063, + "height": 33.60002136230469 + } + }, + "m_Slots": [ + { + "m_Id": "502c7de712704e589a5f4122939fd6ad" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "0b9dbf9a826e406cb428d9f2734cedd6" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "3baad8928376402aa732c95e9fecf039", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "3bcba134af7c4a309c27101d5d739ba3", + "m_Guid": { + "m_GuidSerialized": "f9d67cee-8dc7-4d2e-a49e-2d494dd35989" + }, + "m_Name": "_occlusionTexture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_occlusionTexture", + "m_DefaultReferenceName": "_occlusionTexture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3d81494076a04557ba64566121099fd4", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "3fbd1c3b72144c9bb0d4f447f665b812", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -845.6000366210938, + "y": 628.0000610351563, + "width": 183.2000732421875, + "height": 246.4000244140625 + } + }, + "m_Slots": [ + { + "m_Id": "3960aa3272934bea8af77a5708437dfd" + }, + { + "m_Id": "bd28af200c85467484c38320cc934751" + }, + { + "m_Id": "d97f290797ac441e8358030d37757232" + }, + { + "m_Id": "266415980f5e43a099ec0b7f4e00f269" + }, + { + "m_Id": "839eb4991f0548b2959459a42ea748af" + }, + { + "m_Id": "74c85c54b046449c9071dfa982a42a98" + }, + { + "m_Id": "d173330296014482b9b7a0cec0e88786" + }, + { + "m_Id": "192685163ed648e8bcf9e06c89646dc7" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "406d08e0e8674bc39a821c8162a5706e", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "431c8c134cd348539df641b10bc9adb2", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "43a2fa68027944319c6fa7d294711594", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.AlphaClipThreshold", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4c2151c1ecad4076bf71639299afaaf1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "46aabc1ff5864486b7092cd638870198", + "m_Id": 0, + "m_DisplayName": "_normalTexture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "492f2ffe3a144f4caa460a75d716db8d", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "4a12c23919544b11b0ba57290575b33a", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "4a68bd995d5d47218337b1992d85a607", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -390.4000244140625, + "y": 1313.60009765625, + "width": 130.39999389648438, + "height": 117.599853515625 + } + }, + "m_Slots": [ + { + "m_Id": "7cf62f1ef3b64d14ac1e4c0cfa399947" + }, + { + "m_Id": "67d29063154c41e583a263cb06928c81" + }, + { + "m_Id": "406d08e0e8674bc39a821c8162a5706e" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "4aa10038b58a4dd0b90b937782e8405e", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "7254426710ee40f7b28630f28e605621" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "UniGLTF.UniGltfPbrShaderGUI", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4c2151c1ecad4076bf71639299afaaf1", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4d1e0cf9578045debb2303806169d75b", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "4d4903974b78487881dcd3504822271a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "de0ecb624b24438889751d8c42bf5b6d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "4eb2fbf4531745d4a3a4771a69eace87", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -400.7998962402344, + "y": 1702.39990234375, + "width": 141.59994506835938, + "height": 33.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "dc1ac8a35237425f9f71146e9f8f19cd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "8abf09023d5b4663a434fff492f8be30" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "502c7de712704e589a5f4122939fd6ad", + "m_Id": 0, + "m_DisplayName": "_metallicFactor", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "566bb291178a4347ac8c6645d5bee3c7", + "m_Guid": { + "m_GuidSerialized": "3a2c0d44-0ee9-4a2b-9484-c8118db5ac8d" + }, + "m_Name": "_occlusionStrength", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_occlusionStrength", + "m_DefaultReferenceName": "_occlusionStrength", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "5761a01d6b904790b6e7032166adae96", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "5853f4abf9c6456e8f2bc9a685eba2b8", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5bb662468a4c4c42a3cfefb34d794552", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5d336699cf6e4f868d1a063fad2305f0", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "5db8bde504364796a76600faf2f2751a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -845.5999755859375, + "y": 197.60006713867188, + "width": 183.20001220703126, + "height": 246.39993286132813 + } + }, + "m_Slots": [ + { + "m_Id": "1c12214258564748b13469dbe473a23a" + }, + { + "m_Id": "2558d1315fb6409ebafc4fa5992e60a3" + }, + { + "m_Id": "0224b0a2291949a6b648b11ddef37981" + }, + { + "m_Id": "198847d7b75a4718909b545acb955b51" + }, + { + "m_Id": "2532166e595c4958b71e7478a4499919" + }, + { + "m_Id": "e1c87396db1a4e6ebffbe0688f29e4b0" + }, + { + "m_Id": "1125692cd5924bbfbb83fb123b9fa4e4" + }, + { + "m_Id": "0ad0a4560f3141d6aefc0320f273c796" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "5e4307f2ef1d40ff80fb886d60b05d7c", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "601a6e4dcc4a4612924831e7bc7fb9a3", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "60869cef3e8c4853a29adc7d7ce123c9", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6133bae81813461180aab5a82b60fc1d", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget", + "m_ObjectId": "618e74ba0c3e4d379cf917280a2646e8", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "6283f46f8d734ea18db849a0eedae5f3", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "675dcf3a44b741e3a1f7c7fd6d31959f", + "m_Guid": { + "m_GuidSerialized": "d0f67220-86a3-4c21-b2df-e9ed8a955a8f" + }, + "m_Name": "_metallicRoughnessTexture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_metallicRoughnessTexture", + "m_DefaultReferenceName": "_metallicRoughnessTexture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "67d29063154c41e583a263cb06928c81", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "6acbdacc76f34889a9d431c4ab98e2d9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -587.2000732421875, + "y": 1313.60009765625, + "width": 161.60009765625, + "height": 33.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "08beaa9174034a44ad0a315b95829788" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f57da91c59b04ddea01bf2973edd001d" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "6b671fcf311f4de88f841a75ac510952", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "6bb74c758f0149afbc8c4ad97fc9c56c", + "m_Id": 0, + "m_DisplayName": "_metallicRoughnessTexture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6faf993ac81c4227948b6a0379b30140", + "m_Id": 1, + "m_DisplayName": "Strength", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Strength", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "71a758ed1bc447bda3079684f26d41da", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "7254426710ee40f7b28630f28e605621", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0, + "m_ClearCoat": false, + "m_BlendModePreserveSpecular": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "73523c42c8b14aefb779579fd9823566", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1070.4000244140625, + "y": 628.0000610351563, + "width": 179.19989013671876, + "height": 33.59991455078125 + } + }, + "m_Slots": [ + { + "m_Id": "98eb1a0f9b9642e7bd33306ae70b3f44" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "3bcba134af7c4a309c27101d5d739ba3" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "7498efeedcd34b28b96acfb39a579115", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -383.20001220703127, + "y": 346.3999938964844, + "width": 125.59994506835938, + "height": 117.60006713867188 + } + }, + "m_Slots": [ + { + "m_Id": "d080bcbdcdbd4764a6d8a377cc74ade6" + }, + { + "m_Id": "601a6e4dcc4a4612924831e7bc7fb9a3" + }, + { + "m_Id": "60869cef3e8c4853a29adc7d7ce123c9" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "74c85c54b046449c9071dfa982a42a98", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "77c5515d3832411b93584c8167db055e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -845.5999755859375, + "y": -151.99996948242188, + "width": 183.20001220703126, + "height": 246.4000244140625 + } + }, + "m_Slots": [ + { + "m_Id": "5761a01d6b904790b6e7032166adae96" + }, + { + "m_Id": "f4eaa85295334752a8ec73f7e1ed85a3" + }, + { + "m_Id": "9bf4717d9ba14a80b3b914f33f344cfd" + }, + { + "m_Id": "c8db81e9e9744ec0a926452adf472cd7" + }, + { + "m_Id": "aa32873c70f74fb18848a8888c735144" + }, + { + "m_Id": "bdcb6d0c78be48e2b8514660e18b80be" + }, + { + "m_Id": "a972e50d211049659709b845354d7d80" + }, + { + "m_Id": "6b671fcf311f4de88f841a75ac510952" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalStrengthNode", + "m_ObjectId": "7930af29e6064d0687cd2dd42a4778ee", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Normal Strength", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -425.5999755859375, + "y": 962.4000854492188, + "width": 165.59991455078126, + "height": 117.60003662109375 + } + }, + "m_Slots": [ + { + "m_Id": "5d336699cf6e4f868d1a063fad2305f0" + }, + { + "m_Id": "6faf993ac81c4227948b6a0379b30140" + }, + { + "m_Id": "03103861de63421b9cef72e262a846ad" + } + ], + "synonyms": [ + "intensity" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "7cf62f1ef3b64d14ac1e4c0cfa399947", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.LerpNode", + "m_ObjectId": "7cf8712800a4423e962f5e9a32d20c64", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Lerp", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -385.6000061035156, + "y": 628.0, + "width": 125.5999755859375, + "height": 141.60003662109376 + } + }, + "m_Slots": [ + { + "m_Id": "5853f4abf9c6456e8f2bc9a685eba2b8" + }, + { + "m_Id": "969352a650094763a7f788e2fb9594bb" + }, + { + "m_Id": "05e5c79457a44aa19668d0aeeb214fb0" + }, + { + "m_Id": "ab8a1cb66d6642e9b1ce08b930545e4e" + } + ], + "synonyms": [ + "mix", + "blend", + "linear interpolate" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "7d67c05b881f49ae9703101619fbf842", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -599.199951171875, + "y": -152.0, + "width": 169.60000610351563, + "height": 33.599952697753909 + } + }, + "m_Slots": [ + { + "m_Id": "a403503220024924be2a526488c7f771" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "06c5810661eb40aa81086456daffdda9" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "7f64abf5ed134048b86b26c1ff10d87a", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "82bd827f20f24671b5c497a11420e477", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -604.0000610351563, + "y": 628.0, + "width": 175.20001220703126, + "height": 33.60003662109375 + } + }, + "m_Slots": [ + { + "m_Id": "c60da089818c48b3b86fcd9230b5843b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "566bb291178a4347ac8c6645d5bee3c7" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "839eb4991f0548b2959459a42ea748af", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "86767cf143e4482fb804a200d22786a9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -845.5999755859375, + "y": 962.4000244140625, + "width": 183.2000732421875, + "height": 246.400146484375 + } + }, + "m_Slots": [ + { + "m_Id": "051a9ea5140c49d58bad8b322189feca" + }, + { + "m_Id": "e759c0308f774d89ab01af9721fda271" + }, + { + "m_Id": "e31b286549a6427391f3443421f7fa93" + }, + { + "m_Id": "8bf35a48cb024adba81b708a1b1754df" + }, + { + "m_Id": "ba406b0de5be45bd9abc67df07482d35" + }, + { + "m_Id": "431c8c134cd348539df641b10bc9adb2" + }, + { + "m_Id": "17842883ce76425d8f708a40de65dd7d" + }, + { + "m_Id": "d524fe9b2bd44a53a738c563a96e06b8" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 1, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "8abf09023d5b4663a434fff492f8be30", + "m_Guid": { + "m_GuidSerialized": "065ffa73-eb5d-457c-8344-9530aae3f937" + }, + "m_Name": "_alphaCutoff", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_alphaCutoff", + "m_DefaultReferenceName": "_alphaCutoff", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8bf35a48cb024adba81b708a1b1754df", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8bf5c3f2de0d42e3814f866c8c3a0e46", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8cb00d40a1024b0588423838d669dd7e", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "8ed4570b58ac412ea16d8c78543edaf3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1119.2000732421875, + "y": 197.60006713867188, + "width": 227.199951171875, + "height": 33.599945068359378 + } + }, + "m_Slots": [ + { + "m_Id": "6bb74c758f0149afbc8c4ad97fc9c56c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "675dcf3a44b741e3a1f7c7fd6d31959f" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "9320b381ea114db9a84599e5ad4282ea", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -383.1999206542969, + "y": -146.39999389648438, + "width": 130.39999389648438, + "height": 117.60000610351563 + } + }, + "m_Slots": [ + { + "m_Id": "97b83645e80a44648f70d53f78d18e4e" + }, + { + "m_Id": "a8557e5f6d094cfe8ddde8892dcb7f27" + }, + { + "m_Id": "932d3c4e63dd4194b2235fa78b51d5c9" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "932d3c4e63dd4194b2235fa78b51d5c9", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "93d7a74672954f48ae67fd3e8678fe88", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "96a2f6113a924f34a0bd573fd584e6f7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "952783ff61d145ea90271c0952debda6", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "969352a650094763a7f788e2fb9594bb", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "96a2f6113a924f34a0bd573fd584e6f7", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "97b83645e80a44648f70d53f78d18e4e", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "98eb1a0f9b9642e7bd33306ae70b3f44", + "m_Id": 0, + "m_DisplayName": "_occlusionTexture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "9bc66639162543caab926afb9d7ce41c", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9bf4717d9ba14a80b3b914f33f344cfd", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9d473f0dec3a4ee1b325688f6723777f", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "a0bfd9a494b840c794cf0cd0026c78f8", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a11fa829d41147c987c760ab7a60ed19", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Specular", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "1af67c77326d48feaeb40ddbb4ea17d2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Specular" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "a1f693aa60434103afd8315157b21be0", + "m_Guid": { + "m_GuidSerialized": "4603665b-048c-4834-818f-b8983c9e95af" + }, + "m_Name": "_normalTexture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_normalTexture", + "m_DefaultReferenceName": "_normalTexture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "a403503220024924be2a526488c7f771", + "m_Id": 0, + "m_DisplayName": "_baseColorFactor", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "a59b0c75c11c46c986ce08821bcb206a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1066.4000244140625, + "y": 1313.60009765625, + "width": 175.199951171875, + "height": 33.599853515625 + } + }, + "m_Slots": [ + { + "m_Id": "eebd6b38413143899204a7bbd6881d27" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "c8de150f709b4bbfa9954e921055fa24" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "a8557e5f6d094cfe8ddde8892dcb7f27", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "a972e50d211049659709b845354d7d80", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "aa32873c70f74fb18848a8888c735144", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ab8a1cb66d6642e9b1ce08b930545e4e", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "acac8330bd5f4dcba7adb8baa4f2dc9a", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b0c683a3101549d280ff18f02259441b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "eaeb6bf9287042ddab9e8dd074603837" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "b0e3793602fe4512ac5d1f9f44834780", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b2aea46aa13f4a2bb2b04dd5110eb285", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "1ac6f1af7ec74a18bb6d1e0fddb854f2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ba347a3582e04bae92191d9b69caf0a5", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ba406b0de5be45bd9abc67df07482d35", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "bd28af200c85467484c38320cc934751", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "bd81728eadb44b93a3a4c77b3f8a9c1c", + "m_Id": 0, + "m_DisplayName": "_emissiveStrength", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "bdcb6d0c78be48e2b8514660e18b80be", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c60da089818c48b3b86fcd9230b5843b", + "m_Id": 0, + "m_DisplayName": "_occlusionStrength", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c8db81e9e9744ec0a926452adf472cd7", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "c8de150f709b4bbfa9954e921055fa24", + "m_Guid": { + "m_GuidSerialized": "db5ef5f6-21fa-4535-b234-a20739cf3d3c" + }, + "m_Name": "_emissiveTexture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_emissiveTexture", + "m_DefaultReferenceName": "_emissiveTexture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "cac51d71fd6d4a76ba3fe77b01ef1299", + "m_Id": 0, + "m_DisplayName": "_normalScale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "cc17630439a143d4b7fef6c9266c3fa7", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "d080bcbdcdbd4764a6d8a377cc74ade6", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "d143d755f017479a8c64deb22bef68e6", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "d173330296014482b9b7a0cec0e88786", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "d180d73921754d7692c3db0cb159bba5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1056.800048828125, + "y": 962.4000244140625, + "width": 165.5999755859375, + "height": 33.60003662109375 + } + }, + "m_Slots": [ + { + "m_Id": "46aabc1ff5864486b7092cd638870198" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a1f693aa60434103afd8315157b21be0" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "d4fce1221fd24c28b9515b4bfc731fc3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "3d81494076a04557ba64566121099fd4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "d524fe9b2bd44a53a738c563a96e06b8", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d97f290797ac441e8358030d37757232", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "dc1ac8a35237425f9f71146e9f8f19cd", + "m_Id": 0, + "m_DisplayName": "_alphaCutoff", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "dd85aa0c29524f3ba03110f41b237375", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -574.4000244140625, + "y": 962.4000854492188, + "width": 144.80001831054688, + "height": 33.59991455078125 + } + }, + "m_Slots": [ + { + "m_Id": "cac51d71fd6d4a76ba3fe77b01ef1299" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "24d2e32d29ee486d85e9b9a74ba32b83" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "de0ecb624b24438889751d8c42bf5b6d", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "df03bfd15b35413d9eacf5b7c7e08a2a", + "m_Guid": { + "m_GuidSerialized": "ab4a9232-24c7-4e80-955b-7634d28ac986" + }, + "m_Name": "_baseColorTexture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_baseColorTexture", + "m_DefaultReferenceName": "_baseColorTexture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": true, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.OneMinusNode", + "m_ObjectId": "e027a2ea937e40a9ac45605b0d5914c1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "One Minus", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -385.60003662109377, + "y": 464.00006103515627, + "width": 128.0, + "height": 93.59991455078125 + } + }, + "m_Slots": [ + { + "m_Id": "acac8330bd5f4dcba7adb8baa4f2dc9a" + }, + { + "m_Id": "b0e3793602fe4512ac5d1f9f44834780" + } + ], + "synonyms": [ + "complement", + "invert", + "opposite" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "e1c87396db1a4e6ebffbe0688f29e4b0", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e31b286549a6427391f3443421f7fa93", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e759c0308f774d89ab01af9721fda271", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "e75c19fe6e7e4e3196ab5b5ed5ebafef", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -845.5999755859375, + "y": 1313.60009765625, + "width": 183.2000732421875, + "height": 246.4000244140625 + } + }, + "m_Slots": [ + { + "m_Id": "ec84064f3d6746d699c987bb05446c9c" + }, + { + "m_Id": "266b82833e2e44cb9cce75bdb77f22a9" + }, + { + "m_Id": "9d473f0dec3a4ee1b325688f6723777f" + }, + { + "m_Id": "492f2ffe3a144f4caa460a75d716db8d" + }, + { + "m_Id": "6133bae81813461180aab5a82b60fc1d" + }, + { + "m_Id": "6283f46f8d734ea18db849a0eedae5f3" + }, + { + "m_Id": "cc17630439a143d4b7fef6c9266c3fa7" + }, + { + "m_Id": "5e4307f2ef1d40ff80fb886d60b05d7c" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "eaeb6bf9287042ddab9e8dd074603837", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "ec84064f3d6746d699c987bb05446c9c", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "eebd6b38413143899204a7bbd6881d27", + "m_Id": 0, + "m_DisplayName": "_emissiveTexture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f4eaa85295334752a8ec73f7e1ed85a3", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "f57da91c59b04ddea01bf2973edd001d", + "m_Guid": { + "m_GuidSerialized": "b22f7a82-62da-43aa-a249-ea2b6093afc9" + }, + "m_Name": "_emissiveFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_emissiveFactor", + "m_DefaultReferenceName": "_emissiveFactor", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 0.0 + }, + "isMainColor": false, + "m_ColorMode": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "f6b49b2efb5b4816b7082c0dcfa4212b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1074.4000244140625, + "y": -146.39996337890626, + "width": 181.5999755859375, + "height": 33.599952697753909 + } + }, + "m_Slots": [ + { + "m_Id": "f75b71fc79294d9f8e14195890118847" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "df03bfd15b35413d9eacf5b7c7e08a2a" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "f703a3ab8f94462bb20acee60da8424a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -596.7999877929688, + "y": 1459.2000732421875, + "width": 171.20001220703126, + "height": 33.60009765625 + } + }, + "m_Slots": [ + { + "m_Id": "bd81728eadb44b93a3a4c77b3f8a9c1c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "2fb28a6b3fc945008bebd31c58954d65" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "f75b71fc79294d9f8e14195890118847", + "m_Id": 0, + "m_DisplayName": "_baseColorTexture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f7f1fad912a346de8928cda8fce008b6", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget", + "m_ObjectId": "fb730e0eaa184092894f7bf6cea8b456", + "m_ActiveSubTarget": { + "m_Id": "618e74ba0c3e4d379cf917280a2646e8" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 0, + "m_ZWriteControl": 0, + "m_ZTestMode": 4, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CustomEditorGUI": "UniGLTF.UniGltfPbrShaderGUI" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "fe8a738ebe984823a55da8c5edd5317a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4d1e0cf9578045debb2303806169d75b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + diff --git a/Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph.meta b/Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph.meta new file mode 100644 index 000000000..119682101 --- /dev/null +++ b/Packages/UniGLTF/UniGltfPbr/Shaders/UniGltfPbr.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e8ba9e3a727ae804aa8aeda83529a9e3 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Packages/UniGLTF/package.json b/Packages/UniGLTF/package.json index 3689c218a..ca5689e51 100644 --- a/Packages/UniGLTF/package.json +++ b/Packages/UniGLTF/package.json @@ -15,7 +15,8 @@ "com.unity.modules.imgui": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", "com.unity.test-framework": "1.4.6", - "com.unity.mathematics": "1.2.6" + "com.unity.mathematics": "1.2.6", + "com.unity.shadergraph": "12.1.12" }, "samples": [ { diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 545d38a9e..359e21656 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -155,7 +155,8 @@ "com.unity.modules.imgui": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", "com.unity.test-framework": "1.4.6", - "com.unity.mathematics": "1.2.6" + "com.unity.mathematics": "1.2.6", + "com.unity.shadergraph": "12.1.12" } }, "com.vrmc.univrm": {