From 21082a1b05649a8db3f0cdec84f76988b3015980 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 27 Feb 2025 16:24:05 +0900 Subject: [PATCH 1/6] ground metallic/roughness --- Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs index f6bc44257..b87a30f79 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs @@ -36,7 +36,10 @@ namespace UniVRM10.VRM10Viewer { if (_urpMaterialForGrayscale != null) { - visual.GetComponent().material = Instantiate(_urpMaterialForGrayscale); + var m = Instantiate(_urpMaterialForGrayscale); + m.SetFloat("_Metallic", 0); + m.SetFloat("_Roughness", 1); + visual.GetComponent().material = m; } } } From 6a92f38064981ea5153f14ec46ba95ca895fdfd1 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 27 Feb 2025 19:55:24 +0900 Subject: [PATCH 2/6] _ShadingShiftFactor --- .../Assets/TinyMToonAlphaBlend.shadergraph | 126 +++++++- .../Assets/TinyMToonOpaque.shadergraph | 134 +++++++- .../Assets/TinyMToon_SubGraph.shadersubgraph | 296 ++++++++++++++++-- .../VRM10Viewer/TinyMToonMaterialContext.cs | 6 + .../VRM10Viewer/TinyMToonMaterialImporter.cs | 1 + .../VRM10Viewer/VRM10VisualPrimitive.cs | 4 +- 6 files changed, 526 insertions(+), 41 deletions(-) diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph index 146731b20..beef056c3 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph @@ -17,6 +17,9 @@ }, { "m_Id": "025d73c9fe2e47b3853bf9a00d126af4" + }, + { + "m_Id": "245594752a2f40a9a0b592ea1d772667" } ], "m_Keywords": [], @@ -59,6 +62,9 @@ }, { "m_Id": "df96d56bdf664324a1b96c21e76b4a17" + }, + { + "m_Id": "9e996b1a054f4a0caf78c639f3d104ac" } ], "m_GroupDatas": [], @@ -134,6 +140,20 @@ "m_SlotId": 2016068918 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9e996b1a054f4a0caf78c639f3d104ac" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 592166105 + } + }, { "m_OutputSlot": { "m_Node": { @@ -362,6 +382,9 @@ { "m_Id": "ead31769aa464a4e8aae7a3cfa026b2c" }, + { + "m_Id": "5fe8cab7980244fcaefd3eaf8f1b4057" + }, { "m_Id": "e6c1845b1ff7420192f4e36917f71689" }, @@ -383,14 +406,16 @@ "d2495ca0-f5eb-484a-bd18-dca0589774e3", "916faab9-cc1c-4621-84b8-9c47171bf8e8", "ad5cc3fe-a5f8-4a48-9956-35d13519f07e", - "fa354438-5a66-4424-a53f-da950e75c488" + "fa354438-5a66-4424-a53f-da950e75c488", + "d3263a66-e96d-45f6-bbbd-9b3869d2008d" ], "m_PropertyIds": [ 1340748427, -643094866, 2016068918, 1221667242, - -1559276299 + -1559276299, + 592166105 ], "m_Dropdowns": [], "m_DropdownSelectedEntries": [] @@ -432,6 +457,34 @@ } } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "245594752a2f40a9a0b592ea1d772667", + "m_Guid": { + "m_GuidSerialized": "8664794b-d0c4-43d3-831d-d05580ae7250" + }, + "m_Name": "ShadingShiftFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "ShadingShiftFactor", + "m_DefaultReferenceName": "_ShadingShiftFactor", + "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.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -629,6 +682,21 @@ "m_DefaultType": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5fe8cab7980244fcaefd3eaf8f1b4057", + "m_Id": 592166105, + "m_DisplayName": "ShadingShiftFactor", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_ShadingShiftFactor", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -716,6 +784,9 @@ }, { "m_Id": "025d73c9fe2e47b3853bf9a00d126af4" + }, + { + "m_Id": "245594752a2f40a9a0b592ea1d772667" } ] } @@ -846,6 +917,57 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9e996b1a054f4a0caf78c639f3d104ac", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -16.0, + "y": 258.0, + "width": 176.66668701171876, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "ac0a28cfdb9d4ec78f68744c66110f8d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "245594752a2f40a9a0b592ea1d772667" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ac0a28cfdb9d4ec78f68744c66110f8d", + "m_Id": 0, + "m_DisplayName": "ShadingShiftFactor", + "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", diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph index 6bcdfb896..8ae490825 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph @@ -23,6 +23,9 @@ }, { "m_Id": "d39873e6759a47c2a923dde640e6f4f6" + }, + { + "m_Id": "f0d45de1f0c94cd794a750a329950f35" } ], "m_Keywords": [], @@ -77,6 +80,9 @@ }, { "m_Id": "9096c7ad43b94e54b6b3240398f1dab5" + }, + { + "m_Id": "2f23a09054324cf1aaa3cf24eb9c7df9" } ], "m_GroupDatas": [], @@ -152,6 +158,20 @@ "m_SlotId": -1559276299 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2f23a09054324cf1aaa3cf24eb9c7df9" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 592166105 + } + }, { "m_OutputSlot": { "m_Node": { @@ -437,10 +457,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 240.66665649414063, - "y": 95.33334350585938, - "width": 265.3334045410156, - "height": 377.3332824707031 + "x": 231.33335876464845, + "y": 77.33333587646485, + "width": 265.33331298828127, + "height": 401.33331298828127 } }, "m_Slots": [ @@ -459,6 +479,9 @@ { "m_Id": "ead31769aa464a4e8aae7a3cfa026b2c" }, + { + "m_Id": "7392f5e248684e5c93520870021f5631" + }, { "m_Id": "7207d851d0d54d9dbec558d8350cbcf5" }, @@ -480,14 +503,16 @@ "d2495ca0-f5eb-484a-bd18-dca0589774e3", "916faab9-cc1c-4621-84b8-9c47171bf8e8", "ad5cc3fe-a5f8-4a48-9956-35d13519f07e", - "fa354438-5a66-4424-a53f-da950e75c488" + "fa354438-5a66-4424-a53f-da950e75c488", + "d3263a66-e96d-45f6-bbbd-9b3869d2008d" ], "m_PropertyIds": [ 1340748427, -643094866, 2016068918, 1221667242, - -1559276299 + -1559276299, + 592166105 ], "m_Dropdowns": [], "m_DropdownSelectedEntries": [] @@ -594,6 +619,42 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "2f23a09054324cf1aaa3cf24eb9c7df9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -16.0, + "y": 258.0, + "width": 176.6666717529297, + "height": 36.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "d053c162e1e64e7b8ff3f91b45ecc824" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f0d45de1f0c94cd794a750a329950f35" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", @@ -875,6 +936,21 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7392f5e248684e5c93520870021f5631", + "m_Id": 592166105, + "m_DisplayName": "ShadingShiftFactor", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_ShadingShiftFactor", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", @@ -953,6 +1029,9 @@ }, { "m_Id": "d39873e6759a47c2a923dde640e6f4f6" + }, + { + "m_Id": "f0d45de1f0c94cd794a750a329950f35" } ] } @@ -1373,6 +1452,21 @@ "m_ObjectId": "cd81c525151142c89a6af7f574fd628b" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d053c162e1e64e7b8ff3f91b45ecc824", + "m_Id": 0, + "m_DisplayName": "ShadingShiftFactor", + "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.Vector4MaterialSlot", @@ -1533,6 +1627,34 @@ "m_Labels": [] } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "f0d45de1f0c94cd794a750a329950f35", + "m_Guid": { + "m_GuidSerialized": "d7b412ec-0586-4bd1-ad66-16ccf23249fb" + }, + "m_Name": "ShadingShiftFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "ShadingShiftFactor", + "m_DefaultReferenceName": "_ShadingShiftFactor", + "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.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph index 462a1b670..55e89168d 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph @@ -17,6 +17,9 @@ }, { "m_Id": "22a4bb49b85e452a8db5595bcbeb91c5" + }, + { + "m_Id": "7e09a1dd20fa45cfb744461ff4274fe3" } ], "m_Keywords": [], @@ -86,6 +89,12 @@ }, { "m_Id": "4efbc3bbf016413e94e4c9ac65dd4789" + }, + { + "m_Id": "564e3bc994554c0895bbd2cba3c0915d" + }, + { + "m_Id": "e97ebd89b37649bbbbb6bce779b31161" } ], "m_GroupDatas": [], @@ -100,21 +109,7 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "9e8ee3e30f75499087e513eaac81b463" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "193173a2eded42af802f4085a1ba700a" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "ac0d7130cca947dfa64b9b4e4869b270" + "m_Id": "564e3bc994554c0895bbd2cba3c0915d" }, "m_SlotId": 0 } @@ -175,6 +170,34 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "564e3bc994554c0895bbd2cba3c0915d" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "9e8ee3e30f75499087e513eaac81b463" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "564e3bc994554c0895bbd2cba3c0915d" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ac0d7130cca947dfa64b9b4e4869b270" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -399,6 +422,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e97ebd89b37649bbbbb6bce779b31161" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "564e3bc994554c0895bbd2cba3c0915d" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -591,10 +628,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -241.3332977294922, - "y": 66.00003051757813, - "width": 185.33326721191407, - "height": 36.000022888183597 + "x": -352.0, + "y": 290.6667175292969, + "width": 185.33334350585938, + "height": 35.999969482421878 } }, "m_Slots": [ @@ -919,6 +956,30 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "365fece80463494f884dfba1ea141896", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "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.DynamicValueMaterialSlot", @@ -979,10 +1040,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -241.3332977294922, - "y": -6.000007152557373, - "width": 148.66659545898438, - "height": 36.00001907348633 + "x": -240.6666717529297, + "y": -167.99998474121095, + "width": 148.6666717529297, + "height": 36.0 } }, "m_Slots": [ @@ -1250,10 +1311,56 @@ }, { "m_Id": "22a4bb49b85e452a8db5595bcbeb91c5" + }, + { + "m_Id": "7e09a1dd20fa45cfb744461ff4274fe3" } ] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AddNode", + "m_ObjectId": "564e3bc994554c0895bbd2cba3c0915d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Add", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -131.99998474121095, + "y": 266.6667175292969, + "width": 127.33331298828125, + "height": 120.00003051757813 + } + }, + "m_Slots": [ + { + "m_Id": "365fece80463494f884dfba1ea141896" + }, + { + "m_Id": "9809a78c448345959ba93247b69dd7bc" + }, + { + "m_Id": "d43d943ea3ac4cf3955a6aff64035bcc" + } + ], + "synonyms": [ + "addition", + "sum", + "plus" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", @@ -1535,6 +1642,34 @@ "m_Labels": [] } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "7e09a1dd20fa45cfb744461ff4274fe3", + "m_Guid": { + "m_GuidSerialized": "d3263a66-e96d-45f6-bbbd-9b3869d2008d" + }, + "m_Name": "ShadingShiftFactor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "ShadingShiftFactor", + "m_DefaultReferenceName": "_ShadingShiftFactor", + "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.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", @@ -1717,6 +1852,30 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "9809a78c448345959ba93247b69dd7bc", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "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.Vector1MaterialSlot", @@ -1890,10 +2049,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 38.66663360595703, - "y": 242.66673278808595, - "width": 129.3333740234375, - "height": 95.99998474121094 + "x": 38.666690826416019, + "y": 194.66668701171876, + "width": 129.33331298828126, + "height": 96.00003051757813 } }, "m_Slots": [ @@ -2144,6 +2303,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c586599eb94844e8852ace67749001b7", + "m_Id": 0, + "m_DisplayName": "ShadingShiftFactor", + "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.MainLightDirectionNode", @@ -2349,6 +2523,30 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "d43d943ea3ac4cf3955a6aff64035bcc", + "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, + "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", @@ -2385,10 +2583,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -241.3332977294922, - "y": 30.00001335144043, - "width": 177.99990844726563, - "height": 36.00001525878906 + "x": -240.6666717529297, + "y": -119.9999771118164, + "width": 178.0, + "height": 35.999969482421878 } }, "m_Slots": [ @@ -2686,6 +2884,42 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "e97ebd89b37649bbbbb6bce779b31161", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -352.0, + "y": 326.66668701171877, + "width": 102.66665649414063, + "height": 36.000030517578128 + } + }, + "m_Slots": [ + { + "m_Id": "c586599eb94844e8852ace67749001b7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "7e09a1dd20fa45cfb744461ff4274fe3" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", diff --git a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs index d74440732..09c162aab 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs @@ -22,6 +22,7 @@ namespace UniVRM10.VRM10Viewer private static readonly int ShadingColorFactorProp = Shader.PropertyToID("_ShadingColor"); private static readonly int ShadingMapProp = Shader.PropertyToID("_ShadingMap"); private static readonly int ShadingToonyFactorProp = Shader.PropertyToID("_ShadingToonyFactor"); + private static readonly int ShadingShiftFactorProp = Shader.PropertyToID("_ShadingShiftFactor"); /// /// float = 1.0 @@ -92,6 +93,11 @@ namespace UniVRM10.VRM10Viewer get => Material.GetFloat(ShadingToonyFactorProp); set => Material.SetFloat(ShadingToonyFactorProp, value); } + public float ShadingShiftFactor + { + get => Material.GetFloat(ShadingShiftFactorProp); + set => Material.SetFloat(ShadingShiftFactorProp, value); + } public float BumpScale { diff --git a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs index bd467cd5d..b1a5c381b 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs @@ -101,6 +101,7 @@ namespace UniVRM10.VRM10Viewer } context.ShadingToonyFactor = mtoon.ShadingToonyFactor.GetValueOrDefault(); + context.ShadingShiftFactor = mtoon.ShadingToonyFactor.GetValueOrDefault(); var shadeColor = mtoon.ShadeColorFactor?.ToColor3(UniGLTF.ColorSpace.Linear, UniGLTF.ColorSpace.sRGB); context.ShadingColorFactorSrgb = shadeColor.GetValueOrDefault(Color.white); if (mtoon is { ShadeMultiplyTexture: { Index: >= 0 } }) diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs index b87a30f79..668701c3b 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs @@ -37,8 +37,8 @@ namespace UniVRM10.VRM10Viewer if (_urpMaterialForGrayscale != null) { var m = Instantiate(_urpMaterialForGrayscale); - m.SetFloat("_Metallic", 0); - m.SetFloat("_Roughness", 1); + // m.SetFloat("_Metallic", 0); + // m.SetFloat("_Roughness", 1); visual.GetComponent().material = m; } } From 98a16e81a98bb63bfdc43307ccc95c3fb4edadd4 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 27 Feb 2025 20:50:12 +0900 Subject: [PATCH 3/6] NormalMap --- .../Assets/TinyMToon_SubGraph.shadersubgraph | 120 +++++++++++------- .../VRM10Viewer/TinyMToonMaterialImporter.cs | 16 ++- .../VRM10Viewer/VRM10VisualPrimitive.cs | 4 +- 3 files changed, 88 insertions(+), 52 deletions(-) diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph index 55e89168d..69f825c2f 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph @@ -1040,10 +1040,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -240.6666717529297, - "y": -167.99998474121095, - "width": 148.6666717529297, - "height": 36.0 + "x": -250.0, + "y": -129.3333740234375, + "width": 148.6666259765625, + "height": 35.99998474121094 } }, "m_Slots": [ @@ -1251,9 +1251,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 41.33331298828125, - "y": -774.6666870117188, - "width": 129.33340454101563, + "x": 29.33331871032715, + "y": -714.666748046875, + "width": 129.33334350585938, "height": 126.66668701171875 } }, @@ -1564,10 +1564,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -30.666671752929689, - "y": -480.6666259765625, - "width": 184.66668701171876, - "height": 254.66665649414063 + "x": -42.66670608520508, + "y": -420.66668701171877, + "width": 184.66665649414063, + "height": 254.6667022705078 } }, "m_Slots": [ @@ -1682,10 +1682,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 191.83334350585938, - "y": -719.625, - "width": 209.33334350585938, - "height": 304.0 + "x": 180.0, + "y": -660.0, + "width": 209.33328247070313, + "height": 303.99993896484377 } }, "m_Slots": [ @@ -1976,10 +1976,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -16.666717529296876, - "y": -131.99996948242188, - "width": 184.66671752929688, - "height": 254.6666717529297 + "x": -26.000001907348634, + "y": -93.33338928222656, + "width": 184.66665649414063, + "height": 254.66668701171876 } }, "m_Slots": [ @@ -2088,10 +2088,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 445.9999694824219, - "y": -225.99998474121095, + "x": 443.3333435058594, + "y": -192.66668701171876, "width": 209.33328247070313, - "height": 328.0000305175781 + "height": 327.99993896484377 } }, "m_Slots": [ @@ -2224,10 +2224,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 189.33331298828126, - "y": -207.33331298828126, - "width": 209.33331298828126, - "height": 304.0 + "x": 180.0, + "y": -168.6667022705078, + "width": 209.33328247070313, + "height": 303.99993896484377 } }, "m_Slots": [ @@ -2437,9 +2437,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -113.33329010009766, - "y": -795.3333740234375, - "width": 120.66663360595703, + "x": -125.33336639404297, + "y": -735.3333740234375, + "width": 120.66670989990235, "height": 150.66668701171876 } }, @@ -2499,10 +2499,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -277.33331298828127, - "y": -756.0, - "width": 132.00001525878907, - "height": 36.0 + "x": -289.3334045410156, + "y": -696.0000610351563, + "width": 132.00006103515626, + "height": 36.00006103515625 } }, "m_Slots": [ @@ -2583,10 +2583,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -240.6666717529297, - "y": -119.9999771118164, - "width": 178.0, - "height": 35.999969482421878 + "x": -250.0, + "y": -81.3333969116211, + "width": 177.9999542236328, + "height": 35.99997329711914 } }, "m_Slots": [ @@ -2631,6 +2631,29 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "da1f526e56c749649fdde4460e6ab70e", + "m_Id": 3, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "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.SamplerStateMaterialSlot", @@ -2791,10 +2814,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 714.6666870117188, - "y": -428.6665954589844, - "width": 110.00006103515625, - "height": 102.6666259765625 + "x": 724.0000610351563, + "y": -192.66668701171876, + "width": 110.0, + "height": 126.66663360595703 } }, "m_Slots": [ @@ -2803,6 +2826,9 @@ }, { "m_Id": "eb34d529e298407aa3606f9cbcdc7819" + }, + { + "m_Id": "da1f526e56c749649fdde4460e6ab70e" } ], "synonyms": [], @@ -2932,9 +2958,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -278.6666259765625, - "y": -451.9999694824219, - "width": 133.33328247070313, + "x": -290.66668701171877, + "y": -392.00006103515627, + "width": 133.33334350585938, "height": 36.0 } }, @@ -2983,10 +3009,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 271.3333435058594, - "y": -402.6666259765625, + "x": 259.33331298828127, + "y": -342.6666564941406, "width": 127.33328247070313, - "height": 120.00003051757813 + "height": 119.99992370605469 } }, "m_Slots": [ diff --git a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs index b1a5c381b..b5f5003e0 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs @@ -55,9 +55,7 @@ namespace UniVRM10.VRM10Viewer ImportSurfaceSettings(src, context); await ImportBaseShadeColorAsync(data, src, mtoon, 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 ImportNormalAsync(data, src, context, getTextureAsync, awaitCaller); // await ImportEmissionAsync(data, src, context, getTextureAsync, awaitCaller); // context.Validate(); @@ -112,5 +110,17 @@ namespace UniVRM10.VRM10Viewer } } } + + private static async Task ImportNormalAsync(GltfData data, glTFMaterial src, TinyMToonMaterialContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller) + { + if (src.normalTexture is { index: >= 0 }) + { + if (GltfPbrTextureImporter.TryNormalTexture(data, src, out _, out var desc)) + { + context.BumpMap = await getTextureAsync(desc, awaitCaller); + context.BumpScale = src.normalTexture.scale; + } + } + } } } \ No newline at end of file diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs index 668701c3b..b87a30f79 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10VisualPrimitive.cs @@ -37,8 +37,8 @@ namespace UniVRM10.VRM10Viewer if (_urpMaterialForGrayscale != null) { var m = Instantiate(_urpMaterialForGrayscale); - // m.SetFloat("_Metallic", 0); - // m.SetFloat("_Roughness", 1); + m.SetFloat("_Metallic", 0); + m.SetFloat("_Roughness", 1); visual.GetComponent().material = m; } } From 360195d7ae54fee2b974c9c6d3aeb7d73a268d00 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 28 Feb 2025 14:03:59 +0900 Subject: [PATCH 4/6] emission bloom --- .../Assets/PostProcess Profile.asset | 63 ++ .../Assets/PostProcess Profile.asset.meta | 8 + .../Assets/TinyMToonAlphaBlend.shadergraph | 279 ++++++- .../Assets/TinyMToonOpaque.shadergraph | 279 ++++++- .../Assets/TinyMToon_SubGraph.shadersubgraph | 678 +++++++++++++++++- 5 files changed, 1296 insertions(+), 11 deletions(-) create mode 100644 Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset create mode 100644 Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset.meta diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset b/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset new file mode 100644 index 000000000..8e3c91d76 --- /dev/null +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: PostProcess Profile + m_EditorClassIdentifier: + components: + - {fileID: 4092932147052232957} +--- !u!114 &4092932147052232957 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + skipIterations: + m_OverrideState: 0 + m_Value: 1 + threshold: + m_OverrideState: 0 + m_Value: 0.9 + intensity: + m_OverrideState: 0 + m_Value: 0 + scatter: + m_OverrideState: 0 + m_Value: 0.7 + clamp: + m_OverrideState: 0 + m_Value: 65472 + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + highQualityFiltering: + m_OverrideState: 0 + m_Value: 0 + downscale: + m_OverrideState: 0 + m_Value: 0 + maxIterations: + m_OverrideState: 0 + m_Value: 6 + dirtTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + dirtIntensity: + m_OverrideState: 0 + m_Value: 0 diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset.meta b/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset.meta new file mode 100644 index 000000000..b750f3872 --- /dev/null +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74977177c881c8a449d9f981e53acc0c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph index beef056c3..f8cf167e4 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph @@ -20,6 +20,12 @@ }, { "m_Id": "245594752a2f40a9a0b592ea1d772667" + }, + { + "m_Id": "562743730bee4e7d884999358d07eff8" + }, + { + "m_Id": "0742cd72e9334a03a596f3bf845e52cf" } ], "m_Keywords": [], @@ -65,6 +71,12 @@ }, { "m_Id": "9e996b1a054f4a0caf78c639f3d104ac" + }, + { + "m_Id": "d60c8ebae6a34276a9c940ce0c22e7f1" + }, + { + "m_Id": "4ca5e0de823c4b5f890216a9a1d28ced" } ], "m_GroupDatas": [], @@ -126,6 +138,20 @@ "m_SlotId": -1559276299 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4ca5e0de823c4b5f890216a9a1d28ced" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 490756011 + } + }, { "m_OutputSlot": { "m_Node": { @@ -181,6 +207,20 @@ }, "m_SlotId": 1221667242 } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d60c8ebae6a34276a9c940ce0c22e7f1" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 287326672 + } } ], "m_VertexContext": { @@ -348,6 +388,34 @@ } } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "0742cd72e9334a03a596f3bf845e52cf", + "m_Guid": { + "m_GuidSerialized": "cd38a38b-22cd-403b-92df-6fccc9a67d6b" + }, + "m_Name": "BumpScale", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "BumpScale", + "m_DefaultReferenceName": "_BumpScale", + "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.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.SubGraphNode", @@ -385,11 +453,20 @@ { "m_Id": "5fe8cab7980244fcaefd3eaf8f1b4057" }, + { + "m_Id": "e55ec74ec60f474d9580d5ed52bfb4aa" + }, + { + "m_Id": "102c2a8fcff94efdad15054c1e4a4392" + }, { "m_Id": "e6c1845b1ff7420192f4e36917f71689" }, { "m_Id": "5411d859ca084103badb8b7863988cb2" + }, + { + "m_Id": "a835f0ec85a0423d8d95a4c24e21c10b" } ], "synonyms": [], @@ -407,7 +484,10 @@ "916faab9-cc1c-4621-84b8-9c47171bf8e8", "ad5cc3fe-a5f8-4a48-9956-35d13519f07e", "fa354438-5a66-4424-a53f-da950e75c488", - "d3263a66-e96d-45f6-bbbd-9b3869d2008d" + "d3263a66-e96d-45f6-bbbd-9b3869d2008d", + "23fc4c5e-606f-4623-9fc8-c425baf7c621", + "fc02a70c-3be1-403c-8f2b-a3d7b2f6bd7a", + "7739fffb-53c8-4ab8-b490-2f422c6bee62" ], "m_PropertyIds": [ 1340748427, @@ -415,12 +495,30 @@ 2016068918, 1221667242, -1559276299, - 592166105 + 592166105, + 1641878292, + 287326672, + 490756011 ], "m_Dropdowns": [], "m_DropdownSelectedEntries": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "102c2a8fcff94efdad15054c1e4a4392", + "m_Id": 287326672, + "m_DisplayName": "NormalStrength", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_NormalStrength", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -485,6 +583,19 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "2b256c71e9934914bee19f91ac9400a9", + "m_Id": 0, + "m_DisplayName": "BumpMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -607,6 +718,42 @@ "m_BareResource": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "4ca5e0de823c4b5f890216a9a1d28ced", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 22.666664123535158, + "y": 294.0, + "width": 138.0, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "2b256c71e9934914bee19f91ac9400a9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "562743730bee4e7d884999358d07eff8" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", @@ -652,6 +799,36 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "562743730bee4e7d884999358d07eff8", + "m_Guid": { + "m_GuidSerialized": "dcb3e785-f2ae-444a-a6c2-35c400d8b8fe" + }, + "m_Name": "BumpMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "BumpMap", + "m_DefaultReferenceName": "_BumpMap", + "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": false, + "m_Modifiable": true, + "m_DefaultType": 3 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", @@ -787,6 +964,12 @@ }, { "m_Id": "245594752a2f40a9a0b592ea1d772667" + }, + { + "m_Id": "562743730bee4e7d884999358d07eff8" + }, + { + "m_Id": "0742cd72e9334a03a596f3bf845e52cf" } ] } @@ -953,6 +1136,29 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "a835f0ec85a0423d8d95a4c24e21c10b", + "m_Id": 3, + "m_DisplayName": "Normal", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "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.Vector1MaterialSlot", @@ -1147,6 +1353,57 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "d60c8ebae6a34276a9c940ce0c22e7f1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 26.0, + "y": 330.0, + "width": 134.6666717529297, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "d8f073174a9440d4b4b45d696b8f81d0" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "0742cd72e9334a03a596f3bf845e52cf" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d8f073174a9440d4b4b45d696b8f81d0", + "m_Id": 0, + "m_DisplayName": "BumpScale", + "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.BlockNode", @@ -1215,6 +1472,24 @@ "m_SerializedDescriptor": "SurfaceDescription.BaseColor" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "e55ec74ec60f474d9580d5ed52bfb4aa", + "m_Id": 490756011, + "m_DisplayName": "NormalMap", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_NormalMap", + "m_StageCapability": 2, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph index 8ae490825..18f51158f 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph @@ -26,6 +26,12 @@ }, { "m_Id": "f0d45de1f0c94cd794a750a329950f35" + }, + { + "m_Id": "768ef8d819804d919b966c240e815700" + }, + { + "m_Id": "b1faea9e904b4eab8c5266d6c0565f0d" } ], "m_Keywords": [], @@ -83,6 +89,12 @@ }, { "m_Id": "2f23a09054324cf1aaa3cf24eb9c7df9" + }, + { + "m_Id": "730d19702af74ab0a460870e52ee93b1" + }, + { + "m_Id": "4ad616c1aab04122abdd5700f5e65735" } ], "m_GroupDatas": [], @@ -172,6 +184,34 @@ "m_SlotId": 592166105 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4ad616c1aab04122abdd5700f5e65735" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 490756011 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "730d19702af74ab0a460870e52ee93b1" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 287326672 + } + }, { "m_OutputSlot": { "m_Node": { @@ -482,11 +522,20 @@ { "m_Id": "7392f5e248684e5c93520870021f5631" }, + { + "m_Id": "d8c467fa94be4293a923f302733693da" + }, + { + "m_Id": "4afd8280877340cf8f37960bba00cd70" + }, { "m_Id": "7207d851d0d54d9dbec558d8350cbcf5" }, { "m_Id": "8dee648ae25449838a2cc7261ec55970" + }, + { + "m_Id": "3e70c875940e45098805f075861a86a2" } ], "synonyms": [], @@ -504,7 +553,10 @@ "916faab9-cc1c-4621-84b8-9c47171bf8e8", "ad5cc3fe-a5f8-4a48-9956-35d13519f07e", "fa354438-5a66-4424-a53f-da950e75c488", - "d3263a66-e96d-45f6-bbbd-9b3869d2008d" + "d3263a66-e96d-45f6-bbbd-9b3869d2008d", + "23fc4c5e-606f-4623-9fc8-c425baf7c621", + "fc02a70c-3be1-403c-8f2b-a3d7b2f6bd7a", + "7739fffb-53c8-4ab8-b490-2f422c6bee62" ], "m_PropertyIds": [ 1340748427, @@ -512,7 +564,10 @@ 2016068918, 1221667242, -1559276299, - 592166105 + 592166105, + 1641878292, + 287326672, + 490756011 ], "m_Dropdowns": [], "m_DropdownSelectedEntries": [] @@ -685,6 +740,29 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "3e70c875940e45098805f075861a86a2", + "m_Id": 3, + "m_DisplayName": "Normal", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "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": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -757,6 +835,42 @@ "m_DefaultValue": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "4ad616c1aab04122abdd5700f5e65735", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 22.666664123535158, + "y": 293.9999694824219, + "width": 138.00003051757813, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "70a8e0bdfe3e4717a57111e48e056afc" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "768ef8d819804d919b966c240e815700" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -791,6 +905,21 @@ "m_SerializedDescriptor": "VertexDescription.Tangent" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4afd8280877340cf8f37960bba00cd70", + "m_Id": 287326672, + "m_DisplayName": "NormalStrength", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_NormalStrength", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", @@ -913,6 +1042,19 @@ "m_SerializedDescriptor": "SurfaceDescription.Alpha" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "70a8e0bdfe3e4717a57111e48e056afc", + "m_Id": 0, + "m_DisplayName": "BumpMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", @@ -936,6 +1078,42 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "730d19702af74ab0a460870e52ee93b1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 27.333335876464845, + "y": 329.9999694824219, + "width": 134.66665649414063, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "a5c728807e084c5d9adba57613ac10b3" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b1faea9e904b4eab8c5266d6c0565f0d" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -951,6 +1129,36 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "768ef8d819804d919b966c240e815700", + "m_Guid": { + "m_GuidSerialized": "f652e6b3-5210-4d68-aef2-ffe08a7be1e4" + }, + "m_Name": "BumpMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "BumpMap", + "m_DefaultReferenceName": "_BumpMap", + "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": false, + "m_Modifiable": true, + "m_DefaultType": 3 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", @@ -1032,6 +1240,12 @@ }, { "m_Id": "f0d45de1f0c94cd794a750a329950f35" + }, + { + "m_Id": "768ef8d819804d919b966c240e815700" + }, + { + "m_Id": "b1faea9e904b4eab8c5266d6c0565f0d" } ] } @@ -1223,6 +1437,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a5c728807e084c5d9adba57613ac10b3", + "m_Id": 0, + "m_DisplayName": "BumpScale", + "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.DynamicVectorMaterialSlot", @@ -1247,6 +1476,34 @@ } } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "b1faea9e904b4eab8c5266d6c0565f0d", + "m_Guid": { + "m_GuidSerialized": "58bcb52a-51f5-424c-9517-b18584cbb4c3" + }, + "m_Name": "BumpScale", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "BumpScale", + "m_DefaultReferenceName": "_BumpScale", + "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.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -1515,6 +1772,24 @@ "m_Value": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "d8c467fa94be4293a923f302733693da", + "m_Id": 490756011, + "m_DisplayName": "NormalMap", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_NormalMap", + "m_StageCapability": 2, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph index 69f825c2f..44d0e1c34 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph @@ -20,6 +20,12 @@ }, { "m_Id": "7e09a1dd20fa45cfb744461ff4274fe3" + }, + { + "m_Id": "80d7033fb26d4150afc7e381325e548b" + }, + { + "m_Id": "2e2ceb974f5b4c829366c88514f74c46" } ], "m_Keywords": [], @@ -95,6 +101,21 @@ }, { "m_Id": "e97ebd89b37649bbbbb6bce779b31161" + }, + { + "m_Id": "2dca18a425c24ef996f41d99f41f944f" + }, + { + "m_Id": "4cd8ff51123a4571aec4742c647d03e2" + }, + { + "m_Id": "a9167087f1b545f493408946cc06fa67" + }, + { + "m_Id": "de30e03340034417b8e6ae35c3fe8445" + }, + { + "m_Id": "33b1b5fde65e408db84dc8b2041d1f96" } ], "m_GroupDatas": [], @@ -114,6 +135,34 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2dca18a425c24ef996f41d99f41f944f" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4157f6d98e8f4cff8948bb4a108c6c31" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "33b1b5fde65e408db84dc8b2041d1f96" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "de30e03340034417b8e6ae35c3fe8445" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -156,6 +205,20 @@ "m_SlotId": 2 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4cd8ff51123a4571aec4742c647d03e2" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2dca18a425c24ef996f41d99f41f944f" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -207,9 +270,9 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "4157f6d98e8f4cff8948bb4a108c6c31" + "m_Id": "2dca18a425c24ef996f41d99f41f944f" }, - "m_SlotId": 1 + "m_SlotId": 0 } }, { @@ -282,6 +345,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a9167087f1b545f493408946cc06fa67" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4cd8ff51123a4571aec4742c647d03e2" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -422,6 +499,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "de30e03340034417b8e6ae35c3fe8445" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4cd8ff51123a4571aec4742c647d03e2" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -675,6 +766,57 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1ef8e98871764425805d3d5d00cafd2c", + "m_Id": 0, + "m_DisplayName": "NormalStrength", + "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.Vector3MaterialSlot", + "m_ObjectId": "20e1731fba3c4e4abbcceaca20e43546", + "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.Texture2DMaterialSlot", + "m_ObjectId": "2172df51dc264e95a47d86247aeb738b", + "m_Id": 0, + "m_DisplayName": "NormalMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", @@ -911,6 +1053,89 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalBlendNode", + "m_ObjectId": "2dca18a425c24ef996f41d99f41f944f", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Normal Blend", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -517.3333129882813, + "y": 455.3333435058594, + "width": 209.33331298828126, + "height": 340.0000305175781 + } + }, + "m_Slots": [ + { + "m_Id": "6cc074d28a2248ec94c00b73180098ed" + }, + { + "m_Id": "abc7ac9e69c2400d907864143f74f526" + }, + { + "m_Id": "d8b989079b4b416e96bad77427cfc855" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_BlendMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "2e2ceb974f5b4c829366c88514f74c46", + "m_Guid": { + "m_GuidSerialized": "7739fffb-53c8-4ab8-b490-2f422c6bee62" + }, + "m_Name": "NormalMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "NormalMap", + "m_DefaultReferenceName": "_NormalMap", + "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": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "30ae7f93002e407386dbdc4f76bf9d08", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -941,6 +1166,42 @@ "m_ColorMode": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "33b1b5fde65e408db84dc8b2041d1f96", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1214.6666259765625, + "y": 536.6665649414063, + "width": 145.333251953125, + "height": 36.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "2172df51dc264e95a47d86247aeb738b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "2e2ceb974f5b4c829366c88514f74c46" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -1158,6 +1419,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4842fbf2d7044c75a39ca30c7d366a77", + "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.Vector1MaterialSlot", @@ -1197,6 +1473,47 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalStrengthNode", + "m_ObjectId": "4cd8ff51123a4571aec4742c647d03e2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Normal Strength", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -788.0, + "y": 497.33331298828127, + "width": 209.333251953125, + "height": 304.0 + } + }, + "m_Slots": [ + { + "m_Id": "20e1731fba3c4e4abbcceaca20e43546" + }, + { + "m_Id": "4842fbf2d7044c75a39ca30c7d366a77" + }, + { + "m_Id": "59f25b85991649f591b5ef62203138c8" + } + ], + "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.Texture2DInputMaterialSlot", @@ -1314,6 +1631,12 @@ }, { "m_Id": "7e09a1dd20fa45cfb744461ff4274fe3" + }, + { + "m_Id": "2e2ceb974f5b4c829366c88514f74c46" + }, + { + "m_Id": "80d7033fb26d4150afc7e381325e548b" } ] } @@ -1386,6 +1709,44 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "588c76b41cf84cb6a672821bc73de249", + "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.Vector3MaterialSlot", + "m_ObjectId": "59f25b85991649f591b5ef62203138c8", + "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.Vector3MaterialSlot", @@ -1516,6 +1877,44 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "6cc074d28a2248ec94c00b73180098ed", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "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.Vector1MaterialSlot", + "m_ObjectId": "6f6041b20d494af4ac63813f1711fb75", + "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.NormalVectorNode", @@ -1528,10 +1927,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -517.3333129882813, - "y": 478.0000915527344, - "width": 209.33334350585938, - "height": 318.6664733886719 + "x": -823.3333740234375, + "y": 326.66668701171877, + "width": 207.3333740234375, + "height": 134.66671752929688 } }, "m_Slots": [ @@ -1543,7 +1942,7 @@ "surface direction" ], "m_Precision": 0, - "m_PreviewExpanded": true, + "m_PreviewExpanded": false, "m_DismissedVersion": 0, "m_PreviewMode": 2, "m_CustomColors": { @@ -1670,6 +2069,34 @@ } } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "80d7033fb26d4150afc7e381325e548b", + "m_Guid": { + "m_GuidSerialized": "fc02a70c-3be1-403c-8f2b-a3d7b2f6bd7a" + }, + "m_Name": "NormalStrength", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "NormalStrength", + "m_DefaultReferenceName": "_NormalStrength", + "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.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", @@ -1776,6 +2203,31 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "8ab402d6dc9e49e7b456f140264432a3", + "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.DynamicValueMaterialSlot", @@ -2037,6 +2489,65 @@ "m_BareResource": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "a9167087f1b545f493408946cc06fa67", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1214.6666259765625, + "y": 581.3333129882813, + "width": 159.333251953125, + "height": 35.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "1ef8e98871764425805d3d5d00cafd2c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "80d7033fb26d4150afc7e381325e548b" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "abc7ac9e69c2400d907864143f74f526", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "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.NegateNode", @@ -2353,6 +2864,28 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "c9ac6a4a126c410098a495cd60816b70", + "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", @@ -2487,6 +3020,21 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "cffab61eda8744239e70de29379c6ade", + "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.PropertyNode", @@ -2523,6 +3071,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d39135f347fc40a6b5bfa35ddcc61bde", + "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", @@ -2547,6 +3110,24 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "d65f1545e6c64629a81b1ef5f473aadb", + "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.DynamicVectorMaterialSlot", @@ -2631,6 +3212,29 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "d8b989079b4b416e96bad77427cfc855", + "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.Vector3MaterialSlot", @@ -2715,6 +3319,66 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "de30e03340034417b8e6ae35c3fe8445", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -1005.3333129882813, + "y": 497.3333435058594, + "width": 182.0, + "height": 158.66665649414063 + } + }, + "m_Slots": [ + { + "m_Id": "8ab402d6dc9e49e7b456f140264432a3" + }, + { + "m_Id": "588c76b41cf84cb6a672821bc73de249" + }, + { + "m_Id": "6f6041b20d494af4ac63813f1711fb75" + }, + { + "m_Id": "cffab61eda8744239e70de29379c6ade" + }, + { + "m_Id": "d39135f347fc40a6b5bfa35ddcc61bde" + }, + { + "m_Id": "d65f1545e6c64629a81b1ef5f473aadb" + }, + { + "m_Id": "c9ac6a4a126c410098a495cd60816b70" + }, + { + "m_Id": "30ae7f93002e407386dbdc4f76bf9d08" + } + ], + "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.Vector1MaterialSlot", From f692ffbaad53de0fbb0f85e3bda615ca4d9da53f Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 3 Mar 2025 21:53:13 +0900 Subject: [PATCH 5/6] update shadergraph --- .../Import/IMaterialDescriptorGenerator.cs | 3 +- .../Assets/PostProcess Profile.asset | 8 +- .../Assets/TinyMToonAlphaBlend.shadergraph | 275 +++++- .../Assets/TinyMToonOpaque.shadergraph | 275 +++++- .../Assets/TinyMToon_SubGraph.shadersubgraph | 901 ++++++++++++++++-- .../Assets/TinyPbrAlphaBlend.shadergraph | 86 +- .../Assets/TinyPbrOpaque.shadergraph | 2 +- .../Assets/TinyPbr_SubGraph.shadersubgraph | 232 ++++- 8 files changed, 1639 insertions(+), 143 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs index 6ba99e4d2..f9cf47e42 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs @@ -1,8 +1,7 @@ namespace UniGLTF { /// - /// 指定の index の glTFMaterial から Import できる Material の生成情報を生成する。 - /// glTFMaterial と Unity Material は 1:1 対応する。 + /// generate a unity Material from a glTFMaterial. /// public interface IMaterialDescriptorGenerator { diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset b/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset index 8e3c91d76..8311d90c1 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/PostProcess Profile.asset @@ -31,11 +31,11 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 1 threshold: - m_OverrideState: 0 - m_Value: 0.9 + m_OverrideState: 1 + m_Value: 1 intensity: - m_OverrideState: 0 - m_Value: 0 + m_OverrideState: 1 + m_Value: 1 scatter: m_OverrideState: 0 m_Value: 0.7 diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph index f8cf167e4..999910b99 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonAlphaBlend.shadergraph @@ -26,6 +26,12 @@ }, { "m_Id": "0742cd72e9334a03a596f3bf845e52cf" + }, + { + "m_Id": "974a754cac90444da383dd520d43725f" + }, + { + "m_Id": "732138fff95a49b4ac254e0ddf11bc94" } ], "m_Keywords": [], @@ -77,6 +83,12 @@ }, { "m_Id": "4ca5e0de823c4b5f890216a9a1d28ced" + }, + { + "m_Id": "bea6ff10b4da44caa50af89cba32211e" + }, + { + "m_Id": "70539d01b9d6429691a5db24f5e65c7d" } ], "m_GroupDatas": [], @@ -152,6 +164,20 @@ "m_SlotId": 490756011 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "70539d01b9d6429691a5db24f5e65c7d" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 889685277 + } + }, { "m_OutputSlot": { "m_Node": { @@ -194,6 +220,20 @@ "m_SlotId": 1340748427 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "bea6ff10b4da44caa50af89cba32211e" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": -2125782034 + } + }, { "m_OutputSlot": { "m_Node": { @@ -311,6 +351,24 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "0127c13240d544acbd50c531c02d37dc", + "m_Id": 889685277, + "m_DisplayName": "EmissionMap", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_EmissionMap", + "m_StageCapability": 2, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", @@ -459,6 +517,12 @@ { "m_Id": "102c2a8fcff94efdad15054c1e4a4392" }, + { + "m_Id": "3d07bb566f064af3859a145f3ba3c45a" + }, + { + "m_Id": "0127c13240d544acbd50c531c02d37dc" + }, { "m_Id": "e6c1845b1ff7420192f4e36917f71689" }, @@ -487,7 +551,9 @@ "d3263a66-e96d-45f6-bbbd-9b3869d2008d", "23fc4c5e-606f-4623-9fc8-c425baf7c621", "fc02a70c-3be1-403c-8f2b-a3d7b2f6bd7a", - "7739fffb-53c8-4ab8-b490-2f422c6bee62" + "7739fffb-53c8-4ab8-b490-2f422c6bee62", + "317ea6aa-c51a-4f75-976a-f291c92ab26e", + "4771a75d-cc06-4d5b-afd1-6afbe93f47c4" ], "m_PropertyIds": [ 1340748427, @@ -498,7 +564,9 @@ 592166105, 1641878292, 287326672, - 490756011 + 490756011, + -2125782034, + 889685277 ], "m_Dropdowns": [], "m_DropdownSelectedEntries": [] @@ -641,6 +709,31 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "3d07bb566f064af3859a145f3ba3c45a", + "m_Id": -2125782034, + "m_DisplayName": "EmissionColor", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_EmissionColor", + "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": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -889,6 +982,72 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "70539d01b9d6429691a5db24f5e65c7d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 6.666666507720947, + "y": 402.0000305175781, + "width": 154.0, + "height": 35.999969482421878 + } + }, + "m_Slots": [ + { + "m_Id": "f4e7136123c9483cb7d91305c33ddbd1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "732138fff95a49b4ac254e0ddf11bc94" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "732138fff95a49b4ac254e0ddf11bc94", + "m_Guid": { + "m_GuidSerialized": "370eb310-6a74-497d-99d7-55d5e9f7683e" + }, + "m_Name": "EmissionMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "EmissionMap", + "m_DefaultReferenceName": "_EmissionMap", + "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": "{\"texture\":{\"fileID\":2800000,\"guid\":\"09e6225be3a2a43489e11a41cb198377\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", @@ -970,6 +1129,12 @@ }, { "m_Id": "0742cd72e9334a03a596f3bf845e52cf" + }, + { + "m_Id": "974a754cac90444da383dd520d43725f" + }, + { + "m_Id": "732138fff95a49b4ac254e0ddf11bc94" } ] } @@ -1046,6 +1211,36 @@ "m_Labels": [] } +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "974a754cac90444da383dd520d43725f", + "m_Guid": { + "m_GuidSerialized": "5952bd85-d232-41b9-a39b-8dfad6219580" + }, + "m_Name": "EmissionColor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "EmissionColor", + "m_DefaultReferenceName": "_EmissionColor", + "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.Texture2DInputMaterialSlot", @@ -1234,6 +1429,42 @@ "m_Space": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "bea6ff10b4da44caa50af89cba32211e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 8.000003814697266, + "y": 366.0000305175781, + "width": 152.6666717529297, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "ec80a33b78a3474cbdfd861f8ed21802" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "974a754cac90444da383dd520d43725f" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -1294,7 +1525,7 @@ "r": 1.0, "g": 1.0, "b": 1.0, - "a": 0.0 + "a": 1.0 }, "isMainColor": true, "m_ColorMode": 0 @@ -1528,6 +1759,31 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "ec80a33b78a3474cbdfd861f8ed21802", + "m_Id": 0, + "m_DisplayName": "EmissionColor", + "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.PositionMaterialSlot", @@ -1552,6 +1808,19 @@ "m_Space": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "f4e7136123c9483cb7d91305c33ddbd1", + "m_Id": 0, + "m_DisplayName": "EmissionMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph index 18f51158f..7d244214c 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph @@ -32,6 +32,12 @@ }, { "m_Id": "b1faea9e904b4eab8c5266d6c0565f0d" + }, + { + "m_Id": "708e3009785c4aa69f6e0985da3b277d" + }, + { + "m_Id": "a70c5ed980b14805943aca6a4dac34d0" } ], "m_Keywords": [], @@ -95,6 +101,12 @@ }, { "m_Id": "4ad616c1aab04122abdd5700f5e65735" + }, + { + "m_Id": "fe0e2c9b1312432cbe511bdccc98a1dc" + }, + { + "m_Id": "0167e9468c5d410d961d2b009ad33255" } ], "m_GroupDatas": [], @@ -114,6 +126,20 @@ "m_SlotId": -643094866 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0167e9468c5d410d961d2b009ad33255" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": -2125782034 + } + }, { "m_OutputSlot": { "m_Node": { @@ -281,6 +307,20 @@ }, "m_SlotId": 1 } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "fe0e2c9b1312432cbe511bdccc98a1dc" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0776e82cf5bc4372962108bf3847d1d0" + }, + "m_SlotId": 889685277 + } } ], "m_VertexContext": { @@ -374,6 +414,42 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "0167e9468c5d410d961d2b009ad33255", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 8.0, + "y": 366.0, + "width": 152.66668701171876, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "d09ad54764c84f3aab56efa384981cea" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "708e3009785c4aa69f6e0985da3b277d" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", @@ -528,6 +604,12 @@ { "m_Id": "4afd8280877340cf8f37960bba00cd70" }, + { + "m_Id": "a6126f44bb5c428fb710bb2cd7d6587f" + }, + { + "m_Id": "a73f6944d5794d408169a6ae86da40ce" + }, { "m_Id": "7207d851d0d54d9dbec558d8350cbcf5" }, @@ -556,7 +638,9 @@ "d3263a66-e96d-45f6-bbbd-9b3869d2008d", "23fc4c5e-606f-4623-9fc8-c425baf7c621", "fc02a70c-3be1-403c-8f2b-a3d7b2f6bd7a", - "7739fffb-53c8-4ab8-b490-2f422c6bee62" + "7739fffb-53c8-4ab8-b490-2f422c6bee62", + "317ea6aa-c51a-4f75-976a-f291c92ab26e", + "4771a75d-cc06-4d5b-afd1-6afbe93f47c4" ], "m_PropertyIds": [ 1340748427, @@ -567,7 +651,9 @@ 592166105, 1641878292, 287326672, - 490756011 + 490756011, + -2125782034, + 889685277 ], "m_Dropdowns": [], "m_DropdownSelectedEntries": [] @@ -1042,6 +1128,36 @@ "m_SerializedDescriptor": "SurfaceDescription.Alpha" } +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "708e3009785c4aa69f6e0985da3b277d", + "m_Guid": { + "m_GuidSerialized": "9212fba3-cb0b-4fc7-80f7-cba5204379dd" + }, + "m_Name": "EmissionColor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "EmissionColor", + "m_DefaultReferenceName": "_EmissionColor", + "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.Texture2DMaterialSlot", @@ -1246,6 +1362,12 @@ }, { "m_Id": "b1faea9e904b4eab8c5266d6c0565f0d" + }, + { + "m_Id": "708e3009785c4aa69f6e0985da3b277d" + }, + { + "m_Id": "a70c5ed980b14805943aca6a4dac34d0" } ] } @@ -1452,6 +1574,79 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "a6126f44bb5c428fb710bb2cd7d6587f", + "m_Id": -2125782034, + "m_DisplayName": "EmissionColor", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_EmissionColor", + "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.Internal.Texture2DShaderProperty", + "m_ObjectId": "a70c5ed980b14805943aca6a4dac34d0", + "m_Guid": { + "m_GuidSerialized": "384f5731-3f0b-49cf-9452-a49898a1db5f" + }, + "m_Name": "EmissionMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "EmissionMap", + "m_DefaultReferenceName": "_EmissionMap", + "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": "{\"texture\":{\"fileID\":2800000,\"guid\":\"09e6225be3a2a43489e11a41cb198377\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "a73f6944d5794d408169a6ae86da40ce", + "m_Id": 889685277, + "m_DisplayName": "EmissionMap", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "_EmissionMap", + "m_StageCapability": 2, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -1639,7 +1834,7 @@ "r": 1.0, "g": 1.0, "b": 1.0, - "a": 0.0 + "a": 1.0 }, "isMainColor": true, "m_ColorMode": 0 @@ -1703,6 +1898,19 @@ "m_SupportVFX": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "cd0a74ac28974fdead1bf17f9d8a7751", + "m_Id": 0, + "m_DisplayName": "EmissionMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 2, "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", @@ -1724,6 +1932,31 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "d09ad54764c84f3aab56efa384981cea", + "m_Id": 0, + "m_DisplayName": "EmissionColor", + "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.Vector4MaterialSlot", @@ -1979,3 +2212,39 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "fe0e2c9b1312432cbe511bdccc98a1dc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 6.6666717529296879, + "y": 402.0, + "width": 154.00001525878907, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "cd0a74ac28974fdead1bf17f9d8a7751" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a70c5ed980b14805943aca6a4dac34d0" + } +} + diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph index 44d0e1c34..3f3e63b53 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToon_SubGraph.shadersubgraph @@ -26,6 +26,12 @@ }, { "m_Id": "2e2ceb974f5b4c829366c88514f74c46" + }, + { + "m_Id": "21a9aae9b5764a25996c4db9113b01a8" + }, + { + "m_Id": "9283ec1a1dd24b3b905fa64aeb451295" } ], "m_Keywords": [], @@ -116,6 +122,21 @@ }, { "m_Id": "33b1b5fde65e408db84dc8b2041d1f96" + }, + { + "m_Id": "25269285c9b544969a3690ac48194e8f" + }, + { + "m_Id": "528bfcabf30e4aa5b664cebd5172b79a" + }, + { + "m_Id": "c4b56b3a517448c7958db7acb0aca67a" + }, + { + "m_Id": "324d4e7e67db46f19b82f83d5d11bf31" + }, + { + "m_Id": "d50c97dd3c324b959458d512f51d5024" } ], "m_GroupDatas": [], @@ -135,6 +156,20 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "25269285c9b544969a3690ac48194e8f" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d50c97dd3c324b959458d512f51d5024" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -149,6 +184,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "324d4e7e67db46f19b82f83d5d11bf31" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "25269285c9b544969a3690ac48194e8f" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -233,6 +282,20 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "528bfcabf30e4aa5b664cebd5172b79a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "324d4e7e67db46f19b82f83d5d11bf31" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -382,9 +445,9 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "e14d05fc892148ad9baf9d7558e2cb5a" + "m_Id": "d50c97dd3c324b959458d512f51d5024" }, - "m_SlotId": 1 + "m_SlotId": 0 } }, { @@ -401,6 +464,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c4b56b3a517448c7958db7acb0aca67a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "25269285c9b544969a3690ac48194e8f" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -485,6 +562,20 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d50c97dd3c324b959458d512f51d5024" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e14d05fc892148ad9baf9d7558e2cb5a" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -587,6 +678,24 @@ "m_ActiveTargets": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "06adf733b79c4db1a4f520425ec78c8c", + "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", @@ -743,6 +852,45 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "1b9eb67026d94c05b291aa278dcf6e79", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "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.Vector1MaterialSlot", + "m_ObjectId": "1c46ed8b238344cbaf1f06214775f449", + "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", @@ -781,6 +929,30 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "200a2d12772a4be99acb3b79635016dd", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "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.Vector3MaterialSlot", @@ -817,6 +989,36 @@ "m_BareResource": false } +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "21a9aae9b5764a25996c4db9113b01a8", + "m_Guid": { + "m_GuidSerialized": "317ea6aa-c51a-4f75-976a-f291c92ab26e" + }, + "m_Name": "EmissionColor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "EmissionColor", + "m_DefaultReferenceName": "_EmissionColor", + "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": 0 +} + { "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", @@ -868,6 +1070,49 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "25269285c9b544969a3690ac48194e8f", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 744.6665649414063, + "y": 128.66665649414063, + "width": 209.33331298828126, + "height": 304.0 + } + }, + "m_Slots": [ + { + "m_Id": "e4c63d5bd4a74dd99b49586c54e51114" + }, + { + "m_Id": "34fac29a29ce4637b03b69d8b2b9cd80" + }, + { + "m_Id": "a9812c2c078e43f0995ff7d99c9c9af4" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", @@ -896,6 +1141,21 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "269c31d2473a4316ae01db3ad32ecf77", + "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", @@ -1136,6 +1396,66 @@ "m_BareResource": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "324d4e7e67db46f19b82f83d5d11bf31", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": 531.9999389648438, + "y": 128.66665649414063, + "width": 182.0001220703125, + "height": 157.33328247070313 + } + }, + "m_Slots": [ + { + "m_Id": "3a5f7dd7df4e4f2283ae645991a95fe6" + }, + { + "m_Id": "269c31d2473a4316ae01db3ad32ecf77" + }, + { + "m_Id": "1c46ed8b238344cbaf1f06214775f449" + }, + { + "m_Id": "a72f683783f3403686e3df672e47744b" + }, + { + "m_Id": "d6846e47db7c4e5a9e01e55b5aa86b44" + }, + { + "m_Id": "06adf733b79c4db1a4f520425ec78c8c" + }, + { + "m_Id": "7ed1d6f1cff142c9ba18a7d237791baa" + }, + { + "m_Id": "fc668553d3f145bf9dcca58208602109" + } + ], + "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": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -1202,6 +1522,54 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "34fac29a29ce4637b03b69d8b2b9cd80", + "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", @@ -1289,6 +1657,31 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "3a5f7dd7df4e4f2283ae645991a95fe6", + "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", @@ -1301,10 +1694,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -250.0, - "y": -129.3333740234375, - "width": 148.6666259765625, - "height": 35.99998474121094 + "x": -398.6666564941406, + "y": -162.00003051757813, + "width": 148.6667022705078, + "height": 36.000022888183597 } }, "m_Slots": [ @@ -1568,10 +1961,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 29.33331871032715, - "y": -714.666748046875, - "width": 129.33334350585938, - "height": 126.66668701171875 + "x": -119.33338165283203, + "y": -747.3333740234375, + "width": 129.3333740234375, + "height": 126.6666259765625 } }, "m_Slots": [ @@ -1637,10 +2030,52 @@ }, { "m_Id": "80d7033fb26d4150afc7e381325e548b" + }, + { + "m_Id": "21a9aae9b5764a25996c4db9113b01a8" + }, + { + "m_Id": "9283ec1a1dd24b3b905fa64aeb451295" } ] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "528bfcabf30e4aa5b664cebd5172b79a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 338.66668701171877, + "y": 168.66664123535157, + "width": 153.99996948242188, + "height": 36.00001525878906 + } + }, + "m_Slots": [ + { + "m_Id": "9bf595e3b8a54631af32ea69b6284f78" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "9283ec1a1dd24b3b905fa64aeb451295" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.AddNode", @@ -1795,6 +2230,30 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "5d93dfc32bb54c279421d10a134c5e8e", + "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, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + { "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -1963,10 +2422,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -42.66670608520508, - "y": -420.66668701171877, - "width": 184.66665649414063, - "height": 254.6667022705078 + "x": -191.33331298828126, + "y": -453.3333740234375, + "width": 184.66661071777345, + "height": 254.66665649414063 } }, "m_Slots": [ @@ -2069,6 +2528,28 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "7ed1d6f1cff142c9ba18a7d237791baa", + "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": 1, "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", @@ -2109,10 +2590,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 180.0, - "y": -660.0, - "width": 209.33328247070313, - "height": 303.99993896484377 + "x": 110.66669464111328, + "y": -692.6666870117188, + "width": 209.33331298828126, + "height": 303.9999694824219 } }, "m_Slots": [ @@ -2276,6 +2757,36 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "9283ec1a1dd24b3b905fa64aeb451295", + "m_Guid": { + "m_GuidSerialized": "4771a75d-cc06-4d5b-afd1-6afbe93f47c4" + }, + "m_Name": "EmissionMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "EmissionMap", + "m_DefaultReferenceName": "_EmissionMap", + "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": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", @@ -2328,6 +2839,19 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "9bf595e3b8a54631af32ea69b6284f78", + "m_Id": 0, + "m_DisplayName": "EmissionMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -2416,6 +2940,31 @@ "m_FunctionBody": "Out = saturate( ( t - a ) / ( b - a ) );" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "9f3deceed8cf4669ba2dafa7ab4c2b76", + "m_Id": 0, + "m_DisplayName": "EmissionColor", + "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.SampleTexture2DNode", @@ -2428,10 +2977,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -26.000001907348634, - "y": -93.33338928222656, - "width": 184.66665649414063, - "height": 254.66668701171876 + "x": -174.6666259765625, + "y": -126.00000762939453, + "width": 184.66661071777345, + "height": 254.66665649414063 } }, "m_Slots": [ @@ -2476,6 +3025,21 @@ "m_MipSamplingMode": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a72f683783f3403686e3df672e47744b", + "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.Texture2DMaterialSlot", @@ -2525,6 +3089,54 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "a9812c2c078e43f0995ff7d99c9c9af4", + "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.Vector3MaterialSlot", @@ -2599,10 +3211,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 443.3333435058594, - "y": -192.66668701171876, - "width": 209.33328247070313, - "height": 327.99993896484377 + "x": 294.6666564941406, + "y": -225.33340454101563, + "width": 209.33331298828126, + "height": 328.0000305175781 } }, "m_Slots": [ @@ -2735,10 +3347,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 180.0, - "y": -168.6667022705078, - "width": 209.33328247070313, - "height": 303.99993896484377 + "x": 31.333293914794923, + "y": -201.33334350585938, + "width": 209.33331298828126, + "height": 303.9999694824219 } }, "m_Slots": [ @@ -2814,6 +3426,42 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "c4b56b3a517448c7958db7acb0aca67a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 340.0, + "y": 204.66665649414063, + "width": 152.66665649414063, + "height": 36.000030517578128 + } + }, + "m_Slots": [ + { + "m_Id": "9f3deceed8cf4669ba2dafa7ab4c2b76" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "21a9aae9b5764a25996c4db9113b01a8" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -2970,10 +3618,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -125.33336639404297, - "y": -735.3333740234375, - "width": 120.66670989990235, - "height": 150.66668701171876 + "x": -274.0, + "y": -768.0, + "width": 120.66668701171875, + "height": 150.6666259765625 } }, "m_Slots": [ @@ -3047,10 +3695,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -289.3334045410156, - "y": -696.0000610351563, - "width": 132.00006103515626, - "height": 36.00006103515625 + "x": -437.9999694824219, + "y": -728.6666870117188, + "width": 132.0, + "height": 36.0 } }, "m_Slots": [ @@ -3110,6 +3758,49 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AddNode", + "m_ObjectId": "d50c97dd3c324b959458d512f51d5024", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Add", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 531.9999389648438, + "y": -225.33340454101563, + "width": 131.3333740234375, + "height": 120.00003814697266 + } + }, + "m_Slots": [ + { + "m_Id": "200a2d12772a4be99acb3b79635016dd" + }, + { + "m_Id": "1b9eb67026d94c05b291aa278dcf6e79" + }, + { + "m_Id": "5d93dfc32bb54c279421d10a134c5e8e" + } + ], + "synonyms": [ + "addition", + "sum", + "plus" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", @@ -3128,6 +3819,21 @@ "m_DefaultType": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d6846e47db7c4e5a9e01e55b5aa86b44", + "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", @@ -3164,10 +3870,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -250.0, - "y": -81.3333969116211, - "width": 177.9999542236328, - "height": 35.99997329711914 + "x": -398.6666564941406, + "y": -114.00003814697266, + "width": 178.00001525878907, + "height": 36.00001525878906 } }, "m_Slots": [ @@ -3235,29 +3941,6 @@ "m_Labels": [] } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "da1f526e56c749649fdde4460e6ab70e", - "m_Id": 3, - "m_DisplayName": "Normal", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Normal", - "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.SamplerStateMaterialSlot", @@ -3478,21 +4161,18 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 724.0000610351563, - "y": -192.66668701171876, - "width": 110.0, - "height": 126.66663360595703 + "x": 739.3333129882813, + "y": -225.33340454101563, + "width": 109.99993896484375, + "height": 126.66674041748047 } }, "m_Slots": [ - { - "m_Id": "5b947c35e0f3453e887c550f2ec5bfdf" - }, { "m_Id": "eb34d529e298407aa3606f9cbcdc7819" }, { - "m_Id": "da1f526e56c749649fdde4460e6ab70e" + "m_Id": "5b947c35e0f3453e887c550f2ec5bfdf" } ], "synonyms": [], @@ -3506,6 +4186,54 @@ "IsFirstSlotValid": true } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "e4c63d5bd4a74dd99b49586c54e51114", + "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.Internal.Texture2DShaderProperty", @@ -3622,9 +4350,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -290.66668701171877, - "y": -392.00006103515627, - "width": 133.33334350585938, + "x": -439.3333435058594, + "y": -424.6667175292969, + "width": 133.3333740234375, "height": 36.0 } }, @@ -3673,10 +4401,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 259.33331298828127, - "y": -342.6666564941406, - "width": 127.33328247070313, - "height": 119.99992370605469 + "x": 110.66669464111328, + "y": -375.33331298828127, + "width": 127.3332748413086, + "height": 119.99993896484375 } }, "m_Slots": [ @@ -3758,3 +4486,16 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "fc668553d3f145bf9dcca58208602109", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrAlphaBlend.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrAlphaBlend.shadergraph index f25a42259..06bf1c361 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrAlphaBlend.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrAlphaBlend.shadergraph @@ -502,10 +502,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -780.0000610351563, - "y": 222.66671752929688, - "width": 132.00006103515626, - "height": 36.000030517578128 + "x": -610.0, + "y": 180.0, + "width": 132.00003051757813, + "height": 36.0 } }, "m_Slots": [ @@ -726,9 +726,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -780.0, - "y": 330.666748046875, - "width": 159.33331298828126, + "x": -637.3333129882813, + "y": 288.0, + "width": 159.33334350585938, "height": 36.0 } }, @@ -901,10 +901,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -780.0000610351563, - "y": 258.666748046875, - "width": 133.33331298828126, - "height": 35.999908447265628 + "x": -610.0, + "y": 216.0, + "width": 133.33334350585938, + "height": 35.99998474121094 } }, "m_Slots": [ @@ -981,10 +981,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -780.0, - "y": 294.6667175292969, - "width": 172.66668701171876, - "height": 36.000030517578128 + "x": -650.6666870117188, + "y": 251.99998474121095, + "width": 172.66671752929688, + "height": 36.00001525878906 } }, "m_Slots": [ @@ -1302,9 +1302,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -780.0, - "y": 474.6666564941406, - "width": 138.0, + "x": -616.0, + "y": 432.0, + "width": 138.00003051757813, "height": 36.0 } }, @@ -1495,10 +1495,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -779.3333129882813, - "y": 402.66668701171877, - "width": 117.33331298828125, - "height": 36.0 + "x": -595.3333129882813, + "y": 360.0000305175781, + "width": 117.33334350585938, + "height": 35.999969482421878 } }, "m_Slots": [ @@ -1692,10 +1692,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -780.0, - "y": 546.6666259765625, - "width": 152.66668701171876, - "height": 36.0 + "x": -630.6666870117188, + "y": 504.0000305175781, + "width": 152.66671752929688, + "height": 35.999969482421878 } }, "m_Slots": [ @@ -1783,10 +1783,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -779.3333129882813, - "y": 366.66668701171877, - "width": 134.0, - "height": 36.0 + "x": -612.0, + "y": 324.0, + "width": 134.00003051757813, + "height": 36.000030517578128 } }, "m_Slots": [ @@ -1864,10 +1864,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -779.3333129882813, - "y": 438.66668701171877, + "x": -698.0, + "y": 396.0, "width": 206.0, - "height": 35.999969482421878 + "height": 36.0 } }, "m_Slots": [ @@ -1900,10 +1900,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -779.3333129882813, - "y": 510.6666564941406, - "width": 134.6666259765625, - "height": 35.999969482421878 + "x": -612.6666870117188, + "y": 468.0, + "width": 134.66671752929688, + "height": 36.000030517578128 } }, "m_Slots": [ @@ -1931,7 +1931,7 @@ "m_Group": { "m_Id": "" }, - "m_Name": "TinyPbr", + "m_Name": "TinyPbr_SubGraph", "m_DrawState": { "m_Expanded": true, "m_Position": { @@ -2151,7 +2151,7 @@ "r": 1.0, "g": 1.0, "b": 1.0, - "a": 0.0 + "a": 1.0 }, "isMainColor": false, "m_ColorMode": 0 @@ -2286,10 +2286,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -779.3333129882813, - "y": 582.6666259765625, - "width": 154.0, - "height": 35.99993896484375 + "x": -630.6666870117188, + "y": 540.0, + "width": 154.00003051757813, + "height": 36.0 } }, "m_Slots": [ diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrOpaque.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrOpaque.shadergraph index a4bf22ab9..f38f08b81 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrOpaque.shadergraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrOpaque.shadergraph @@ -2451,7 +2451,7 @@ "r": 1.0, "g": 1.0, "b": 1.0, - "a": 0.0 + "a": 1.0 }, "isMainColor": false, "m_ColorMode": 0 diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbr_SubGraph.shadersubgraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbr_SubGraph.shadersubgraph index 06a421e45..38ffca101 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbr_SubGraph.shadersubgraph +++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbr_SubGraph.shadersubgraph @@ -125,6 +125,9 @@ }, { "m_Id": "3fba216a7770483ebd8ffef83f8d0793" + }, + { + "m_Id": "de30d6b26ca94bb29eb937897d6e59f0" } ], "m_GroupDatas": [], @@ -326,6 +329,20 @@ "m_SlotId": 3 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5eef577c98e34954bf04a2dd7c871f75" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "de30d6b26ca94bb29eb937897d6e59f0" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -475,9 +492,9 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "95965af48a8849339faf1a291c791faf" + "m_Id": "de30d6b26ca94bb29eb937897d6e59f0" }, - "m_SlotId": 2 + "m_SlotId": 1 } }, { @@ -508,6 +525,20 @@ "m_SlotId": 3 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "de30d6b26ca94bb29eb937897d6e59f0" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "95965af48a8849339faf1a291c791faf" + }, + "m_SlotId": 2 + } + }, { "m_OutputSlot": { "m_Node": { @@ -1701,6 +1732,54 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "435429e6f47e4728b418862d9fb72ba3", + "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", @@ -1934,7 +2013,7 @@ }, "m_Name": "Sample Texture 2D", "m_DrawState": { - "m_Expanded": true, + "m_Expanded": false, "m_Position": { "serializedVersion": "2", "x": -166.0, @@ -2287,6 +2366,54 @@ "m_BareResource": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "6c552ae7139a472abc1dd448779f258c", + "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", @@ -3416,6 +3543,54 @@ "m_DefaultType": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "b6816faafcfa4ebea46328c930b2be6c", + "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.Vector1MaterialSlot", @@ -3667,6 +3842,49 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "de30d6b26ca94bb29eb937897d6e59f0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 254.0, + "y": -192.66661071777345, + "width": 127.3333740234375, + "height": 119.99995422363281 + } + }, + "m_Slots": [ + { + "m_Id": "b6816faafcfa4ebea46328c930b2be6c" + }, + { + "m_Id": "435429e6f47e4728b418862d9fb72ba3" + }, + { + "m_Id": "6c552ae7139a472abc1dd448779f258c" + } + ], + "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", @@ -3741,10 +3959,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": 253.9999237060547, - "y": -385.9999694824219, - "width": 209.33335876464845, - "height": 303.9999694824219 + "x": 254.0, + "y": -509.3332214355469, + "width": 209.33334350585938, + "height": 303.99993896484377 } }, "m_Slots": [ From 5d16112bf42517f4d7421dbd4e301f584d4807d0 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 4 Mar 2025 13:35:25 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E5=BE=A9=E6=B4=BB=E3=80=82=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Import/IMaterialDescriptorGenerator.cs | 12 +++++++-- .../MaterialIO/Import/MaterialDescriptor.cs | 26 +++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs index f9cf47e42..5f6afcc46 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/IMaterialDescriptorGenerator.cs @@ -1,17 +1,25 @@ namespace UniGLTF { /// - /// generate a unity Material from a glTFMaterial. + /// 指定の index の glTFMaterial から Import できる Material の生成情報を生成する。 + /// glTFMaterial と Unity Material は 1:1 対応する。 + /// + /// IMaterialDescriptorGenerator の使われ方は MaterialFactory.LoadAsync を参照 /// public interface IMaterialDescriptorGenerator { /// /// Generate the MaterialDescriptor generated from the index i. + /// + /// glTFMaterial src = data.GLTF.materials[i]; + /// return new MaterialDescriptor(); + /// /// MaterialDescriptor Get(GltfData data, int i); /// - /// Generate the MaterialDescriptor for the non-specified glTF material. + /// Generate the fallback MaterialDescriptor for the non-specified glTF material. + /// /// MaterialDescriptor GetGltfDefault(string materialName = null); } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/MaterialDescriptor.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/MaterialDescriptor.cs index f33d6a37a..f91c13fdb 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/MaterialDescriptor.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/Import/MaterialDescriptor.cs @@ -5,18 +5,44 @@ using UnityEngine; namespace UniGLTF { + /// + /// Material information generated by IMaterialDescriptorGenerator + /// In recent versions, it is easy to manipulate Materials directly using Actions. + /// + /// Actions の使用例は UniGLTF.UrpGltfMaterialDescriptorGenerator を参照 + /// public sealed class MaterialDescriptor { public delegate Task MaterialGenerateAsyncFunc(Material m, GetTextureAsyncFunc getTexture, IAwaitCaller awaitCaller); + /// + /// + /// material.name = matDesc.SubAssetKey.Name; + /// + /// public readonly string Name; + + /// + /// + /// material = new Material(matDesc.Shader); + /// public readonly Shader Shader; + public readonly int? RenderQueue; public readonly IReadOnlyDictionary TextureSlots; public readonly IReadOnlyDictionary FloatValues; public readonly IReadOnlyDictionary Colors; public readonly IReadOnlyDictionary Vectors; + + /// + /// Process and construct the argument Material + /// + /// material.SetTexture(prop, texture); + /// material.SetColor(prop, color); + /// + /// public readonly IReadOnlyList> Actions; + public readonly IReadOnlyList AsyncActions; public SubAssetKey SubAssetKey => new SubAssetKey(SubAssetKey.MaterialType, Name);