From a221bd3e6d12a14be42949e706afed86c9e6052e Mon Sep 17 00:00:00 2001 From: Nithin Pranesh Date: Tue, 29 Nov 2022 17:58:24 -0500 Subject: [PATCH 1/3] fix metallic-roughness default behavior + honor gltf sampler info --- Runtime/ConfigureReinterop.cs | 4 + .../CesiumDefaultTilesetShader.shadergraph | 907 +++++++++++++----- Runtime/Resources/green1x1.png | Bin 0 -> 119 bytes Runtime/Resources/green1x1.png.meta | 123 +++ native~/Runtime/src/TextureLoader.cpp | 68 +- 5 files changed, 871 insertions(+), 231 deletions(-) create mode 100644 Runtime/Resources/green1x1.png create mode 100644 Runtime/Resources/green1x1.png.meta diff --git a/Runtime/ConfigureReinterop.cs b/Runtime/ConfigureReinterop.cs index 27ad59da..994b4e29 100644 --- a/Runtime/ConfigureReinterop.cs +++ b/Runtime/ConfigureReinterop.cs @@ -111,6 +111,10 @@ public void ExposeToCPP() texture2D.anisoLevel = 16; texture2D.filterMode = FilterMode.Trilinear; Texture texture = texture2D; + texture.wrapModeU = texture.wrapModeU; + texture.wrapModeV = texture.wrapModeV; + texture.wrapModeW = texture.wrapModeW; + Mesh mesh = new Mesh(); Mesh[] meshes = new[] { mesh }; diff --git a/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph b/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph index 38b9cb21..d9bc1cca 100644 --- a/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph +++ b/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph @@ -259,9 +259,6 @@ { "m_Id": "a12d0d898b784c958defc876f5b07e2b" }, - { - "m_Id": "22d1eac146ff46588001e95c25f2ba18" - }, { "m_Id": "b3edf110ead247948bb4294d4906f256" }, @@ -279,6 +276,21 @@ }, { "m_Id": "6727f80e1d1a49f19c57395b11d83c5c" + }, + { + "m_Id": "7b384b57bd2c40d3aa6805f6854dfa36" + }, + { + "m_Id": "f73bc29b661b411186500cfde09a2029" + }, + { + "m_Id": "f0ef1b3c0ab8492f8b78cc96044fc413" + }, + { + "m_Id": "da59a11ca7764d999c96a1a33676faca" + }, + { + "m_Id": "3420016393a14650b9fb2fb7aa691593" } ], "m_GroupDatas": [], @@ -432,43 +444,43 @@ { "m_OutputSlot": { "m_Node": { - "m_Id": "22d1eac146ff46588001e95c25f2ba18" + "m_Id": "24d7fe51ce454aefbad9d42c94607413" }, - "m_SlotId": 2 + "m_SlotId": 0 }, "m_InputSlot": { "m_Node": { - "m_Id": "07976c0531e14e7cbefae5a0472fcc64" + "m_Id": "928032a32993416daabe6e0215937f7f" }, - "m_SlotId": 0 + "m_SlotId": -1177420189 } }, { "m_OutputSlot": { "m_Node": { - "m_Id": "24d7fe51ce454aefbad9d42c94607413" + "m_Id": "308f8c0756f043fc94809907e712b64c" }, - "m_SlotId": 0 + "m_SlotId": 4 }, "m_InputSlot": { "m_Node": { - "m_Id": "928032a32993416daabe6e0215937f7f" + "m_Id": "2eacb23513544fc097cb3007f3134d97" }, - "m_SlotId": -1177420189 + "m_SlotId": 0 } }, { "m_OutputSlot": { "m_Node": { - "m_Id": "308f8c0756f043fc94809907e712b64c" + "m_Id": "3420016393a14650b9fb2fb7aa691593" }, - "m_SlotId": 4 + "m_SlotId": 0 }, "m_InputSlot": { "m_Node": { - "m_Id": "2eacb23513544fc097cb3007f3134d97" + "m_Id": "f0ef1b3c0ab8492f8b78cc96044fc413" }, - "m_SlotId": 0 + "m_SlotId": 1 } }, { @@ -480,7 +492,7 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "22d1eac146ff46588001e95c25f2ba18" + "m_Id": "f0ef1b3c0ab8492f8b78cc96044fc413" }, "m_SlotId": 0 } @@ -760,9 +772,9 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "22d1eac146ff46588001e95c25f2ba18" + "m_Id": "da59a11ca7764d999c96a1a33676faca" }, - "m_SlotId": 1 + "m_SlotId": 0 } }, { @@ -905,6 +917,34 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "da59a11ca7764d999c96a1a33676faca" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3420016393a14650b9fb2fb7aa691593" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "da59a11ca7764d999c96a1a33676faca" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3420016393a14650b9fb2fb7aa691593" + }, + "m_SlotId": 2 + } + }, { "m_OutputSlot": { "m_Node": { @@ -989,6 +1029,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f0ef1b3c0ab8492f8b78cc96044fc413" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "07976c0531e14e7cbefae5a0472fcc64" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -1064,6 +1118,12 @@ }, { "m_Id": "6727f80e1d1a49f19c57395b11d83c5c" + }, + { + "m_Id": "7b384b57bd2c40d3aa6805f6854dfa36" + }, + { + "m_Id": "f73bc29b661b411186500cfde09a2029" } ] }, @@ -1090,6 +1150,23 @@ ] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0038617ff7fe448d9419739e76e166ed", + "m_Id": 2, + "m_DisplayName": "Y", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Y", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "Y" + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -1138,9 +1215,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -165.0, - "y": 1175.0, - "width": 119.00006103515625, + "x": -188.0, + "y": 1189.0, + "width": 120.0, "height": 149.0 } }, @@ -1172,6 +1249,54 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "09395c160a4d4571bb73655ef78c241b", + "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", @@ -1207,6 +1332,54 @@ "m_SupportVFX": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "0b229f3ddf964a4283b4a5298a1f79a3", + "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.Rendering.HighDefinition.ShaderGraph.BuiltinData", @@ -1578,8 +1751,8 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -1680.0, - "y": 1185.0, + "x": -1681.0, + "y": 1186.0, "width": 222.0, "height": 34.0 } @@ -1739,6 +1912,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1f70519c50fe42a9a3710d995667ddb7", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", @@ -1870,48 +2058,6 @@ "m_Labels": [] } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", - "m_ObjectId": "22d1eac146ff46588001e95c25f2ba18", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Multiply", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -884.0, - "y": 1152.0, - "width": 130.00006103515626, - "height": 118.0 - } - }, - "m_Slots": [ - { - "m_Id": "ad8fa2c3472d4d10917ae72b62bb8fe2" - }, - { - "m_Id": "e6f893651d01496ba0a37335ab36dcd2" - }, - { - "m_Id": "90c8cb7542994c26ae135e4eaeabea16" - } - ], - "synonyms": [ - "multiplication", - "times", - "x" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -2125,6 +2271,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2bfd5259e21c4a59a468ff9cf72fca5c", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -2306,12 +2467,67 @@ { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", - "m_ObjectId": "34d4bba9f1364d3dbe1600b79fd9437a", - "m_Id": 3, - "m_DisplayName": "Sampler", - "m_SlotType": 0, - "m_Hidden": false, + "m_Type": "UnityEditor.ShaderGraph.Vector4Node", + "m_ObjectId": "3420016393a14650b9fb2fb7aa691593", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Vector 4", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -743.0, + "y": 1276.0, + "width": 131.0, + "height": 149.0 + } + }, + "m_Slots": [ + { + "m_Id": "e4227bae82b04382b803a3a8dd71f2ae" + }, + { + "m_Id": "0038617ff7fe448d9419739e76e166ed" + }, + { + "m_Id": "fc349130c7e747a49df6548bd1dbc947" + }, + { + "m_Id": "fada3473dffe461c811d3ebbffbb78e7" + }, + { + "m_Id": "de3823f4dda041ecb5cc9e141e59ab06" + } + ], + "synonyms": [ + "4", + "v4", + "vec4", + "float4" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "34d4bba9f1364d3dbe1600b79fd9437a", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, "m_ShaderOutputName": "Sampler", "m_StageCapability": 3, "m_BareResource": false @@ -4001,6 +4217,39 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "7b384b57bd2c40d3aa6805f6854dfa36", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Specular", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "80faa26a50c04b86bf21bc1b264e179e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Specular" +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.SubGraphNode", @@ -4137,6 +4386,36 @@ "m_ObjectId": "7f4ab31fab4c4490947809c917642bc5" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "80faa26a50c04b86bf21bc1b264e179e", + "m_Id": 0, + "m_DisplayName": "Specular Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Specular", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -4618,6 +4897,30 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8cf5ad8fdd9b472697c3f241570fcadf", + "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", @@ -4725,54 +5028,6 @@ } } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "90c8cb7542994c26ae135e4eaeabea16", - "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.SubGraphNode", @@ -5176,9 +5431,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -1129.0, - "y": 1315.0, - "width": 208.00006103515626, + "x": -1175.0, + "y": 1388.0, + "width": 208.0, "height": 34.0 } }, @@ -5501,7 +5756,7 @@ "hlslDeclarationOverride": 0, "m_Hidden": false, "m_Value": { - "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"ce97cc92c5d962f4585b2ac5527d723e\",\"type\":3}}", "m_Guid": "" }, "isMainTexture": false, @@ -5673,54 +5928,6 @@ "m_DropdownSelectedEntries": [] } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "ad8fa2c3472d4d10917ae72b62bb8fe2", - "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", @@ -6356,6 +6563,36 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c77cc4bf636d4257b0dfdcc35b3e0523", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c81de391fccc42e3abc5eeb907ef94f9", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitData", @@ -6731,17 +6968,111 @@ { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", - "m_ObjectId": "db19d6e4201b463099b1a89f4c735f8e", - "m_Id": 0, - "m_DisplayName": "occlusionTexture", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_BareResource": false -} - + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "da59a11ca7764d999c96a1a33676faca", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -965.0, + "y": 1271.0, + "width": 119.0, + "height": 149.0 + } + }, + "m_Slots": [ + { + "m_Id": "8cf5ad8fdd9b472697c3f241570fcadf" + }, + { + "m_Id": "c81de391fccc42e3abc5eeb907ef94f9" + }, + { + "m_Id": "dd9c3d45333e42869ff2191f3edfbdec" + }, + { + "m_Id": "1f70519c50fe42a9a3710d995667ddb7" + }, + { + "m_Id": "2bfd5259e21c4a59a468ff9cf72fca5c" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "db19d6e4201b463099b1a89f4c735f8e", + "m_Id": 0, + "m_DisplayName": "occlusionTexture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "db2923fe7a854b79a90b3e74fb221676", + "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", @@ -6850,6 +7181,46 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "dd9c3d45333e42869ff2191f3edfbdec", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "de3823f4dda041ecb5cc9e141e59ab06", + "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": 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.Texture2DInputMaterialSlot", @@ -6960,6 +7331,21 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e4227bae82b04382b803a3a8dd71f2ae", + "m_Id": 1, + "m_DisplayName": "X", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "X", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.OneMinusNode", @@ -7067,54 +7453,6 @@ } } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "e6f893651d01496ba0a37335ab36dcd2", - "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", @@ -7321,6 +7659,48 @@ "m_ClearCoat": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "f0ef1b3c0ab8492f8b78cc96044fc413", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -583.0, + "y": 1186.0, + "width": 208.0, + "height": 302.0 + } + }, + "m_Slots": [ + { + "m_Id": "db2923fe7a854b79a90b3e74fb221676" + }, + { + "m_Id": "09395c160a4d4571bb73655ef78c241b" + }, + { + "m_Id": "0b229f3ddf964a4283b4a5298a1f79a3" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -7455,6 +7835,39 @@ "m_ColorMode": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f73bc29b661b411186500cfde09a2029", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.AlphaClipThreshold", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c77cc4bf636d4257b0dfdcc35b3e0523" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", @@ -7516,6 +7929,23 @@ "m_DefaultType": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "fada3473dffe461c811d3ebbffbb78e7", + "m_Id": 4, + "m_DisplayName": "W", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "W", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "W" + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", @@ -7544,6 +7974,23 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "fc349130c7e747a49df6548bd1dbc947", + "m_Id": 3, + "m_DisplayName": "Z", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Z", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "Z" + ] +} + { "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", diff --git a/Runtime/Resources/green1x1.png b/Runtime/Resources/green1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..28bbabd473eb41880456dfed4cee58b7bb272f7f GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2s6ii6yp7}lMWc?smOq&xaLGB9lH z=l+w(3gmMZctjR6FvzxpFk}DIkEuXG9#0p?5Q*^QgdgV_7?_wC87^LSa{-Doc)I$z JtaD0e0syvP8^r(s literal 0 HcmV?d00001 diff --git a/Runtime/Resources/green1x1.png.meta b/Runtime/Resources/green1x1.png.meta new file mode 100644 index 00000000..5d8886bb --- /dev/null +++ b/Runtime/Resources/green1x1.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: ce97cc92c5d962f4585b2ac5527d723e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/native~/Runtime/src/TextureLoader.cpp b/native~/Runtime/src/TextureLoader.cpp index 0d68ea1d..c22856c2 100644 --- a/native~/Runtime/src/TextureLoader.cpp +++ b/native~/Runtime/src/TextureLoader.cpp @@ -1,12 +1,15 @@ #include "TextureLoader.h" #include +#include #include #include #include #include #include +#include +#include #include @@ -60,7 +63,70 @@ UnityEngine::Texture TextureLoader::loadTexture( } const ImageCesium& imageCesium = pImage->cesium; - return loadTexture(imageCesium); + UnityEngine::Texture unityTexture = loadTexture(imageCesium); + + const Sampler* pSampler = Model::getSafe(&model.samplers, texture.sampler); + if (pSampler) { + switch (pSampler->wrapS) { + case CesiumGltf::Sampler::WrapS::MIRRORED_REPEAT: + unityTexture.wrapModeU(UnityEngine::TextureWrapMode::Mirror); + break; + case CesiumGltf::Sampler::WrapS::REPEAT: + unityTexture.wrapModeU(UnityEngine::TextureWrapMode::Repeat); + break; + // case CesiumGltf::Sampler::WrapS::CLAMP_TO_EDGE: + default: + unityTexture.wrapModeU(UnityEngine::TextureWrapMode::Clamp); + } + + switch (pSampler->wrapT) { + case CesiumGltf::Sampler::WrapT::MIRRORED_REPEAT: + unityTexture.wrapModeV(UnityEngine::TextureWrapMode::Mirror); + break; + case CesiumGltf::Sampler::WrapT::REPEAT: + unityTexture.wrapModeV(UnityEngine::TextureWrapMode::Repeat); + break; + // case CesiumGltf::Sampler::WrapT::CLAMP_TO_EDGE: + default: + unityTexture.wrapModeV(UnityEngine::TextureWrapMode::Clamp); + } + + if (!pSampler->minFilter) { + if (pSampler->magFilter && + *pSampler->magFilter == Sampler::MagFilter::NEAREST) { + unityTexture.filterMode(UnityEngine::FilterMode::Point); + } else { + unityTexture.filterMode(UnityEngine::FilterMode::Bilinear); + } + } else { + switch (*pSampler->minFilter) { + case Sampler::MinFilter::NEAREST: + case Sampler::MinFilter::NEAREST_MIPMAP_NEAREST: + unityTexture.filterMode(UnityEngine::FilterMode::Point); + break; + case Sampler::MinFilter::LINEAR: + case Sampler::MinFilter::LINEAR_MIPMAP_NEAREST: + unityTexture.filterMode(UnityEngine::FilterMode::Bilinear); + break; + // case Sampler::MinFilter::LINEAR_MIPMAP_LINEAR: + // case Sampler::MinFilter::NEAREST_MIPMAP_LINEAR: + default: + unityTexture.filterMode(UnityEngine::FilterMode::Trilinear); + } + } + + // Use anisotropic filtering if we have mipmaps. + switch (pSampler->minFilter.value_or( + CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_LINEAR)) { + case CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_LINEAR: + case CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_NEAREST: + case CesiumGltf::Sampler::MinFilter::NEAREST_MIPMAP_LINEAR: + case CesiumGltf::Sampler::MinFilter::NEAREST_MIPMAP_NEAREST: + unityTexture.anisoLevel(16); + } + } + + return unityTexture; } } // namespace CesiumForUnityNative From a1581f1a26fe700d8deceb3e02a09ac4e785b9ee Mon Sep 17 00:00:00 2001 From: Nithin Pranesh Date: Tue, 29 Nov 2022 19:24:44 -0500 Subject: [PATCH 2/3] format --- native~/Runtime/src/TextureLoader.cpp | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/native~/Runtime/src/TextureLoader.cpp b/native~/Runtime/src/TextureLoader.cpp index c22856c2..7f17a3ca 100644 --- a/native~/Runtime/src/TextureLoader.cpp +++ b/native~/Runtime/src/TextureLoader.cpp @@ -5,11 +5,11 @@ #include #include +#include #include #include #include #include -#include #include @@ -64,7 +64,7 @@ UnityEngine::Texture TextureLoader::loadTexture( const ImageCesium& imageCesium = pImage->cesium; UnityEngine::Texture unityTexture = loadTexture(imageCesium); - + const Sampler* pSampler = Model::getSafe(&model.samplers, texture.sampler); if (pSampler) { switch (pSampler->wrapS) { @@ -92,7 +92,7 @@ UnityEngine::Texture TextureLoader::loadTexture( } if (!pSampler->minFilter) { - if (pSampler->magFilter && + if (pSampler->magFilter && *pSampler->magFilter == Sampler::MagFilter::NEAREST) { unityTexture.filterMode(UnityEngine::FilterMode::Point); } else { @@ -100,22 +100,22 @@ UnityEngine::Texture TextureLoader::loadTexture( } } else { switch (*pSampler->minFilter) { - case Sampler::MinFilter::NEAREST: - case Sampler::MinFilter::NEAREST_MIPMAP_NEAREST: - unityTexture.filterMode(UnityEngine::FilterMode::Point); - break; - case Sampler::MinFilter::LINEAR: - case Sampler::MinFilter::LINEAR_MIPMAP_NEAREST: - unityTexture.filterMode(UnityEngine::FilterMode::Bilinear); - break; - // case Sampler::MinFilter::LINEAR_MIPMAP_LINEAR: - // case Sampler::MinFilter::NEAREST_MIPMAP_LINEAR: - default: - unityTexture.filterMode(UnityEngine::FilterMode::Trilinear); + case Sampler::MinFilter::NEAREST: + case Sampler::MinFilter::NEAREST_MIPMAP_NEAREST: + unityTexture.filterMode(UnityEngine::FilterMode::Point); + break; + case Sampler::MinFilter::LINEAR: + case Sampler::MinFilter::LINEAR_MIPMAP_NEAREST: + unityTexture.filterMode(UnityEngine::FilterMode::Bilinear); + break; + // case Sampler::MinFilter::LINEAR_MIPMAP_LINEAR: + // case Sampler::MinFilter::NEAREST_MIPMAP_LINEAR: + default: + unityTexture.filterMode(UnityEngine::FilterMode::Trilinear); } } - // Use anisotropic filtering if we have mipmaps. + // Use anisotropic filtering if we have mipmaps. switch (pSampler->minFilter.value_or( CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_LINEAR)) { case CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_LINEAR: From 77498f90352aab638a47b3fde00091c73ee945e6 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 30 Nov 2022 12:23:35 +1100 Subject: [PATCH 3/3] Remove unused shader keywords. --- .../CesiumDefaultTilesetShader.shadergraph | 204 +----------------- 1 file changed, 1 insertion(+), 203 deletions(-) diff --git a/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph b/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph index d9bc1cca..bfe53a84 100644 --- a/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph +++ b/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph @@ -76,26 +76,7 @@ "m_Id": "7de6510c684046cb8ace0a0049c1c2f7" } ], - "m_Keywords": [ - { - "m_Id": "1679e449a79d4f5f98573c53b0ae98c9" - }, - { - "m_Id": "a6adc6e16aa34416b597e61664c4ffd2" - }, - { - "m_Id": "d2dbe1ce118e432488d1d42c773c4e8e" - }, - { - "m_Id": "7c44c52a3cb24724a8d3753aebb093c4" - }, - { - "m_Id": "fe8b62e4ea9642b5a2c78827e83b3f75" - }, - { - "m_Id": "938d30cd4a84481e9b0f2135fc5237bd" - } - ], + "m_Keywords": [], "m_Dropdowns": [], "m_CategoryData": [ { @@ -1700,30 +1681,6 @@ } } -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", - "m_ObjectId": "1679e449a79d4f5f98573c53b0ae98c9", - "m_Guid": { - "m_GuidSerialized": "8688f38a-2340-4a8c-b693-808700a86b8d" - }, - "m_Name": "HASBASECOLOR", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "HASBASECOLOR", - "m_DefaultReferenceName": "_HASBASECOLOR", - "m_OverrideReferenceName": "_HASBASECOLOR_ON", - "m_GeneratePropertyBlock": false, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_KeywordType": 0, - "m_KeywordDefinition": 0, - "m_KeywordScope": 0, - "m_KeywordStages": 63, - "m_Entries": [], - "m_Value": 0, - "m_IsEditable": true -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -3849,9 +3806,6 @@ { "m_Id": "6f7975d05f0e490c85685da73a7d1657" }, - { - "m_Id": "1679e449a79d4f5f98573c53b0ae98c9" - }, { "m_Id": "598ab387339a4cce8002387e6c00e3f9" }, @@ -3861,27 +3815,18 @@ { "m_Id": "a8b280220caf41ffbb8b087ac44a23ed" }, - { - "m_Id": "a6adc6e16aa34416b597e61664c4ffd2" - }, { "m_Id": "bfc65ac9b9c54affac3f90f53d623591" }, { "m_Id": "cc08e4ccb6ff4e449415b92130856196" }, - { - "m_Id": "d2dbe1ce118e432488d1d42c773c4e8e" - }, { "m_Id": "4e0650c964aa42ea98069648953d928d" }, { "m_Id": "965bf93aed2947908ec82cf30287ea9d" }, - { - "m_Id": "7c44c52a3cb24724a8d3753aebb093c4" - }, { "m_Id": "aa996c40f4d44a7fa509717977b8c9ff" }, @@ -3891,12 +3836,6 @@ { "m_Id": "5a121aaee7a340748e40ddcaf811d129" }, - { - "m_Id": "fe8b62e4ea9642b5a2c78827e83b3f75" - }, - { - "m_Id": "938d30cd4a84481e9b0f2135fc5237bd" - }, { "m_Id": "e3bbd79339e64d009e31960a31e3ff05" }, @@ -4294,30 +4233,6 @@ "m_DropdownSelectedEntries": [] } -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", - "m_ObjectId": "7c44c52a3cb24724a8d3753aebb093c4", - "m_Guid": { - "m_GuidSerialized": "073198e0-f5d0-4bda-81d9-c38072392250" - }, - "m_Name": "HASNORMALMAP", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "HASNORMALMAP", - "m_DefaultReferenceName": "_HASNORMALMAP", - "m_OverrideReferenceName": "_HASNORMALMAP_ON", - "m_GeneratePropertyBlock": false, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_KeywordType": 0, - "m_KeywordDefinition": 0, - "m_KeywordScope": 0, - "m_KeywordStages": 63, - "m_Entries": [], - "m_Value": 0, - "m_IsEditable": true -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -5112,51 +5027,6 @@ "m_Labels": [] } -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", - "m_ObjectId": "938d30cd4a84481e9b0f2135fc5237bd", - "m_Guid": { - "m_GuidSerialized": "97432230-ed68-4a25-a845-78395efa3fb8" - }, - "m_Name": "OVERLAYCOUNT", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "OVERLAYCOUNT", - "m_DefaultReferenceName": "_OVERLAYCOUNT", - "m_OverrideReferenceName": "", - "m_GeneratePropertyBlock": false, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_KeywordType": 1, - "m_KeywordDefinition": 0, - "m_KeywordScope": 0, - "m_KeywordStages": 63, - "m_Entries": [ - { - "id": 4, - "displayName": "NONE", - "referenceName": "NONE" - }, - { - "id": 2, - "displayName": "ONE", - "referenceName": "ONE" - }, - { - "id": 3, - "displayName": "TWO", - "referenceName": "TWO" - }, - { - "id": 5, - "displayName": "THREE", - "referenceName": "THREE" - } - ], - "m_Value": 0, - "m_IsEditable": true -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", @@ -5577,30 +5447,6 @@ "m_Labels": [] } -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", - "m_ObjectId": "a6adc6e16aa34416b597e61664c4ffd2", - "m_Guid": { - "m_GuidSerialized": "85f17a4f-bebe-41e9-b6e9-25e763fd9fa6" - }, - "m_Name": "HASMETALLICROUGHNESS", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "HASMETALLICROUGHNESS", - "m_DefaultReferenceName": "_HASMETALLICROUGHNESS", - "m_OverrideReferenceName": "_HASMETALLICROUGHNESS_ON", - "m_GeneratePropertyBlock": false, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_KeywordType": 0, - "m_KeywordDefinition": 0, - "m_KeywordScope": 0, - "m_KeywordStages": 63, - "m_Entries": [], - "m_Value": 0, - "m_IsEditable": true -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -6781,30 +6627,6 @@ } } -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", - "m_ObjectId": "d2dbe1ce118e432488d1d42c773c4e8e", - "m_Guid": { - "m_GuidSerialized": "8635e7cf-d9cc-40ec-828f-50d938335117" - }, - "m_Name": "HASOCCLUSION", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "HASOCCLUSION", - "m_DefaultReferenceName": "_HASOCCLUSION", - "m_OverrideReferenceName": "_HASOCCLUSION_ON", - "m_GeneratePropertyBlock": false, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_KeywordType": 0, - "m_KeywordDefinition": 0, - "m_KeywordScope": 0, - "m_KeywordStages": 63, - "m_Entries": [], - "m_Value": 0, - "m_IsEditable": true -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", @@ -7991,30 +7813,6 @@ ] } -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", - "m_ObjectId": "fe8b62e4ea9642b5a2c78827e83b3f75", - "m_Guid": { - "m_GuidSerialized": "27432a4c-19b5-4a6e-8073-868a8c5b2ad2" - }, - "m_Name": "HASEMISSIVE", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "HASEMISSIVE", - "m_DefaultReferenceName": "_HASEMISSIVE", - "m_OverrideReferenceName": "_HASEMISSIVE_ON", - "m_GeneratePropertyBlock": false, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_KeywordType": 0, - "m_KeywordDefinition": 0, - "m_KeywordScope": 0, - "m_KeywordStages": 63, - "m_Entries": [], - "m_Value": 0, - "m_IsEditable": true -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",