diff --git a/Assets/VRM10/Runtime/IO/Texture/Vrm10MToonTextureImporter.cs b/Assets/VRM10/Runtime/IO/Texture/Vrm10MToonTextureImporter.cs
index 28d78c174..b7dd4fe7b 100644
--- a/Assets/VRM10/Runtime/IO/Texture/Vrm10MToonTextureImporter.cs
+++ b/Assets/VRM10/Runtime/IO/Texture/Vrm10MToonTextureImporter.cs
@@ -118,7 +118,7 @@ namespace UniVRM10
}
}
- private static bool TryGetShadeMultiplyTexture(GltfData data, VRMC_materials_mtoon mToon, out SubAssetKey key, out TextureDescriptor desc)
+ public static bool TryGetShadeMultiplyTexture(GltfData data, VRMC_materials_mtoon mToon, out SubAssetKey key, out TextureDescriptor desc)
{
return TryGetSRGBTexture(data, new Vrm10TextureInfo(mToon.ShadeMultiplyTexture), out key, out desc);
}
diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph
index 29a8bad40..b25267f2b 100644
--- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph
+++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyMToonOpaque.shadergraph
@@ -5,6 +5,18 @@
"m_Properties": [
{
"m_Id": "4e79611254fb4f7ebaa9dc55ea52a427"
+ },
+ {
+ "m_Id": "41bfcf3cf6f24e0098346d3a59224d97"
+ },
+ {
+ "m_Id": "5c4080b43fa645598a638526be476d15"
+ },
+ {
+ "m_Id": "c6ae1333e8494c6292d560a6a0c1126e"
+ },
+ {
+ "m_Id": "025d73c9fe2e47b3853bf9a00d126af4"
}
],
"m_Keywords": [],
@@ -27,26 +39,53 @@
{
"m_Id": "e27b69744886424eb5f477011f04efd2"
},
- {
- "m_Id": "978fb2b4d6a64b13baf4df534019c0ef"
- },
- {
- "m_Id": "12d6f083f5bf4fe396e430f312c91445"
- },
- {
- "m_Id": "945c5856342a4d05a37a15c8fd76dd91"
- },
- {
- "m_Id": "ef80aee428f942ea9ba07ca5ff70d8b7"
- },
- {
- "m_Id": "c043e21ac8d54fe3af1f367b6682ea76"
- },
{
"m_Id": "6f5745e22b43420db4198550f74935a6"
},
{
"m_Id": "001956a26193431db776814a0429e033"
+ },
+ {
+ "m_Id": "aa688b600dbe46bfa78fda5e3d5fdd0b"
+ },
+ {
+ "m_Id": "e202f291b6294c1c980899f1ab2ca582"
+ },
+ {
+ "m_Id": "11c2b215d12c4952997709b16601ce21"
+ },
+ {
+ "m_Id": "5caf44abf8c94193bae46a6c36c6bb87"
+ },
+ {
+ "m_Id": "9e9053ae73f94d2f99ce33a60274938f"
+ },
+ {
+ "m_Id": "e41f220e296b4cc2a9a3c1faf14d7d72"
+ },
+ {
+ "m_Id": "53ca4faac8f8465c955fe6f1c038c001"
+ },
+ {
+ "m_Id": "02d64a802a6d4d29bdf3cc69c21aab22"
+ },
+ {
+ "m_Id": "740353e06794457a882599bb4a70b703"
+ },
+ {
+ "m_Id": "c0677ef2e2bf4d488e08da8a6f0fd932"
+ },
+ {
+ "m_Id": "b81474aeedbf4efa8c1bc90bb75c99a9"
+ },
+ {
+ "m_Id": "a62805bf0771413ba8c1e8f51ad17b54"
+ },
+ {
+ "m_Id": "61e8c91a6b5d417f89dba58a5aaee6d8"
+ },
+ {
+ "m_Id": "2367bc93d6e7445391b808a16728f2b9"
}
],
"m_GroupDatas": [],
@@ -66,6 +105,104 @@
"m_SlotId": 1
}
},
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "02d64a802a6d4d29bdf3cc69c21aab22"
+ },
+ "m_SlotId": 3
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "e41f220e296b4cc2a9a3c1faf14d7d72"
+ },
+ "m_SlotId": 2
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "11c2b215d12c4952997709b16601ce21"
+ },
+ "m_SlotId": 2
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "5caf44abf8c94193bae46a6c36c6bb87"
+ },
+ "m_SlotId": 0
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "2367bc93d6e7445391b808a16728f2b9"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "02d64a802a6d4d29bdf3cc69c21aab22"
+ },
+ "m_SlotId": 1
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "2367bc93d6e7445391b808a16728f2b9"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "61e8c91a6b5d417f89dba58a5aaee6d8"
+ },
+ "m_SlotId": 0
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "53ca4faac8f8465c955fe6f1c038c001"
+ },
+ "m_SlotId": 2
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "e41f220e296b4cc2a9a3c1faf14d7d72"
+ },
+ "m_SlotId": 1
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "5caf44abf8c94193bae46a6c36c6bb87"
+ },
+ "m_SlotId": 1
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "02d64a802a6d4d29bdf3cc69c21aab22"
+ },
+ "m_SlotId": 2
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "61e8c91a6b5d417f89dba58a5aaee6d8"
+ },
+ "m_SlotId": 1
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "02d64a802a6d4d29bdf3cc69c21aab22"
+ },
+ "m_SlotId": 0
+ }
+ },
{
"m_OutputSlot": {
"m_Node": {
@@ -73,6 +210,118 @@
},
"m_SlotId": 0
},
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "a62805bf0771413ba8c1e8f51ad17b54"
+ },
+ "m_SlotId": 1
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "740353e06794457a882599bb4a70b703"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "53ca4faac8f8465c955fe6f1c038c001"
+ },
+ "m_SlotId": 1
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "9e9053ae73f94d2f99ce33a60274938f"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "53ca4faac8f8465c955fe6f1c038c001"
+ },
+ "m_SlotId": 0
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "a62805bf0771413ba8c1e8f51ad17b54"
+ },
+ "m_SlotId": 2
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "e41f220e296b4cc2a9a3c1faf14d7d72"
+ },
+ "m_SlotId": 0
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "aa688b600dbe46bfa78fda5e3d5fdd0b"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "11c2b215d12c4952997709b16601ce21"
+ },
+ "m_SlotId": 0
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "b81474aeedbf4efa8c1bc90bb75c99a9"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "a62805bf0771413ba8c1e8f51ad17b54"
+ },
+ "m_SlotId": 0
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "c0677ef2e2bf4d488e08da8a6f0fd932"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "740353e06794457a882599bb4a70b703"
+ },
+ "m_SlotId": 1
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "e202f291b6294c1c980899f1ab2ca582"
+ },
+ "m_SlotId": 0
+ },
+ "m_InputSlot": {
+ "m_Node": {
+ "m_Id": "11c2b215d12c4952997709b16601ce21"
+ },
+ "m_SlotId": 1
+ }
+ },
+ {
+ "m_OutputSlot": {
+ "m_Node": {
+ "m_Id": "e41f220e296b4cc2a9a3c1faf14d7d72"
+ },
+ "m_SlotId": 3
+ },
"m_InputSlot": {
"m_Node": {
"m_Id": "e27b69744886424eb5f477011f04efd2"
@@ -83,8 +332,8 @@
],
"m_VertexContext": {
"m_Position": {
- "x": 0.0,
- "y": 0.0
+ "x": 544.0000610351563,
+ "y": -131.33334350585938
},
"m_Blocks": [
{
@@ -100,27 +349,12 @@
},
"m_FragmentContext": {
"m_Position": {
- "x": 0.0,
- "y": 200.0
+ "x": 544.0000610351563,
+ "y": 95.3333740234375
},
"m_Blocks": [
{
"m_Id": "e27b69744886424eb5f477011f04efd2"
- },
- {
- "m_Id": "978fb2b4d6a64b13baf4df534019c0ef"
- },
- {
- "m_Id": "12d6f083f5bf4fe396e430f312c91445"
- },
- {
- "m_Id": "945c5856342a4d05a37a15c8fd76dd91"
- },
- {
- "m_Id": "ef80aee428f942ea9ba07ca5ff70d8b7"
- },
- {
- "m_Id": "c043e21ac8d54fe3af1f367b6682ea76"
}
]
},
@@ -157,10 +391,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": -434.6666564941406,
- "y": 140.0,
- "width": 140.0,
- "height": 35.99998474121094
+ "x": -391.3333435058594,
+ "y": -28.000011444091798,
+ "width": 133.33334350585938,
+ "height": 36.0000114440918
}
},
"m_Slots": [
@@ -181,36 +415,6 @@
}
}
-{
- "m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
- "m_ObjectId": "019aac67658b4391a0fbbde2235300db",
- "m_Id": 0,
- "m_DisplayName": "Emission",
- "m_SlotType": 0,
- "m_Hidden": false,
- "m_ShaderOutputName": "Emission",
- "m_StageCapability": 2,
- "m_Value": {
- "x": 0.0,
- "y": 0.0,
- "z": 0.0
- },
- "m_DefaultValue": {
- "x": 0.0,
- "y": 0.0,
- "z": 0.0
- },
- "m_Labels": [],
- "m_ColorMode": 1,
- "m_DefaultColor": {
- "r": 0.0,
- "g": 0.0,
- "b": 0.0,
- "a": 1.0
- }
-}
-
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
@@ -235,6 +439,203 @@
"m_Space": 0
}
+{
+ "m_SGVersion": 1,
+ "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
+ "m_ObjectId": "025d73c9fe2e47b3853bf9a00d126af4",
+ "m_Guid": {
+ "m_GuidSerialized": "faf3291f-b550-41b3-b53d-2a983b8f3183"
+ },
+ "m_Name": "ShadingToonyFactor",
+ "m_DefaultRefNameVersion": 1,
+ "m_RefNameGeneratedByDisplayName": "ShadingToonyFactor",
+ "m_DefaultReferenceName": "_ShadingToonyFactor",
+ "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": 1,
+ "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
+ "m_ObjectId": "02d64a802a6d4d29bdf3cc69c21aab22",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "linearstep (Custom Function)",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -11.999978065490723,
+ "y": 557.3333129882813,
+ "width": 211.99998474121095,
+ "height": 144.0
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "1a6db28a6c03456083c39b3b0dfbc56a"
+ },
+ {
+ "m_Id": "f55b8ae1b1c7406ca3a2b32d737adf05"
+ },
+ {
+ "m_Id": "35b4cbc7d7894237be86cdf5305edaa6"
+ },
+ {
+ "m_Id": "ec6717fc07224569802ff5be80e915d7"
+ }
+ ],
+ "synonyms": [
+ "code",
+ "HLSL"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": false,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ },
+ "m_SourceType": 1,
+ "m_FunctionName": "linearstep",
+ "m_FunctionSource": "",
+ "m_FunctionBody": "Out = saturate( ( t - a ) / ( b - a ) );"
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "063fb8e850264b3bba0c55df7440ba52",
+ "m_Id": 0,
+ "m_DisplayName": "In",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "In",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ },
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
+ "m_ObjectId": "0acaf0553f7946bfb5829bdc191aaed7",
+ "m_Id": 1,
+ "m_DisplayName": "B",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "B",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "e00": 2.0,
+ "e01": 2.0,
+ "e02": 2.0,
+ "e03": 2.0,
+ "e10": 2.0,
+ "e11": 2.0,
+ "e12": 2.0,
+ "e13": 2.0,
+ "e20": 2.0,
+ "e21": 2.0,
+ "e22": 2.0,
+ "e23": 2.0,
+ "e30": 2.0,
+ "e31": 2.0,
+ "e32": 2.0,
+ "e33": 2.0
+ },
+ "m_DefaultValue": {
+ "e00": 1.0,
+ "e01": 0.0,
+ "e02": 0.0,
+ "e03": 0.0,
+ "e10": 0.0,
+ "e11": 1.0,
+ "e12": 0.0,
+ "e13": 0.0,
+ "e20": 0.0,
+ "e21": 0.0,
+ "e22": 1.0,
+ "e23": 0.0,
+ "e30": 0.0,
+ "e31": 0.0,
+ "e32": 0.0,
+ "e33": 1.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
+ "m_ObjectId": "0ce508edff374df4bb032abe5f083cf1",
+ "m_Id": 2,
+ "m_DisplayName": "Out",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "e00": 0.0,
+ "e01": 0.0,
+ "e02": 0.0,
+ "e03": 0.0,
+ "e10": 0.0,
+ "e11": 0.0,
+ "e12": 0.0,
+ "e13": 0.0,
+ "e20": 0.0,
+ "e21": 0.0,
+ "e22": 0.0,
+ "e23": 0.0,
+ "e30": 0.0,
+ "e31": 0.0,
+ "e32": 0.0,
+ "e33": 0.0
+ },
+ "m_DefaultValue": {
+ "e00": 1.0,
+ "e01": 0.0,
+ "e02": 0.0,
+ "e03": 0.0,
+ "e10": 0.0,
+ "e11": 1.0,
+ "e12": 0.0,
+ "e13": 0.0,
+ "e20": 0.0,
+ "e21": 0.0,
+ "e22": 1.0,
+ "e23": 0.0,
+ "e30": 0.0,
+ "e31": 0.0,
+ "e32": 0.0,
+ "e33": 1.0
+ }
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -252,25 +653,129 @@
{
"m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.BlockNode",
- "m_ObjectId": "12d6f083f5bf4fe396e430f312c91445",
+ "m_Type": "UnityEditor.ShaderGraph.DotProductNode",
+ "m_ObjectId": "11c2b215d12c4952997709b16601ce21",
"m_Group": {
"m_Id": ""
},
- "m_Name": "SurfaceDescription.Metallic",
+ "m_Name": "Dot Product",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": 0.0,
- "y": 0.0,
- "width": 0.0,
- "height": 0.0
+ "x": -415.3333435058594,
+ "y": 737.333251953125,
+ "width": 209.33331298828126,
+ "height": 304.0
}
},
"m_Slots": [
{
- "m_Id": "bed0fcfe71ee4b1e85fb3d9d7ee1e4c1"
+ "m_Id": "22cba68eaa70423e9470cba77ea66f7f"
+ },
+ {
+ "m_Id": "2763a2e24ec94cd4818051c81a67e6e5"
+ },
+ {
+ "m_Id": "530783b8df6b4117921bebd846679a96"
+ }
+ ],
+ "synonyms": [
+ "scalar product"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": true,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "186bce80a20f46b7bd505213dbac4145",
+ "m_Id": 0,
+ "m_DisplayName": "In",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "In",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ },
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "1a6db28a6c03456083c39b3b0dfbc56a",
+ "m_Id": 0,
+ "m_DisplayName": "a",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "a",
+ "m_StageCapability": 3,
+ "m_Value": -1.0,
+ "m_DefaultValue": 0.0,
+ "m_Labels": []
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "22cba68eaa70423e9470cba77ea66f7f",
+ "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.PropertyNode",
+ "m_ObjectId": "2367bc93d6e7445391b808a16728f2b9",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Property",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -389.9999694824219,
+ "y": 617.3333129882813,
+ "width": 184.00001525878907,
+ "height": 36.0
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "2c364dcc6c61442cbf11e8ab6a564d48"
}
],
"synonyms": [],
@@ -281,7 +786,100 @@
"m_CustomColors": {
"m_SerializableColors": []
},
- "m_SerializedDescriptor": "SurfaceDescription.Metallic"
+ "m_Property": {
+ "m_Id": "025d73c9fe2e47b3853bf9a00d126af4"
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "2763a2e24ec94cd4818051c81a67e6e5",
+ "m_Id": 1,
+ "m_DisplayName": "B",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "B",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 1.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.SamplerStateMaterialSlot",
+ "m_ObjectId": "287d5f9bb8b7491ca4de9a9f289728dd",
+ "m_Id": 3,
+ "m_DisplayName": "Sampler",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Sampler",
+ "m_StageCapability": 3,
+ "m_BareResource": false
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "2c364dcc6c61442cbf11e8ab6a564d48",
+ "m_Id": 0,
+ "m_DisplayName": "ShadingToonyFactor",
+ "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",
+ "m_ObjectId": "2cf27a4d36454c98b25d12c294e5bc6d",
+ "m_Id": 2,
+ "m_DisplayName": "T",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "T",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ },
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "35b4cbc7d7894237be86cdf5305edaa6",
+ "m_Id": 2,
+ "m_DisplayName": "t",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "t",
+ "m_StageCapability": 3,
+ "m_Value": 0.0,
+ "m_DefaultValue": 0.0,
+ "m_Labels": []
}
{
@@ -314,6 +912,36 @@
}
}
+{
+ "m_SGVersion": 3,
+ "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty",
+ "m_ObjectId": "41bfcf3cf6f24e0098346d3a59224d97",
+ "m_Guid": {
+ "m_GuidSerialized": "f42a4d4f-6d88-4897-addd-f0cb1e430ab8"
+ },
+ "m_Name": "ShadingColor",
+ "m_DefaultRefNameVersion": 1,
+ "m_RefNameGeneratedByDisplayName": "ShadingColor",
+ "m_DefaultReferenceName": "_ShadingColor",
+ "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.5849056243896484,
+ "g": 0.5849056243896484,
+ "b": 0.5849056243896484,
+ "a": 1.0
+ },
+ "isMainColor": false,
+ "m_ColorMode": 0
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
@@ -348,6 +976,19 @@
"m_SerializedDescriptor": "VertexDescription.Tangent"
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
+ "m_ObjectId": "4bd73107ed5043a6a98b42284d491e6d",
+ "m_Id": 0,
+ "m_DisplayName": "ShadingMap",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
+ "m_BareResource": false
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
@@ -378,6 +1019,174 @@
"m_DefaultType": 0
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "530783b8df6b4117921bebd846679a96",
+ "m_Id": 2,
+ "m_DisplayName": "Out",
+ "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.MultiplyNode",
+ "m_ObjectId": "53ca4faac8f8465c955fe6f1c038c001",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Multiply",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -11.999979019165039,
+ "y": 186.0000457763672,
+ "width": 209.33335876464845,
+ "height": 304.0
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "a34da0802e87442eaf359e401ba5268b"
+ },
+ {
+ "m_Id": "8b4922699ee6451ba733201453de68a6"
+ },
+ {
+ "m_Id": "0ce508edff374df4bb032abe5f083cf1"
+ }
+ ],
+ "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.Texture2DInputMaterialSlot",
+ "m_ObjectId": "57cb21c7713343469a05eef5dde2da73",
+ "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",
+ "m_ObjectId": "5981590622dc4c7eb9d7eca93e62857f",
+ "m_Id": 1,
+ "m_DisplayName": "Out",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ },
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
+ "m_ObjectId": "5c4080b43fa645598a638526be476d15",
+ "m_Guid": {
+ "m_GuidSerialized": "32cac61f-148f-4535-a0a3-1b35df0ee783"
+ },
+ "m_Name": "ShadingMap",
+ "m_DefaultRefNameVersion": 1,
+ "m_RefNameGeneratedByDisplayName": "ShadingMap",
+ "m_DefaultReferenceName": "_ShadingMap",
+ "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.SaturateNode",
+ "m_ObjectId": "5caf44abf8c94193bae46a6c36c6bb87",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Saturate",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -162.66665649414063,
+ "y": 701.3333740234375,
+ "width": 129.3333740234375,
+ "height": 95.99993896484375
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "186bce80a20f46b7bd505213dbac4145"
+ },
+ {
+ "m_Id": "5981590622dc4c7eb9d7eca93e62857f"
+ }
+ ],
+ "synonyms": [
+ "clamp"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": false,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ }
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -395,26 +1204,89 @@
{
"m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
- "m_ObjectId": "6ea9aa166ed74644b3a8a23458367734",
- "m_Id": 0,
- "m_DisplayName": "Normal (Tangent Space)",
- "m_SlotType": 0,
+ "m_Type": "UnityEditor.ShaderGraph.NegateNode",
+ "m_ObjectId": "61e8c91a6b5d417f89dba58a5aaee6d8",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Negate",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -162.6666717529297,
+ "y": 557.3333129882813,
+ "width": 129.3334197998047,
+ "height": 96.0
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "063fb8e850264b3bba0c55df7440ba52"
+ },
+ {
+ "m_Id": "658f56a453034c4fa307a8e33389edf7"
+ }
+ ],
+ "synonyms": [
+ "invert",
+ "opposite"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": false,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "658f56a453034c4fa307a8e33389edf7",
+ "m_Id": 1,
+ "m_DisplayName": "Out",
+ "m_SlotType": 1,
"m_Hidden": false,
- "m_ShaderOutputName": "NormalTS",
- "m_StageCapability": 2,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
- "z": 0.0
+ "z": 0.0,
+ "w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
- "z": 0.0
+ "z": 0.0,
+ "w": 0.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "65f13b0e92a247fdb153ab9b99eb60ec",
+ "m_Id": 1,
+ "m_DisplayName": "B",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "B",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 1.0,
+ "y": 1.0,
+ "z": 1.0,
+ "w": 1.0
},
- "m_Labels": [],
- "m_Space": 3
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ }
}
{
@@ -429,10 +1301,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": -319.1457214355469,
- "y": 221.52105712890626,
- "width": 209.3333282470703,
- "height": 438.66668701171877
+ "x": -218.0,
+ "y": -57.33329391479492,
+ "width": 184.66665649414063,
+ "height": 254.66664123535157
}
},
"m_Slots": [
@@ -465,14 +1337,14 @@
"tex2d"
],
"m_Precision": 0,
- "m_PreviewExpanded": true,
+ "m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_TextureType": 0,
- "m_NormalMapSpace": 0,
+ "m_NormalMapSpace": 1,
"m_EnableGlobalMipBias": true,
"m_MipSamplingMode": 0
}
@@ -492,6 +1364,96 @@
"m_Labels": []
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode",
+ "m_ObjectId": "740353e06794457a882599bb4a70b703",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Sample Texture 2D",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -217.9999542236328,
+ "y": 261.3334045410156,
+ "width": 184.66668701171876,
+ "height": 254.66659545898438
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "c5d09826216940f08397fb95ec32fa71"
+ },
+ {
+ "m_Id": "7cef4486bdd34f3a89a63215444e9c84"
+ },
+ {
+ "m_Id": "d2dbb34462e7424a9c199463bb21bdd5"
+ },
+ {
+ "m_Id": "7961fc7e637341e89889fd0db0d24d91"
+ },
+ {
+ "m_Id": "93ea5f2c21fd4188bfc5c6489c0baf47"
+ },
+ {
+ "m_Id": "57cb21c7713343469a05eef5dde2da73"
+ },
+ {
+ "m_Id": "f968d08982784ea0bdea3db8ea689dd2"
+ },
+ {
+ "m_Id": "287d5f9bb8b7491ca4de9a9f289728dd"
+ }
+ ],
+ "synonyms": [
+ "tex2d"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": false,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ },
+ "m_TextureType": 0,
+ "m_NormalMapSpace": 1,
+ "m_EnableGlobalMipBias": true,
+ "m_MipSamplingMode": 0
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "7961fc7e637341e89889fd0db0d24d91",
+ "m_Id": 6,
+ "m_DisplayName": "B",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "B",
+ "m_StageCapability": 2,
+ "m_Value": 0.0,
+ "m_DefaultValue": 0.0,
+ "m_Labels": []
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "7cef4486bdd34f3a89a63215444e9c84",
+ "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.BlockNode",
@@ -532,8 +1494,20 @@
"m_ObjectId": "867e133e4da04154ac66a450c056f228",
"m_Name": "",
"m_ChildObjectList": [
+ {
+ "m_Id": "c6ae1333e8494c6292d560a6a0c1126e"
+ },
{
"m_Id": "4e79611254fb4f7ebaa9dc55ea52a427"
+ },
+ {
+ "m_Id": "41bfcf3cf6f24e0098346d3a59224d97"
+ },
+ {
+ "m_Id": "5c4080b43fa645598a638526be476d15"
+ },
+ {
+ "m_Id": "025d73c9fe2e47b3853bf9a00d126af4"
}
]
}
@@ -551,6 +1525,54 @@
"m_BareResource": false
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
+ "m_ObjectId": "8b4922699ee6451ba733201453de68a6",
+ "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.BlockNode",
@@ -587,46 +1609,66 @@
{
"m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.BlockNode",
- "m_ObjectId": "945c5856342a4d05a37a15c8fd76dd91",
- "m_Group": {
- "m_Id": ""
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "8f535cbbf2854293a08dec8d8aa7986e",
+ "m_Id": 3,
+ "m_DisplayName": "Out",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
},
- "m_Name": "SurfaceDescription.Smoothness",
- "m_DrawState": {
- "m_Expanded": true,
- "m_Position": {
- "serializedVersion": "2",
- "x": 0.0,
- "y": 0.0,
- "width": 0.0,
- "height": 0.0
- }
- },
- "m_Slots": [
- {
- "m_Id": "da4800c1d386405fb154caff690abd85"
- }
- ],
- "synonyms": [],
- "m_Precision": 0,
- "m_PreviewExpanded": true,
- "m_DismissedVersion": 0,
- "m_PreviewMode": 0,
- "m_CustomColors": {
- "m_SerializableColors": []
- },
- "m_SerializedDescriptor": "SurfaceDescription.Smoothness"
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0,
+ "w": 0.0
+ }
}
{
- "m_SGVersion": 2,
- "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget",
- "m_ObjectId": "97355bb871ae412c90915a1c95a39813",
- "m_WorkflowMode": 1,
- "m_NormalDropOffSpace": 0,
- "m_ClearCoat": false,
- "m_BlendModePreserveSpecular": true
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "93ea5f2c21fd4188bfc5c6489c0baf47",
+ "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.Vector4MaterialSlot",
+ "m_ObjectId": "9588546692ca4354acbdb16148b88365",
+ "m_Id": 0,
+ "m_DisplayName": "ShadingColor",
+ "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": []
}
{
@@ -654,40 +1696,6 @@
"m_Labels": []
}
-{
- "m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.BlockNode",
- "m_ObjectId": "978fb2b4d6a64b13baf4df534019c0ef",
- "m_Group": {
- "m_Id": ""
- },
- "m_Name": "SurfaceDescription.NormalTS",
- "m_DrawState": {
- "m_Expanded": true,
- "m_Position": {
- "serializedVersion": "2",
- "x": 0.0,
- "y": 0.0,
- "width": 0.0,
- "height": 0.0
- }
- },
- "m_Slots": [
- {
- "m_Id": "6ea9aa166ed74644b3a8a23458367734"
- }
- ],
- "synonyms": [],
- "m_Precision": 0,
- "m_PreviewExpanded": true,
- "m_DismissedVersion": 0,
- "m_PreviewMode": 0,
- "m_CustomColors": {
- "m_SerializableColors": []
- },
- "m_SerializedDescriptor": "SurfaceDescription.NormalTS"
-}
-
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -703,6 +1711,227 @@
"m_Labels": []
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.PropertyNode",
+ "m_ObjectId": "9e9053ae73f94d2f99ce33a60274938f",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Property",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -393.9999694824219,
+ "y": 225.33338928222657,
+ "width": 139.33331298828126,
+ "height": 35.99992370605469
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "9588546692ca4354acbdb16148b88365"
+ }
+ ],
+ "synonyms": [],
+ "m_Precision": 0,
+ "m_PreviewExpanded": true,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ },
+ "m_Property": {
+ "m_Id": "41bfcf3cf6f24e0098346d3a59224d97"
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
+ "m_ObjectId": "a2233950ab514a708c59193dc0931934",
+ "m_Id": 0,
+ "m_DisplayName": "Direction",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Direction",
+ "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.DynamicValueMaterialSlot",
+ "m_ObjectId": "a34da0802e87442eaf359e401ba5268b",
+ "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.MultiplyNode",
+ "m_ObjectId": "a62805bf0771413ba8c1e8f51ad17b54",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Multiply",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -12.000016212463379,
+ "y": -131.3333282470703,
+ "width": 209.33334350585938,
+ "height": 304.0
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "ec4dcc25a33a4887adbbbe8bf7ba2d83"
+ },
+ {
+ "m_Id": "0acaf0553f7946bfb5829bdc191aaed7"
+ },
+ {
+ "m_Id": "f4bbe10db634492a8b729d010310abe0"
+ }
+ ],
+ "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.MainLightDirectionNode",
+ "m_ObjectId": "aa688b600dbe46bfa78fda5e3d5fdd0b",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Main Light Direction",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -670.6666870117188,
+ "y": 691.333251953125,
+ "width": 161.33334350585938,
+ "height": 78.666748046875
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "a2233950ab514a708c59193dc0931934"
+ }
+ ],
+ "synonyms": [
+ "sun"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": true,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.PropertyNode",
+ "m_ObjectId": "b81474aeedbf4efa8c1bc90bb75c99a9",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Property",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -390.0,
+ "y": -93.33330535888672,
+ "width": 132.0,
+ "height": 36.0000114440918
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "fb9fb639830c4cf69bfd994cb2ed4c29"
+ }
+ ],
+ "synonyms": [],
+ "m_Precision": 0,
+ "m_PreviewExpanded": true,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ },
+ "m_Property": {
+ "m_Id": "c6ae1333e8494c6292d560a6a0c1126e"
+ }
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot",
@@ -729,40 +1958,25 @@
{
"m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
- "m_ObjectId": "bed0fcfe71ee4b1e85fb3d9d7ee1e4c1",
- "m_Id": 0,
- "m_DisplayName": "Metallic",
- "m_SlotType": 0,
- "m_Hidden": false,
- "m_ShaderOutputName": "Metallic",
- "m_StageCapability": 2,
- "m_Value": 0.0,
- "m_DefaultValue": 0.0,
- "m_Labels": []
-}
-
-{
- "m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.BlockNode",
- "m_ObjectId": "c043e21ac8d54fe3af1f367b6682ea76",
+ "m_Type": "UnityEditor.ShaderGraph.PropertyNode",
+ "m_ObjectId": "c0677ef2e2bf4d488e08da8a6f0fd932",
"m_Group": {
"m_Id": ""
},
- "m_Name": "SurfaceDescription.Occlusion",
+ "m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": 0.0,
- "y": 0.0,
- "width": 0.0,
- "height": 0.0
+ "x": -391.3332824707031,
+ "y": 289.3334045410156,
+ "width": 140.6666259765625,
+ "height": 36.0
}
},
"m_Slots": [
{
- "m_Id": "e0d5d67a35d246f4be028fa5a4c778bf"
+ "m_Id": "4bd73107ed5043a6a98b42284d491e6d"
}
],
"synonyms": [],
@@ -773,7 +1987,64 @@
"m_CustomColors": {
"m_SerializableColors": []
},
- "m_SerializedDescriptor": "SurfaceDescription.Occlusion"
+ "m_Property": {
+ "m_Id": "5c4080b43fa645598a638526be476d15"
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
+ "m_ObjectId": "c5d09826216940f08397fb95ec32fa71",
+ "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": 3,
+ "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty",
+ "m_ObjectId": "c6ae1333e8494c6292d560a6a0c1126e",
+ "m_Guid": {
+ "m_GuidSerialized": "e4a91be8-41b1-46a6-8fb3-cee571683ce1"
+ },
+ "m_Name": "BaseColor",
+ "m_DefaultRefNameVersion": 1,
+ "m_RefNameGeneratedByDisplayName": "BaseColor",
+ "m_DefaultReferenceName": "_BaseColor",
+ "m_OverrideReferenceName": "",
+ "m_GeneratePropertyBlock": true,
+ "m_UseCustomSlotLabel": false,
+ "m_CustomSlotLabel": "",
+ "m_DismissedVersion": 0,
+ "m_Precision": 0,
+ "overrideHLSLDeclaration": false,
+ "hlslDeclarationOverride": 0,
+ "m_Hidden": false,
+ "m_Value": {
+ "r": 1.0,
+ "g": 1.0,
+ "b": 1.0,
+ "a": 0.0
+ },
+ "isMainColor": false,
+ "m_ColorMode": 0
}
{
@@ -782,7 +2053,7 @@
"m_ObjectId": "cd04b2ec603c4ce98f51d924e2a512c2",
"m_Datas": [],
"m_ActiveSubTarget": {
- "m_Id": "97355bb871ae412c90915a1c95a39813"
+ "m_Id": "cd81c525151142c89a6af7f574fd628b"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 0,
@@ -798,6 +2069,27 @@
"m_SupportVFX": false
}
+{
+ "m_SGVersion": 2,
+ "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
+ "m_ObjectId": "cd81c525151142c89a6af7f574fd628b"
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "d2dbb34462e7424a9c199463bb21bdd5",
+ "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.Texture2DInputMaterialSlot",
@@ -818,32 +2110,38 @@
{
"m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
- "m_ObjectId": "da4800c1d386405fb154caff690abd85",
- "m_Id": 0,
- "m_DisplayName": "Smoothness",
- "m_SlotType": 0,
- "m_Hidden": false,
- "m_ShaderOutputName": "Smoothness",
- "m_StageCapability": 2,
- "m_Value": 0.5,
- "m_DefaultValue": 0.5,
- "m_Labels": []
-}
-
-{
- "m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
- "m_ObjectId": "e0d5d67a35d246f4be028fa5a4c778bf",
- "m_Id": 0,
- "m_DisplayName": "Ambient Occlusion",
- "m_SlotType": 0,
- "m_Hidden": false,
- "m_ShaderOutputName": "Occlusion",
- "m_StageCapability": 2,
- "m_Value": 1.0,
- "m_DefaultValue": 1.0,
- "m_Labels": []
+ "m_Type": "UnityEditor.ShaderGraph.NormalVectorNode",
+ "m_ObjectId": "e202f291b6294c1c980899f1ab2ca582",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Normal Vector",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": -718.6666870117188,
+ "y": 792.6666259765625,
+ "width": 209.33334350585938,
+ "height": 318.6666259765625
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "f1db522d48544626941467ff25d95e13"
+ }
+ ],
+ "synonyms": [
+ "surface direction"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": true,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 2,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ },
+ "m_Space": 2
}
{
@@ -880,6 +2178,52 @@
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.LerpNode",
+ "m_ObjectId": "e41f220e296b4cc2a9a3c1faf14d7d72",
+ "m_Group": {
+ "m_Id": ""
+ },
+ "m_Name": "Lerp",
+ "m_DrawState": {
+ "m_Expanded": true,
+ "m_Position": {
+ "serializedVersion": "2",
+ "x": 262.66668701171877,
+ "y": 95.3333740234375,
+ "width": 209.33328247070313,
+ "height": 327.99993896484377
+ }
+ },
+ "m_Slots": [
+ {
+ "m_Id": "f22a1522c3bb47bf8416a9fbb8262bb4"
+ },
+ {
+ "m_Id": "65f13b0e92a247fdb153ab9b99eb60ec"
+ },
+ {
+ "m_Id": "2cf27a4d36454c98b25d12c294e5bc6d"
+ },
+ {
+ "m_Id": "8f535cbbf2854293a08dec8d8aa7986e"
+ }
+ ],
+ "synonyms": [
+ "mix",
+ "blend",
+ "linear interpolate"
+ ],
+ "m_Precision": 0,
+ "m_PreviewExpanded": true,
+ "m_DismissedVersion": 0,
+ "m_PreviewMode": 0,
+ "m_CustomColors": {
+ "m_SerializableColors": []
+ }
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
@@ -904,36 +2248,112 @@
{
"m_SGVersion": 0,
- "m_Type": "UnityEditor.ShaderGraph.BlockNode",
- "m_ObjectId": "ef80aee428f942ea9ba07ca5ff70d8b7",
- "m_Group": {
- "m_Id": ""
+ "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
+ "m_ObjectId": "ec4dcc25a33a4887adbbbe8bf7ba2d83",
+ "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_Name": "SurfaceDescription.Emission",
- "m_DrawState": {
- "m_Expanded": true,
- "m_Position": {
- "serializedVersion": "2",
- "x": 0.0,
- "y": 0.0,
- "width": 0.0,
- "height": 0.0
- }
+ "m_DefaultValue": {
+ "e00": 1.0,
+ "e01": 0.0,
+ "e02": 0.0,
+ "e03": 0.0,
+ "e10": 0.0,
+ "e11": 1.0,
+ "e12": 0.0,
+ "e13": 0.0,
+ "e20": 0.0,
+ "e21": 0.0,
+ "e22": 1.0,
+ "e23": 0.0,
+ "e30": 0.0,
+ "e31": 0.0,
+ "e32": 0.0,
+ "e33": 1.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "ec6717fc07224569802ff5be80e915d7",
+ "m_Id": 3,
+ "m_DisplayName": "Out",
+ "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": "f1db522d48544626941467ff25d95e13",
+ "m_Id": 0,
+ "m_DisplayName": "Out",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 1.0
},
- "m_Slots": [
- {
- "m_Id": "019aac67658b4391a0fbbde2235300db"
- }
- ],
- "synonyms": [],
- "m_Precision": 0,
- "m_PreviewExpanded": true,
- "m_DismissedVersion": 0,
- "m_PreviewMode": 0,
- "m_CustomColors": {
- "m_SerializableColors": []
+ "m_DefaultValue": {
+ "x": 0.0,
+ "y": 0.0,
+ "z": 0.0
},
- "m_SerializedDescriptor": "SurfaceDescription.Emission"
+ "m_Labels": []
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
+ "m_ObjectId": "f22a1522c3bb47bf8416a9fbb8262bb4",
+ "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
+ }
}
{
@@ -960,6 +2380,69 @@
"m_Space": 0
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
+ "m_ObjectId": "f4bbe10db634492a8b729d010310abe0",
+ "m_Id": 2,
+ "m_DisplayName": "Out",
+ "m_SlotType": 1,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "Out",
+ "m_StageCapability": 3,
+ "m_Value": {
+ "e00": 0.0,
+ "e01": 0.0,
+ "e02": 0.0,
+ "e03": 0.0,
+ "e10": 0.0,
+ "e11": 0.0,
+ "e12": 0.0,
+ "e13": 0.0,
+ "e20": 0.0,
+ "e21": 0.0,
+ "e22": 0.0,
+ "e23": 0.0,
+ "e30": 0.0,
+ "e31": 0.0,
+ "e32": 0.0,
+ "e33": 0.0
+ },
+ "m_DefaultValue": {
+ "e00": 1.0,
+ "e01": 0.0,
+ "e02": 0.0,
+ "e03": 0.0,
+ "e10": 0.0,
+ "e11": 1.0,
+ "e12": 0.0,
+ "e13": 0.0,
+ "e20": 0.0,
+ "e21": 0.0,
+ "e22": 1.0,
+ "e23": 0.0,
+ "e30": 0.0,
+ "e31": 0.0,
+ "e32": 0.0,
+ "e33": 1.0
+ }
+}
+
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+ "m_ObjectId": "f55b8ae1b1c7406ca3a2b32d737adf05",
+ "m_Id": 1,
+ "m_DisplayName": "b",
+ "m_SlotType": 0,
+ "m_Hidden": false,
+ "m_ShaderOutputName": "b",
+ "m_StageCapability": 3,
+ "m_Value": 1.0,
+ "m_DefaultValue": 0.0,
+ "m_Labels": []
+}
+
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot",
@@ -973,3 +2456,50 @@
"m_BareResource": false
}
+{
+ "m_SGVersion": 0,
+ "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
+ "m_ObjectId": "f968d08982784ea0bdea3db8ea689dd2",
+ "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.Vector4MaterialSlot",
+ "m_ObjectId": "fb9fb639830c4cf69bfd994cb2ed4c29",
+ "m_Id": 0,
+ "m_DisplayName": "BaseColor",
+ "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": []
+}
+
diff --git a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrSubGraph.shadersubgraph b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrSubGraph.shadersubgraph
index 10d440638..06a421e45 100644
--- a/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrSubGraph.shadersubgraph
+++ b/Assets/VRM10_Samples/VRM10Viewer/Assets/TinyPbrSubGraph.shadersubgraph
@@ -2554,10 +2554,10 @@
"m_Expanded": false,
"m_Position": {
"serializedVersion": "2",
- "x": -14.666682243347168,
- "y": 77.33332824707031,
- "width": 157.33334350585938,
- "height": 158.66665649414063
+ "x": -60.00007629394531,
+ "y": 77.33324432373047,
+ "width": 157.3333282470703,
+ "height": 157.33343505859376
}
},
"m_Slots": [
@@ -3029,10 +3029,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": 536.0,
- "y": -22.00001335144043,
- "width": 149.33331298828126,
- "height": 198.66668701171876
+ "x": 660.666748046875,
+ "y": 2.000000238418579,
+ "width": 149.3331298828125,
+ "height": 222.66671752929688
}
},
"m_Slots": [
@@ -3244,10 +3244,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": 231.33331298828126,
- "y": 17.333377838134767,
- "width": 127.33328247070313,
- "height": 119.99998474121094
+ "x": 125.33326721191406,
+ "y": -38.66671371459961,
+ "width": 209.33335876464845,
+ "height": 303.9999694824219
}
},
"m_Slots": [
@@ -3267,7 +3267,7 @@
"x"
],
"m_Precision": 0,
- "m_PreviewExpanded": false,
+ "m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
@@ -3741,10 +3741,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
- "x": 227.33331298828126,
- "y": -282.0,
- "width": 131.33334350585938,
- "height": 119.99998474121094
+ "x": 253.9999237060547,
+ "y": -385.9999694824219,
+ "width": 209.33335876464845,
+ "height": 303.9999694824219
}
},
"m_Slots": [
@@ -3764,7 +3764,7 @@
"x"
],
"m_Precision": 0,
- "m_PreviewExpanded": false,
+ "m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
diff --git a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs
index 4df95163d..d74440732 100644
--- a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs
+++ b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialContext.cs
@@ -1,3 +1,4 @@
+using System.Dynamic;
using UnityEngine;
namespace UniVRM10.VRM10Viewer
@@ -17,21 +18,11 @@ namespace UniVRM10.VRM10Viewer
/// When using shadergraph, require "Set as Main Texture"
///
private static readonly int BaseMapProp = Shader.PropertyToID("_BaseMap");
- ///
- /// float = 1.0
- ///
- private static readonly int OcclusionStrengthProp = Shader.PropertyToID("_OcclusionStrength");
- ///
- /// Texture2D.Red = 1.0.
- ///
- private static readonly int OcclusionMapProp = Shader.PropertyToID("_OcclusionMap");
- private static readonly int RoughnessProp = Shader.PropertyToID("_Roughness");
- private static readonly int MetallicProp = Shader.PropertyToID("_Metallic");
- ///
- /// Texture2D.Green = 1.0. The roughness
- /// Texture2D.Blue = 1.0. The metalness
- ///
- private static readonly int MetallicRoughnessMapProp = Shader.PropertyToID("_MetallicRoughnessMap");
+
+ private static readonly int ShadingColorFactorProp = Shader.PropertyToID("_ShadingColor");
+ private static readonly int ShadingMapProp = Shader.PropertyToID("_ShadingMap");
+ private static readonly int ShadingToonyFactorProp = Shader.PropertyToID("_ShadingToonyFactor");
+
///
/// float = 1.0
///
@@ -40,6 +31,7 @@ namespace UniVRM10.VRM10Viewer
/// Texture2D = [0, 0, 1.0]
///
private static readonly int BumpMapProp = Shader.PropertyToID("_BumpMap");
+
///
/// Color = black
///
@@ -48,6 +40,7 @@ namespace UniVRM10.VRM10Viewer
/// Texture2D = black
///
private static readonly int EmissionMapProp = Shader.PropertyToID("_EmissionMap");
+
///
/// boolean keyword
///
@@ -84,34 +77,20 @@ namespace UniVRM10.VRM10Viewer
set => Material.SetTextureScale(BaseMapProp, value);
}
- public float OcclusionStrength
+ public Color ShadingColorFactorSrgb
{
- get => Material.GetFloat(OcclusionStrengthProp);
- set => Material.SetFloat(OcclusionStrengthProp, value);
+ get => Material.GetColor(ShadingColorFactorProp);
+ set => Material.SetColor(ShadingColorFactorProp, value);
}
- public Texture OcclusionTexture
+ public Texture ShadingTexture
{
- get => Material.GetTexture(OcclusionMapProp);
- set
- {
- Material.SetTexture(OcclusionMapProp, value);
- }
+ get => Material.GetTexture(ShadingMapProp);
+ set => Material.SetTexture(ShadingMapProp, value);
}
-
- public float Roughness
+ public float ShadingToonyFactor
{
- get => Material.GetFloat(RoughnessProp);
- set => Material.SetFloat(RoughnessProp, value);
- }
- public float Metallic
- {
- get => Material.GetFloat(MetallicProp);
- set => Material.SetFloat(MetallicProp, value);
- }
- public Texture MetallicRoughnessMap
- {
- get => Material.GetTexture(MetallicRoughnessMapProp);
- set => Material.SetTexture(MetallicRoughnessMapProp, value);
+ get => Material.GetFloat(ShadingToonyFactorProp);
+ set => Material.SetFloat(ShadingToonyFactorProp, value);
}
public float BumpScale
diff --git a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs
index 9da754da7..5801562d8 100644
--- a/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs
+++ b/Assets/VRM10_Samples/VRM10Viewer/TinyMToonMaterialImporter.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UniGLTF;
+using UniGLTF.Extensions.VRMC_materials_mtoon;
using UnityEngine;
namespace UniVRM10.VRM10Viewer
@@ -43,15 +44,15 @@ namespace UniVRM10.VRM10Viewer
);
return true;
- Task AsyncAction(Material x, GetTextureAsyncFunc y, IAwaitCaller z) => GenerateMaterialAsync(data, src, x, y, z);
+ Task AsyncAction(Material x, GetTextureAsyncFunc y, IAwaitCaller z) => GenerateMaterialAsync(data, src, mtoon, x, y, z);
}
- public static async Task GenerateMaterialAsync(GltfData data, glTFMaterial src, Material dst, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller)
+ public static async Task GenerateMaterialAsync(GltfData data, glTFMaterial src, VRMC_materials_mtoon mtoon, Material dst, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller)
{
var context = new TinyMToonMaterialContext(dst);
// ImportSurfaceSettings(src, context);
- await ImportBaseColorAsync(data, src, context, getTextureAsync, awaitCaller);
+ 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);
@@ -60,7 +61,7 @@ namespace UniVRM10.VRM10Viewer
// context.Validate();
}
- public static async Task ImportBaseColorAsync(GltfData data, glTFMaterial src, TinyMToonMaterialContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller)
+ public static async Task ImportBaseShadeColorAsync(GltfData data, glTFMaterial src, VRMC_materials_mtoon mtoon, TinyMToonMaterialContext context, GetTextureAsyncFunc getTextureAsync, IAwaitCaller awaitCaller)
{
var baseColorFactor = GltfMaterialImportUtils.ImportLinearBaseColorFactor(data, src);
if (baseColorFactor.HasValue)
@@ -77,6 +78,17 @@ namespace UniVRM10.VRM10Viewer
context.BaseTextureScale = desc.Scale;
}
}
+
+ context.ShadingToonyFactor = 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 } })
+ {
+ if (Vrm10MToonTextureImporter.TryGetShadeMultiplyTexture(data, mtoon, out var _, out var desc))
+ {
+ context.ShadingTexture = await getTextureAsync(desc, awaitCaller);
+ }
+ }
}
}
}
\ No newline at end of file