├── IceScene.unity ├── IceScene.unity.meta ├── NotUpLoad.meta ├── README.md ├── SampleResource.meta ├── SampleResource ├── Mesh.meta ├── Mesh │ ├── Ice_Closed.FBX │ └── Ice_Closed.FBX.meta ├── Shader Graphs_IceGraph.mat ├── Shader Graphs_IceGraph.mat.meta ├── Textures.meta ├── Textures │ ├── CracksSDF.TGA │ ├── CracksSDF.TGA.meta │ ├── DetailNormal.TGA │ ├── DetailNormal.TGA.meta │ ├── DustCristal.TGA │ ├── DustCristal.TGA.meta │ ├── Glass.TGA │ ├── Glass.TGA.meta │ ├── GlassNormal.TGA │ ├── GlassNormal.TGA.meta │ ├── ReflectionMap.exr │ └── ReflectionMap.exr.meta ├── Unlit_Ice.mat └── Unlit_Ice.mat.meta ├── Shader.meta ├── Shader ├── Ice.shader ├── Ice.shader.meta ├── IceFn.hlsl ├── IceFn.hlsl.meta ├── IceForwardPass.hlsl ├── IceForwardPass.hlsl.meta ├── IceInput.hlsl └── IceInput.hlsl.meta ├── ShaderGraph.meta └── ShaderGraph ├── IceGraph.shadergraph ├── IceGraph.shadergraph.meta ├── SubGraphs.meta └── SubGraphs ├── AlphaBlending.shadersubgraph ├── AlphaBlending.shadersubgraph.meta ├── EffectCracks.shadersubgraph ├── EffectCracks.shadersubgraph.meta ├── EffectDust.shadersubgraph ├── EffectDust.shadersubgraph.meta ├── EffectNormal.shadersubgraph ├── EffectNormal.shadersubgraph.meta ├── EffectReflection.shadersubgraph ├── EffectReflection.shadersubgraph.meta ├── EffectRefraction.shadersubgraph ├── EffectRefraction.shadersubgraph.meta ├── SDF_Raymarching.shadersubgraph ├── SDF_Raymarching.shadersubgraph.meta ├── ShapeVolume.shadersubgraph └── ShapeVolume.shadersubgraph.meta /IceScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &203844586 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 203844589} 135 | - component: {fileID: 203844588} 136 | - component: {fileID: 203844587} 137 | m_Layer: 0 138 | m_Name: Directional Light 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!114 &203844587 145 | MonoBehaviour: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 203844586} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | m_Version: 1 157 | m_UsePipelineSettings: 1 158 | m_AdditionalLightsShadowResolutionTier: 2 159 | m_LightLayerMask: 1 160 | m_CustomShadowLayers: 0 161 | m_ShadowLayerMask: 1 162 | m_LightCookieSize: {x: 1, y: 1} 163 | m_LightCookieOffset: {x: 0, y: 0} 164 | --- !u!108 &203844588 165 | Light: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 203844586} 171 | m_Enabled: 1 172 | serializedVersion: 10 173 | m_Type: 1 174 | m_Shape: 0 175 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 176 | m_Intensity: 1 177 | m_Range: 10 178 | m_SpotAngle: 30 179 | m_InnerSpotAngle: 21.80208 180 | m_CookieSize: 10 181 | m_Shadows: 182 | m_Type: 2 183 | m_Resolution: -1 184 | m_CustomResolution: -1 185 | m_Strength: 1 186 | m_Bias: 0.05 187 | m_NormalBias: 0.4 188 | m_NearPlane: 0.2 189 | m_CullingMatrixOverride: 190 | e00: 1 191 | e01: 0 192 | e02: 0 193 | e03: 0 194 | e10: 0 195 | e11: 1 196 | e12: 0 197 | e13: 0 198 | e20: 0 199 | e21: 0 200 | e22: 1 201 | e23: 0 202 | e30: 0 203 | e31: 0 204 | e32: 0 205 | e33: 1 206 | m_UseCullingMatrixOverride: 0 207 | m_Cookie: {fileID: 0} 208 | m_DrawHalo: 0 209 | m_Flare: {fileID: 0} 210 | m_RenderMode: 0 211 | m_CullingMask: 212 | serializedVersion: 2 213 | m_Bits: 4294967295 214 | m_RenderingLayerMask: 1 215 | m_Lightmapping: 4 216 | m_LightShadowCasterMode: 0 217 | m_AreaSize: {x: 1, y: 1} 218 | m_BounceIntensity: 1 219 | m_ColorTemperature: 6570 220 | m_UseColorTemperature: 0 221 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 222 | m_UseBoundingSphereOverride: 0 223 | m_UseViewFrustumForShadowCasterCull: 1 224 | m_ShadowRadius: 0 225 | m_ShadowAngle: 0 226 | --- !u!4 &203844589 227 | Transform: 228 | m_ObjectHideFlags: 0 229 | m_CorrespondingSourceObject: {fileID: 0} 230 | m_PrefabInstance: {fileID: 0} 231 | m_PrefabAsset: {fileID: 0} 232 | m_GameObject: {fileID: 203844586} 233 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 234 | m_LocalPosition: {x: 0, y: 3, z: 0} 235 | m_LocalScale: {x: 1, y: 1, z: 1} 236 | m_ConstrainProportionsScale: 0 237 | m_Children: [] 238 | m_Father: {fileID: 0} 239 | m_RootOrder: 1 240 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 241 | --- !u!1 &961739749 242 | GameObject: 243 | m_ObjectHideFlags: 0 244 | m_CorrespondingSourceObject: {fileID: 0} 245 | m_PrefabInstance: {fileID: 0} 246 | m_PrefabAsset: {fileID: 0} 247 | serializedVersion: 6 248 | m_Component: 249 | - component: {fileID: 961739753} 250 | - component: {fileID: 961739752} 251 | - component: {fileID: 961739751} 252 | - component: {fileID: 961739750} 253 | m_Layer: 0 254 | m_Name: Main Camera 255 | m_TagString: MainCamera 256 | m_Icon: {fileID: 0} 257 | m_NavMeshLayer: 0 258 | m_StaticEditorFlags: 0 259 | m_IsActive: 1 260 | --- !u!114 &961739750 261 | MonoBehaviour: 262 | m_ObjectHideFlags: 0 263 | m_CorrespondingSourceObject: {fileID: 0} 264 | m_PrefabInstance: {fileID: 0} 265 | m_PrefabAsset: {fileID: 0} 266 | m_GameObject: {fileID: 961739749} 267 | m_Enabled: 1 268 | m_EditorHideFlags: 0 269 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} 270 | m_Name: 271 | m_EditorClassIdentifier: 272 | m_RenderShadows: 1 273 | m_RequiresDepthTextureOption: 2 274 | m_RequiresOpaqueTextureOption: 2 275 | m_CameraType: 0 276 | m_Cameras: [] 277 | m_RendererIndex: -1 278 | m_VolumeLayerMask: 279 | serializedVersion: 2 280 | m_Bits: 1 281 | m_VolumeTrigger: {fileID: 0} 282 | m_VolumeFrameworkUpdateModeOption: 2 283 | m_RenderPostProcessing: 0 284 | m_Antialiasing: 0 285 | m_AntialiasingQuality: 2 286 | m_StopNaN: 0 287 | m_Dithering: 0 288 | m_ClearDepth: 1 289 | m_AllowXRRendering: 1 290 | m_RequiresDepthTexture: 0 291 | m_RequiresColorTexture: 0 292 | m_Version: 2 293 | --- !u!81 &961739751 294 | AudioListener: 295 | m_ObjectHideFlags: 0 296 | m_CorrespondingSourceObject: {fileID: 0} 297 | m_PrefabInstance: {fileID: 0} 298 | m_PrefabAsset: {fileID: 0} 299 | m_GameObject: {fileID: 961739749} 300 | m_Enabled: 1 301 | --- !u!20 &961739752 302 | Camera: 303 | m_ObjectHideFlags: 0 304 | m_CorrespondingSourceObject: {fileID: 0} 305 | m_PrefabInstance: {fileID: 0} 306 | m_PrefabAsset: {fileID: 0} 307 | m_GameObject: {fileID: 961739749} 308 | m_Enabled: 1 309 | serializedVersion: 2 310 | m_ClearFlags: 2 311 | m_BackGroundColor: {r: 0.5188679, g: 0.5188679, b: 0.5188679, a: 0} 312 | m_projectionMatrixMode: 1 313 | m_GateFitMode: 2 314 | m_FOVAxisMode: 0 315 | m_SensorSize: {x: 36, y: 24} 316 | m_LensShift: {x: 0, y: 0} 317 | m_FocalLength: 50 318 | m_NormalizedViewPortRect: 319 | serializedVersion: 2 320 | x: 0 321 | y: 0 322 | width: 1 323 | height: 1 324 | near clip plane: 0.3 325 | far clip plane: 1000 326 | field of view: 29 327 | orthographic: 0 328 | orthographic size: 5 329 | m_Depth: -1 330 | m_CullingMask: 331 | serializedVersion: 2 332 | m_Bits: 4294967295 333 | m_RenderingPath: -1 334 | m_TargetTexture: {fileID: 0} 335 | m_TargetDisplay: 0 336 | m_TargetEye: 3 337 | m_HDR: 1 338 | m_AllowMSAA: 1 339 | m_AllowDynamicResolution: 0 340 | m_ForceIntoRT: 0 341 | m_OcclusionCulling: 1 342 | m_StereoConvergence: 10 343 | m_StereoSeparation: 0.022 344 | --- !u!4 &961739753 345 | Transform: 346 | m_ObjectHideFlags: 0 347 | m_CorrespondingSourceObject: {fileID: 0} 348 | m_PrefabInstance: {fileID: 0} 349 | m_PrefabAsset: {fileID: 0} 350 | m_GameObject: {fileID: 961739749} 351 | m_LocalRotation: {x: -0.014381249, y: -0.6887923, z: 0.06518184, w: -0.7218793} 352 | m_LocalPosition: {x: -8.393694, y: 2.4578276, z: -0.4532214} 353 | m_LocalScale: {x: 1, y: 1, z: 1} 354 | m_ConstrainProportionsScale: 0 355 | m_Children: [] 356 | m_Father: {fileID: 0} 357 | m_RootOrder: 0 358 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 359 | --- !u!1001 &1267882142 360 | PrefabInstance: 361 | m_ObjectHideFlags: 0 362 | serializedVersion: 2 363 | m_Modification: 364 | m_TransformParent: {fileID: 0} 365 | m_Modifications: 366 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 367 | propertyPath: m_RootOrder 368 | value: 2 369 | objectReference: {fileID: 0} 370 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 371 | propertyPath: m_LocalPosition.x 372 | value: 0 373 | objectReference: {fileID: 0} 374 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 375 | propertyPath: m_LocalPosition.y 376 | value: 0 377 | objectReference: {fileID: 0} 378 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 379 | propertyPath: m_LocalPosition.z 380 | value: 0 381 | objectReference: {fileID: 0} 382 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 383 | propertyPath: m_LocalRotation.w 384 | value: 1 385 | objectReference: {fileID: 0} 386 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 387 | propertyPath: m_LocalRotation.x 388 | value: 0 389 | objectReference: {fileID: 0} 390 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 391 | propertyPath: m_LocalRotation.y 392 | value: 0 393 | objectReference: {fileID: 0} 394 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 395 | propertyPath: m_LocalRotation.z 396 | value: 0 397 | objectReference: {fileID: 0} 398 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 399 | propertyPath: m_LocalEulerAnglesHint.x 400 | value: 0 401 | objectReference: {fileID: 0} 402 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 403 | propertyPath: m_LocalEulerAnglesHint.y 404 | value: 0 405 | objectReference: {fileID: 0} 406 | - target: {fileID: -8679921383154817045, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 407 | propertyPath: m_LocalEulerAnglesHint.z 408 | value: 0 409 | objectReference: {fileID: 0} 410 | - target: {fileID: -5920423914768835010, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 411 | propertyPath: m_IsActive 412 | value: 0 413 | objectReference: {fileID: 0} 414 | - target: {fileID: -489671257408525598, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 415 | propertyPath: m_Materials.Array.data[0] 416 | value: 417 | objectReference: {fileID: 2100000, guid: 38a522df4ba6d2e45bee7ea5fb943aa7, type: 2} 418 | - target: {fileID: 919132149155446097, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 419 | propertyPath: m_Name 420 | value: Ice_Closed 421 | objectReference: {fileID: 0} 422 | - target: {fileID: 3673969117139080935, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 423 | propertyPath: m_Materials.Array.data[0] 424 | value: 425 | objectReference: {fileID: 2100000, guid: 38a522df4ba6d2e45bee7ea5fb943aa7, type: 2} 426 | - target: {fileID: 4332572925765003667, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 427 | propertyPath: m_Materials.Array.data[0] 428 | value: 429 | objectReference: {fileID: 2100000, guid: 38a522df4ba6d2e45bee7ea5fb943aa7, type: 2} 430 | - target: {fileID: 5388336106744780911, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 431 | propertyPath: m_Materials.Array.data[0] 432 | value: 433 | objectReference: {fileID: 2100000, guid: 38a522df4ba6d2e45bee7ea5fb943aa7, type: 2} 434 | m_RemovedComponents: [] 435 | m_SourcePrefab: {fileID: 100100000, guid: bdd7c48222f9c5d488cac0e699065dfc, type: 3} 436 | -------------------------------------------------------------------------------- /IceScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71e2bc0db8e815f40b8b52831e848e50 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /NotUpLoad.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78012e4c890f8574bb3ac914f769dd1a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity_Learn_Ice 2 | Unity中文课堂Ice源代码,包含ShaderGraph文件,Unity版本2021.2.19f1 3 | -------------------------------------------------------------------------------- /SampleResource.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d695c80987da7743bcbdcd7b4368220 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SampleResource/Mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd9166cb2b9a5c6419fef1cb5e2440b3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SampleResource/Mesh/Ice_Closed.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Mesh/Ice_Closed.FBX -------------------------------------------------------------------------------- /SampleResource/Mesh/Ice_Closed.FBX.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdd7c48222f9c5d488cac0e699065dfc 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: 38 | - 0.25 39 | - 0.125 40 | - 0.0625 41 | - 0.01 42 | globalScale: 1 43 | meshCompression: 0 44 | addColliders: 0 45 | useSRGBMaterialColor: 1 46 | sortHierarchyByName: 1 47 | importVisibility: 1 48 | importBlendShapes: 1 49 | importCameras: 1 50 | importLights: 1 51 | nodeNameCollisionStrategy: 1 52 | fileIdsGeneration: 2 53 | swapUVChannels: 0 54 | generateSecondaryUV: 0 55 | useFileUnits: 1 56 | keepQuads: 0 57 | weldVertices: 1 58 | bakeAxisConversion: 0 59 | preserveHierarchy: 0 60 | skinWeightsMode: 0 61 | maxBonesPerVertex: 4 62 | minBoneWeight: 0.001 63 | optimizeBones: 1 64 | meshOptimizationFlags: -1 65 | indexFormat: 0 66 | secondaryUVAngleDistortion: 8 67 | secondaryUVAreaDistortion: 15.000001 68 | secondaryUVHardAngle: 88 69 | secondaryUVMarginMethod: 1 70 | secondaryUVMinLightmapResolution: 40 71 | secondaryUVMinObjectScale: 1 72 | secondaryUVPackMargin: 4 73 | useFileScale: 1 74 | tangentSpace: 75 | normalSmoothAngle: 60 76 | normalImportMode: 0 77 | tangentImportMode: 3 78 | normalCalculationMode: 4 79 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 80 | blendShapeNormalImportMode: 1 81 | normalSmoothingSource: 0 82 | referencedClips: [] 83 | importAnimation: 1 84 | humanDescription: 85 | serializedVersion: 3 86 | human: [] 87 | skeleton: [] 88 | armTwist: 0.5 89 | foreArmTwist: 0.5 90 | upperLegTwist: 0.5 91 | legTwist: 0.5 92 | armStretch: 0.05 93 | legStretch: 0.05 94 | feetSpacing: 0 95 | globalScale: 1 96 | rootMotionBoneName: 97 | hasTranslationDoF: 0 98 | hasExtraRoot: 0 99 | skeletonHasParents: 1 100 | lastHumanDescriptionAvatarSource: {instanceID: 0} 101 | autoGenerateAvatarMappingIfUnspecified: 1 102 | animationType: 2 103 | humanoidOversampling: 1 104 | avatarSetup: 0 105 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /SampleResource/Shader Graphs_IceGraph.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Shader Graphs_IceGraph 11 | m_Shader: {fileID: -6465566751694194690, guid: acececbb82d4d344eaad2d5d752673db, type: 3} 12 | m_ValidKeywords: [] 13 | m_InvalidKeywords: [] 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _CracksSDFTexture: 24 | m_Texture: {fileID: 2800000, guid: c4c4c99dd5a7f29488451579db3a6d42, type: 3} 25 | m_Scale: {x: 4, y: 4} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailNormal: 28 | m_Texture: {fileID: 2800000, guid: 61b63771992458247a47521abbd0f47c, type: 3} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DustTexture: 32 | m_Texture: {fileID: 2800000, guid: efac6029fc8b30d479fe6f6f562a8d56, type: 3} 33 | m_Scale: {x: 10, y: 10} 34 | m_Offset: {x: 0, y: 0} 35 | - _GlassNormal: 36 | m_Texture: {fileID: 2800000, guid: 021fa0ff9c19edf479953b5f507a1b45, type: 3} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _GlassTexture: 40 | m_Texture: {fileID: 2800000, guid: a9e1f2029b44d284fa1e960be2b2fbf9, type: 3} 41 | m_Scale: {x: 4, y: 4} 42 | m_Offset: {x: 0, y: 0} 43 | - _ReflectionTexture: 44 | m_Texture: {fileID: 8900000, guid: 74b313e17ab2e6244ab61a9f921de1af, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _Texture2D_Array: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - unity_Lightmaps: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - unity_LightmapsInd: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - unity_ShadowMasks: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | m_Ints: [] 64 | m_Floats: 65 | - _CracksDepthIterations: 5 66 | - _CracksDepthScale: 2 67 | - _CracksDepthStepSize: 0.1 68 | - _CracksDistortion: 0.02 69 | - _CracksHeight: 0.34 70 | - _CracksWidth: 0.15 71 | - _DustDepthShift: 1 72 | - _DustLayerBetween: 0.5 73 | - _Float: 0.1 74 | - _Float_1: 0.1 75 | - _FogBase: 0.18 76 | - _FogDensity: 0.73 77 | - _GlassDetailUVScale: 6 78 | - _GlassNormalScale: 0.3 79 | - _QueueControl: 0 80 | - _QueueOffset: 0 81 | - _ShapeSphereRadius: 0.5 82 | - _UseAberration: 0 83 | - _UseFogExp2: 1 84 | m_Colors: 85 | - _CracksColor: {r: 0.70980394, g: 0.8352942, b: 0.98039216, a: 1} 86 | - _DustColor: {r: 0.30980393, g: 0.3764706, b: 0.44313726, a: 1} 87 | - _DustTextureUVAnim: {r: 0, g: 0.2, b: 0, a: 0} 88 | - _FogColor: {r: 0.21960786, g: 0.36862746, b: 0.4431373, a: 0} 89 | - _GlassColor: {r: 0.6901961, g: 0.8235295, b: 0.94117653, a: 1} 90 | - _ReflectionColor: {r: 1, g: 1, b: 1, a: 1} 91 | - _RefractionColor: {r: 1, g: 1, b: 1, a: 1} 92 | m_BuildTextureStacks: [] 93 | --- !u!114 &2624461014502143949 94 | MonoBehaviour: 95 | m_ObjectHideFlags: 11 96 | m_CorrespondingSourceObject: {fileID: 0} 97 | m_PrefabInstance: {fileID: 0} 98 | m_PrefabAsset: {fileID: 0} 99 | m_GameObject: {fileID: 0} 100 | m_Enabled: 1 101 | m_EditorHideFlags: 0 102 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 103 | m_Name: 104 | m_EditorClassIdentifier: 105 | version: 5 106 | -------------------------------------------------------------------------------- /SampleResource/Shader Graphs_IceGraph.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a716643fce295384181d4950d3e0dc4b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SampleResource/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f5bd3258c9658f4ea464b43ec987c75 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SampleResource/Textures/CracksSDF.TGA: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Textures/CracksSDF.TGA -------------------------------------------------------------------------------- /SampleResource/Textures/CracksSDF.TGA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4c4c99dd5a7f29488451579db3a6d42 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 0 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 1 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 2 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: Android 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | - serializedVersion: 3 116 | buildTarget: iPhone 117 | maxTextureSize: 2048 118 | resizeAlgorithm: 0 119 | textureFormat: -1 120 | textureCompression: 1 121 | compressionQuality: 50 122 | crunchedCompression: 0 123 | allowsAlphaSplitting: 0 124 | overridden: 0 125 | androidETC2FallbackOverride: 0 126 | forceMaximumCompressionQuality_BC6H_BC7: 0 127 | - serializedVersion: 3 128 | buildTarget: WebGL 129 | maxTextureSize: 2048 130 | resizeAlgorithm: 0 131 | textureFormat: -1 132 | textureCompression: 1 133 | compressionQuality: 50 134 | crunchedCompression: 0 135 | allowsAlphaSplitting: 0 136 | overridden: 0 137 | androidETC2FallbackOverride: 0 138 | forceMaximumCompressionQuality_BC6H_BC7: 0 139 | spriteSheet: 140 | serializedVersion: 2 141 | sprites: [] 142 | outline: [] 143 | physicsShape: [] 144 | bones: [] 145 | spriteID: 146 | internalID: 0 147 | vertices: [] 148 | indices: 149 | edges: [] 150 | weights: [] 151 | secondaryTextures: [] 152 | nameFileIdTable: {} 153 | spritePackingTag: 154 | pSDRemoveMatte: 0 155 | pSDShowRemoveMatteOption: 0 156 | userData: 157 | assetBundleName: 158 | assetBundleVariant: 159 | -------------------------------------------------------------------------------- /SampleResource/Textures/DetailNormal.TGA: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Textures/DetailNormal.TGA -------------------------------------------------------------------------------- /SampleResource/Textures/DetailNormal.TGA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61b63771992458247a47521abbd0f47c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 1 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | - serializedVersion: 3 74 | buildTarget: Standalone 75 | maxTextureSize: 2048 76 | resizeAlgorithm: 0 77 | textureFormat: -1 78 | textureCompression: 1 79 | compressionQuality: 50 80 | crunchedCompression: 0 81 | allowsAlphaSplitting: 0 82 | overridden: 0 83 | androidETC2FallbackOverride: 0 84 | forceMaximumCompressionQuality_BC6H_BC7: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | physicsShape: [] 90 | bones: [] 91 | spriteID: 92 | internalID: 0 93 | vertices: [] 94 | indices: 95 | edges: [] 96 | weights: [] 97 | secondaryTextures: [] 98 | spritePackingTag: 99 | pSDRemoveMatte: 0 100 | pSDShowRemoveMatteOption: 0 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /SampleResource/Textures/DustCristal.TGA: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Textures/DustCristal.TGA -------------------------------------------------------------------------------- /SampleResource/Textures/DustCristal.TGA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efac6029fc8b30d479fe6f6f562a8d56 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /SampleResource/Textures/Glass.TGA: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Textures/Glass.TGA -------------------------------------------------------------------------------- /SampleResource/Textures/Glass.TGA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9e1f2029b44d284fa1e960be2b2fbf9 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 0 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 1 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: 63 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: Android 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | - serializedVersion: 3 116 | buildTarget: iPhone 117 | maxTextureSize: 2048 118 | resizeAlgorithm: 0 119 | textureFormat: -1 120 | textureCompression: 1 121 | compressionQuality: 50 122 | crunchedCompression: 0 123 | allowsAlphaSplitting: 0 124 | overridden: 0 125 | androidETC2FallbackOverride: 0 126 | forceMaximumCompressionQuality_BC6H_BC7: 0 127 | - serializedVersion: 3 128 | buildTarget: WebGL 129 | maxTextureSize: 2048 130 | resizeAlgorithm: 0 131 | textureFormat: -1 132 | textureCompression: 1 133 | compressionQuality: 50 134 | crunchedCompression: 0 135 | allowsAlphaSplitting: 0 136 | overridden: 0 137 | androidETC2FallbackOverride: 0 138 | forceMaximumCompressionQuality_BC6H_BC7: 0 139 | spriteSheet: 140 | serializedVersion: 2 141 | sprites: [] 142 | outline: [] 143 | physicsShape: [] 144 | bones: [] 145 | spriteID: 146 | internalID: 0 147 | vertices: [] 148 | indices: 149 | edges: [] 150 | weights: [] 151 | secondaryTextures: [] 152 | nameFileIdTable: {} 153 | spritePackingTag: 154 | pSDRemoveMatte: 0 155 | pSDShowRemoveMatteOption: 0 156 | userData: 157 | assetBundleName: 158 | assetBundleVariant: 159 | -------------------------------------------------------------------------------- /SampleResource/Textures/GlassNormal.TGA: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Textures/GlassNormal.TGA -------------------------------------------------------------------------------- /SampleResource/Textures/GlassNormal.TGA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 021fa0ff9c19edf479953b5f507a1b45 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 0 55 | spriteTessellationDetail: -1 56 | textureType: 1 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: Android 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | - serializedVersion: 3 116 | buildTarget: iPhone 117 | maxTextureSize: 2048 118 | resizeAlgorithm: 0 119 | textureFormat: -1 120 | textureCompression: 1 121 | compressionQuality: 50 122 | crunchedCompression: 0 123 | allowsAlphaSplitting: 0 124 | overridden: 0 125 | androidETC2FallbackOverride: 0 126 | forceMaximumCompressionQuality_BC6H_BC7: 0 127 | - serializedVersion: 3 128 | buildTarget: WebGL 129 | maxTextureSize: 2048 130 | resizeAlgorithm: 0 131 | textureFormat: -1 132 | textureCompression: 1 133 | compressionQuality: 50 134 | crunchedCompression: 0 135 | allowsAlphaSplitting: 0 136 | overridden: 0 137 | androidETC2FallbackOverride: 0 138 | forceMaximumCompressionQuality_BC6H_BC7: 0 139 | spriteSheet: 140 | serializedVersion: 2 141 | sprites: [] 142 | outline: [] 143 | physicsShape: [] 144 | bones: [] 145 | spriteID: 146 | internalID: 0 147 | vertices: [] 148 | indices: 149 | edges: [] 150 | weights: [] 151 | secondaryTextures: [] 152 | nameFileIdTable: {} 153 | spritePackingTag: 154 | pSDRemoveMatte: 0 155 | pSDShowRemoveMatteOption: 0 156 | userData: 157 | assetBundleName: 158 | assetBundleVariant: 159 | -------------------------------------------------------------------------------- /SampleResource/Textures/ReflectionMap.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong2024/Unity_Learn_Ice/3d6646718285232e893542f63b156379b6bdbcba/SampleResource/Textures/ReflectionMap.exr -------------------------------------------------------------------------------- /SampleResource/Textures/ReflectionMap.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74b313e17ab2e6244ab61a9f921de1af 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 1 31 | seamlessCubemap: 1 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 2 37 | aniso: 0 38 | mipBias: 0 39 | wrapU: 1 40 | wrapV: 1 41 | wrapW: 1 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 0 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 2 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 100 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 100 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 100 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: Android 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 100 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | - serializedVersion: 3 116 | buildTarget: iPhone 117 | maxTextureSize: 2048 118 | resizeAlgorithm: 0 119 | textureFormat: -1 120 | textureCompression: 1 121 | compressionQuality: 100 122 | crunchedCompression: 0 123 | allowsAlphaSplitting: 0 124 | overridden: 0 125 | androidETC2FallbackOverride: 0 126 | forceMaximumCompressionQuality_BC6H_BC7: 0 127 | - serializedVersion: 3 128 | buildTarget: WebGL 129 | maxTextureSize: 2048 130 | resizeAlgorithm: 0 131 | textureFormat: -1 132 | textureCompression: 1 133 | compressionQuality: 100 134 | crunchedCompression: 0 135 | allowsAlphaSplitting: 0 136 | overridden: 0 137 | androidETC2FallbackOverride: 0 138 | forceMaximumCompressionQuality_BC6H_BC7: 0 139 | spriteSheet: 140 | serializedVersion: 2 141 | sprites: [] 142 | outline: [] 143 | physicsShape: [] 144 | bones: [] 145 | spriteID: 146 | internalID: 0 147 | vertices: [] 148 | indices: 149 | edges: [] 150 | weights: [] 151 | secondaryTextures: [] 152 | nameFileIdTable: {} 153 | spritePackingTag: 154 | pSDRemoveMatte: 0 155 | pSDShowRemoveMatteOption: 0 156 | userData: 157 | assetBundleName: 158 | assetBundleVariant: 159 | -------------------------------------------------------------------------------- /SampleResource/Unlit_Ice.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Unlit_Ice 11 | m_Shader: {fileID: 4800000, guid: e951a170dc9f37c40b061738955dd325, type: 3} 12 | m_ValidKeywords: 13 | - _USEDETAILNORMAL 14 | - _USEGLASSNORMAL 15 | m_InvalidKeywords: 16 | - _USEFOGEXP2_ON 17 | m_LightmapFlags: 4 18 | m_EnableInstancingVariants: 0 19 | m_DoubleSidedGI: 0 20 | m_CustomRenderQueue: -1 21 | stringTagMap: {} 22 | disabledShaderPasses: [] 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _CracksSDFTexture: 27 | m_Texture: {fileID: 2800000, guid: c4c4c99dd5a7f29488451579db3a6d42, type: 3} 28 | m_Scale: {x: 4, y: 4} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailNormal: 31 | m_Texture: {fileID: 2800000, guid: 61b63771992458247a47521abbd0f47c, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DustTexture: 35 | m_Texture: {fileID: 2800000, guid: efac6029fc8b30d479fe6f6f562a8d56, type: 3} 36 | m_Scale: {x: 10, y: 10} 37 | m_Offset: {x: 0, y: 0} 38 | - _GlassNormal: 39 | m_Texture: {fileID: 2800000, guid: 021fa0ff9c19edf479953b5f507a1b45, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _GlassTexture: 43 | m_Texture: {fileID: 2800000, guid: a9e1f2029b44d284fa1e960be2b2fbf9, type: 3} 44 | m_Scale: {x: 4, y: 4} 45 | m_Offset: {x: 0, y: 0} 46 | - _ReflectionTexture: 47 | m_Texture: {fileID: 8900000, guid: 74b313e17ab2e6244ab61a9f921de1af, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | m_Ints: [] 51 | m_Floats: 52 | - _CracksDepthIterations: 5 53 | - _CracksDepthScale: 2.01 54 | - _CracksDepthStepSize: 0.1 55 | - _CracksDistortion: 0.02 56 | - _CracksHeight: 0.34 57 | - _CracksWidth: 0.15 58 | - _DustDepthShift: 1 59 | - _DustLayerBetween: 0.5 60 | - _FogBase: 0.18 61 | - _FogDensity: 0.73 62 | - _FresnelPower: 5 63 | - _GlassDetailUVScale: 6 64 | - _GlassNormalScale: 0.3 65 | - _Iro: 1.43 66 | - _ShapeSphereRadius: 0.95 67 | - _UseAberration: 0 68 | - _UseDetailNormal: 1 69 | - _UseFogExp2: 1 70 | - _UseGlassNormal: 1 71 | m_Colors: 72 | - _CracksColor: {r: 0.7176471, g: 0.84705883, b: 0.9921569, a: 1} 73 | - _DustColor: {r: 0.30980393, g: 0.37647063, b: 0.4431373, a: 1} 74 | - _DustTextureUVAnim: {r: 0, g: 0.2, b: 0, a: 0} 75 | - _FogColor: {r: 0.21960661, g: 0.36879975, b: 0.4433962, a: 0} 76 | - _GlassColor: {r: 0.69803923, g: 0.8313726, b: 0.95294124, a: 1} 77 | - _ReflectionColor: {r: 1, g: 1, b: 1, a: 1} 78 | - _RefractionColor: {r: 1, g: 1, b: 1, a: 1} 79 | m_BuildTextureStacks: [] 80 | -------------------------------------------------------------------------------- /SampleResource/Unlit_Ice.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38a522df4ba6d2e45bee7ea5fb943aa7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ce3a55eb88be1240861a929aea46f6b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shader/Ice.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Ice" 2 | { 3 | Properties 4 | { 5 | [Header(FogColor)] 6 | [Toggle]_UseFogExp2("UseFogExp2", Float) = 0 7 | _FogColor("FogColor", Color) = (0.16, 0.42, 0.47, 0.0) 8 | _FogBase("FogBase", Float) = 0.3 9 | _FogDensity("FogDensity", Float) = 0.33 10 | _ShapeSphereRadius("ShapeSphereRadius", Float) = 0.5 11 | 12 | [Header(Dust)] 13 | _DustColor("DustColor", Color) = (1,1,1,1) 14 | _DustTexture("DustTexture", 2D) = "white" {} 15 | _DustTextureUVAnim("DustTextureUVAnim", Vector) = (0,0,0,0) 16 | _DustDepthShift("DustDepthShift", Float) = 0.5 17 | _DustLayerBetween("DustLayerBetween", Float) = 0.5 18 | 19 | [Header(Cracks)] 20 | _CracksColor("Cracks Color", Color) = (0.1, 0.6, 1.0, 0.7) 21 | _CracksSDFTexture("Cracks SDF Texture", 2D) = "black" {} 22 | [IntRange]_CracksDepthIterations("Cracks Depth Iterations", Range(0,10)) = 5 23 | _CracksDepthScale("Cracks Depth Scale", Float) = 0.09 24 | _CracksDepthStepSize("Cracks Depth StepSize", Float) = 0.1 25 | _CracksDistortion("Cracks Distortion", Float) = 0.02 26 | _CracksHeight("Cracks Height", Float) = 0.8 27 | _CracksWidth("Cracks Width", Float) = 0.1 28 | 29 | [Header(Glass)] 30 | _GlassColor ("Glass Color", Color) = (1, 1, 1, 0.7) 31 | _GlassTexture("Glass Tex", 2D) = "black" {} 32 | _GlassNormal("Glass Normal", 2D) = "bump" {} 33 | _GlassNormalScale ("Glass Normal Scale", Float) = 1.0 34 | [noscaleoffset]_DetailNormal("Detail Normal", 2D) = "bump" {} 35 | _GlassDetailUVScale ("Glass Detail UVScale", Float) = 1.0 36 | [Toggle(_USEGLASSNORMAL)]_UseGlassNormal ("Use Glass Normal", Float) = 1.0 37 | [Toggle(_USEDETAILNORMAL)]_UseDetailNormal ("Use Detail Normal", Float) = 1.0 38 | 39 | 40 | 41 | [Header(Reflection)] 42 | _ReflectionColor("Reflection Color", Color) = (1,1,1,1) 43 | [noscaleoffset]_ReflectionTexture("Reflection Texture", Cube) = "black" {} 44 | 45 | [Header(Refraction)] 46 | _RefractionColor("Refraction Color", Color) = (1,1,1,1) 47 | [Toggle]_UseAberration("UseAberration", Float) = 1.0 48 | } 49 | 50 | SubShader 51 | { 52 | Tags {"RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "Queue"="Geometry"} 53 | 54 | Pass 55 | { 56 | Name "Unlit" 57 | 58 | HLSLPROGRAM 59 | #pragma exclude_renderers gles gles3 glcore 60 | #pragma target 4.5 61 | 62 | #pragma shader_feature_local_fragment _ALPHATEST_ON 63 | #pragma shader_feature_local_fragment _USEGLASSNORMAL 64 | #pragma shader_feature_local_fragment _USEDETAILNORMAL 65 | 66 | // ------------------------------------- 67 | 68 | #pragma vertex UnlitPassVertex 69 | #pragma fragment UnlitPassFragment 70 | 71 | #include "IceInput.hlsl" 72 | #include "IceForwardPass.hlsl" 73 | ENDHLSL 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Shader/Ice.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e951a170dc9f37c40b061738955dd325 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Shader/IceFn.hlsl: -------------------------------------------------------------------------------- 1 | struct IceInputData 2 | { 3 | // 当前相机的世界空间位置 4 | float3 cameraPosition; 5 | // 模型表面着色点的世界空间位置 6 | float3 positionWS; 7 | // 世界空间的视觉方向,模型着色点指向相机的方向 8 | float3 viewDirectionWS; 9 | // 切线空间的视觉方向,是viewDirectionWS的不同空间描述 10 | float3 viewDirectionTS; 11 | // 世界空间的顶点法线方向 12 | float3 vertexNormalWS; 13 | // 世界空间的像素法线方向(包含法线贴图信息) 14 | float3 pixelNormalWS; 15 | // 切线空间的法线方向 16 | float3 normalTS; 17 | // 系统的运行时间 18 | float time; 19 | }; 20 | 21 | half3 BlendAngleCorrectedNormals(half3 baseNormal, half3 additionalNormal) 22 | { 23 | baseNormal.b += 1.0; 24 | additionalNormal.rg *= -1.0; 25 | half d = dot(baseNormal, additionalNormal); 26 | half3 tempBase = baseNormal * d; 27 | half3 tempAdd = additionalNormal * baseNormal.b; 28 | return tempBase - tempAdd; 29 | } 30 | 31 | void EffectNormal(float3x3 t2w, float2 uv, out half3 normalTS, out half3 normalWS) 32 | { 33 | normalTS = half3(0, 0, 1); 34 | 35 | #ifdef _USEGLASSNORMAL 36 | 37 | normalTS = UnpackNormal(tex2D(_GlassNormal, uv)); 38 | normalTS.rg *= _GlassNormalScale; 39 | normalTS = normalize(normalTS); 40 | 41 | #ifdef _USEDETAILNORMAL 42 | half3 detailNormalTS = UnpackNormal(tex2D(_DetailNormal, uv * _GlassDetailUVScale)); 43 | normalTS = BlendAngleCorrectedNormals(normalTS, detailNormalTS); 44 | normalTS = normalize(normalTS); 45 | #endif // _USEDETAILNORMAL 46 | 47 | #endif // _USEGLASSNORMAL 48 | 49 | normalWS = TransformTangentToWorld(normalTS, t2w); 50 | } 51 | 52 | void InitializeIceData(Varyings input, out IceInputData inputData) 53 | { 54 | inputData = (IceInputData)0; 55 | 56 | // 切线空间到世界空间的转换矩阵,由于每个顶点的切线坐标不一样,因此无法通过Unity统一传递过来,需要每个顶点去计算 57 | float3x3 t2w = float3x3(input.tangentWS.xyz, input.bitangentWS.xyz, input.normalWS.xyz); 58 | 59 | inputData.cameraPosition = GetCameraPositionWS(); 60 | inputData.positionWS = input.positionWS; 61 | // 在顶点着色器已经计算出来并储存在相关通道上 62 | inputData.viewDirectionWS = normalize(float3(input.normalWS.w, input.tangentWS.w, input.bitangentWS.w)); 63 | inputData.viewDirectionTS = TransformWorldToTangent(inputData.viewDirectionWS, t2w); 64 | inputData.vertexNormalWS = normalize(input.normalWS.xyz); 65 | EffectNormal(t2w, input.uv0.zw, inputData.normalTS, inputData.pixelNormalWS); 66 | // _Time是Unity传递过来的时间参数,x:t/20 y:t z:t*2 w:t*3 67 | inputData.time = _Time.x; 68 | } 69 | 70 | //////////////////// Reflection 71 | half4 EffectReflection(IceInputData inputData) 72 | { 73 | half4 color = texCUBElod(_ReflectionTexture, float4(reflect(-inputData.viewDirectionWS, inputData.pixelNormalWS), 0)); 74 | 75 | // Fresnel 76 | // ((n1 - n2)/(n1 + n2))^2,n1是空气的折射率1.0,n2是冰的折射率1.333 77 | half R0 = 0.02; 78 | // cosθ,可以转换成出射方向与法线方向的点乘 79 | half fresnel = dot(inputData.viewDirectionWS, inputData.pixelNormalWS); 80 | fresnel = 1 - max(0, fresnel); 81 | fresnel = pow(fresnel, 5); 82 | fresnel = R0 + (1 - R0) * fresnel; 83 | // _ReflectionColor 是用来模拟光线吸收 84 | color.rgb *= fresnel * _ReflectionColor.rgb; 85 | color.a = fresnel; 86 | return color; 87 | } 88 | 89 | //////////////////// Refraction 90 | half4 EffectRefraction(IceInputData inputData) 91 | { 92 | // n1/n2 93 | float w = 0.75; 94 | 95 | float3 L = -inputData.viewDirectionWS; 96 | float3 N = inputData.pixelNormalWS; 97 | half3 refractR = texCUBElod(_ReflectionTexture, float4(refract(L, N, w), 0)).rgb; 98 | half3 refractG = texCUBElod(_ReflectionTexture, float4(refract(L, N, w * 0.975), 0)).rgb; 99 | half3 refractB = texCUBElod(_ReflectionTexture, float4(refract(L, N, w * 0.95), 0)).rgb; 100 | half3 color = _UseAberration ? half3(refractR.r, refractG.g, refractB.b) : refractR; 101 | 102 | // 模拟颜色吸收,乘以一个折射颜色 103 | color *= _RefractionColor.rgb; 104 | 105 | return half4(color, 1.0); 106 | } 107 | 108 | /////////////// Cracks 109 | half SDF_Raymarching(sampler2D tex, float2 baseUV, float2 offsetUV, int numSteps, half stepSize, half edgeWidth) 110 | { 111 | // 起始点 112 | float2 p = baseUV; 113 | // 归一化后获得方向 114 | float2 dir = normalize(offsetUV); 115 | // 起始点到终点的距离 116 | float value = 0.0; 117 | 118 | for (int i = 0; i < numSteps && i < 10; i++) 119 | { 120 | // 通过采样 SDF 图求得当前 p 点与最近裂缝距离 121 | // 循环内只能对纹理的单一 MipMap 等级采样 122 | float distance = 1 - tex2Dlod(tex, float4(p, 0,0)).r; 123 | // 加入 edgeWidth 微调宽度效果 124 | distance -= edgeWidth; 125 | 126 | // 当距离少于0,说明已经击中物体,退出循环 127 | if (distance < 0.0) 128 | break; 129 | 130 | // 不为0的时候,记录当前 t ,更新 p 点位置 131 | float t = distance * stepSize; 132 | p += dir * t; 133 | value += t; 134 | } 135 | 136 | return value; 137 | } 138 | 139 | half EffectCracks(Varyings input, IceInputData inputData) 140 | { 141 | // baseUV 在切线方向上做一些法线的扰动 142 | float2 baseUV = input.uv1.zw + inputData.normalTS.xy * _CracksDistortion; 143 | // -Vxy V在物体表面的投影方向的反方向,乘以_CracksHeight做高度微调 144 | float2 offsetUV = -inputData.viewDirectionTS.xy * _CracksHeight; 145 | int numSteps = _CracksDepthIterations; 146 | half stepSize = _CracksDepthStepSize; 147 | half edgeWidth = _CracksWidth; 148 | half depthCracks = SDF_Raymarching(_CracksSDFTexture, baseUV, offsetUV, numSteps, stepSize, edgeWidth); 149 | // viewDirectionTS 在物体表面的投影长度 减去 SDF_Raymarching 的距离 150 | depthCracks = length(offsetUV) - depthCracks; 151 | depthCracks *= _CracksDepthScale; 152 | depthCracks = saturate(depthCracks); 153 | 154 | return depthCracks; 155 | } 156 | 157 | ///////////////// Dust 158 | half3 EffectDust(Varyings input, IceInputData inputData) 159 | { 160 | // 基本UV加入时间参数模拟流动效果 161 | float2 dustUV = input.uv1.xy + inputData.time * _DustTextureUVAnim.xy; 162 | // 视觉偏移增加 _DustDepthShift 参数作为 k 系数 163 | float2 viewUV = -inputData.viewDirectionTS.xy * _DustDepthShift; 164 | 165 | // Layer1, _DustLayerBetween 作为两个 Layer 之间的偏差参数控制 166 | float2 uv1 = dustUV + viewUV * _DustLayerBetween; 167 | float3 color1 = tex2D(_DustTexture, uv1).rgb; 168 | // Layer2 169 | float2 uv2 = dustUV + viewUV; 170 | float3 color2 = tex2D(_DustTexture, uv2).rgb; 171 | 172 | // FinalColor 173 | float3 finalColor = color1 * color1 + color2 * color2; 174 | finalColor *= _DustColor.rgb; 175 | 176 | return finalColor; 177 | } 178 | 179 | /////////////// Thickness 180 | // 从球体相交衍生出来的方法 181 | void IntersectionMesh(float3 rayOrigin, float3 rayDirection, float radius, IceInputData inputData, out float thickness) 182 | { 183 | // Shading Point 沿法线反方向以半径 radius 长度偏移,得出球心 184 | float3 offsetPosWS = inputData.positionWS - inputData.vertexNormalWS * radius; 185 | float3 oc = rayOrigin - offsetPosWS; 186 | float b = dot(rayDirection, oc); 187 | float c = dot(oc, oc) - radius * radius; 188 | float h = b * b - c; 189 | h = sqrt(h); 190 | 191 | thickness = h * 2; 192 | } 193 | 194 | // 获取物体缩放值 195 | float3 ObjectScale() 196 | { 197 | float3 output = 0; 198 | float3 worldDir = TransformObjectToWorldDir(float3(1,0,0), false); 199 | output.x = length(worldDir); 200 | worldDir = TransformObjectToWorldDir(float3(0,1,0), false); 201 | output.y = length(worldDir); 202 | worldDir = TransformObjectToWorldDir(float3(0,0,1), false); 203 | output.z = length(worldDir); 204 | return output; 205 | } 206 | 207 | // 最终求物体厚度的函数 208 | float ShapeVolume(IceInputData inputData) 209 | { 210 | float3 rayOrigin = inputData.cameraPosition; 211 | float3 rayDirection = -inputData.viewDirectionWS; 212 | float radius = _ShapeSphereRadius * ObjectScale().x; 213 | float thickness = 0; 214 | IntersectionMesh(rayOrigin, rayDirection, radius, inputData, thickness); 215 | 216 | return thickness; 217 | } 218 | 219 | /////////////// Fog 220 | float ExponentialDensity(float depth, float density, bool useExp2) 221 | { 222 | // D3DFOG_EXP f = 1/ e ^ (depth * density) 223 | // D3DFOG_EXP2 f = 1/ e ^ ((depth * density)^2) 224 | float value = depth * density; 225 | value = useExp2 ? value * value : value; 226 | 227 | value = pow(2.718, value); 228 | value = 1 / value; 229 | 230 | // 深度小于0则跳过 231 | if (depth <= 0) value = 1; 232 | 233 | return value; 234 | } 235 | 236 | // Premultiply Mode 237 | half4 AlphaBlending(half4 srcColor, half4 dstColor) 238 | { 239 | half4 finalColor; 240 | half oneMinutesAlpha = 1 - srcColor.a; 241 | finalColor = srcColor + oneMinutesAlpha * dstColor; 242 | return finalColor; 243 | } 244 | 245 | ////////////////// Glass 246 | half4 EffectGlass(Varyings input) 247 | { 248 | half glassAlpha = tex2D(_GlassTexture, input.uv0.xy).r * _GlassColor.a; 249 | half4 glassColor = half4(_GlassColor.rgb * glassAlpha, glassAlpha); 250 | 251 | return glassColor; 252 | } 253 | 254 | //////////////////// Diffuse 255 | half4 DiffuseEffect(Varyings input, IceInputData inputData) 256 | { 257 | // Thickness 258 | float thickness = ShapeVolume(inputData); 259 | thickness = max(0, thickness); 260 | 261 | // Fog 262 | half fog = ExponentialDensity(thickness + _FogBase, _FogDensity, _UseFogExp2); 263 | fog = 1 - saturate(fog); 264 | 265 | // Dust Color 266 | half4 dustColor = 1; 267 | dustColor.rgb = EffectDust(input, inputData) + _FogColor.rgb; 268 | dustColor.rgb *= fog; 269 | dustColor.a = fog; 270 | 271 | // Cracks Color 272 | float depthCracks = EffectCracks(input, inputData); 273 | half4 cracksColor = _CracksColor; 274 | cracksColor.a *= depthCracks; 275 | cracksColor.rgb *= cracksColor.a; 276 | 277 | // Blend Cracks and Dust 278 | half4 cracksDustColor = AlphaBlending(cracksColor, dustColor); 279 | 280 | // Glass 281 | half4 glassColor = EffectGlass(input); 282 | 283 | // Diffuse 284 | half4 diffuse = AlphaBlending(glassColor, cracksDustColor); 285 | 286 | return diffuse; 287 | } 288 | 289 | // 最终合成 290 | void CombinedEffects(Varyings input, IceInputData inputData, out half3 color) 291 | { 292 | // Diffuse 293 | half4 diffuse = DiffuseEffect(input, inputData); 294 | 295 | // Reflection 296 | half4 reflection = EffectReflection(inputData); 297 | 298 | // Refraction 299 | half4 refraction = EffectRefraction(inputData) * (1-reflection.a); 300 | 301 | // FinalColor 302 | color = AlphaBlending(diffuse, refraction).rgb; 303 | color += reflection.rgb; 304 | } -------------------------------------------------------------------------------- /Shader/IceFn.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77dfafbae24359647b59d1767902ea9d 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Shader/IceForwardPass.hlsl: -------------------------------------------------------------------------------- 1 | struct Attributes 2 | { 3 | float4 positionOS : POSITION; 4 | float2 uv : TEXCOORD0; 5 | float3 normalOS : NORMAL; 6 | float4 tangentOS : TANGENT; 7 | }; 8 | 9 | struct Varyings 10 | { 11 | float4 positionCS : SV_POSITION; 12 | float4 uv0 : TEXCOORD0; // xy:GlassTextureUV zw:GlassNormalUV 13 | float4 uv1 : TEXCOORD1; // xy:DustTextureUV zw:CracksSDFTextureUV 14 | float3 positionWS : TEXCOORD2; // 世界空间的模型顶点位置 15 | float4 normalWS : TEXCOORD4; // 世界空间的法线方向 16 | float4 tangentWS : TEXCOORD5; // 世界空间的切线方向 17 | float4 bitangentWS : TEXCOORD6; // 垂直于法线与切线方向的第三个方向,这三个方向通常用来把法线贴图转换成世界空间 18 | }; 19 | 20 | #include "IceFn.hlsl" 21 | 22 | Varyings UnlitPassVertex(Attributes input) 23 | { 24 | Varyings output = (Varyings)0; 25 | 26 | VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); 27 | 28 | output.positionCS = vertexInput.positionCS; 29 | output.positionWS = vertexInput.positionWS; 30 | output.uv0.xy = TRANSFORM_TEX(input.uv, _GlassTexture); 31 | output.uv0.zw = TRANSFORM_TEX(input.uv, _GlassNormal); 32 | output.uv1.xy = TRANSFORM_TEX(input.uv, _DustTexture); 33 | output.uv1.zw = TRANSFORM_TEX(input.uv, _CracksSDFTexture); 34 | 35 | VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS); 36 | half3 viewDirWS = GetWorldSpaceViewDir(vertexInput.positionWS); 37 | 38 | output.normalWS.xyz = normalInput.normalWS; 39 | output.tangentWS.xyz = normalInput.tangentWS; 40 | output.bitangentWS.xyz = normalInput.bitangentWS; 41 | output.normalWS.w = viewDirWS.x; 42 | output.tangentWS.w = viewDirWS.y; 43 | output.bitangentWS.w = viewDirWS.z; 44 | 45 | return output; 46 | } 47 | 48 | half4 UnlitPassFragment(Varyings input) : SV_Target 49 | { 50 | IceInputData inputData; 51 | InitializeIceData(input, inputData); 52 | half4 finalColor = 1; 53 | 54 | CombinedEffects(input, inputData, finalColor.rgb); 55 | 56 | return finalColor; 57 | } 58 | -------------------------------------------------------------------------------- /Shader/IceForwardPass.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 140d35a15326632439aeef4e13b932d8 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Shader/IceInput.hlsl: -------------------------------------------------------------------------------- 1 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl" 2 | 3 | CBUFFER_START(UnityPerMaterial) 4 | float4 _GlassTexture_ST; 5 | float4 _GlassNormal_ST; 6 | float4 _DustTexture_ST; 7 | float4 _CracksSDFTexture_ST; 8 | 9 | // FogColor 10 | half _UseFogExp2; 11 | half4 _FogColor; 12 | half _FogBase; 13 | half _FogDensity; 14 | half _ShapeSphereRadius; 15 | 16 | // Dust 17 | half4 _DustColor; 18 | half4 _DustTextureUVAnim; 19 | half _DustDepthShift; 20 | half _DustLayerBetween; 21 | 22 | // Cracks 23 | half4 _CracksColor; 24 | half _CracksDepthIterations; 25 | half _CracksDepthScale; 26 | half _CracksDepthStepSize; 27 | half _CracksDistortion; 28 | half _CracksHeight; 29 | half _CracksWidth; 30 | 31 | // Glass 32 | half4 _GlassColor; 33 | half _GlassNormalScale; 34 | half _GlassDetailUVScale; 35 | 36 | // Refraction 37 | half4 _RefractionColor; 38 | half _UseAberration; 39 | 40 | // Reflection 41 | half4 _ReflectionColor; 42 | CBUFFER_END 43 | 44 | // Dust 45 | sampler2D _DustTexture; 46 | 47 | // Cracks 48 | sampler2D _CracksSDFTexture; 49 | sampler2D _DetailNormal; 50 | 51 | // Glass 52 | sampler2D _GlassNormal; 53 | sampler2D _GlassTexture; 54 | 55 | // Reflection 56 | samplerCUBE _ReflectionTexture; -------------------------------------------------------------------------------- /Shader/IceInput.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3bb09f9cba951a54b971b192bc8e16ac 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ShaderGraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91ad91f32e393de4783d0f18622ea934 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ShaderGraph/IceGraph.shadergraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acececbb82d4d344eaad2d5d752673db 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ffce22a9d2306e45817485570f1ebec 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/AlphaBlending.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SGVersion": 3, 3 | "m_Type": "UnityEditor.ShaderGraph.GraphData", 4 | "m_ObjectId": "dd421ae125ab4694a70d51aceb4262a8", 5 | "m_Properties": [ 6 | { 7 | "m_Id": "450bc6544b5f4e26be39a6a6f5fb28e6" 8 | }, 9 | { 10 | "m_Id": "085cc7b2057145c7a6ebd6d0dbeaff06" 11 | } 12 | ], 13 | "m_Keywords": [], 14 | "m_Dropdowns": [], 15 | "m_CategoryData": [ 16 | { 17 | "m_Id": "f987f7c0ca8e456b8ac41ff812abc424" 18 | } 19 | ], 20 | "m_Nodes": [ 21 | { 22 | "m_Id": "b6d4bd091c03447eb1653247bf2e55bd" 23 | }, 24 | { 25 | "m_Id": "dac2dac8bb5c41e0bc2c15c4400c6561" 26 | }, 27 | { 28 | "m_Id": "18d802895dc84a38b5ca880a83819a79" 29 | }, 30 | { 31 | "m_Id": "1783594b27494dbe96372747b940f928" 32 | } 33 | ], 34 | "m_GroupDatas": [], 35 | "m_StickyNoteDatas": [], 36 | "m_Edges": [ 37 | { 38 | "m_OutputSlot": { 39 | "m_Node": { 40 | "m_Id": "1783594b27494dbe96372747b940f928" 41 | }, 42 | "m_SlotId": 0 43 | }, 44 | "m_InputSlot": { 45 | "m_Node": { 46 | "m_Id": "dac2dac8bb5c41e0bc2c15c4400c6561" 47 | }, 48 | "m_SlotId": 1 49 | } 50 | }, 51 | { 52 | "m_OutputSlot": { 53 | "m_Node": { 54 | "m_Id": "18d802895dc84a38b5ca880a83819a79" 55 | }, 56 | "m_SlotId": 0 57 | }, 58 | "m_InputSlot": { 59 | "m_Node": { 60 | "m_Id": "dac2dac8bb5c41e0bc2c15c4400c6561" 61 | }, 62 | "m_SlotId": 0 63 | } 64 | }, 65 | { 66 | "m_OutputSlot": { 67 | "m_Node": { 68 | "m_Id": "dac2dac8bb5c41e0bc2c15c4400c6561" 69 | }, 70 | "m_SlotId": 2 71 | }, 72 | "m_InputSlot": { 73 | "m_Node": { 74 | "m_Id": "b6d4bd091c03447eb1653247bf2e55bd" 75 | }, 76 | "m_SlotId": 1 77 | } 78 | } 79 | ], 80 | "m_VertexContext": { 81 | "m_Position": { 82 | "x": 0.0, 83 | "y": 0.0 84 | }, 85 | "m_Blocks": [] 86 | }, 87 | "m_FragmentContext": { 88 | "m_Position": { 89 | "x": 0.0, 90 | "y": 0.0 91 | }, 92 | "m_Blocks": [] 93 | }, 94 | "m_PreviewData": { 95 | "serializedMesh": { 96 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 97 | "m_Guid": "" 98 | }, 99 | "preventRotation": false 100 | }, 101 | "m_Path": "Sub Graphs", 102 | "m_GraphPrecision": 1, 103 | "m_PreviewMode": 2, 104 | "m_OutputNode": { 105 | "m_Id": "b6d4bd091c03447eb1653247bf2e55bd" 106 | }, 107 | "m_ActiveTargets": [] 108 | } 109 | 110 | { 111 | "m_SGVersion": 3, 112 | "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", 113 | "m_ObjectId": "085cc7b2057145c7a6ebd6d0dbeaff06", 114 | "m_Guid": { 115 | "m_GuidSerialized": "b1374806-e824-4779-aeb9-198b56d45309" 116 | }, 117 | "m_Name": "dstColor", 118 | "m_DefaultRefNameVersion": 1, 119 | "m_RefNameGeneratedByDisplayName": "dstColor", 120 | "m_DefaultReferenceName": "_dstColor", 121 | "m_OverrideReferenceName": "", 122 | "m_GeneratePropertyBlock": true, 123 | "m_UseCustomSlotLabel": false, 124 | "m_CustomSlotLabel": "", 125 | "m_Precision": 0, 126 | "overrideHLSLDeclaration": false, 127 | "hlslDeclarationOverride": 0, 128 | "m_Hidden": false, 129 | "m_Value": { 130 | "r": 0.0, 131 | "g": 0.0, 132 | "b": 0.0, 133 | "a": 0.0 134 | }, 135 | "isMainColor": false, 136 | "m_ColorMode": 0 137 | } 138 | 139 | { 140 | "m_SGVersion": 0, 141 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 142 | "m_ObjectId": "1783594b27494dbe96372747b940f928", 143 | "m_Group": { 144 | "m_Id": "" 145 | }, 146 | "m_Name": "Property", 147 | "m_DrawState": { 148 | "m_Expanded": true, 149 | "m_Position": { 150 | "serializedVersion": "2", 151 | "x": -736.0, 152 | "y": 43.0, 153 | "width": 122.0, 154 | "height": 34.0 155 | } 156 | }, 157 | "m_Slots": [ 158 | { 159 | "m_Id": "57d1f1aa48494e6d82be0efc0368624c" 160 | } 161 | ], 162 | "synonyms": [], 163 | "m_Precision": 0, 164 | "m_PreviewExpanded": true, 165 | "m_PreviewMode": 0, 166 | "m_CustomColors": { 167 | "m_SerializableColors": [] 168 | }, 169 | "m_Property": { 170 | "m_Id": "085cc7b2057145c7a6ebd6d0dbeaff06" 171 | } 172 | } 173 | 174 | { 175 | "m_SGVersion": 0, 176 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 177 | "m_ObjectId": "18d802895dc84a38b5ca880a83819a79", 178 | "m_Group": { 179 | "m_Id": "" 180 | }, 181 | "m_Name": "Property", 182 | "m_DrawState": { 183 | "m_Expanded": true, 184 | "m_Position": { 185 | "serializedVersion": "2", 186 | "x": -735.0, 187 | "y": -17.0, 188 | "width": 121.0, 189 | "height": 34.0 190 | } 191 | }, 192 | "m_Slots": [ 193 | { 194 | "m_Id": "9e9ed0bc6ac94f8db910c32ed1ca0bc6" 195 | } 196 | ], 197 | "synonyms": [], 198 | "m_Precision": 0, 199 | "m_PreviewExpanded": true, 200 | "m_PreviewMode": 0, 201 | "m_CustomColors": { 202 | "m_SerializableColors": [] 203 | }, 204 | "m_Property": { 205 | "m_Id": "450bc6544b5f4e26be39a6a6f5fb28e6" 206 | } 207 | } 208 | 209 | { 210 | "m_SGVersion": 1, 211 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector4ShaderProperty", 212 | "m_ObjectId": "450bc6544b5f4e26be39a6a6f5fb28e6", 213 | "m_Guid": { 214 | "m_GuidSerialized": "c7f9ac0a-995d-4f2e-855c-30c8c7f4610b" 215 | }, 216 | "m_Name": "srcColor", 217 | "m_DefaultRefNameVersion": 1, 218 | "m_RefNameGeneratedByDisplayName": "srcColor", 219 | "m_DefaultReferenceName": "_srcColor", 220 | "m_OverrideReferenceName": "", 221 | "m_GeneratePropertyBlock": true, 222 | "m_UseCustomSlotLabel": false, 223 | "m_CustomSlotLabel": "", 224 | "m_Precision": 0, 225 | "overrideHLSLDeclaration": false, 226 | "hlslDeclarationOverride": 0, 227 | "m_Hidden": false, 228 | "m_Value": { 229 | "x": 0.0, 230 | "y": 0.0, 231 | "z": 0.0, 232 | "w": 0.0 233 | } 234 | } 235 | 236 | { 237 | "m_SGVersion": 0, 238 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 239 | "m_ObjectId": "57d1f1aa48494e6d82be0efc0368624c", 240 | "m_Id": 0, 241 | "m_DisplayName": "dstColor", 242 | "m_SlotType": 1, 243 | "m_Hidden": false, 244 | "m_ShaderOutputName": "Out", 245 | "m_StageCapability": 3, 246 | "m_Value": { 247 | "x": 0.0, 248 | "y": 0.0, 249 | "z": 0.0, 250 | "w": 0.0 251 | }, 252 | "m_DefaultValue": { 253 | "x": 0.0, 254 | "y": 0.0, 255 | "z": 0.0, 256 | "w": 0.0 257 | }, 258 | "m_Labels": [] 259 | } 260 | 261 | { 262 | "m_SGVersion": 0, 263 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 264 | "m_ObjectId": "599d90e8b2cd4d05afdc9f1eed42f7ad", 265 | "m_Id": 1, 266 | "m_DisplayName": "dstColor", 267 | "m_SlotType": 0, 268 | "m_Hidden": false, 269 | "m_ShaderOutputName": "dstColor", 270 | "m_StageCapability": 3, 271 | "m_Value": { 272 | "x": 0.0, 273 | "y": 0.0, 274 | "z": 0.0, 275 | "w": 0.0 276 | }, 277 | "m_DefaultValue": { 278 | "x": 0.0, 279 | "y": 0.0, 280 | "z": 0.0, 281 | "w": 0.0 282 | }, 283 | "m_Labels": [] 284 | } 285 | 286 | { 287 | "m_SGVersion": 0, 288 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 289 | "m_ObjectId": "9e9ed0bc6ac94f8db910c32ed1ca0bc6", 290 | "m_Id": 0, 291 | "m_DisplayName": "srcColor", 292 | "m_SlotType": 1, 293 | "m_Hidden": false, 294 | "m_ShaderOutputName": "Out", 295 | "m_StageCapability": 3, 296 | "m_Value": { 297 | "x": 0.0, 298 | "y": 0.0, 299 | "z": 0.0, 300 | "w": 0.0 301 | }, 302 | "m_DefaultValue": { 303 | "x": 0.0, 304 | "y": 0.0, 305 | "z": 0.0, 306 | "w": 0.0 307 | }, 308 | "m_Labels": [] 309 | } 310 | 311 | { 312 | "m_SGVersion": 0, 313 | "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", 314 | "m_ObjectId": "b6d4bd091c03447eb1653247bf2e55bd", 315 | "m_Group": { 316 | "m_Id": "" 317 | }, 318 | "m_Name": "Output", 319 | "m_DrawState": { 320 | "m_Expanded": true, 321 | "m_Position": { 322 | "serializedVersion": "2", 323 | "x": -230.0000457763672, 324 | "y": -41.00002670288086, 325 | "width": 121.00006866455078, 326 | "height": 77.00005340576172 327 | } 328 | }, 329 | "m_Slots": [ 330 | { 331 | "m_Id": "efe1dbb97f2a463093d50f6af804f57f" 332 | } 333 | ], 334 | "synonyms": [], 335 | "m_Precision": 0, 336 | "m_PreviewExpanded": true, 337 | "m_PreviewMode": 0, 338 | "m_CustomColors": { 339 | "m_SerializableColors": [] 340 | }, 341 | "IsFirstSlotValid": true 342 | } 343 | 344 | { 345 | "m_SGVersion": 0, 346 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 347 | "m_ObjectId": "d5f1aa31c98b4f6dab895838082103f9", 348 | "m_Id": 0, 349 | "m_DisplayName": "srcColor", 350 | "m_SlotType": 0, 351 | "m_Hidden": false, 352 | "m_ShaderOutputName": "srcColor", 353 | "m_StageCapability": 3, 354 | "m_Value": { 355 | "x": 0.0, 356 | "y": 0.0, 357 | "z": 0.0, 358 | "w": 0.0 359 | }, 360 | "m_DefaultValue": { 361 | "x": 0.0, 362 | "y": 0.0, 363 | "z": 0.0, 364 | "w": 0.0 365 | }, 366 | "m_Labels": [] 367 | } 368 | 369 | { 370 | "m_SGVersion": 1, 371 | "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", 372 | "m_ObjectId": "dac2dac8bb5c41e0bc2c15c4400c6561", 373 | "m_Group": { 374 | "m_Id": "" 375 | }, 376 | "m_Name": "AlphaBlending (Custom Function)", 377 | "m_DrawState": { 378 | "m_Expanded": true, 379 | "m_Position": { 380 | "serializedVersion": "2", 381 | "x": -559.0, 382 | "y": -41.0, 383 | "width": 236.0, 384 | "height": 118.0 385 | } 386 | }, 387 | "m_Slots": [ 388 | { 389 | "m_Id": "d5f1aa31c98b4f6dab895838082103f9" 390 | }, 391 | { 392 | "m_Id": "599d90e8b2cd4d05afdc9f1eed42f7ad" 393 | }, 394 | { 395 | "m_Id": "e039262f2df4492081fca602ee86fe3f" 396 | } 397 | ], 398 | "synonyms": [ 399 | "code", 400 | "HLSL" 401 | ], 402 | "m_Precision": 0, 403 | "m_PreviewExpanded": false, 404 | "m_PreviewMode": 0, 405 | "m_CustomColors": { 406 | "m_SerializableColors": [] 407 | }, 408 | "m_SourceType": 1, 409 | "m_FunctionName": "AlphaBlending", 410 | "m_FunctionSource": "", 411 | "m_FunctionBody": " half oneMinutesAlpha = 1 - srcColor.a;\r\n output = srcColor + oneMinutesAlpha * dstColor;\r" 412 | } 413 | 414 | { 415 | "m_SGVersion": 0, 416 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 417 | "m_ObjectId": "e039262f2df4492081fca602ee86fe3f", 418 | "m_Id": 2, 419 | "m_DisplayName": "output", 420 | "m_SlotType": 1, 421 | "m_Hidden": false, 422 | "m_ShaderOutputName": "output", 423 | "m_StageCapability": 3, 424 | "m_Value": { 425 | "x": 0.0, 426 | "y": 0.0, 427 | "z": 0.0, 428 | "w": 0.0 429 | }, 430 | "m_DefaultValue": { 431 | "x": 0.0, 432 | "y": 0.0, 433 | "z": 0.0, 434 | "w": 0.0 435 | }, 436 | "m_Labels": [] 437 | } 438 | 439 | { 440 | "m_SGVersion": 0, 441 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 442 | "m_ObjectId": "efe1dbb97f2a463093d50f6af804f57f", 443 | "m_Id": 1, 444 | "m_DisplayName": "Out_Vector4", 445 | "m_SlotType": 0, 446 | "m_Hidden": false, 447 | "m_ShaderOutputName": "OutVector4", 448 | "m_StageCapability": 3, 449 | "m_Value": { 450 | "x": 0.0, 451 | "y": 0.0, 452 | "z": 0.0, 453 | "w": 0.0 454 | }, 455 | "m_DefaultValue": { 456 | "x": 0.0, 457 | "y": 0.0, 458 | "z": 0.0, 459 | "w": 0.0 460 | }, 461 | "m_Labels": [] 462 | } 463 | 464 | { 465 | "m_SGVersion": 0, 466 | "m_Type": "UnityEditor.ShaderGraph.CategoryData", 467 | "m_ObjectId": "f987f7c0ca8e456b8ac41ff812abc424", 468 | "m_Name": "", 469 | "m_ChildObjectList": [ 470 | { 471 | "m_Id": "450bc6544b5f4e26be39a6a6f5fb28e6" 472 | }, 473 | { 474 | "m_Id": "085cc7b2057145c7a6ebd6d0dbeaff06" 475 | } 476 | ] 477 | } 478 | 479 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/AlphaBlending.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87bea4f2c38572443ae4aad815e2bec0 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/EffectCracks.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 219468b60e0fdea47b38766c0145c78d 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/EffectDust.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a076704a10da8164183f51a3edcb25a1 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/EffectNormal.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b66c3f244ccce9c4098ad8cdde7cfcf9 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/EffectReflection.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SGVersion": 3, 3 | "m_Type": "UnityEditor.ShaderGraph.GraphData", 4 | "m_ObjectId": "818524e36b0f47d8be19d2de49458b3c", 5 | "m_Properties": [ 6 | { 7 | "m_Id": "ba3bc35bcf75487c8c2b8c36e7e261e2" 8 | }, 9 | { 10 | "m_Id": "82bea4ffe49a47c78c40f1d20804ed48" 11 | }, 12 | { 13 | "m_Id": "3228bdc94d8040bb8de318504221736e" 14 | } 15 | ], 16 | "m_Keywords": [], 17 | "m_Dropdowns": [], 18 | "m_CategoryData": [ 19 | { 20 | "m_Id": "0de24cd6e8aa4ba3a5b345a4e9a37db5" 21 | } 22 | ], 23 | "m_Nodes": [ 24 | { 25 | "m_Id": "38c8a54108e94bbea80039b3fd78bdab" 26 | }, 27 | { 28 | "m_Id": "2e6d288af5cb49f388d2405ba5dcba47" 29 | }, 30 | { 31 | "m_Id": "7c73ffafa7bd4ed5b420f91432bcddde" 32 | }, 33 | { 34 | "m_Id": "7def1017adb54df9ae61c385eecb0ad8" 35 | }, 36 | { 37 | "m_Id": "fcd5425b54dc4c91b67aaa3b921c6efb" 38 | }, 39 | { 40 | "m_Id": "a4a25a302a094331853a19f03b5691b1" 41 | }, 42 | { 43 | "m_Id": "742a2b210b8f4601920748ecbd7e2b5a" 44 | }, 45 | { 46 | "m_Id": "98e97377c2774503b6e3b6523d566f5a" 47 | }, 48 | { 49 | "m_Id": "b516d7a9c10d4075830959ec34963848" 50 | }, 51 | { 52 | "m_Id": "2bae703839f24820b9554ea9f6d4448b" 53 | }, 54 | { 55 | "m_Id": "7535d4a1b0d1455e9fb92dcacb9a1227" 56 | }, 57 | { 58 | "m_Id": "9506f5502de8437cb8a5811ba65529a4" 59 | }, 60 | { 61 | "m_Id": "caadba88939746d7a3cf2f4ec388a014" 62 | } 63 | ], 64 | "m_GroupDatas": [], 65 | "m_StickyNoteDatas": [], 66 | "m_Edges": [ 67 | { 68 | "m_OutputSlot": { 69 | "m_Node": { 70 | "m_Id": "2bae703839f24820b9554ea9f6d4448b" 71 | }, 72 | "m_SlotId": 2 73 | }, 74 | "m_InputSlot": { 75 | "m_Node": { 76 | "m_Id": "7535d4a1b0d1455e9fb92dcacb9a1227" 77 | }, 78 | "m_SlotId": 0 79 | } 80 | }, 81 | { 82 | "m_OutputSlot": { 83 | "m_Node": { 84 | "m_Id": "2e6d288af5cb49f388d2405ba5dcba47" 85 | }, 86 | "m_SlotId": 0 87 | }, 88 | "m_InputSlot": { 89 | "m_Node": { 90 | "m_Id": "7def1017adb54df9ae61c385eecb0ad8" 91 | }, 92 | "m_SlotId": 0 93 | } 94 | }, 95 | { 96 | "m_OutputSlot": { 97 | "m_Node": { 98 | "m_Id": "2e6d288af5cb49f388d2405ba5dcba47" 99 | }, 100 | "m_SlotId": 0 101 | }, 102 | "m_InputSlot": { 103 | "m_Node": { 104 | "m_Id": "caadba88939746d7a3cf2f4ec388a014" 105 | }, 106 | "m_SlotId": 0 107 | } 108 | }, 109 | { 110 | "m_OutputSlot": { 111 | "m_Node": { 112 | "m_Id": "742a2b210b8f4601920748ecbd7e2b5a" 113 | }, 114 | "m_SlotId": 0 115 | }, 116 | "m_InputSlot": { 117 | "m_Node": { 118 | "m_Id": "b516d7a9c10d4075830959ec34963848" 119 | }, 120 | "m_SlotId": 0 121 | } 122 | }, 123 | { 124 | "m_OutputSlot": { 125 | "m_Node": { 126 | "m_Id": "7535d4a1b0d1455e9fb92dcacb9a1227" 127 | }, 128 | "m_SlotId": 1 129 | }, 130 | "m_InputSlot": { 131 | "m_Node": { 132 | "m_Id": "9506f5502de8437cb8a5811ba65529a4" 133 | }, 134 | "m_SlotId": 0 135 | } 136 | }, 137 | { 138 | "m_OutputSlot": { 139 | "m_Node": { 140 | "m_Id": "7535d4a1b0d1455e9fb92dcacb9a1227" 141 | }, 142 | "m_SlotId": 2 143 | }, 144 | "m_InputSlot": { 145 | "m_Node": { 146 | "m_Id": "9506f5502de8437cb8a5811ba65529a4" 147 | }, 148 | "m_SlotId": 1 149 | } 150 | }, 151 | { 152 | "m_OutputSlot": { 153 | "m_Node": { 154 | "m_Id": "7535d4a1b0d1455e9fb92dcacb9a1227" 155 | }, 156 | "m_SlotId": 3 157 | }, 158 | "m_InputSlot": { 159 | "m_Node": { 160 | "m_Id": "9506f5502de8437cb8a5811ba65529a4" 161 | }, 162 | "m_SlotId": 2 163 | } 164 | }, 165 | { 166 | "m_OutputSlot": { 167 | "m_Node": { 168 | "m_Id": "7c73ffafa7bd4ed5b420f91432bcddde" 169 | }, 170 | "m_SlotId": 0 171 | }, 172 | "m_InputSlot": { 173 | "m_Node": { 174 | "m_Id": "caadba88939746d7a3cf2f4ec388a014" 175 | }, 176 | "m_SlotId": 1 177 | } 178 | }, 179 | { 180 | "m_OutputSlot": { 181 | "m_Node": { 182 | "m_Id": "7c73ffafa7bd4ed5b420f91432bcddde" 183 | }, 184 | "m_SlotId": 0 185 | }, 186 | "m_InputSlot": { 187 | "m_Node": { 188 | "m_Id": "fcd5425b54dc4c91b67aaa3b921c6efb" 189 | }, 190 | "m_SlotId": 1 191 | } 192 | }, 193 | { 194 | "m_OutputSlot": { 195 | "m_Node": { 196 | "m_Id": "7def1017adb54df9ae61c385eecb0ad8" 197 | }, 198 | "m_SlotId": 1 199 | }, 200 | "m_InputSlot": { 201 | "m_Node": { 202 | "m_Id": "fcd5425b54dc4c91b67aaa3b921c6efb" 203 | }, 204 | "m_SlotId": 0 205 | } 206 | }, 207 | { 208 | "m_OutputSlot": { 209 | "m_Node": { 210 | "m_Id": "9506f5502de8437cb8a5811ba65529a4" 211 | }, 212 | "m_SlotId": 4 213 | }, 214 | "m_InputSlot": { 215 | "m_Node": { 216 | "m_Id": "38c8a54108e94bbea80039b3fd78bdab" 217 | }, 218 | "m_SlotId": 1 219 | } 220 | }, 221 | { 222 | "m_OutputSlot": { 223 | "m_Node": { 224 | "m_Id": "98e97377c2774503b6e3b6523d566f5a" 225 | }, 226 | "m_SlotId": 0 227 | }, 228 | "m_InputSlot": { 229 | "m_Node": { 230 | "m_Id": "b516d7a9c10d4075830959ec34963848" 231 | }, 232 | "m_SlotId": 1 233 | } 234 | }, 235 | { 236 | "m_OutputSlot": { 237 | "m_Node": { 238 | "m_Id": "a4a25a302a094331853a19f03b5691b1" 239 | }, 240 | "m_SlotId": 0 241 | }, 242 | "m_InputSlot": { 243 | "m_Node": { 244 | "m_Id": "742a2b210b8f4601920748ecbd7e2b5a" 245 | }, 246 | "m_SlotId": 1 247 | } 248 | }, 249 | { 250 | "m_OutputSlot": { 251 | "m_Node": { 252 | "m_Id": "b516d7a9c10d4075830959ec34963848" 253 | }, 254 | "m_SlotId": 2 255 | }, 256 | "m_InputSlot": { 257 | "m_Node": { 258 | "m_Id": "2bae703839f24820b9554ea9f6d4448b" 259 | }, 260 | "m_SlotId": 0 261 | } 262 | }, 263 | { 264 | "m_OutputSlot": { 265 | "m_Node": { 266 | "m_Id": "caadba88939746d7a3cf2f4ec388a014" 267 | }, 268 | "m_SlotId": 2 269 | }, 270 | "m_InputSlot": { 271 | "m_Node": { 272 | "m_Id": "2bae703839f24820b9554ea9f6d4448b" 273 | }, 274 | "m_SlotId": 1 275 | } 276 | }, 277 | { 278 | "m_OutputSlot": { 279 | "m_Node": { 280 | "m_Id": "caadba88939746d7a3cf2f4ec388a014" 281 | }, 282 | "m_SlotId": 2 283 | }, 284 | "m_InputSlot": { 285 | "m_Node": { 286 | "m_Id": "9506f5502de8437cb8a5811ba65529a4" 287 | }, 288 | "m_SlotId": 3 289 | } 290 | }, 291 | { 292 | "m_OutputSlot": { 293 | "m_Node": { 294 | "m_Id": "fcd5425b54dc4c91b67aaa3b921c6efb" 295 | }, 296 | "m_SlotId": 2 297 | }, 298 | "m_InputSlot": { 299 | "m_Node": { 300 | "m_Id": "742a2b210b8f4601920748ecbd7e2b5a" 301 | }, 302 | "m_SlotId": 2 303 | } 304 | } 305 | ], 306 | "m_VertexContext": { 307 | "m_Position": { 308 | "x": 0.0, 309 | "y": 0.0 310 | }, 311 | "m_Blocks": [] 312 | }, 313 | "m_FragmentContext": { 314 | "m_Position": { 315 | "x": 0.0, 316 | "y": 0.0 317 | }, 318 | "m_Blocks": [] 319 | }, 320 | "m_PreviewData": { 321 | "serializedMesh": { 322 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 323 | "m_Guid": "" 324 | }, 325 | "preventRotation": false 326 | }, 327 | "m_Path": "Sub Graphs", 328 | "m_GraphPrecision": 1, 329 | "m_PreviewMode": 2, 330 | "m_OutputNode": { 331 | "m_Id": "38c8a54108e94bbea80039b3fd78bdab" 332 | }, 333 | "m_ActiveTargets": [] 334 | } 335 | 336 | { 337 | "m_SGVersion": 0, 338 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 339 | "m_ObjectId": "0978e047ade847c6a98d2c0f7fd7d5b7", 340 | "m_Id": 0, 341 | "m_DisplayName": "viewDirectionWS", 342 | "m_SlotType": 0, 343 | "m_Hidden": false, 344 | "m_ShaderOutputName": "viewDirectionWS", 345 | "m_StageCapability": 3, 346 | "m_Value": { 347 | "x": 0.0, 348 | "y": 0.0, 349 | "z": 0.0 350 | }, 351 | "m_DefaultValue": { 352 | "x": 0.0, 353 | "y": 0.0, 354 | "z": 0.0 355 | }, 356 | "m_Labels": [] 357 | } 358 | 359 | { 360 | "m_SGVersion": 0, 361 | "m_Type": "UnityEditor.ShaderGraph.CategoryData", 362 | "m_ObjectId": "0de24cd6e8aa4ba3a5b345a4e9a37db5", 363 | "m_Name": "", 364 | "m_ChildObjectList": [ 365 | { 366 | "m_Id": "ba3bc35bcf75487c8c2b8c36e7e261e2" 367 | }, 368 | { 369 | "m_Id": "82bea4ffe49a47c78c40f1d20804ed48" 370 | }, 371 | { 372 | "m_Id": "3228bdc94d8040bb8de318504221736e" 373 | } 374 | ] 375 | } 376 | 377 | { 378 | "m_SGVersion": 0, 379 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 380 | "m_ObjectId": "1232c7829a1d451c830762963f34803d", 381 | "m_Id": 1, 382 | "m_DisplayName": "Out", 383 | "m_SlotType": 1, 384 | "m_Hidden": false, 385 | "m_ShaderOutputName": "Out", 386 | "m_StageCapability": 3, 387 | "m_Value": { 388 | "x": 0.0, 389 | "y": 0.0, 390 | "z": 0.0, 391 | "w": 0.0 392 | }, 393 | "m_DefaultValue": { 394 | "x": 0.0, 395 | "y": 0.0, 396 | "z": 0.0, 397 | "w": 0.0 398 | } 399 | } 400 | 401 | { 402 | "m_SGVersion": 0, 403 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 404 | "m_ObjectId": "1dfddbc24aea4811b187d842ae1a061a", 405 | "m_Id": 1, 406 | "m_DisplayName": "Normal", 407 | "m_SlotType": 0, 408 | "m_Hidden": false, 409 | "m_ShaderOutputName": "Normal", 410 | "m_StageCapability": 3, 411 | "m_Value": { 412 | "x": 0.0, 413 | "y": 1.0, 414 | "z": 0.0, 415 | "w": 0.0 416 | }, 417 | "m_DefaultValue": { 418 | "x": 0.0, 419 | "y": 0.0, 420 | "z": 0.0, 421 | "w": 0.0 422 | } 423 | } 424 | 425 | { 426 | "m_SGVersion": 0, 427 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 428 | "m_ObjectId": "1e04e70a759544f69622a620cc676613", 429 | "m_Id": 0, 430 | "m_DisplayName": "In", 431 | "m_SlotType": 0, 432 | "m_Hidden": false, 433 | "m_ShaderOutputName": "In", 434 | "m_StageCapability": 3, 435 | "m_Value": { 436 | "x": 0.0, 437 | "y": 0.0, 438 | "z": 0.0, 439 | "w": 0.0 440 | }, 441 | "m_DefaultValue": { 442 | "x": 0.0, 443 | "y": 0.0, 444 | "z": 0.0, 445 | "w": 0.0 446 | } 447 | } 448 | 449 | { 450 | "m_SGVersion": 0, 451 | "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", 452 | "m_ObjectId": "238fc2a44b7d459b904bf9e708c7dfa2", 453 | "m_Id": 3, 454 | "m_DisplayName": "Sampler", 455 | "m_SlotType": 0, 456 | "m_Hidden": false, 457 | "m_ShaderOutputName": "Sampler", 458 | "m_StageCapability": 3, 459 | "m_BareResource": false 460 | } 461 | 462 | { 463 | "m_SGVersion": 0, 464 | "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", 465 | "m_ObjectId": "2bae703839f24820b9554ea9f6d4448b", 466 | "m_Group": { 467 | "m_Id": "" 468 | }, 469 | "m_Name": "Multiply", 470 | "m_DrawState": { 471 | "m_Expanded": true, 472 | "m_Position": { 473 | "serializedVersion": "2", 474 | "x": 593.9999389648438, 475 | "y": -211.00001525878907, 476 | "width": 130.00006103515626, 477 | "height": 117.99983978271485 478 | } 479 | }, 480 | "m_Slots": [ 481 | { 482 | "m_Id": "46c86c8224254f07a96d4a4e0b9f75af" 483 | }, 484 | { 485 | "m_Id": "2f8e0ffba0c94e43a570339d6337958b" 486 | }, 487 | { 488 | "m_Id": "5c2c63e932904ca2847684006e818b7f" 489 | } 490 | ], 491 | "synonyms": [ 492 | "multiplication", 493 | "times", 494 | "x" 495 | ], 496 | "m_Precision": 0, 497 | "m_PreviewExpanded": false, 498 | "m_PreviewMode": 0, 499 | "m_CustomColors": { 500 | "m_SerializableColors": [] 501 | } 502 | } 503 | 504 | { 505 | "m_SGVersion": 0, 506 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 507 | "m_ObjectId": "2dbf10e0c6ae482b8a512c22331b8a08", 508 | "m_Id": 1, 509 | "m_DisplayName": "ReflectionColor", 510 | "m_SlotType": 0, 511 | "m_Hidden": false, 512 | "m_ShaderOutputName": "ReflectionColor", 513 | "m_StageCapability": 3, 514 | "m_Value": { 515 | "x": 0.0, 516 | "y": 0.0, 517 | "z": 0.0, 518 | "w": 0.0 519 | }, 520 | "m_DefaultValue": { 521 | "x": 0.0, 522 | "y": 0.0, 523 | "z": 0.0, 524 | "w": 0.0 525 | }, 526 | "m_Labels": [] 527 | } 528 | 529 | { 530 | "m_SGVersion": 1, 531 | "m_Type": "UnityEditor.ShaderGraph.ViewDirectionNode", 532 | "m_ObjectId": "2e6d288af5cb49f388d2405ba5dcba47", 533 | "m_Group": { 534 | "m_Id": "" 535 | }, 536 | "m_Name": "View Direction", 537 | "m_DrawState": { 538 | "m_Expanded": true, 539 | "m_Position": { 540 | "serializedVersion": "2", 541 | "x": -785.0, 542 | "y": -339.0, 543 | "width": 206.0, 544 | "height": 131.0 545 | } 546 | }, 547 | "m_Slots": [ 548 | { 549 | "m_Id": "97665889cb5542f996b5b1eb2b42e94e" 550 | } 551 | ], 552 | "synonyms": [ 553 | "eye direction" 554 | ], 555 | "m_Precision": 0, 556 | "m_PreviewExpanded": false, 557 | "m_PreviewMode": 2, 558 | "m_CustomColors": { 559 | "m_SerializableColors": [] 560 | }, 561 | "m_Space": 2 562 | } 563 | 564 | { 565 | "m_SGVersion": 0, 566 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 567 | "m_ObjectId": "2f6a54185ae0463ab8df939ca4fe14e8", 568 | "m_Id": 0, 569 | "m_DisplayName": "A", 570 | "m_SlotType": 0, 571 | "m_Hidden": false, 572 | "m_ShaderOutputName": "A", 573 | "m_StageCapability": 3, 574 | "m_Value": { 575 | "e00": 0.0, 576 | "e01": 0.0, 577 | "e02": 0.0, 578 | "e03": 0.0, 579 | "e10": 0.0, 580 | "e11": 0.0, 581 | "e12": 0.0, 582 | "e13": 0.0, 583 | "e20": 0.0, 584 | "e21": 0.0, 585 | "e22": 0.0, 586 | "e23": 0.0, 587 | "e30": 0.0, 588 | "e31": 0.0, 589 | "e32": 0.0, 590 | "e33": 0.0 591 | }, 592 | "m_DefaultValue": { 593 | "e00": 1.0, 594 | "e01": 0.0, 595 | "e02": 0.0, 596 | "e03": 0.0, 597 | "e10": 0.0, 598 | "e11": 1.0, 599 | "e12": 0.0, 600 | "e13": 0.0, 601 | "e20": 0.0, 602 | "e21": 0.0, 603 | "e22": 1.0, 604 | "e23": 0.0, 605 | "e30": 0.0, 606 | "e31": 0.0, 607 | "e32": 0.0, 608 | "e33": 1.0 609 | } 610 | } 611 | 612 | { 613 | "m_SGVersion": 0, 614 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 615 | "m_ObjectId": "2f8e0ffba0c94e43a570339d6337958b", 616 | "m_Id": 1, 617 | "m_DisplayName": "B", 618 | "m_SlotType": 0, 619 | "m_Hidden": false, 620 | "m_ShaderOutputName": "B", 621 | "m_StageCapability": 3, 622 | "m_Value": { 623 | "e00": 2.0, 624 | "e01": 2.0, 625 | "e02": 2.0, 626 | "e03": 2.0, 627 | "e10": 2.0, 628 | "e11": 2.0, 629 | "e12": 2.0, 630 | "e13": 2.0, 631 | "e20": 2.0, 632 | "e21": 2.0, 633 | "e22": 2.0, 634 | "e23": 2.0, 635 | "e30": 2.0, 636 | "e31": 2.0, 637 | "e32": 2.0, 638 | "e33": 2.0 639 | }, 640 | "m_DefaultValue": { 641 | "e00": 1.0, 642 | "e01": 0.0, 643 | "e02": 0.0, 644 | "e03": 0.0, 645 | "e10": 0.0, 646 | "e11": 1.0, 647 | "e12": 0.0, 648 | "e13": 0.0, 649 | "e20": 0.0, 650 | "e21": 0.0, 651 | "e22": 1.0, 652 | "e23": 0.0, 653 | "e30": 0.0, 654 | "e31": 0.0, 655 | "e32": 0.0, 656 | "e33": 1.0 657 | } 658 | } 659 | 660 | { 661 | "m_SGVersion": 3, 662 | "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", 663 | "m_ObjectId": "3228bdc94d8040bb8de318504221736e", 664 | "m_Guid": { 665 | "m_GuidSerialized": "42444ed3-d4c5-4340-8534-5c8f3e530903" 666 | }, 667 | "m_Name": "ReflectionColor", 668 | "m_DefaultRefNameVersion": 1, 669 | "m_RefNameGeneratedByDisplayName": "ReflectionColor", 670 | "m_DefaultReferenceName": "_ReflectionColor", 671 | "m_OverrideReferenceName": "", 672 | "m_GeneratePropertyBlock": true, 673 | "m_UseCustomSlotLabel": false, 674 | "m_CustomSlotLabel": "", 675 | "m_Precision": 0, 676 | "overrideHLSLDeclaration": false, 677 | "hlslDeclarationOverride": 0, 678 | "m_Hidden": false, 679 | "m_Value": { 680 | "r": 1.0, 681 | "g": 1.0, 682 | "b": 1.0, 683 | "a": 1.0 684 | }, 685 | "isMainColor": false, 686 | "m_ColorMode": 0 687 | } 688 | 689 | { 690 | "m_SGVersion": 0, 691 | "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", 692 | "m_ObjectId": "38c8a54108e94bbea80039b3fd78bdab", 693 | "m_Group": { 694 | "m_Id": "" 695 | }, 696 | "m_Name": "Output", 697 | "m_DrawState": { 698 | "m_Expanded": true, 699 | "m_Position": { 700 | "serializedVersion": "2", 701 | "x": 1206.0, 702 | "y": -160.0, 703 | "width": 136.0, 704 | "height": 76.99981689453125 705 | } 706 | }, 707 | "m_Slots": [ 708 | { 709 | "m_Id": "2dbf10e0c6ae482b8a512c22331b8a08" 710 | } 711 | ], 712 | "synonyms": [], 713 | "m_Precision": 0, 714 | "m_PreviewExpanded": true, 715 | "m_PreviewMode": 0, 716 | "m_CustomColors": { 717 | "m_SerializableColors": [] 718 | }, 719 | "IsFirstSlotValid": true 720 | } 721 | 722 | { 723 | "m_SGVersion": 0, 724 | "m_Type": "UnityEditor.ShaderGraph.CubemapMaterialSlot", 725 | "m_ObjectId": "3970deca9105416e87bb9e6dd8e7e296", 726 | "m_Id": 0, 727 | "m_DisplayName": "Cubemap", 728 | "m_SlotType": 1, 729 | "m_Hidden": false, 730 | "m_ShaderOutputName": "Out", 731 | "m_StageCapability": 3, 732 | "m_BareResource": false 733 | } 734 | 735 | { 736 | "m_SGVersion": 0, 737 | "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", 738 | "m_ObjectId": "3e560f073f0c49d28befed2db535917e", 739 | "m_Id": 6, 740 | "m_DisplayName": "RG", 741 | "m_SlotType": 1, 742 | "m_Hidden": false, 743 | "m_ShaderOutputName": "RG", 744 | "m_StageCapability": 3, 745 | "m_Value": { 746 | "x": 0.0, 747 | "y": 0.0 748 | }, 749 | "m_DefaultValue": { 750 | "x": 0.0, 751 | "y": 0.0 752 | }, 753 | "m_Labels": [] 754 | } 755 | 756 | { 757 | "m_SGVersion": 0, 758 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 759 | "m_ObjectId": "41a6ff652bf24ae88751dd6d37789360", 760 | "m_Id": 1, 761 | "m_DisplayName": "pixelNormalWS", 762 | "m_SlotType": 0, 763 | "m_Hidden": false, 764 | "m_ShaderOutputName": "pixelNormalWS", 765 | "m_StageCapability": 3, 766 | "m_Value": { 767 | "x": 0.0, 768 | "y": 0.0, 769 | "z": 0.0 770 | }, 771 | "m_DefaultValue": { 772 | "x": 0.0, 773 | "y": 0.0, 774 | "z": 0.0 775 | }, 776 | "m_Labels": [] 777 | } 778 | 779 | { 780 | "m_SGVersion": 0, 781 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 782 | "m_ObjectId": "46c86c8224254f07a96d4a4e0b9f75af", 783 | "m_Id": 0, 784 | "m_DisplayName": "A", 785 | "m_SlotType": 0, 786 | "m_Hidden": false, 787 | "m_ShaderOutputName": "A", 788 | "m_StageCapability": 3, 789 | "m_Value": { 790 | "e00": 0.0, 791 | "e01": 0.0, 792 | "e02": 0.0, 793 | "e03": 0.0, 794 | "e10": 0.0, 795 | "e11": 0.0, 796 | "e12": 0.0, 797 | "e13": 0.0, 798 | "e20": 0.0, 799 | "e21": 0.0, 800 | "e22": 0.0, 801 | "e23": 0.0, 802 | "e30": 0.0, 803 | "e31": 0.0, 804 | "e32": 0.0, 805 | "e33": 0.0 806 | }, 807 | "m_DefaultValue": { 808 | "e00": 1.0, 809 | "e01": 0.0, 810 | "e02": 0.0, 811 | "e03": 0.0, 812 | "e10": 0.0, 813 | "e11": 1.0, 814 | "e12": 0.0, 815 | "e13": 0.0, 816 | "e20": 0.0, 817 | "e21": 0.0, 818 | "e22": 1.0, 819 | "e23": 0.0, 820 | "e30": 0.0, 821 | "e31": 0.0, 822 | "e32": 0.0, 823 | "e33": 1.0 824 | } 825 | } 826 | 827 | { 828 | "m_SGVersion": 0, 829 | "m_Type": "UnityEditor.ShaderGraph.CubemapInputMaterialSlot", 830 | "m_ObjectId": "5245915b512042199a4ecdff63deefa0", 831 | "m_Id": 1, 832 | "m_DisplayName": "Cube", 833 | "m_SlotType": 0, 834 | "m_Hidden": false, 835 | "m_ShaderOutputName": "Cube", 836 | "m_StageCapability": 3, 837 | "m_BareResource": false, 838 | "m_Cubemap": { 839 | "m_SerializedCubemap": "{\"cubemap\":{\"instanceID\":0}}", 840 | "m_Guid": "" 841 | } 842 | } 843 | 844 | { 845 | "m_SGVersion": 0, 846 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 847 | "m_ObjectId": "52f14e3aa1a1418f9d3c03a3ec08f4c8", 848 | "m_Id": 2, 849 | "m_DisplayName": "Out", 850 | "m_SlotType": 1, 851 | "m_Hidden": false, 852 | "m_ShaderOutputName": "Out", 853 | "m_StageCapability": 3, 854 | "m_Value": { 855 | "x": 0.0, 856 | "y": 0.0, 857 | "z": 0.0, 858 | "w": 0.0 859 | }, 860 | "m_DefaultValue": { 861 | "x": 0.0, 862 | "y": 0.0, 863 | "z": 0.0, 864 | "w": 0.0 865 | } 866 | } 867 | 868 | { 869 | "m_SGVersion": 0, 870 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 871 | "m_ObjectId": "5c2c63e932904ca2847684006e818b7f", 872 | "m_Id": 2, 873 | "m_DisplayName": "Out", 874 | "m_SlotType": 1, 875 | "m_Hidden": false, 876 | "m_ShaderOutputName": "Out", 877 | "m_StageCapability": 3, 878 | "m_Value": { 879 | "e00": 0.0, 880 | "e01": 0.0, 881 | "e02": 0.0, 882 | "e03": 0.0, 883 | "e10": 0.0, 884 | "e11": 0.0, 885 | "e12": 0.0, 886 | "e13": 0.0, 887 | "e20": 0.0, 888 | "e21": 0.0, 889 | "e22": 0.0, 890 | "e23": 0.0, 891 | "e30": 0.0, 892 | "e31": 0.0, 893 | "e32": 0.0, 894 | "e33": 0.0 895 | }, 896 | "m_DefaultValue": { 897 | "e00": 1.0, 898 | "e01": 0.0, 899 | "e02": 0.0, 900 | "e03": 0.0, 901 | "e10": 0.0, 902 | "e11": 1.0, 903 | "e12": 0.0, 904 | "e13": 0.0, 905 | "e20": 0.0, 906 | "e21": 0.0, 907 | "e22": 1.0, 908 | "e23": 0.0, 909 | "e30": 0.0, 910 | "e31": 0.0, 911 | "e32": 0.0, 912 | "e33": 1.0 913 | } 914 | } 915 | 916 | { 917 | "m_SGVersion": 0, 918 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 919 | "m_ObjectId": "5db08c4bf1e7493894642c7b0df902ba", 920 | "m_Id": 2, 921 | "m_DisplayName": "G", 922 | "m_SlotType": 1, 923 | "m_Hidden": false, 924 | "m_ShaderOutputName": "G", 925 | "m_StageCapability": 3, 926 | "m_Value": 0.0, 927 | "m_DefaultValue": 0.0, 928 | "m_Labels": [] 929 | } 930 | 931 | { 932 | "m_SGVersion": 0, 933 | "m_Type": "UnityEditor.ShaderGraph.SampleRawCubemapNode", 934 | "m_ObjectId": "742a2b210b8f4601920748ecbd7e2b5a", 935 | "m_Group": { 936 | "m_Id": "" 937 | }, 938 | "m_Name": "Sample Cubemap", 939 | "m_DrawState": { 940 | "m_Expanded": true, 941 | "m_Position": { 942 | "serializedVersion": "2", 943 | "x": -25.0, 944 | "y": -420.0, 945 | "width": 208.00001525878907, 946 | "height": 350.0 947 | } 948 | }, 949 | "m_Slots": [ 950 | { 951 | "m_Id": "cdbc8270069b4fafab9960090b0711ba" 952 | }, 953 | { 954 | "m_Id": "5245915b512042199a4ecdff63deefa0" 955 | }, 956 | { 957 | "m_Id": "ce839d4957d94adba48d0304b6da4429" 958 | }, 959 | { 960 | "m_Id": "238fc2a44b7d459b904bf9e708c7dfa2" 961 | }, 962 | { 963 | "m_Id": "b1dad2c63c64409d8a262d34069c90ed" 964 | } 965 | ], 966 | "synonyms": [], 967 | "m_Precision": 0, 968 | "m_PreviewExpanded": true, 969 | "m_PreviewMode": 2, 970 | "m_CustomColors": { 971 | "m_SerializableColors": [] 972 | } 973 | } 974 | 975 | { 976 | "m_SGVersion": 0, 977 | "m_Type": "UnityEditor.ShaderGraph.SplitNode", 978 | "m_ObjectId": "7535d4a1b0d1455e9fb92dcacb9a1227", 979 | "m_Group": { 980 | "m_Id": "" 981 | }, 982 | "m_Name": "Split", 983 | "m_DrawState": { 984 | "m_Expanded": true, 985 | "m_Position": { 986 | "serializedVersion": "2", 987 | "x": 780.0, 988 | "y": -211.00001525878907, 989 | "width": 120.0, 990 | "height": 148.99986267089845 991 | } 992 | }, 993 | "m_Slots": [ 994 | { 995 | "m_Id": "a6de26e529e74f3790eb6777c1af97a6" 996 | }, 997 | { 998 | "m_Id": "8e967eafc86047eb8ef97a5cfc655337" 999 | }, 1000 | { 1001 | "m_Id": "5db08c4bf1e7493894642c7b0df902ba" 1002 | }, 1003 | { 1004 | "m_Id": "fe846b5039c2430099da132948e349cf" 1005 | }, 1006 | { 1007 | "m_Id": "efa2adb52b66419f8c4acf1c9fc57dad" 1008 | } 1009 | ], 1010 | "synonyms": [ 1011 | "separate" 1012 | ], 1013 | "m_Precision": 0, 1014 | "m_PreviewExpanded": true, 1015 | "m_PreviewMode": 0, 1016 | "m_CustomColors": { 1017 | "m_SerializableColors": [] 1018 | } 1019 | } 1020 | 1021 | { 1022 | "m_SGVersion": 0, 1023 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 1024 | "m_ObjectId": "75409afed2e94061a103e262c4162bbe", 1025 | "m_Id": 5, 1026 | "m_DisplayName": "RGB", 1027 | "m_SlotType": 1, 1028 | "m_Hidden": false, 1029 | "m_ShaderOutputName": "RGB", 1030 | "m_StageCapability": 3, 1031 | "m_Value": { 1032 | "x": 0.0, 1033 | "y": 0.0, 1034 | "z": 0.0 1035 | }, 1036 | "m_DefaultValue": { 1037 | "x": 0.0, 1038 | "y": 0.0, 1039 | "z": 0.0 1040 | }, 1041 | "m_Labels": [] 1042 | } 1043 | 1044 | { 1045 | "m_SGVersion": 0, 1046 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 1047 | "m_ObjectId": "7c73ffafa7bd4ed5b420f91432bcddde", 1048 | "m_Group": { 1049 | "m_Id": "" 1050 | }, 1051 | "m_Name": "Property", 1052 | "m_DrawState": { 1053 | "m_Expanded": true, 1054 | "m_Position": { 1055 | "serializedVersion": "2", 1056 | "x": -746.0, 1057 | "y": -174.00001525878907, 1058 | "width": 157.0, 1059 | "height": 33.99998474121094 1060 | } 1061 | }, 1062 | "m_Slots": [ 1063 | { 1064 | "m_Id": "9446b3939f7d49a595110a90ca8f64ab" 1065 | } 1066 | ], 1067 | "synonyms": [], 1068 | "m_Precision": 0, 1069 | "m_PreviewExpanded": true, 1070 | "m_PreviewMode": 0, 1071 | "m_CustomColors": { 1072 | "m_SerializableColors": [] 1073 | }, 1074 | "m_Property": { 1075 | "m_Id": "82bea4ffe49a47c78c40f1d20804ed48" 1076 | } 1077 | } 1078 | 1079 | { 1080 | "m_SGVersion": 0, 1081 | "m_Type": "UnityEditor.ShaderGraph.NegateNode", 1082 | "m_ObjectId": "7def1017adb54df9ae61c385eecb0ad8", 1083 | "m_Group": { 1084 | "m_Id": "" 1085 | }, 1086 | "m_Name": "Negate", 1087 | "m_DrawState": { 1088 | "m_Expanded": true, 1089 | "m_Position": { 1090 | "serializedVersion": "2", 1091 | "x": -553.0, 1092 | "y": -339.0, 1093 | "width": 132.0, 1094 | "height": 94.0 1095 | } 1096 | }, 1097 | "m_Slots": [ 1098 | { 1099 | "m_Id": "1e04e70a759544f69622a620cc676613" 1100 | }, 1101 | { 1102 | "m_Id": "1232c7829a1d451c830762963f34803d" 1103 | } 1104 | ], 1105 | "synonyms": [ 1106 | "invert", 1107 | "opposite" 1108 | ], 1109 | "m_Precision": 0, 1110 | "m_PreviewExpanded": false, 1111 | "m_PreviewMode": 0, 1112 | "m_CustomColors": { 1113 | "m_SerializableColors": [] 1114 | } 1115 | } 1116 | 1117 | { 1118 | "m_SGVersion": 1, 1119 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", 1120 | "m_ObjectId": "82bea4ffe49a47c78c40f1d20804ed48", 1121 | "m_Guid": { 1122 | "m_GuidSerialized": "71e4bf56-2910-4321-8618-c63984cdad71" 1123 | }, 1124 | "m_Name": "PixelNormalWS", 1125 | "m_DefaultRefNameVersion": 1, 1126 | "m_RefNameGeneratedByDisplayName": "PixelNormalWS", 1127 | "m_DefaultReferenceName": "_PixelNormalWS", 1128 | "m_OverrideReferenceName": "", 1129 | "m_GeneratePropertyBlock": true, 1130 | "m_UseCustomSlotLabel": false, 1131 | "m_CustomSlotLabel": "", 1132 | "m_Precision": 0, 1133 | "overrideHLSLDeclaration": false, 1134 | "hlslDeclarationOverride": 0, 1135 | "m_Hidden": false, 1136 | "m_Value": { 1137 | "x": 0.0, 1138 | "y": 0.0, 1139 | "z": 1.0, 1140 | "w": 0.0 1141 | } 1142 | } 1143 | 1144 | { 1145 | "m_SGVersion": 0, 1146 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1147 | "m_ObjectId": "8e967eafc86047eb8ef97a5cfc655337", 1148 | "m_Id": 1, 1149 | "m_DisplayName": "R", 1150 | "m_SlotType": 1, 1151 | "m_Hidden": false, 1152 | "m_ShaderOutputName": "R", 1153 | "m_StageCapability": 3, 1154 | "m_Value": 0.0, 1155 | "m_DefaultValue": 0.0, 1156 | "m_Labels": [] 1157 | } 1158 | 1159 | { 1160 | "m_SGVersion": 0, 1161 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 1162 | "m_ObjectId": "9446b3939f7d49a595110a90ca8f64ab", 1163 | "m_Id": 0, 1164 | "m_DisplayName": "PixelNormalWS", 1165 | "m_SlotType": 1, 1166 | "m_Hidden": false, 1167 | "m_ShaderOutputName": "Out", 1168 | "m_StageCapability": 3, 1169 | "m_Value": { 1170 | "x": 0.0, 1171 | "y": 0.0, 1172 | "z": 0.0 1173 | }, 1174 | "m_DefaultValue": { 1175 | "x": 0.0, 1176 | "y": 0.0, 1177 | "z": 0.0 1178 | }, 1179 | "m_Labels": [] 1180 | } 1181 | 1182 | { 1183 | "m_SGVersion": 0, 1184 | "m_Type": "UnityEditor.ShaderGraph.CombineNode", 1185 | "m_ObjectId": "9506f5502de8437cb8a5811ba65529a4", 1186 | "m_Group": { 1187 | "m_Id": "" 1188 | }, 1189 | "m_Name": "Combine", 1190 | "m_DrawState": { 1191 | "m_Expanded": true, 1192 | "m_Position": { 1193 | "serializedVersion": "2", 1194 | "x": 941.9999389648438, 1195 | "y": -160.0, 1196 | "width": 207.99993896484376, 1197 | "height": 350.0 1198 | } 1199 | }, 1200 | "m_Slots": [ 1201 | { 1202 | "m_Id": "cc6220ad4a634ce5951d96b47902f2d0" 1203 | }, 1204 | { 1205 | "m_Id": "e1a71abf67454793a7d033b962b47bd8" 1206 | }, 1207 | { 1208 | "m_Id": "cb7d47bcc1c84e28879684b3466d7b2e" 1209 | }, 1210 | { 1211 | "m_Id": "dfe8d3ba805c45fc81d0905c06c23c16" 1212 | }, 1213 | { 1214 | "m_Id": "f2944eb89306477c9c5a2707aeb17fb8" 1215 | }, 1216 | { 1217 | "m_Id": "75409afed2e94061a103e262c4162bbe" 1218 | }, 1219 | { 1220 | "m_Id": "3e560f073f0c49d28befed2db535917e" 1221 | } 1222 | ], 1223 | "synonyms": [ 1224 | "append" 1225 | ], 1226 | "m_Precision": 0, 1227 | "m_PreviewExpanded": true, 1228 | "m_PreviewMode": 0, 1229 | "m_CustomColors": { 1230 | "m_SerializableColors": [] 1231 | } 1232 | } 1233 | 1234 | { 1235 | "m_SGVersion": 0, 1236 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 1237 | "m_ObjectId": "969138d0e6b84e94a3485f93cd972788", 1238 | "m_Id": 2, 1239 | "m_DisplayName": "Out", 1240 | "m_SlotType": 1, 1241 | "m_Hidden": false, 1242 | "m_ShaderOutputName": "Out", 1243 | "m_StageCapability": 3, 1244 | "m_Value": { 1245 | "e00": 0.0, 1246 | "e01": 0.0, 1247 | "e02": 0.0, 1248 | "e03": 0.0, 1249 | "e10": 0.0, 1250 | "e11": 0.0, 1251 | "e12": 0.0, 1252 | "e13": 0.0, 1253 | "e20": 0.0, 1254 | "e21": 0.0, 1255 | "e22": 0.0, 1256 | "e23": 0.0, 1257 | "e30": 0.0, 1258 | "e31": 0.0, 1259 | "e32": 0.0, 1260 | "e33": 0.0 1261 | }, 1262 | "m_DefaultValue": { 1263 | "e00": 1.0, 1264 | "e01": 0.0, 1265 | "e02": 0.0, 1266 | "e03": 0.0, 1267 | "e10": 0.0, 1268 | "e11": 1.0, 1269 | "e12": 0.0, 1270 | "e13": 0.0, 1271 | "e20": 0.0, 1272 | "e21": 0.0, 1273 | "e22": 1.0, 1274 | "e23": 0.0, 1275 | "e30": 0.0, 1276 | "e31": 0.0, 1277 | "e32": 0.0, 1278 | "e33": 1.0 1279 | } 1280 | } 1281 | 1282 | { 1283 | "m_SGVersion": 0, 1284 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 1285 | "m_ObjectId": "96f4bca117804dd88a86b8175b185cec", 1286 | "m_Id": 1, 1287 | "m_DisplayName": "B", 1288 | "m_SlotType": 0, 1289 | "m_Hidden": false, 1290 | "m_ShaderOutputName": "B", 1291 | "m_StageCapability": 3, 1292 | "m_Value": { 1293 | "e00": 2.0, 1294 | "e01": 2.0, 1295 | "e02": 2.0, 1296 | "e03": 2.0, 1297 | "e10": 2.0, 1298 | "e11": 2.0, 1299 | "e12": 2.0, 1300 | "e13": 2.0, 1301 | "e20": 2.0, 1302 | "e21": 2.0, 1303 | "e22": 2.0, 1304 | "e23": 2.0, 1305 | "e30": 2.0, 1306 | "e31": 2.0, 1307 | "e32": 2.0, 1308 | "e33": 2.0 1309 | }, 1310 | "m_DefaultValue": { 1311 | "e00": 1.0, 1312 | "e01": 0.0, 1313 | "e02": 0.0, 1314 | "e03": 0.0, 1315 | "e10": 0.0, 1316 | "e11": 1.0, 1317 | "e12": 0.0, 1318 | "e13": 0.0, 1319 | "e20": 0.0, 1320 | "e21": 0.0, 1321 | "e22": 1.0, 1322 | "e23": 0.0, 1323 | "e30": 0.0, 1324 | "e31": 0.0, 1325 | "e32": 0.0, 1326 | "e33": 1.0 1327 | } 1328 | } 1329 | 1330 | { 1331 | "m_SGVersion": 0, 1332 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 1333 | "m_ObjectId": "97665889cb5542f996b5b1eb2b42e94e", 1334 | "m_Id": 0, 1335 | "m_DisplayName": "Out", 1336 | "m_SlotType": 1, 1337 | "m_Hidden": false, 1338 | "m_ShaderOutputName": "Out", 1339 | "m_StageCapability": 3, 1340 | "m_Value": { 1341 | "x": 0.0, 1342 | "y": 0.0, 1343 | "z": 0.0 1344 | }, 1345 | "m_DefaultValue": { 1346 | "x": 0.0, 1347 | "y": 0.0, 1348 | "z": 0.0 1349 | }, 1350 | "m_Labels": [] 1351 | } 1352 | 1353 | { 1354 | "m_SGVersion": 0, 1355 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 1356 | "m_ObjectId": "98e97377c2774503b6e3b6523d566f5a", 1357 | "m_Group": { 1358 | "m_Id": "" 1359 | }, 1360 | "m_Name": "Property", 1361 | "m_DrawState": { 1362 | "m_Expanded": true, 1363 | "m_Position": { 1364 | "serializedVersion": "2", 1365 | "x": 24.999975204467775, 1366 | "y": -47.99998474121094, 1367 | "width": 158.00003051757813, 1368 | "height": 33.99999237060547 1369 | } 1370 | }, 1371 | "m_Slots": [ 1372 | { 1373 | "m_Id": "bcbb9674b4c94262a4f231530f766b62" 1374 | } 1375 | ], 1376 | "synonyms": [], 1377 | "m_Precision": 0, 1378 | "m_PreviewExpanded": true, 1379 | "m_PreviewMode": 0, 1380 | "m_CustomColors": { 1381 | "m_SerializableColors": [] 1382 | }, 1383 | "m_Property": { 1384 | "m_Id": "3228bdc94d8040bb8de318504221736e" 1385 | } 1386 | } 1387 | 1388 | { 1389 | "m_SGVersion": 0, 1390 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 1391 | "m_ObjectId": "a4a25a302a094331853a19f03b5691b1", 1392 | "m_Group": { 1393 | "m_Id": "" 1394 | }, 1395 | "m_Name": "Property", 1396 | "m_DrawState": { 1397 | "m_Expanded": true, 1398 | "m_Position": { 1399 | "serializedVersion": "2", 1400 | "x": -256.0000305175781, 1401 | "y": -432.0, 1402 | "width": 129.00003051757813, 1403 | "height": 34.0 1404 | } 1405 | }, 1406 | "m_Slots": [ 1407 | { 1408 | "m_Id": "3970deca9105416e87bb9e6dd8e7e296" 1409 | } 1410 | ], 1411 | "synonyms": [], 1412 | "m_Precision": 0, 1413 | "m_PreviewExpanded": true, 1414 | "m_PreviewMode": 0, 1415 | "m_CustomColors": { 1416 | "m_SerializableColors": [] 1417 | }, 1418 | "m_Property": { 1419 | "m_Id": "ba3bc35bcf75487c8c2b8c36e7e261e2" 1420 | } 1421 | } 1422 | 1423 | { 1424 | "m_SGVersion": 0, 1425 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 1426 | "m_ObjectId": "a6de26e529e74f3790eb6777c1af97a6", 1427 | "m_Id": 0, 1428 | "m_DisplayName": "In", 1429 | "m_SlotType": 0, 1430 | "m_Hidden": false, 1431 | "m_ShaderOutputName": "In", 1432 | "m_StageCapability": 3, 1433 | "m_Value": { 1434 | "x": 0.0, 1435 | "y": 0.0, 1436 | "z": 0.0, 1437 | "w": 0.0 1438 | }, 1439 | "m_DefaultValue": { 1440 | "x": 0.0, 1441 | "y": 0.0, 1442 | "z": 0.0, 1443 | "w": 0.0 1444 | } 1445 | } 1446 | 1447 | { 1448 | "m_SGVersion": 0, 1449 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1450 | "m_ObjectId": "b1dad2c63c64409d8a262d34069c90ed", 1451 | "m_Id": 4, 1452 | "m_DisplayName": "LOD", 1453 | "m_SlotType": 0, 1454 | "m_Hidden": false, 1455 | "m_ShaderOutputName": "LOD", 1456 | "m_StageCapability": 3, 1457 | "m_Value": 0.0, 1458 | "m_DefaultValue": 0.0, 1459 | "m_Labels": [] 1460 | } 1461 | 1462 | { 1463 | "m_SGVersion": 0, 1464 | "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", 1465 | "m_ObjectId": "b516d7a9c10d4075830959ec34963848", 1466 | "m_Group": { 1467 | "m_Id": "" 1468 | }, 1469 | "m_Name": "Multiply", 1470 | "m_DrawState": { 1471 | "m_Expanded": true, 1472 | "m_Position": { 1473 | "serializedVersion": "2", 1474 | "x": 377.54998779296877, 1475 | "y": -366.45001220703127, 1476 | "width": 208.0, 1477 | "height": 302.0 1478 | } 1479 | }, 1480 | "m_Slots": [ 1481 | { 1482 | "m_Id": "2f6a54185ae0463ab8df939ca4fe14e8" 1483 | }, 1484 | { 1485 | "m_Id": "96f4bca117804dd88a86b8175b185cec" 1486 | }, 1487 | { 1488 | "m_Id": "969138d0e6b84e94a3485f93cd972788" 1489 | } 1490 | ], 1491 | "synonyms": [ 1492 | "multiplication", 1493 | "times", 1494 | "x" 1495 | ], 1496 | "m_Precision": 0, 1497 | "m_PreviewExpanded": false, 1498 | "m_PreviewMode": 0, 1499 | "m_CustomColors": { 1500 | "m_SerializableColors": [] 1501 | } 1502 | } 1503 | 1504 | { 1505 | "m_SGVersion": 0, 1506 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1507 | "m_ObjectId": "b7dd4d76ec214549bb67922265387803", 1508 | "m_Id": 2, 1509 | "m_DisplayName": "output", 1510 | "m_SlotType": 1, 1511 | "m_Hidden": false, 1512 | "m_ShaderOutputName": "output", 1513 | "m_StageCapability": 3, 1514 | "m_Value": 0.0, 1515 | "m_DefaultValue": 0.0, 1516 | "m_Labels": [] 1517 | } 1518 | 1519 | { 1520 | "m_SGVersion": 0, 1521 | "m_Type": "UnityEditor.ShaderGraph.Internal.CubemapShaderProperty", 1522 | "m_ObjectId": "ba3bc35bcf75487c8c2b8c36e7e261e2", 1523 | "m_Guid": { 1524 | "m_GuidSerialized": "f97ba12b-c1e9-4366-97a8-1b1f3aedae62" 1525 | }, 1526 | "m_Name": "Cubemap", 1527 | "m_DefaultRefNameVersion": 1, 1528 | "m_RefNameGeneratedByDisplayName": "Cubemap", 1529 | "m_DefaultReferenceName": "_Cubemap", 1530 | "m_OverrideReferenceName": "", 1531 | "m_GeneratePropertyBlock": true, 1532 | "m_UseCustomSlotLabel": false, 1533 | "m_CustomSlotLabel": "", 1534 | "m_Precision": 0, 1535 | "overrideHLSLDeclaration": false, 1536 | "hlslDeclarationOverride": 0, 1537 | "m_Hidden": false, 1538 | "m_Value": { 1539 | "m_SerializedCubemap": "{\"cubemap\":{\"instanceID\":0}}", 1540 | "m_Guid": "" 1541 | }, 1542 | "m_Modifiable": true 1543 | } 1544 | 1545 | { 1546 | "m_SGVersion": 0, 1547 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 1548 | "m_ObjectId": "bcbb9674b4c94262a4f231530f766b62", 1549 | "m_Id": 0, 1550 | "m_DisplayName": "ReflectionColor", 1551 | "m_SlotType": 1, 1552 | "m_Hidden": false, 1553 | "m_ShaderOutputName": "Out", 1554 | "m_StageCapability": 3, 1555 | "m_Value": { 1556 | "x": 0.0, 1557 | "y": 0.0, 1558 | "z": 0.0, 1559 | "w": 0.0 1560 | }, 1561 | "m_DefaultValue": { 1562 | "x": 0.0, 1563 | "y": 0.0, 1564 | "z": 0.0, 1565 | "w": 0.0 1566 | }, 1567 | "m_Labels": [] 1568 | } 1569 | 1570 | { 1571 | "m_SGVersion": 1, 1572 | "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", 1573 | "m_ObjectId": "caadba88939746d7a3cf2f4ec388a014", 1574 | "m_Group": { 1575 | "m_Id": "" 1576 | }, 1577 | "m_Name": "Fresnel (Custom Function)", 1578 | "m_DrawState": { 1579 | "m_Expanded": true, 1580 | "m_Position": { 1581 | "serializedVersion": "2", 1582 | "x": -41.99998092651367, 1583 | "y": 72.0000991821289, 1584 | "width": 224.99996948242188, 1585 | "height": 118.00005340576172 1586 | } 1587 | }, 1588 | "m_Slots": [ 1589 | { 1590 | "m_Id": "0978e047ade847c6a98d2c0f7fd7d5b7" 1591 | }, 1592 | { 1593 | "m_Id": "41a6ff652bf24ae88751dd6d37789360" 1594 | }, 1595 | { 1596 | "m_Id": "b7dd4d76ec214549bb67922265387803" 1597 | } 1598 | ], 1599 | "synonyms": [ 1600 | "code", 1601 | "HLSL" 1602 | ], 1603 | "m_Precision": 0, 1604 | "m_PreviewExpanded": false, 1605 | "m_PreviewMode": 0, 1606 | "m_CustomColors": { 1607 | "m_SerializableColors": [] 1608 | }, 1609 | "m_SourceType": 1, 1610 | "m_FunctionName": "Fresnel", 1611 | "m_FunctionSource": "", 1612 | "m_FunctionBody": " // Fresnel\r\n // ((n1 - n2)/(n1 + n2))^2,n1是空气的折射率1.0,n2是冰的折射率1.333\r\n half R0 = 0.02;\r\n // cosθ,可以转换成出射方向与法线方向的点乘\r\n half fresnel = dot(viewDirectionWS, pixelNormalWS);\r\n fresnel = 1 - max(0, fresnel);\r\n fresnel = pow(fresnel, 5);\r\n fresnel = R0 + (1 - R0) * fresnel;\n\n output = fresnel;" 1613 | } 1614 | 1615 | { 1616 | "m_SGVersion": 0, 1617 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1618 | "m_ObjectId": "cb7d47bcc1c84e28879684b3466d7b2e", 1619 | "m_Id": 2, 1620 | "m_DisplayName": "B", 1621 | "m_SlotType": 0, 1622 | "m_Hidden": false, 1623 | "m_ShaderOutputName": "B", 1624 | "m_StageCapability": 3, 1625 | "m_Value": 0.0, 1626 | "m_DefaultValue": 0.0, 1627 | "m_Labels": [] 1628 | } 1629 | 1630 | { 1631 | "m_SGVersion": 0, 1632 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1633 | "m_ObjectId": "cc6220ad4a634ce5951d96b47902f2d0", 1634 | "m_Id": 0, 1635 | "m_DisplayName": "R", 1636 | "m_SlotType": 0, 1637 | "m_Hidden": false, 1638 | "m_ShaderOutputName": "R", 1639 | "m_StageCapability": 3, 1640 | "m_Value": 0.0, 1641 | "m_DefaultValue": 0.0, 1642 | "m_Labels": [] 1643 | } 1644 | 1645 | { 1646 | "m_SGVersion": 0, 1647 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 1648 | "m_ObjectId": "cdbc8270069b4fafab9960090b0711ba", 1649 | "m_Id": 0, 1650 | "m_DisplayName": "Out", 1651 | "m_SlotType": 1, 1652 | "m_Hidden": false, 1653 | "m_ShaderOutputName": "Out", 1654 | "m_StageCapability": 3, 1655 | "m_Value": { 1656 | "x": 0.0, 1657 | "y": 0.0, 1658 | "z": 0.0, 1659 | "w": 0.0 1660 | }, 1661 | "m_DefaultValue": { 1662 | "x": 0.0, 1663 | "y": 0.0, 1664 | "z": 0.0, 1665 | "w": 0.0 1666 | }, 1667 | "m_Labels": [] 1668 | } 1669 | 1670 | { 1671 | "m_SGVersion": 0, 1672 | "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", 1673 | "m_ObjectId": "ce839d4957d94adba48d0304b6da4429", 1674 | "m_Id": 2, 1675 | "m_DisplayName": "Dir", 1676 | "m_SlotType": 0, 1677 | "m_Hidden": false, 1678 | "m_ShaderOutputName": "Dir", 1679 | "m_StageCapability": 3, 1680 | "m_Value": { 1681 | "x": 0.0, 1682 | "y": 0.0, 1683 | "z": 0.0 1684 | }, 1685 | "m_DefaultValue": { 1686 | "x": 0.0, 1687 | "y": 0.0, 1688 | "z": 0.0 1689 | }, 1690 | "m_Labels": [], 1691 | "m_Space": 2 1692 | } 1693 | 1694 | { 1695 | "m_SGVersion": 0, 1696 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 1697 | "m_ObjectId": "d3208235b3c242068f37ca93bebd18eb", 1698 | "m_Id": 0, 1699 | "m_DisplayName": "In", 1700 | "m_SlotType": 0, 1701 | "m_Hidden": false, 1702 | "m_ShaderOutputName": "In", 1703 | "m_StageCapability": 3, 1704 | "m_Value": { 1705 | "x": 0.0, 1706 | "y": 0.0, 1707 | "z": 0.0, 1708 | "w": 0.0 1709 | }, 1710 | "m_DefaultValue": { 1711 | "x": 0.0, 1712 | "y": 0.0, 1713 | "z": 0.0, 1714 | "w": 0.0 1715 | } 1716 | } 1717 | 1718 | { 1719 | "m_SGVersion": 0, 1720 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1721 | "m_ObjectId": "dfe8d3ba805c45fc81d0905c06c23c16", 1722 | "m_Id": 3, 1723 | "m_DisplayName": "A", 1724 | "m_SlotType": 0, 1725 | "m_Hidden": false, 1726 | "m_ShaderOutputName": "A", 1727 | "m_StageCapability": 3, 1728 | "m_Value": 0.0, 1729 | "m_DefaultValue": 0.0, 1730 | "m_Labels": [] 1731 | } 1732 | 1733 | { 1734 | "m_SGVersion": 0, 1735 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1736 | "m_ObjectId": "e1a71abf67454793a7d033b962b47bd8", 1737 | "m_Id": 1, 1738 | "m_DisplayName": "G", 1739 | "m_SlotType": 0, 1740 | "m_Hidden": false, 1741 | "m_ShaderOutputName": "G", 1742 | "m_StageCapability": 3, 1743 | "m_Value": 0.0, 1744 | "m_DefaultValue": 0.0, 1745 | "m_Labels": [] 1746 | } 1747 | 1748 | { 1749 | "m_SGVersion": 0, 1750 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1751 | "m_ObjectId": "efa2adb52b66419f8c4acf1c9fc57dad", 1752 | "m_Id": 4, 1753 | "m_DisplayName": "A", 1754 | "m_SlotType": 1, 1755 | "m_Hidden": false, 1756 | "m_ShaderOutputName": "A", 1757 | "m_StageCapability": 3, 1758 | "m_Value": 0.0, 1759 | "m_DefaultValue": 0.0, 1760 | "m_Labels": [] 1761 | } 1762 | 1763 | { 1764 | "m_SGVersion": 0, 1765 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 1766 | "m_ObjectId": "f2944eb89306477c9c5a2707aeb17fb8", 1767 | "m_Id": 4, 1768 | "m_DisplayName": "RGBA", 1769 | "m_SlotType": 1, 1770 | "m_Hidden": false, 1771 | "m_ShaderOutputName": "RGBA", 1772 | "m_StageCapability": 3, 1773 | "m_Value": { 1774 | "x": 0.0, 1775 | "y": 0.0, 1776 | "z": 0.0, 1777 | "w": 0.0 1778 | }, 1779 | "m_DefaultValue": { 1780 | "x": 0.0, 1781 | "y": 0.0, 1782 | "z": 0.0, 1783 | "w": 0.0 1784 | }, 1785 | "m_Labels": [] 1786 | } 1787 | 1788 | { 1789 | "m_SGVersion": 0, 1790 | "m_Type": "UnityEditor.ShaderGraph.ReflectionNode", 1791 | "m_ObjectId": "fcd5425b54dc4c91b67aaa3b921c6efb", 1792 | "m_Group": { 1793 | "m_Id": "" 1794 | }, 1795 | "m_Name": "Reflection", 1796 | "m_DrawState": { 1797 | "m_Expanded": true, 1798 | "m_Position": { 1799 | "serializedVersion": "2", 1800 | "x": -335.0, 1801 | "y": -339.0, 1802 | "width": 208.0, 1803 | "height": 302.0 1804 | } 1805 | }, 1806 | "m_Slots": [ 1807 | { 1808 | "m_Id": "d3208235b3c242068f37ca93bebd18eb" 1809 | }, 1810 | { 1811 | "m_Id": "1dfddbc24aea4811b187d842ae1a061a" 1812 | }, 1813 | { 1814 | "m_Id": "52f14e3aa1a1418f9d3c03a3ec08f4c8" 1815 | } 1816 | ], 1817 | "synonyms": [ 1818 | "mirror" 1819 | ], 1820 | "m_Precision": 0, 1821 | "m_PreviewExpanded": false, 1822 | "m_PreviewMode": 0, 1823 | "m_CustomColors": { 1824 | "m_SerializableColors": [] 1825 | } 1826 | } 1827 | 1828 | { 1829 | "m_SGVersion": 0, 1830 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1831 | "m_ObjectId": "fe846b5039c2430099da132948e349cf", 1832 | "m_Id": 3, 1833 | "m_DisplayName": "B", 1834 | "m_SlotType": 1, 1835 | "m_Hidden": false, 1836 | "m_ShaderOutputName": "B", 1837 | "m_StageCapability": 3, 1838 | "m_Value": 0.0, 1839 | "m_DefaultValue": 0.0, 1840 | "m_Labels": [] 1841 | } 1842 | 1843 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/EffectReflection.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e64b677216bc444a9c6f619b753db9a 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/EffectRefraction.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e99a3159f2ef44e41832224954e28417 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/SDF_Raymarching.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SGVersion": 3, 3 | "m_Type": "UnityEditor.ShaderGraph.GraphData", 4 | "m_ObjectId": "a9ff12759ee8488cb0558ae3497b0eda", 5 | "m_Properties": [ 6 | { 7 | "m_Id": "5f397538b25e44e6a4357d678858888b" 8 | }, 9 | { 10 | "m_Id": "659fb8a220ee4420a01183842372a79e" 11 | }, 12 | { 13 | "m_Id": "bdd64cace4f5472ab4943a92c5205928" 14 | }, 15 | { 16 | "m_Id": "a6022f19e950474fb6219d688abef6e1" 17 | }, 18 | { 19 | "m_Id": "64dfc054feed4d66b357e1ff911f43ec" 20 | }, 21 | { 22 | "m_Id": "5c19909a9fd9425dbb13bbf773c658ae" 23 | }, 24 | { 25 | "m_Id": "a40b2691b3b7496b8244f7ba56ab42d8" 26 | } 27 | ], 28 | "m_Keywords": [], 29 | "m_Dropdowns": [], 30 | "m_CategoryData": [ 31 | { 32 | "m_Id": "60fb4a441dcd4e63a2c381d307b7a6f5" 33 | } 34 | ], 35 | "m_Nodes": [ 36 | { 37 | "m_Id": "51c4e6770c6e416980248ce5e222ef5f" 38 | }, 39 | { 40 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 41 | }, 42 | { 43 | "m_Id": "355bdec9c7dc41c9bae4bff940f29c14" 44 | }, 45 | { 46 | "m_Id": "5450a03df59e4679b930ae6f8675266b" 47 | }, 48 | { 49 | "m_Id": "6c566b9973b24da98548a9c238c3eb28" 50 | }, 51 | { 52 | "m_Id": "7cf9137890af4be493472f0ac710b4c5" 53 | }, 54 | { 55 | "m_Id": "e82ea7d07e6746faae7a6cafd9fb5bd4" 56 | }, 57 | { 58 | "m_Id": "70f02fa095524f92af9e8cac9815ebbe" 59 | }, 60 | { 61 | "m_Id": "12d39ef7aaa148b9b37b0a107c6e04cd" 62 | } 63 | ], 64 | "m_GroupDatas": [], 65 | "m_StickyNoteDatas": [], 66 | "m_Edges": [ 67 | { 68 | "m_OutputSlot": { 69 | "m_Node": { 70 | "m_Id": "12d39ef7aaa148b9b37b0a107c6e04cd" 71 | }, 72 | "m_SlotId": 0 73 | }, 74 | "m_InputSlot": { 75 | "m_Node": { 76 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 77 | }, 78 | "m_SlotId": 5 79 | } 80 | }, 81 | { 82 | "m_OutputSlot": { 83 | "m_Node": { 84 | "m_Id": "355bdec9c7dc41c9bae4bff940f29c14" 85 | }, 86 | "m_SlotId": 0 87 | }, 88 | "m_InputSlot": { 89 | "m_Node": { 90 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 91 | }, 92 | "m_SlotId": 0 93 | } 94 | }, 95 | { 96 | "m_OutputSlot": { 97 | "m_Node": { 98 | "m_Id": "5450a03df59e4679b930ae6f8675266b" 99 | }, 100 | "m_SlotId": 0 101 | }, 102 | "m_InputSlot": { 103 | "m_Node": { 104 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 105 | }, 106 | "m_SlotId": 7 107 | } 108 | }, 109 | { 110 | "m_OutputSlot": { 111 | "m_Node": { 112 | "m_Id": "6c566b9973b24da98548a9c238c3eb28" 113 | }, 114 | "m_SlotId": 0 115 | }, 116 | "m_InputSlot": { 117 | "m_Node": { 118 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 119 | }, 120 | "m_SlotId": 1 121 | } 122 | }, 123 | { 124 | "m_OutputSlot": { 125 | "m_Node": { 126 | "m_Id": "70f02fa095524f92af9e8cac9815ebbe" 127 | }, 128 | "m_SlotId": 0 129 | }, 130 | "m_InputSlot": { 131 | "m_Node": { 132 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 133 | }, 134 | "m_SlotId": 4 135 | } 136 | }, 137 | { 138 | "m_OutputSlot": { 139 | "m_Node": { 140 | "m_Id": "7cf9137890af4be493472f0ac710b4c5" 141 | }, 142 | "m_SlotId": 0 143 | }, 144 | "m_InputSlot": { 145 | "m_Node": { 146 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 147 | }, 148 | "m_SlotId": 2 149 | } 150 | }, 151 | { 152 | "m_OutputSlot": { 153 | "m_Node": { 154 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 155 | }, 156 | "m_SlotId": 6 157 | }, 158 | "m_InputSlot": { 159 | "m_Node": { 160 | "m_Id": "51c4e6770c6e416980248ce5e222ef5f" 161 | }, 162 | "m_SlotId": 1 163 | } 164 | }, 165 | { 166 | "m_OutputSlot": { 167 | "m_Node": { 168 | "m_Id": "e82ea7d07e6746faae7a6cafd9fb5bd4" 169 | }, 170 | "m_SlotId": 0 171 | }, 172 | "m_InputSlot": { 173 | "m_Node": { 174 | "m_Id": "8a5efc4df687487591642b98f6c35ff8" 175 | }, 176 | "m_SlotId": 3 177 | } 178 | } 179 | ], 180 | "m_VertexContext": { 181 | "m_Position": { 182 | "x": 0.0, 183 | "y": 0.0 184 | }, 185 | "m_Blocks": [] 186 | }, 187 | "m_FragmentContext": { 188 | "m_Position": { 189 | "x": 0.0, 190 | "y": 0.0 191 | }, 192 | "m_Blocks": [] 193 | }, 194 | "m_PreviewData": { 195 | "serializedMesh": { 196 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 197 | "m_Guid": "" 198 | }, 199 | "preventRotation": false 200 | }, 201 | "m_Path": "Sub Graphs", 202 | "m_GraphPrecision": 1, 203 | "m_PreviewMode": 2, 204 | "m_OutputNode": { 205 | "m_Id": "51c4e6770c6e416980248ce5e222ef5f" 206 | }, 207 | "m_ActiveTargets": [] 208 | } 209 | 210 | { 211 | "m_SGVersion": 0, 212 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 213 | "m_ObjectId": "11545b625a35436fa9d9a8750547e5e3", 214 | "m_Id": 5, 215 | "m_DisplayName": "edgeWidth", 216 | "m_SlotType": 0, 217 | "m_Hidden": false, 218 | "m_ShaderOutputName": "edgeWidth", 219 | "m_StageCapability": 3, 220 | "m_Value": 0.0, 221 | "m_DefaultValue": 0.0, 222 | "m_Labels": [] 223 | } 224 | 225 | { 226 | "m_SGVersion": 0, 227 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 228 | "m_ObjectId": "12d39ef7aaa148b9b37b0a107c6e04cd", 229 | "m_Group": { 230 | "m_Id": "" 231 | }, 232 | "m_Name": "Property", 233 | "m_DrawState": { 234 | "m_Expanded": true, 235 | "m_Position": { 236 | "serializedVersion": "2", 237 | "x": -617.0, 238 | "y": 88.0, 239 | "width": 132.00003051757813, 240 | "height": 33.999969482421878 241 | } 242 | }, 243 | "m_Slots": [ 244 | { 245 | "m_Id": "af6339b445164a24bc66406214508fb7" 246 | } 247 | ], 248 | "synonyms": [], 249 | "m_Precision": 0, 250 | "m_PreviewExpanded": true, 251 | "m_PreviewMode": 0, 252 | "m_CustomColors": { 253 | "m_SerializableColors": [] 254 | }, 255 | "m_Property": { 256 | "m_Id": "a40b2691b3b7496b8244f7ba56ab42d8" 257 | } 258 | } 259 | 260 | { 261 | "m_SGVersion": 0, 262 | "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", 263 | "m_ObjectId": "345413e7a30c494095c7d7e9021475f2", 264 | "m_Id": 1, 265 | "m_DisplayName": "baseUV", 266 | "m_SlotType": 0, 267 | "m_Hidden": false, 268 | "m_ShaderOutputName": "baseUV", 269 | "m_StageCapability": 3, 270 | "m_Value": { 271 | "x": 0.0, 272 | "y": 0.0 273 | }, 274 | "m_DefaultValue": { 275 | "x": 0.0, 276 | "y": 0.0 277 | }, 278 | "m_Labels": [] 279 | } 280 | 281 | { 282 | "m_SGVersion": 0, 283 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 284 | "m_ObjectId": "355bdec9c7dc41c9bae4bff940f29c14", 285 | "m_Group": { 286 | "m_Id": "" 287 | }, 288 | "m_Name": "Property", 289 | "m_DrawState": { 290 | "m_Expanded": true, 291 | "m_Position": { 292 | "serializedVersion": "2", 293 | "x": -603.0, 294 | "y": -134.0000457763672, 295 | "width": 124.99996948242188, 296 | "height": 34.000022888183597 297 | } 298 | }, 299 | "m_Slots": [ 300 | { 301 | "m_Id": "5e4294198ff040c9ab34f8b03acf93fd" 302 | } 303 | ], 304 | "synonyms": [], 305 | "m_Precision": 0, 306 | "m_PreviewExpanded": true, 307 | "m_PreviewMode": 0, 308 | "m_CustomColors": { 309 | "m_SerializableColors": [] 310 | }, 311 | "m_Property": { 312 | "m_Id": "5f397538b25e44e6a4357d678858888b" 313 | } 314 | } 315 | 316 | { 317 | "m_SGVersion": 0, 318 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 319 | "m_ObjectId": "3d3bbed9fbdf43f0bc71dc98a03ca73b", 320 | "m_Id": 4, 321 | "m_DisplayName": "stepSize", 322 | "m_SlotType": 0, 323 | "m_Hidden": false, 324 | "m_ShaderOutputName": "stepSize", 325 | "m_StageCapability": 3, 326 | "m_Value": 0.0, 327 | "m_DefaultValue": 0.0, 328 | "m_Labels": [] 329 | } 330 | 331 | { 332 | "m_SGVersion": 0, 333 | "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", 334 | "m_ObjectId": "51c4e6770c6e416980248ce5e222ef5f", 335 | "m_Group": { 336 | "m_Id": "" 337 | }, 338 | "m_Name": "Output", 339 | "m_DrawState": { 340 | "m_Expanded": true, 341 | "m_Position": { 342 | "serializedVersion": "2", 343 | "x": 3.0, 344 | "y": -124.0, 345 | "width": 90.0, 346 | "height": 77.0 347 | } 348 | }, 349 | "m_Slots": [ 350 | { 351 | "m_Id": "d6a60b92a3924233ad4e2b2d71b7fdce" 352 | } 353 | ], 354 | "synonyms": [], 355 | "m_Precision": 0, 356 | "m_PreviewExpanded": true, 357 | "m_PreviewMode": 0, 358 | "m_CustomColors": { 359 | "m_SerializableColors": [] 360 | }, 361 | "IsFirstSlotValid": true 362 | } 363 | 364 | { 365 | "m_SGVersion": 0, 366 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 367 | "m_ObjectId": "5450a03df59e4679b930ae6f8675266b", 368 | "m_Group": { 369 | "m_Id": "" 370 | }, 371 | "m_Name": "Property", 372 | "m_DrawState": { 373 | "m_Expanded": true, 374 | "m_Position": { 375 | "serializedVersion": "2", 376 | "x": -626.0000610351563, 377 | "y": -94.00003051757813, 378 | "width": 148.00003051757813, 379 | "height": 34.000022888183597 380 | } 381 | }, 382 | "m_Slots": [ 383 | { 384 | "m_Id": "7627c1ec9e4f485582d1254a7be242d7" 385 | } 386 | ], 387 | "synonyms": [], 388 | "m_Precision": 0, 389 | "m_PreviewExpanded": true, 390 | "m_PreviewMode": 0, 391 | "m_CustomColors": { 392 | "m_SerializableColors": [] 393 | }, 394 | "m_Property": { 395 | "m_Id": "a6022f19e950474fb6219d688abef6e1" 396 | } 397 | } 398 | 399 | { 400 | "m_SGVersion": 1, 401 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", 402 | "m_ObjectId": "5c19909a9fd9425dbb13bbf773c658ae", 403 | "m_Guid": { 404 | "m_GuidSerialized": "f1808ae3-6188-4fc5-8d57-76cc5dff901d" 405 | }, 406 | "m_Name": "StepSize", 407 | "m_DefaultRefNameVersion": 1, 408 | "m_RefNameGeneratedByDisplayName": "StepSize", 409 | "m_DefaultReferenceName": "_StepSize", 410 | "m_OverrideReferenceName": "", 411 | "m_GeneratePropertyBlock": true, 412 | "m_UseCustomSlotLabel": false, 413 | "m_CustomSlotLabel": "", 414 | "m_Precision": 0, 415 | "overrideHLSLDeclaration": false, 416 | "hlslDeclarationOverride": 0, 417 | "m_Hidden": false, 418 | "m_Value": 0.10000000149011612, 419 | "m_FloatType": 0, 420 | "m_RangeValues": { 421 | "x": 0.0, 422 | "y": 1.0 423 | } 424 | } 425 | 426 | { 427 | "m_SGVersion": 0, 428 | "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", 429 | "m_ObjectId": "5d711925abd44730bf93d288e0246b7e", 430 | "m_Id": 0, 431 | "m_DisplayName": "tex", 432 | "m_SlotType": 0, 433 | "m_Hidden": false, 434 | "m_ShaderOutputName": "tex", 435 | "m_StageCapability": 3, 436 | "m_BareResource": true, 437 | "m_Texture": { 438 | "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", 439 | "m_Guid": "" 440 | }, 441 | "m_DefaultType": 0 442 | } 443 | 444 | { 445 | "m_SGVersion": 0, 446 | "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", 447 | "m_ObjectId": "5e4294198ff040c9ab34f8b03acf93fd", 448 | "m_Id": 0, 449 | "m_DisplayName": "SDFTex", 450 | "m_SlotType": 1, 451 | "m_Hidden": false, 452 | "m_ShaderOutputName": "Out", 453 | "m_StageCapability": 3, 454 | "m_BareResource": false 455 | } 456 | 457 | { 458 | "m_SGVersion": 0, 459 | "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", 460 | "m_ObjectId": "5f397538b25e44e6a4357d678858888b", 461 | "m_Guid": { 462 | "m_GuidSerialized": "6cc3a177-3519-4885-b2bb-73dc884c8545" 463 | }, 464 | "m_Name": "SDFTex", 465 | "m_DefaultRefNameVersion": 1, 466 | "m_RefNameGeneratedByDisplayName": "SDFTex", 467 | "m_DefaultReferenceName": "_SDFTex", 468 | "m_OverrideReferenceName": "", 469 | "m_GeneratePropertyBlock": true, 470 | "m_UseCustomSlotLabel": false, 471 | "m_CustomSlotLabel": "", 472 | "m_Precision": 0, 473 | "overrideHLSLDeclaration": false, 474 | "hlslDeclarationOverride": 0, 475 | "m_Hidden": false, 476 | "m_Value": { 477 | "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", 478 | "m_Guid": "" 479 | }, 480 | "isMainTexture": false, 481 | "useTilingAndOffset": false, 482 | "m_Modifiable": true, 483 | "m_DefaultType": 0 484 | } 485 | 486 | { 487 | "m_SGVersion": 0, 488 | "m_Type": "UnityEditor.ShaderGraph.CategoryData", 489 | "m_ObjectId": "60fb4a441dcd4e63a2c381d307b7a6f5", 490 | "m_Name": "", 491 | "m_ChildObjectList": [ 492 | { 493 | "m_Id": "5f397538b25e44e6a4357d678858888b" 494 | }, 495 | { 496 | "m_Id": "a6022f19e950474fb6219d688abef6e1" 497 | }, 498 | { 499 | "m_Id": "659fb8a220ee4420a01183842372a79e" 500 | }, 501 | { 502 | "m_Id": "bdd64cace4f5472ab4943a92c5205928" 503 | }, 504 | { 505 | "m_Id": "64dfc054feed4d66b357e1ff911f43ec" 506 | }, 507 | { 508 | "m_Id": "5c19909a9fd9425dbb13bbf773c658ae" 509 | }, 510 | { 511 | "m_Id": "a40b2691b3b7496b8244f7ba56ab42d8" 512 | } 513 | ] 514 | } 515 | 516 | { 517 | "m_SGVersion": 1, 518 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", 519 | "m_ObjectId": "64dfc054feed4d66b357e1ff911f43ec", 520 | "m_Guid": { 521 | "m_GuidSerialized": "a0f2e527-c144-495e-9f01-1c703a08c8ab" 522 | }, 523 | "m_Name": "NumSteps", 524 | "m_DefaultRefNameVersion": 1, 525 | "m_RefNameGeneratedByDisplayName": "NumSteps", 526 | "m_DefaultReferenceName": "_NumSteps", 527 | "m_OverrideReferenceName": "", 528 | "m_GeneratePropertyBlock": true, 529 | "m_UseCustomSlotLabel": false, 530 | "m_CustomSlotLabel": "", 531 | "m_Precision": 0, 532 | "overrideHLSLDeclaration": false, 533 | "hlslDeclarationOverride": 0, 534 | "m_Hidden": false, 535 | "m_Value": 5.0, 536 | "m_FloatType": 0, 537 | "m_RangeValues": { 538 | "x": 0.0, 539 | "y": 1.0 540 | } 541 | } 542 | 543 | { 544 | "m_SGVersion": 1, 545 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty", 546 | "m_ObjectId": "659fb8a220ee4420a01183842372a79e", 547 | "m_Guid": { 548 | "m_GuidSerialized": "ff85408d-acea-4a9d-822d-6d4d60d59544" 549 | }, 550 | "m_Name": "BaseUV", 551 | "m_DefaultRefNameVersion": 1, 552 | "m_RefNameGeneratedByDisplayName": "BaseUV", 553 | "m_DefaultReferenceName": "_BaseUV", 554 | "m_OverrideReferenceName": "", 555 | "m_GeneratePropertyBlock": true, 556 | "m_UseCustomSlotLabel": false, 557 | "m_CustomSlotLabel": "", 558 | "m_Precision": 0, 559 | "overrideHLSLDeclaration": false, 560 | "hlslDeclarationOverride": 0, 561 | "m_Hidden": false, 562 | "m_Value": { 563 | "x": 0.0, 564 | "y": 0.0, 565 | "z": 0.0, 566 | "w": 0.0 567 | } 568 | } 569 | 570 | { 571 | "m_SGVersion": 0, 572 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 573 | "m_ObjectId": "6c566b9973b24da98548a9c238c3eb28", 574 | "m_Group": { 575 | "m_Id": "" 576 | }, 577 | "m_Name": "Property", 578 | "m_DrawState": { 579 | "m_Expanded": true, 580 | "m_Position": { 581 | "serializedVersion": "2", 582 | "x": -603.0, 583 | "y": -60.00001525878906, 584 | "width": 118.00003051757813, 585 | "height": 34.0 586 | } 587 | }, 588 | "m_Slots": [ 589 | { 590 | "m_Id": "a6e686c95dc24103b5a9d665b9b49c89" 591 | } 592 | ], 593 | "synonyms": [], 594 | "m_Precision": 0, 595 | "m_PreviewExpanded": true, 596 | "m_PreviewMode": 0, 597 | "m_CustomColors": { 598 | "m_SerializableColors": [] 599 | }, 600 | "m_Property": { 601 | "m_Id": "659fb8a220ee4420a01183842372a79e" 602 | } 603 | } 604 | 605 | { 606 | "m_SGVersion": 0, 607 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 608 | "m_ObjectId": "70f02fa095524f92af9e8cac9815ebbe", 609 | "m_Group": { 610 | "m_Id": "" 611 | }, 612 | "m_Name": "Property", 613 | "m_DrawState": { 614 | "m_Expanded": true, 615 | "m_Position": { 616 | "serializedVersion": "2", 617 | "x": -615.0, 618 | "y": 42.9999885559082, 619 | "width": 122.0, 620 | "height": 34.00001907348633 621 | } 622 | }, 623 | "m_Slots": [ 624 | { 625 | "m_Id": "ad73789c98a6482eba2bef1e5ff8bd35" 626 | } 627 | ], 628 | "synonyms": [], 629 | "m_Precision": 0, 630 | "m_PreviewExpanded": true, 631 | "m_PreviewMode": 0, 632 | "m_CustomColors": { 633 | "m_SerializableColors": [] 634 | }, 635 | "m_Property": { 636 | "m_Id": "5c19909a9fd9425dbb13bbf773c658ae" 637 | } 638 | } 639 | 640 | { 641 | "m_SGVersion": 0, 642 | "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", 643 | "m_ObjectId": "7627c1ec9e4f485582d1254a7be242d7", 644 | "m_Id": 0, 645 | "m_DisplayName": "SDFSampler", 646 | "m_SlotType": 1, 647 | "m_Hidden": false, 648 | "m_ShaderOutputName": "Out", 649 | "m_StageCapability": 3, 650 | "m_BareResource": false 651 | } 652 | 653 | { 654 | "m_SGVersion": 0, 655 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 656 | "m_ObjectId": "7cf9137890af4be493472f0ac710b4c5", 657 | "m_Group": { 658 | "m_Id": "" 659 | }, 660 | "m_Name": "Property", 661 | "m_DrawState": { 662 | "m_Expanded": true, 663 | "m_Position": { 664 | "serializedVersion": "2", 665 | "x": -610.0, 666 | "y": -26.000017166137697, 667 | "width": 125.00003051757813, 668 | "height": 34.0 669 | } 670 | }, 671 | "m_Slots": [ 672 | { 673 | "m_Id": "e10f6c684277447e9cc8429d84d5bd80" 674 | } 675 | ], 676 | "synonyms": [], 677 | "m_Precision": 0, 678 | "m_PreviewExpanded": true, 679 | "m_PreviewMode": 0, 680 | "m_CustomColors": { 681 | "m_SerializableColors": [] 682 | }, 683 | "m_Property": { 684 | "m_Id": "bdd64cace4f5472ab4943a92c5205928" 685 | } 686 | } 687 | 688 | { 689 | "m_SGVersion": 0, 690 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 691 | "m_ObjectId": "7eaa7a95061a4e98b8f45d3899d997bd", 692 | "m_Id": 6, 693 | "m_DisplayName": "length", 694 | "m_SlotType": 1, 695 | "m_Hidden": false, 696 | "m_ShaderOutputName": "length", 697 | "m_StageCapability": 3, 698 | "m_Value": 0.0, 699 | "m_DefaultValue": 0.0, 700 | "m_Labels": [] 701 | } 702 | 703 | { 704 | "m_SGVersion": 1, 705 | "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", 706 | "m_ObjectId": "8a5efc4df687487591642b98f6c35ff8", 707 | "m_Group": { 708 | "m_Id": "" 709 | }, 710 | "m_Name": "SDF_Raymarching (Custom Function)", 711 | "m_DrawState": { 712 | "m_Expanded": true, 713 | "m_Position": { 714 | "serializedVersion": "2", 715 | "x": -387.9999694824219, 716 | "y": -134.00001525878907, 717 | "width": 256.99993896484377, 718 | "height": 422.0 719 | } 720 | }, 721 | "m_Slots": [ 722 | { 723 | "m_Id": "5d711925abd44730bf93d288e0246b7e" 724 | }, 725 | { 726 | "m_Id": "c2d564cb00124d7f8820f94b6eba6f7e" 727 | }, 728 | { 729 | "m_Id": "345413e7a30c494095c7d7e9021475f2" 730 | }, 731 | { 732 | "m_Id": "c3292bd936114c13af0aba5c20fe09d9" 733 | }, 734 | { 735 | "m_Id": "e4c1c67d4ba04075a2ddf854fe6e1b14" 736 | }, 737 | { 738 | "m_Id": "3d3bbed9fbdf43f0bc71dc98a03ca73b" 739 | }, 740 | { 741 | "m_Id": "11545b625a35436fa9d9a8750547e5e3" 742 | }, 743 | { 744 | "m_Id": "7eaa7a95061a4e98b8f45d3899d997bd" 745 | } 746 | ], 747 | "synonyms": [ 748 | "code", 749 | "HLSL" 750 | ], 751 | "m_Precision": 0, 752 | "m_PreviewExpanded": true, 753 | "m_PreviewMode": 0, 754 | "m_CustomColors": { 755 | "m_SerializableColors": [] 756 | }, 757 | "m_SourceType": 1, 758 | "m_FunctionName": "SDF_Raymarching", 759 | "m_FunctionSource": "1c2393b2f281e7541b43cfa8bc74eac8", 760 | "m_FunctionBody": "// 起始点\r\nfloat2 p = baseUV;\r\n// 归一化后获得方向\r\nfloat2 dir = normalize(offsetUV);\r\n// 起始点到终点的距离\r\nlength = 0.0;\r\n \r\nfor (int i = 0; i < numSteps && i < 10; i++)\r\n{\r\n // 通过采样 SDF 图求得当前 p 点与最近裂缝距离\r\n // 循环内只能对纹理的单一 MipMap 等级采样\r\n float distance = 1 - SAMPLE_TEXTURE2D_LOD(tex, texSampler, p, 0).r;\r\n // 加入 edgeWidth 微调宽度效果\r\n distance -= edgeWidth;\r\n \r\n // 当距离少于0,说明已经击中物体,退出循环\r\n if (distance < 0.0)\r\n break;\r\n \r\n // 不为0的时候,记录当前 t ,更新 p 点位置\r\n float t = distance * stepSize;\r\n p += dir * t;\r\n length += t;\r\n }" 761 | } 762 | 763 | { 764 | "m_SGVersion": 1, 765 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", 766 | "m_ObjectId": "a40b2691b3b7496b8244f7ba56ab42d8", 767 | "m_Guid": { 768 | "m_GuidSerialized": "dd76cb4b-afe0-4d0e-b70d-ea6c28005005" 769 | }, 770 | "m_Name": "EdgeWidth", 771 | "m_DefaultRefNameVersion": 1, 772 | "m_RefNameGeneratedByDisplayName": "EdgeWidth", 773 | "m_DefaultReferenceName": "_EdgeWidth", 774 | "m_OverrideReferenceName": "", 775 | "m_GeneratePropertyBlock": true, 776 | "m_UseCustomSlotLabel": false, 777 | "m_CustomSlotLabel": "", 778 | "m_Precision": 0, 779 | "overrideHLSLDeclaration": false, 780 | "hlslDeclarationOverride": 0, 781 | "m_Hidden": false, 782 | "m_Value": 0.10000000149011612, 783 | "m_FloatType": 0, 784 | "m_RangeValues": { 785 | "x": 0.0, 786 | "y": 1.0 787 | } 788 | } 789 | 790 | { 791 | "m_SGVersion": 1, 792 | "m_Type": "UnityEditor.ShaderGraph.SamplerStateShaderProperty", 793 | "m_ObjectId": "a6022f19e950474fb6219d688abef6e1", 794 | "m_Guid": { 795 | "m_GuidSerialized": "e2f78755-b3a4-4035-a6fd-7772e8f2ceea" 796 | }, 797 | "m_Name": "SDFSampler", 798 | "m_DefaultRefNameVersion": 1, 799 | "m_RefNameGeneratedByDisplayName": "SDFSampler", 800 | "m_DefaultReferenceName": "SDFSampler", 801 | "m_OverrideReferenceName": "", 802 | "m_GeneratePropertyBlock": false, 803 | "m_UseCustomSlotLabel": false, 804 | "m_CustomSlotLabel": "", 805 | "m_Precision": 0, 806 | "overrideHLSLDeclaration": false, 807 | "hlslDeclarationOverride": 0, 808 | "m_Hidden": false, 809 | "m_Value": { 810 | "m_filter": 0, 811 | "m_wrap": 0, 812 | "m_anisotropic": 0 813 | } 814 | } 815 | 816 | { 817 | "m_SGVersion": 0, 818 | "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", 819 | "m_ObjectId": "a6e686c95dc24103b5a9d665b9b49c89", 820 | "m_Id": 0, 821 | "m_DisplayName": "BaseUV", 822 | "m_SlotType": 1, 823 | "m_Hidden": false, 824 | "m_ShaderOutputName": "Out", 825 | "m_StageCapability": 3, 826 | "m_Value": { 827 | "x": 0.0, 828 | "y": 0.0 829 | }, 830 | "m_DefaultValue": { 831 | "x": 0.0, 832 | "y": 0.0 833 | }, 834 | "m_Labels": [] 835 | } 836 | 837 | { 838 | "m_SGVersion": 0, 839 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 840 | "m_ObjectId": "ad73789c98a6482eba2bef1e5ff8bd35", 841 | "m_Id": 0, 842 | "m_DisplayName": "StepSize", 843 | "m_SlotType": 1, 844 | "m_Hidden": false, 845 | "m_ShaderOutputName": "Out", 846 | "m_StageCapability": 3, 847 | "m_Value": 0.0, 848 | "m_DefaultValue": 0.0, 849 | "m_Labels": [] 850 | } 851 | 852 | { 853 | "m_SGVersion": 0, 854 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 855 | "m_ObjectId": "af6339b445164a24bc66406214508fb7", 856 | "m_Id": 0, 857 | "m_DisplayName": "EdgeWidth", 858 | "m_SlotType": 1, 859 | "m_Hidden": false, 860 | "m_ShaderOutputName": "Out", 861 | "m_StageCapability": 3, 862 | "m_Value": 0.0, 863 | "m_DefaultValue": 0.0, 864 | "m_Labels": [] 865 | } 866 | 867 | { 868 | "m_SGVersion": 1, 869 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty", 870 | "m_ObjectId": "bdd64cace4f5472ab4943a92c5205928", 871 | "m_Guid": { 872 | "m_GuidSerialized": "372d6357-d030-4183-bf99-57a341e91fda" 873 | }, 874 | "m_Name": "OffserUV", 875 | "m_DefaultRefNameVersion": 1, 876 | "m_RefNameGeneratedByDisplayName": "OffserUV", 877 | "m_DefaultReferenceName": "_OffserUV", 878 | "m_OverrideReferenceName": "", 879 | "m_GeneratePropertyBlock": true, 880 | "m_UseCustomSlotLabel": false, 881 | "m_CustomSlotLabel": "", 882 | "m_Precision": 0, 883 | "overrideHLSLDeclaration": false, 884 | "hlslDeclarationOverride": 0, 885 | "m_Hidden": false, 886 | "m_Value": { 887 | "x": 0.0, 888 | "y": 0.0, 889 | "z": 0.0, 890 | "w": 0.0 891 | } 892 | } 893 | 894 | { 895 | "m_SGVersion": 0, 896 | "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", 897 | "m_ObjectId": "c2d564cb00124d7f8820f94b6eba6f7e", 898 | "m_Id": 7, 899 | "m_DisplayName": "texSampler", 900 | "m_SlotType": 0, 901 | "m_Hidden": false, 902 | "m_ShaderOutputName": "texSampler", 903 | "m_StageCapability": 3, 904 | "m_BareResource": true 905 | } 906 | 907 | { 908 | "m_SGVersion": 0, 909 | "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", 910 | "m_ObjectId": "c3292bd936114c13af0aba5c20fe09d9", 911 | "m_Id": 2, 912 | "m_DisplayName": "offsetUV", 913 | "m_SlotType": 0, 914 | "m_Hidden": false, 915 | "m_ShaderOutputName": "offsetUV", 916 | "m_StageCapability": 3, 917 | "m_Value": { 918 | "x": 0.0, 919 | "y": 0.0 920 | }, 921 | "m_DefaultValue": { 922 | "x": 0.0, 923 | "y": 0.0 924 | }, 925 | "m_Labels": [] 926 | } 927 | 928 | { 929 | "m_SGVersion": 0, 930 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 931 | "m_ObjectId": "d6a60b92a3924233ad4e2b2d71b7fdce", 932 | "m_Id": 1, 933 | "m_DisplayName": "Length", 934 | "m_SlotType": 0, 935 | "m_Hidden": false, 936 | "m_ShaderOutputName": "Length", 937 | "m_StageCapability": 3, 938 | "m_Value": 0.0, 939 | "m_DefaultValue": 0.0, 940 | "m_Labels": [] 941 | } 942 | 943 | { 944 | "m_SGVersion": 0, 945 | "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", 946 | "m_ObjectId": "e10f6c684277447e9cc8429d84d5bd80", 947 | "m_Id": 0, 948 | "m_DisplayName": "OffserUV", 949 | "m_SlotType": 1, 950 | "m_Hidden": false, 951 | "m_ShaderOutputName": "Out", 952 | "m_StageCapability": 3, 953 | "m_Value": { 954 | "x": 0.0, 955 | "y": 0.0 956 | }, 957 | "m_DefaultValue": { 958 | "x": 0.0, 959 | "y": 0.0 960 | }, 961 | "m_Labels": [] 962 | } 963 | 964 | { 965 | "m_SGVersion": 0, 966 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 967 | "m_ObjectId": "e4c1c67d4ba04075a2ddf854fe6e1b14", 968 | "m_Id": 3, 969 | "m_DisplayName": "numSteps", 970 | "m_SlotType": 0, 971 | "m_Hidden": false, 972 | "m_ShaderOutputName": "numSteps", 973 | "m_StageCapability": 3, 974 | "m_Value": 0.0, 975 | "m_DefaultValue": 0.0, 976 | "m_Labels": [] 977 | } 978 | 979 | { 980 | "m_SGVersion": 0, 981 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 982 | "m_ObjectId": "e82ea7d07e6746faae7a6cafd9fb5bd4", 983 | "m_Group": { 984 | "m_Id": "" 985 | }, 986 | "m_Name": "Property", 987 | "m_DrawState": { 988 | "m_Expanded": true, 989 | "m_Position": { 990 | "serializedVersion": "2", 991 | "x": -615.0, 992 | "y": 7.99998140335083, 993 | "width": 130.00003051757813, 994 | "height": 34.0 995 | } 996 | }, 997 | "m_Slots": [ 998 | { 999 | "m_Id": "f187213df57941a3828e97e73251184a" 1000 | } 1001 | ], 1002 | "synonyms": [], 1003 | "m_Precision": 0, 1004 | "m_PreviewExpanded": true, 1005 | "m_PreviewMode": 0, 1006 | "m_CustomColors": { 1007 | "m_SerializableColors": [] 1008 | }, 1009 | "m_Property": { 1010 | "m_Id": "64dfc054feed4d66b357e1ff911f43ec" 1011 | } 1012 | } 1013 | 1014 | { 1015 | "m_SGVersion": 0, 1016 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1017 | "m_ObjectId": "f187213df57941a3828e97e73251184a", 1018 | "m_Id": 0, 1019 | "m_DisplayName": "NumSteps", 1020 | "m_SlotType": 1, 1021 | "m_Hidden": false, 1022 | "m_ShaderOutputName": "Out", 1023 | "m_StageCapability": 3, 1024 | "m_Value": 0.0, 1025 | "m_DefaultValue": 0.0, 1026 | "m_Labels": [] 1027 | } 1028 | 1029 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/SDF_Raymarching.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02bc6dfa252a168449a5b3f9b0f98420 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/ShapeVolume.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SGVersion": 3, 3 | "m_Type": "UnityEditor.ShaderGraph.GraphData", 4 | "m_ObjectId": "e4cdd9de05004457840ea6d3d8232941", 5 | "m_Properties": [ 6 | { 7 | "m_Id": "8fecb97cf10f4c41819776be783834d5" 8 | } 9 | ], 10 | "m_Keywords": [], 11 | "m_Dropdowns": [], 12 | "m_CategoryData": [ 13 | { 14 | "m_Id": "6b7014d39777421cb8cf8e0d2d116191" 15 | } 16 | ], 17 | "m_Nodes": [ 18 | { 19 | "m_Id": "40e5f64b72e94ab8a30a7e1ec2b177ed" 20 | }, 21 | { 22 | "m_Id": "198addcf70c74217ac69b5fd0b640ce1" 23 | }, 24 | { 25 | "m_Id": "d4ff02a9993b49339f5b014b7ec54ce5" 26 | }, 27 | { 28 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 29 | }, 30 | { 31 | "m_Id": "4b92b1b1f7f6482a9d41cd6504701d04" 32 | }, 33 | { 34 | "m_Id": "e1c13286a3324eec8297d90ea0651242" 35 | }, 36 | { 37 | "m_Id": "c5c32138f36d451ebd05e751aa8d324f" 38 | }, 39 | { 40 | "m_Id": "e57b67ce69e1466eb2476913b77609f1" 41 | }, 42 | { 43 | "m_Id": "b3ecf0d21869483bb041f2ab5f8731f9" 44 | }, 45 | { 46 | "m_Id": "1f23dcec94cb4d949c80e6661215fecd" 47 | }, 48 | { 49 | "m_Id": "c9004e6194134c3fa13503013e6cbbf9" 50 | } 51 | ], 52 | "m_GroupDatas": [], 53 | "m_StickyNoteDatas": [], 54 | "m_Edges": [ 55 | { 56 | "m_OutputSlot": { 57 | "m_Node": { 58 | "m_Id": "198addcf70c74217ac69b5fd0b640ce1" 59 | }, 60 | "m_SlotId": 0 61 | }, 62 | "m_InputSlot": { 63 | "m_Node": { 64 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 65 | }, 66 | "m_SlotId": 0 67 | } 68 | }, 69 | { 70 | "m_OutputSlot": { 71 | "m_Node": { 72 | "m_Id": "1f23dcec94cb4d949c80e6661215fecd" 73 | }, 74 | "m_SlotId": 2 75 | }, 76 | "m_InputSlot": { 77 | "m_Node": { 78 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 79 | }, 80 | "m_SlotId": 2 81 | } 82 | }, 83 | { 84 | "m_OutputSlot": { 85 | "m_Node": { 86 | "m_Id": "4b92b1b1f7f6482a9d41cd6504701d04" 87 | }, 88 | "m_SlotId": 0 89 | }, 90 | "m_InputSlot": { 91 | "m_Node": { 92 | "m_Id": "1f23dcec94cb4d949c80e6661215fecd" 93 | }, 94 | "m_SlotId": 0 95 | } 96 | }, 97 | { 98 | "m_OutputSlot": { 99 | "m_Node": { 100 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 101 | }, 102 | "m_SlotId": 5 103 | }, 104 | "m_InputSlot": { 105 | "m_Node": { 106 | "m_Id": "c9004e6194134c3fa13503013e6cbbf9" 107 | }, 108 | "m_SlotId": 0 109 | } 110 | }, 111 | { 112 | "m_OutputSlot": { 113 | "m_Node": { 114 | "m_Id": "b3ecf0d21869483bb041f2ab5f8731f9" 115 | }, 116 | "m_SlotId": 0 117 | }, 118 | "m_InputSlot": { 119 | "m_Node": { 120 | "m_Id": "1f23dcec94cb4d949c80e6661215fecd" 121 | }, 122 | "m_SlotId": 1 123 | } 124 | }, 125 | { 126 | "m_OutputSlot": { 127 | "m_Node": { 128 | "m_Id": "c5c32138f36d451ebd05e751aa8d324f" 129 | }, 130 | "m_SlotId": 0 131 | }, 132 | "m_InputSlot": { 133 | "m_Node": { 134 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 135 | }, 136 | "m_SlotId": 3 137 | } 138 | }, 139 | { 140 | "m_OutputSlot": { 141 | "m_Node": { 142 | "m_Id": "c9004e6194134c3fa13503013e6cbbf9" 143 | }, 144 | "m_SlotId": 2 145 | }, 146 | "m_InputSlot": { 147 | "m_Node": { 148 | "m_Id": "40e5f64b72e94ab8a30a7e1ec2b177ed" 149 | }, 150 | "m_SlotId": 1 151 | } 152 | }, 153 | { 154 | "m_OutputSlot": { 155 | "m_Node": { 156 | "m_Id": "d4ff02a9993b49339f5b014b7ec54ce5" 157 | }, 158 | "m_SlotId": 0 159 | }, 160 | "m_InputSlot": { 161 | "m_Node": { 162 | "m_Id": "e1c13286a3324eec8297d90ea0651242" 163 | }, 164 | "m_SlotId": 0 165 | } 166 | }, 167 | { 168 | "m_OutputSlot": { 169 | "m_Node": { 170 | "m_Id": "e1c13286a3324eec8297d90ea0651242" 171 | }, 172 | "m_SlotId": 1 173 | }, 174 | "m_InputSlot": { 175 | "m_Node": { 176 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 177 | }, 178 | "m_SlotId": 1 179 | } 180 | }, 181 | { 182 | "m_OutputSlot": { 183 | "m_Node": { 184 | "m_Id": "e57b67ce69e1466eb2476913b77609f1" 185 | }, 186 | "m_SlotId": 0 187 | }, 188 | "m_InputSlot": { 189 | "m_Node": { 190 | "m_Id": "862ddfb2c52f4e8c8e00ce3ca4313f61" 191 | }, 192 | "m_SlotId": 4 193 | } 194 | } 195 | ], 196 | "m_VertexContext": { 197 | "m_Position": { 198 | "x": 0.0, 199 | "y": 0.0 200 | }, 201 | "m_Blocks": [] 202 | }, 203 | "m_FragmentContext": { 204 | "m_Position": { 205 | "x": 0.0, 206 | "y": 0.0 207 | }, 208 | "m_Blocks": [] 209 | }, 210 | "m_PreviewData": { 211 | "serializedMesh": { 212 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 213 | "m_Guid": "" 214 | }, 215 | "preventRotation": false 216 | }, 217 | "m_Path": "Sub Graphs", 218 | "m_GraphPrecision": 1, 219 | "m_PreviewMode": 2, 220 | "m_OutputNode": { 221 | "m_Id": "40e5f64b72e94ab8a30a7e1ec2b177ed" 222 | }, 223 | "m_ActiveTargets": [] 224 | } 225 | 226 | { 227 | "m_SGVersion": 0, 228 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 229 | "m_ObjectId": "125633acafa94e41bb0091bf5c39bc18", 230 | "m_Id": 1, 231 | "m_DisplayName": "Direction", 232 | "m_SlotType": 1, 233 | "m_Hidden": false, 234 | "m_ShaderOutputName": "Direction", 235 | "m_StageCapability": 3, 236 | "m_Value": { 237 | "x": 0.0, 238 | "y": 0.0, 239 | "z": 0.0 240 | }, 241 | "m_DefaultValue": { 242 | "x": 0.0, 243 | "y": 0.0, 244 | "z": 0.0 245 | }, 246 | "m_Labels": [] 247 | } 248 | 249 | { 250 | "m_SGVersion": 0, 251 | "m_Type": "UnityEditor.ShaderGraph.CameraNode", 252 | "m_ObjectId": "198addcf70c74217ac69b5fd0b640ce1", 253 | "m_Group": { 254 | "m_Id": "" 255 | }, 256 | "m_Name": "Camera", 257 | "m_DrawState": { 258 | "m_Expanded": false, 259 | "m_Position": { 260 | "serializedVersion": "2", 261 | "x": -1532.0, 262 | "y": -69.0, 263 | "width": 97.0, 264 | "height": 77.0 265 | } 266 | }, 267 | "m_Slots": [ 268 | { 269 | "m_Id": "4cea8557f2ac4f25879dbccb30f38a3d" 270 | }, 271 | { 272 | "m_Id": "125633acafa94e41bb0091bf5c39bc18" 273 | }, 274 | { 275 | "m_Id": "ab7f69ce014046e6a05b1499bde313a7" 276 | }, 277 | { 278 | "m_Id": "b6a32dd89dfe42829eca03dde0f26b94" 279 | }, 280 | { 281 | "m_Id": "d095cb859edc4514b44ae6a18ea08981" 282 | }, 283 | { 284 | "m_Id": "7a983b9768cb4684b19ad0441f292f84" 285 | }, 286 | { 287 | "m_Id": "cbd9f506ab39464a8524f1ad5c769e6e" 288 | }, 289 | { 290 | "m_Id": "dae64e2f9a964ac5937014e7bbc14404" 291 | } 292 | ], 293 | "synonyms": [ 294 | "position", 295 | "direction", 296 | "orthographic", 297 | "near plane", 298 | "far plane", 299 | "width", 300 | "height" 301 | ], 302 | "m_Precision": 0, 303 | "m_PreviewExpanded": true, 304 | "m_PreviewMode": 0, 305 | "m_CustomColors": { 306 | "m_SerializableColors": [] 307 | } 308 | } 309 | 310 | { 311 | "m_SGVersion": 0, 312 | "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", 313 | "m_ObjectId": "1f23dcec94cb4d949c80e6661215fecd", 314 | "m_Group": { 315 | "m_Id": "" 316 | }, 317 | "m_Name": "Multiply", 318 | "m_DrawState": { 319 | "m_Expanded": true, 320 | "m_Position": { 321 | "serializedVersion": "2", 322 | "x": -1572.0001220703125, 323 | "y": 485.0, 324 | "width": 130.0, 325 | "height": 118.0 326 | } 327 | }, 328 | "m_Slots": [ 329 | { 330 | "m_Id": "6344b196b8c74a828bebd02e6ebf07d9" 331 | }, 332 | { 333 | "m_Id": "7b344190eef14353aa921a271d69dd35" 334 | }, 335 | { 336 | "m_Id": "3cf5dffe40734a649484c8b24b64add5" 337 | } 338 | ], 339 | "synonyms": [ 340 | "multiplication", 341 | "times", 342 | "x" 343 | ], 344 | "m_Precision": 0, 345 | "m_PreviewExpanded": false, 346 | "m_PreviewMode": 0, 347 | "m_CustomColors": { 348 | "m_SerializableColors": [] 349 | } 350 | } 351 | 352 | { 353 | "m_SGVersion": 0, 354 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 355 | "m_ObjectId": "23b6dd0c52f64ca8bf0c058dc7dd9dc4", 356 | "m_Id": 0, 357 | "m_DisplayName": "Out", 358 | "m_SlotType": 1, 359 | "m_Hidden": false, 360 | "m_ShaderOutputName": "Out", 361 | "m_StageCapability": 3, 362 | "m_Value": { 363 | "x": 0.0, 364 | "y": 0.0, 365 | "z": 1.0 366 | }, 367 | "m_DefaultValue": { 368 | "x": 0.0, 369 | "y": 0.0, 370 | "z": 0.0 371 | }, 372 | "m_Labels": [] 373 | } 374 | 375 | { 376 | "m_SGVersion": 0, 377 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 378 | "m_ObjectId": "3cf5dffe40734a649484c8b24b64add5", 379 | "m_Id": 2, 380 | "m_DisplayName": "Out", 381 | "m_SlotType": 1, 382 | "m_Hidden": false, 383 | "m_ShaderOutputName": "Out", 384 | "m_StageCapability": 3, 385 | "m_Value": { 386 | "e00": 0.0, 387 | "e01": 0.0, 388 | "e02": 0.0, 389 | "e03": 0.0, 390 | "e10": 0.0, 391 | "e11": 0.0, 392 | "e12": 0.0, 393 | "e13": 0.0, 394 | "e20": 0.0, 395 | "e21": 0.0, 396 | "e22": 0.0, 397 | "e23": 0.0, 398 | "e30": 0.0, 399 | "e31": 0.0, 400 | "e32": 0.0, 401 | "e33": 0.0 402 | }, 403 | "m_DefaultValue": { 404 | "e00": 1.0, 405 | "e01": 0.0, 406 | "e02": 0.0, 407 | "e03": 0.0, 408 | "e10": 0.0, 409 | "e11": 1.0, 410 | "e12": 0.0, 411 | "e13": 0.0, 412 | "e20": 0.0, 413 | "e21": 0.0, 414 | "e22": 1.0, 415 | "e23": 0.0, 416 | "e30": 0.0, 417 | "e31": 0.0, 418 | "e32": 0.0, 419 | "e33": 1.0 420 | } 421 | } 422 | 423 | { 424 | "m_SGVersion": 0, 425 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 426 | "m_ObjectId": "40532b6f3e51463bad3d972e5aa88d43", 427 | "m_Id": 5, 428 | "m_DisplayName": "thickness", 429 | "m_SlotType": 1, 430 | "m_Hidden": false, 431 | "m_ShaderOutputName": "thickness", 432 | "m_StageCapability": 3, 433 | "m_Value": 0.0, 434 | "m_DefaultValue": 0.0, 435 | "m_Labels": [] 436 | } 437 | 438 | { 439 | "m_SGVersion": 0, 440 | "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", 441 | "m_ObjectId": "40e5f64b72e94ab8a30a7e1ec2b177ed", 442 | "m_Group": { 443 | "m_Id": "" 444 | }, 445 | "m_Name": "Output", 446 | "m_DrawState": { 447 | "m_Expanded": true, 448 | "m_Position": { 449 | "serializedVersion": "2", 450 | "x": -399.9999084472656, 451 | "y": 55.000022888183597, 452 | "width": 102.99990844726563, 453 | "height": 76.99996185302735 454 | } 455 | }, 456 | "m_Slots": [ 457 | { 458 | "m_Id": "e9f16c0fb80d45fcb1a34a2a86bbce69" 459 | } 460 | ], 461 | "synonyms": [], 462 | "m_Precision": 0, 463 | "m_PreviewExpanded": true, 464 | "m_PreviewMode": 0, 465 | "m_CustomColors": { 466 | "m_SerializableColors": [] 467 | }, 468 | "IsFirstSlotValid": true 469 | } 470 | 471 | { 472 | "m_SGVersion": 0, 473 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 474 | "m_ObjectId": "471cb79686f94e5fba949142ae6aa429", 475 | "m_Id": 0, 476 | "m_DisplayName": "output", 477 | "m_SlotType": 1, 478 | "m_Hidden": false, 479 | "m_ShaderOutputName": "output", 480 | "m_StageCapability": 3, 481 | "m_Value": { 482 | "x": 0.0, 483 | "y": 0.0, 484 | "z": 0.0 485 | }, 486 | "m_DefaultValue": { 487 | "x": 0.0, 488 | "y": 0.0, 489 | "z": 0.0 490 | }, 491 | "m_Labels": [] 492 | } 493 | 494 | { 495 | "m_SGVersion": 1, 496 | "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", 497 | "m_ObjectId": "4b92b1b1f7f6482a9d41cd6504701d04", 498 | "m_Group": { 499 | "m_Id": "" 500 | }, 501 | "m_Name": "ObjectScale (Custom Function)", 502 | "m_DrawState": { 503 | "m_Expanded": true, 504 | "m_Position": { 505 | "serializedVersion": "2", 506 | "x": -1839.0001220703125, 507 | "y": 437.9999694824219, 508 | "width": 223.0, 509 | "height": 94.00003051757813 510 | } 511 | }, 512 | "m_Slots": [ 513 | { 514 | "m_Id": "471cb79686f94e5fba949142ae6aa429" 515 | } 516 | ], 517 | "synonyms": [ 518 | "code", 519 | "HLSL" 520 | ], 521 | "m_Precision": 0, 522 | "m_PreviewExpanded": false, 523 | "m_PreviewMode": 0, 524 | "m_CustomColors": { 525 | "m_SerializableColors": [] 526 | }, 527 | "m_SourceType": 1, 528 | "m_FunctionName": "ObjectScale", 529 | "m_FunctionSource": "", 530 | "m_FunctionBody": "output = 0;\r\nfloat3 worldDir = TransformObjectToWorldDir(float3(1,0,0), false);\r\noutput.x = length(worldDir);\r\nworldDir = TransformObjectToWorldDir(float3(0,1,0), false);\r\noutput.y = length(worldDir);\r\nworldDir = TransformObjectToWorldDir(float3(0,0,1), false);\r\noutput.z = length(worldDir);\r" 531 | } 532 | 533 | { 534 | "m_SGVersion": 0, 535 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 536 | "m_ObjectId": "4cea8557f2ac4f25879dbccb30f38a3d", 537 | "m_Id": 0, 538 | "m_DisplayName": "Position", 539 | "m_SlotType": 1, 540 | "m_Hidden": false, 541 | "m_ShaderOutputName": "Position", 542 | "m_StageCapability": 3, 543 | "m_Value": { 544 | "x": 0.0, 545 | "y": 0.0, 546 | "z": 0.0 547 | }, 548 | "m_DefaultValue": { 549 | "x": 0.0, 550 | "y": 0.0, 551 | "z": 0.0 552 | }, 553 | "m_Labels": [] 554 | } 555 | 556 | { 557 | "m_SGVersion": 0, 558 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 559 | "m_ObjectId": "4f28772fad8646209021610a200b5ae5", 560 | "m_Id": 0, 561 | "m_DisplayName": "Out", 562 | "m_SlotType": 1, 563 | "m_Hidden": false, 564 | "m_ShaderOutputName": "Out", 565 | "m_StageCapability": 3, 566 | "m_Value": { 567 | "x": 0.0, 568 | "y": 0.0, 569 | "z": 0.0 570 | }, 571 | "m_DefaultValue": { 572 | "x": 0.0, 573 | "y": 0.0, 574 | "z": 0.0 575 | }, 576 | "m_Labels": [] 577 | } 578 | 579 | { 580 | "m_SGVersion": 0, 581 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 582 | "m_ObjectId": "51904a8289924653bd7bbf74533ec7b6", 583 | "m_Id": 0, 584 | "m_DisplayName": "Out", 585 | "m_SlotType": 1, 586 | "m_Hidden": false, 587 | "m_ShaderOutputName": "Out", 588 | "m_StageCapability": 3, 589 | "m_Value": { 590 | "x": 0.0, 591 | "y": 0.0, 592 | "z": 0.0 593 | }, 594 | "m_DefaultValue": { 595 | "x": 0.0, 596 | "y": 0.0, 597 | "z": 0.0 598 | }, 599 | "m_Labels": [] 600 | } 601 | 602 | { 603 | "m_SGVersion": 0, 604 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 605 | "m_ObjectId": "6344b196b8c74a828bebd02e6ebf07d9", 606 | "m_Id": 0, 607 | "m_DisplayName": "A", 608 | "m_SlotType": 0, 609 | "m_Hidden": false, 610 | "m_ShaderOutputName": "A", 611 | "m_StageCapability": 3, 612 | "m_Value": { 613 | "e00": 0.0, 614 | "e01": 0.0, 615 | "e02": 0.0, 616 | "e03": 0.0, 617 | "e10": 0.0, 618 | "e11": 0.0, 619 | "e12": 0.0, 620 | "e13": 0.0, 621 | "e20": 0.0, 622 | "e21": 0.0, 623 | "e22": 0.0, 624 | "e23": 0.0, 625 | "e30": 0.0, 626 | "e31": 0.0, 627 | "e32": 0.0, 628 | "e33": 0.0 629 | }, 630 | "m_DefaultValue": { 631 | "e00": 1.0, 632 | "e01": 0.0, 633 | "e02": 0.0, 634 | "e03": 0.0, 635 | "e10": 0.0, 636 | "e11": 1.0, 637 | "e12": 0.0, 638 | "e13": 0.0, 639 | "e20": 0.0, 640 | "e21": 0.0, 641 | "e22": 1.0, 642 | "e23": 0.0, 643 | "e30": 0.0, 644 | "e31": 0.0, 645 | "e32": 0.0, 646 | "e33": 1.0 647 | } 648 | } 649 | 650 | { 651 | "m_SGVersion": 0, 652 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 653 | "m_ObjectId": "687f262469db4092b18733dcecbc53c3", 654 | "m_Id": 2, 655 | "m_DisplayName": "Out", 656 | "m_SlotType": 1, 657 | "m_Hidden": false, 658 | "m_ShaderOutputName": "Out", 659 | "m_StageCapability": 3, 660 | "m_Value": { 661 | "x": 0.0, 662 | "y": 0.0, 663 | "z": 0.0, 664 | "w": 0.0 665 | }, 666 | "m_DefaultValue": { 667 | "x": 0.0, 668 | "y": 0.0, 669 | "z": 0.0, 670 | "w": 0.0 671 | } 672 | } 673 | 674 | { 675 | "m_SGVersion": 0, 676 | "m_Type": "UnityEditor.ShaderGraph.CategoryData", 677 | "m_ObjectId": "6b7014d39777421cb8cf8e0d2d116191", 678 | "m_Name": "", 679 | "m_ChildObjectList": [ 680 | { 681 | "m_Id": "8fecb97cf10f4c41819776be783834d5" 682 | } 683 | ] 684 | } 685 | 686 | { 687 | "m_SGVersion": 0, 688 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 689 | "m_ObjectId": "6b98799496d74eb0ac222d64516a88aa", 690 | "m_Id": 0, 691 | "m_DisplayName": "rayOrigin", 692 | "m_SlotType": 0, 693 | "m_Hidden": false, 694 | "m_ShaderOutputName": "rayOrigin", 695 | "m_StageCapability": 3, 696 | "m_Value": { 697 | "x": 0.0, 698 | "y": 0.0, 699 | "z": 0.0 700 | }, 701 | "m_DefaultValue": { 702 | "x": 0.0, 703 | "y": 0.0, 704 | "z": 0.0 705 | }, 706 | "m_Labels": [] 707 | } 708 | 709 | { 710 | "m_SGVersion": 0, 711 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 712 | "m_ObjectId": "72d3f12ceca74c2e821c8c0579264005", 713 | "m_Id": 4, 714 | "m_DisplayName": "vertexNormalWS", 715 | "m_SlotType": 0, 716 | "m_Hidden": false, 717 | "m_ShaderOutputName": "vertexNormalWS", 718 | "m_StageCapability": 3, 719 | "m_Value": { 720 | "x": 0.0, 721 | "y": 0.0, 722 | "z": 0.0 723 | }, 724 | "m_DefaultValue": { 725 | "x": 0.0, 726 | "y": 0.0, 727 | "z": 0.0 728 | }, 729 | "m_Labels": [] 730 | } 731 | 732 | { 733 | "m_SGVersion": 0, 734 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 735 | "m_ObjectId": "74a930f4b47f46c6b2ca35a0aace176b", 736 | "m_Id": 1, 737 | "m_DisplayName": "Out", 738 | "m_SlotType": 1, 739 | "m_Hidden": false, 740 | "m_ShaderOutputName": "Out", 741 | "m_StageCapability": 3, 742 | "m_Value": { 743 | "x": 0.0, 744 | "y": 0.0, 745 | "z": 0.0, 746 | "w": 0.0 747 | }, 748 | "m_DefaultValue": { 749 | "x": 0.0, 750 | "y": 0.0, 751 | "z": 0.0, 752 | "w": 0.0 753 | } 754 | } 755 | 756 | { 757 | "m_SGVersion": 0, 758 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 759 | "m_ObjectId": "7a983b9768cb4684b19ad0441f292f84", 760 | "m_Id": 5, 761 | "m_DisplayName": "Z Buffer Sign", 762 | "m_SlotType": 1, 763 | "m_Hidden": false, 764 | "m_ShaderOutputName": "Z Buffer Sign", 765 | "m_StageCapability": 3, 766 | "m_Value": 1.0, 767 | "m_DefaultValue": 1.0, 768 | "m_Labels": [] 769 | } 770 | 771 | { 772 | "m_SGVersion": 0, 773 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 774 | "m_ObjectId": "7b344190eef14353aa921a271d69dd35", 775 | "m_Id": 1, 776 | "m_DisplayName": "B", 777 | "m_SlotType": 0, 778 | "m_Hidden": false, 779 | "m_ShaderOutputName": "B", 780 | "m_StageCapability": 3, 781 | "m_Value": { 782 | "e00": 2.0, 783 | "e01": 2.0, 784 | "e02": 2.0, 785 | "e03": 2.0, 786 | "e10": 2.0, 787 | "e11": 2.0, 788 | "e12": 2.0, 789 | "e13": 2.0, 790 | "e20": 2.0, 791 | "e21": 2.0, 792 | "e22": 2.0, 793 | "e23": 2.0, 794 | "e30": 2.0, 795 | "e31": 2.0, 796 | "e32": 2.0, 797 | "e33": 2.0 798 | }, 799 | "m_DefaultValue": { 800 | "e00": 1.0, 801 | "e01": 0.0, 802 | "e02": 0.0, 803 | "e03": 0.0, 804 | "e10": 0.0, 805 | "e11": 1.0, 806 | "e12": 0.0, 807 | "e13": 0.0, 808 | "e20": 0.0, 809 | "e21": 0.0, 810 | "e22": 1.0, 811 | "e23": 0.0, 812 | "e30": 0.0, 813 | "e31": 0.0, 814 | "e32": 0.0, 815 | "e33": 1.0 816 | } 817 | } 818 | 819 | { 820 | "m_SGVersion": 0, 821 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 822 | "m_ObjectId": "7c9bfcc610894dba83b913ecb13e9992", 823 | "m_Id": 0, 824 | "m_DisplayName": "A", 825 | "m_SlotType": 0, 826 | "m_Hidden": false, 827 | "m_ShaderOutputName": "A", 828 | "m_StageCapability": 3, 829 | "m_Value": { 830 | "x": 0.0, 831 | "y": 0.0, 832 | "z": 0.0, 833 | "w": 0.0 834 | }, 835 | "m_DefaultValue": { 836 | "x": 0.0, 837 | "y": 0.0, 838 | "z": 0.0, 839 | "w": 0.0 840 | } 841 | } 842 | 843 | { 844 | "m_SGVersion": 1, 845 | "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", 846 | "m_ObjectId": "862ddfb2c52f4e8c8e00ce3ca4313f61", 847 | "m_Group": { 848 | "m_Id": "" 849 | }, 850 | "m_Name": "IntersectionMesh (Custom Function)", 851 | "m_DrawState": { 852 | "m_Expanded": true, 853 | "m_Position": { 854 | "serializedVersion": "2", 855 | "x": -1069.0, 856 | "y": 55.0, 857 | "width": 253.0, 858 | "height": 190.0 859 | } 860 | }, 861 | "m_Slots": [ 862 | { 863 | "m_Id": "6b98799496d74eb0ac222d64516a88aa" 864 | }, 865 | { 866 | "m_Id": "a0eb7c32edc543a6bfc98b370ca13026" 867 | }, 868 | { 869 | "m_Id": "f52b9f2a90844cc5a02a0cfcb0c27eaa" 870 | }, 871 | { 872 | "m_Id": "c7102308df0541c3a164069ba0704a81" 873 | }, 874 | { 875 | "m_Id": "72d3f12ceca74c2e821c8c0579264005" 876 | }, 877 | { 878 | "m_Id": "40532b6f3e51463bad3d972e5aa88d43" 879 | } 880 | ], 881 | "synonyms": [ 882 | "code", 883 | "HLSL" 884 | ], 885 | "m_Precision": 0, 886 | "m_PreviewExpanded": false, 887 | "m_PreviewMode": 0, 888 | "m_CustomColors": { 889 | "m_SerializableColors": [] 890 | }, 891 | "m_SourceType": 1, 892 | "m_FunctionName": "IntersectionMesh", 893 | "m_FunctionSource": "1c2393b2f281e7541b43cfa8bc74eac8", 894 | "m_FunctionBody": "float3 offsetPosWS = positionWS - vertexNormalWS * radius;\r\nfloat3 oc = rayOrigin - offsetPosWS;\r\nfloat b = dot(rayDirection, oc);\r\nfloat c = dot(oc, oc) - radius * radius;\r\nfloat h = b * b - c;\r\nh = sqrt(h);\r\n \r\nthickness = h * 2;" 895 | } 896 | 897 | { 898 | "m_SGVersion": 1, 899 | "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", 900 | "m_ObjectId": "8fecb97cf10f4c41819776be783834d5", 901 | "m_Guid": { 902 | "m_GuidSerialized": "a482b529-e466-4617-ad4a-f80bb1f97ba5" 903 | }, 904 | "m_Name": "ShapeSphereRadius", 905 | "m_DefaultRefNameVersion": 1, 906 | "m_RefNameGeneratedByDisplayName": "ShapeSphereRadius", 907 | "m_DefaultReferenceName": "_ShapeSphereRadius", 908 | "m_OverrideReferenceName": "", 909 | "m_GeneratePropertyBlock": true, 910 | "m_UseCustomSlotLabel": false, 911 | "m_CustomSlotLabel": "", 912 | "m_Precision": 0, 913 | "overrideHLSLDeclaration": false, 914 | "hlslDeclarationOverride": 0, 915 | "m_Hidden": false, 916 | "m_Value": 1.0, 917 | "m_FloatType": 0, 918 | "m_RangeValues": { 919 | "x": 0.0, 920 | "y": 1.0 921 | } 922 | } 923 | 924 | { 925 | "m_SGVersion": 0, 926 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 927 | "m_ObjectId": "a0eb7c32edc543a6bfc98b370ca13026", 928 | "m_Id": 1, 929 | "m_DisplayName": "rayDirection", 930 | "m_SlotType": 0, 931 | "m_Hidden": false, 932 | "m_ShaderOutputName": "rayDirection", 933 | "m_StageCapability": 3, 934 | "m_Value": { 935 | "x": 0.0, 936 | "y": 0.0, 937 | "z": 0.0 938 | }, 939 | "m_DefaultValue": { 940 | "x": 0.0, 941 | "y": 0.0, 942 | "z": 0.0 943 | }, 944 | "m_Labels": [] 945 | } 946 | 947 | { 948 | "m_SGVersion": 0, 949 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 950 | "m_ObjectId": "a1aab84c1f7b4f5c9cc70bbbd5d3fbfa", 951 | "m_Id": 0, 952 | "m_DisplayName": "In", 953 | "m_SlotType": 0, 954 | "m_Hidden": false, 955 | "m_ShaderOutputName": "In", 956 | "m_StageCapability": 3, 957 | "m_Value": { 958 | "x": 0.0, 959 | "y": 0.0, 960 | "z": 0.0, 961 | "w": 0.0 962 | }, 963 | "m_DefaultValue": { 964 | "x": 0.0, 965 | "y": 0.0, 966 | "z": 0.0, 967 | "w": 0.0 968 | } 969 | } 970 | 971 | { 972 | "m_SGVersion": 0, 973 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 974 | "m_ObjectId": "ab7f69ce014046e6a05b1499bde313a7", 975 | "m_Id": 2, 976 | "m_DisplayName": "Orthographic", 977 | "m_SlotType": 1, 978 | "m_Hidden": false, 979 | "m_ShaderOutputName": "Orthographic", 980 | "m_StageCapability": 3, 981 | "m_Value": 0.0, 982 | "m_DefaultValue": 0.0, 983 | "m_Labels": [] 984 | } 985 | 986 | { 987 | "m_SGVersion": 0, 988 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 989 | "m_ObjectId": "b3ecf0d21869483bb041f2ab5f8731f9", 990 | "m_Group": { 991 | "m_Id": "" 992 | }, 993 | "m_Name": "Property", 994 | "m_DrawState": { 995 | "m_Expanded": true, 996 | "m_Position": { 997 | "serializedVersion": "2", 998 | "x": -1796.0001220703125, 999 | "y": 569.0000610351563, 1000 | "width": 180.0, 1001 | "height": 33.99993896484375 1002 | } 1003 | }, 1004 | "m_Slots": [ 1005 | { 1006 | "m_Id": "bff0f60c7d32447dafe9c35d387dec83" 1007 | } 1008 | ], 1009 | "synonyms": [], 1010 | "m_Precision": 0, 1011 | "m_PreviewExpanded": true, 1012 | "m_PreviewMode": 0, 1013 | "m_CustomColors": { 1014 | "m_SerializableColors": [] 1015 | }, 1016 | "m_Property": { 1017 | "m_Id": "8fecb97cf10f4c41819776be783834d5" 1018 | } 1019 | } 1020 | 1021 | { 1022 | "m_SGVersion": 0, 1023 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1024 | "m_ObjectId": "b6a32dd89dfe42829eca03dde0f26b94", 1025 | "m_Id": 3, 1026 | "m_DisplayName": "Near Plane", 1027 | "m_SlotType": 1, 1028 | "m_Hidden": false, 1029 | "m_ShaderOutputName": "Near Plane", 1030 | "m_StageCapability": 3, 1031 | "m_Value": 0.0, 1032 | "m_DefaultValue": 0.0, 1033 | "m_Labels": [] 1034 | } 1035 | 1036 | { 1037 | "m_SGVersion": 0, 1038 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1039 | "m_ObjectId": "bff0f60c7d32447dafe9c35d387dec83", 1040 | "m_Id": 0, 1041 | "m_DisplayName": "ShapeSphereRadius", 1042 | "m_SlotType": 1, 1043 | "m_Hidden": false, 1044 | "m_ShaderOutputName": "Out", 1045 | "m_StageCapability": 3, 1046 | "m_Value": 0.0, 1047 | "m_DefaultValue": 0.0, 1048 | "m_Labels": [] 1049 | } 1050 | 1051 | { 1052 | "m_SGVersion": 1, 1053 | "m_Type": "UnityEditor.ShaderGraph.PositionNode", 1054 | "m_ObjectId": "c5c32138f36d451ebd05e751aa8d324f", 1055 | "m_Group": { 1056 | "m_Id": "" 1057 | }, 1058 | "m_Name": "Position", 1059 | "m_DrawState": { 1060 | "m_Expanded": true, 1061 | "m_Position": { 1062 | "serializedVersion": "2", 1063 | "x": -1777.0, 1064 | "y": 157.0, 1065 | "width": 206.0, 1066 | "height": 131.0 1067 | } 1068 | }, 1069 | "m_Slots": [ 1070 | { 1071 | "m_Id": "4f28772fad8646209021610a200b5ae5" 1072 | } 1073 | ], 1074 | "synonyms": [ 1075 | "location" 1076 | ], 1077 | "m_Precision": 1, 1078 | "m_PreviewExpanded": false, 1079 | "m_PreviewMode": 2, 1080 | "m_CustomColors": { 1081 | "m_SerializableColors": [] 1082 | }, 1083 | "m_Space": 2, 1084 | "m_PositionSource": 0 1085 | } 1086 | 1087 | { 1088 | "m_SGVersion": 0, 1089 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 1090 | "m_ObjectId": "c7102308df0541c3a164069ba0704a81", 1091 | "m_Id": 3, 1092 | "m_DisplayName": "positionWS", 1093 | "m_SlotType": 0, 1094 | "m_Hidden": false, 1095 | "m_ShaderOutputName": "positionWS", 1096 | "m_StageCapability": 3, 1097 | "m_Value": { 1098 | "x": 0.0, 1099 | "y": 0.0, 1100 | "z": 0.0 1101 | }, 1102 | "m_DefaultValue": { 1103 | "x": 0.0, 1104 | "y": 0.0, 1105 | "z": 0.0 1106 | }, 1107 | "m_Labels": [] 1108 | } 1109 | 1110 | { 1111 | "m_SGVersion": 0, 1112 | "m_Type": "UnityEditor.ShaderGraph.MaximumNode", 1113 | "m_ObjectId": "c9004e6194134c3fa13503013e6cbbf9", 1114 | "m_Group": { 1115 | "m_Id": "" 1116 | }, 1117 | "m_Name": "Maximum", 1118 | "m_DrawState": { 1119 | "m_Expanded": true, 1120 | "m_Position": { 1121 | "serializedVersion": "2", 1122 | "x": -660.0, 1123 | "y": 55.0, 1124 | "width": 126.0, 1125 | "height": 118.00003051757813 1126 | } 1127 | }, 1128 | "m_Slots": [ 1129 | { 1130 | "m_Id": "7c9bfcc610894dba83b913ecb13e9992" 1131 | }, 1132 | { 1133 | "m_Id": "d7b1fcc8e33e45c495b243278cbddf77" 1134 | }, 1135 | { 1136 | "m_Id": "687f262469db4092b18733dcecbc53c3" 1137 | } 1138 | ], 1139 | "synonyms": [], 1140 | "m_Precision": 0, 1141 | "m_PreviewExpanded": false, 1142 | "m_PreviewMode": 0, 1143 | "m_CustomColors": { 1144 | "m_SerializableColors": [] 1145 | } 1146 | } 1147 | 1148 | { 1149 | "m_SGVersion": 0, 1150 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1151 | "m_ObjectId": "cbd9f506ab39464a8524f1ad5c769e6e", 1152 | "m_Id": 6, 1153 | "m_DisplayName": "Width", 1154 | "m_SlotType": 1, 1155 | "m_Hidden": false, 1156 | "m_ShaderOutputName": "Width", 1157 | "m_StageCapability": 3, 1158 | "m_Value": 1.0, 1159 | "m_DefaultValue": 1.0, 1160 | "m_Labels": [] 1161 | } 1162 | 1163 | { 1164 | "m_SGVersion": 0, 1165 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1166 | "m_ObjectId": "d095cb859edc4514b44ae6a18ea08981", 1167 | "m_Id": 4, 1168 | "m_DisplayName": "Far Plane", 1169 | "m_SlotType": 1, 1170 | "m_Hidden": false, 1171 | "m_ShaderOutputName": "Far Plane", 1172 | "m_StageCapability": 3, 1173 | "m_Value": 1.0, 1174 | "m_DefaultValue": 1.0, 1175 | "m_Labels": [] 1176 | } 1177 | 1178 | { 1179 | "m_SGVersion": 1, 1180 | "m_Type": "UnityEditor.ShaderGraph.ViewDirectionNode", 1181 | "m_ObjectId": "d4ff02a9993b49339f5b014b7ec54ce5", 1182 | "m_Group": { 1183 | "m_Id": "" 1184 | }, 1185 | "m_Name": "View Direction", 1186 | "m_DrawState": { 1187 | "m_Expanded": true, 1188 | "m_Position": { 1189 | "serializedVersion": "2", 1190 | "x": -1777.0, 1191 | "y": -36.0, 1192 | "width": 206.0, 1193 | "height": 131.0 1194 | } 1195 | }, 1196 | "m_Slots": [ 1197 | { 1198 | "m_Id": "51904a8289924653bd7bbf74533ec7b6" 1199 | } 1200 | ], 1201 | "synonyms": [ 1202 | "eye direction" 1203 | ], 1204 | "m_Precision": 0, 1205 | "m_PreviewExpanded": false, 1206 | "m_PreviewMode": 2, 1207 | "m_CustomColors": { 1208 | "m_SerializableColors": [] 1209 | }, 1210 | "m_Space": 2 1211 | } 1212 | 1213 | { 1214 | "m_SGVersion": 0, 1215 | "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", 1216 | "m_ObjectId": "d7b1fcc8e33e45c495b243278cbddf77", 1217 | "m_Id": 1, 1218 | "m_DisplayName": "B", 1219 | "m_SlotType": 0, 1220 | "m_Hidden": false, 1221 | "m_ShaderOutputName": "B", 1222 | "m_StageCapability": 3, 1223 | "m_Value": { 1224 | "x": 0.0, 1225 | "y": 0.0, 1226 | "z": 0.0, 1227 | "w": 0.0 1228 | }, 1229 | "m_DefaultValue": { 1230 | "x": 0.0, 1231 | "y": 0.0, 1232 | "z": 0.0, 1233 | "w": 0.0 1234 | } 1235 | } 1236 | 1237 | { 1238 | "m_SGVersion": 0, 1239 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1240 | "m_ObjectId": "dae64e2f9a964ac5937014e7bbc14404", 1241 | "m_Id": 7, 1242 | "m_DisplayName": "Height", 1243 | "m_SlotType": 1, 1244 | "m_Hidden": false, 1245 | "m_ShaderOutputName": "Height", 1246 | "m_StageCapability": 3, 1247 | "m_Value": 1.0, 1248 | "m_DefaultValue": 1.0, 1249 | "m_Labels": [] 1250 | } 1251 | 1252 | { 1253 | "m_SGVersion": 0, 1254 | "m_Type": "UnityEditor.ShaderGraph.NegateNode", 1255 | "m_ObjectId": "e1c13286a3324eec8297d90ea0651242", 1256 | "m_Group": { 1257 | "m_Id": "" 1258 | }, 1259 | "m_Name": "Negate", 1260 | "m_DrawState": { 1261 | "m_Expanded": true, 1262 | "m_Position": { 1263 | "serializedVersion": "2", 1264 | "x": -1508.0, 1265 | "y": 39.0, 1266 | "width": 132.0, 1267 | "height": 94.0 1268 | } 1269 | }, 1270 | "m_Slots": [ 1271 | { 1272 | "m_Id": "a1aab84c1f7b4f5c9cc70bbbd5d3fbfa" 1273 | }, 1274 | { 1275 | "m_Id": "74a930f4b47f46c6b2ca35a0aace176b" 1276 | } 1277 | ], 1278 | "synonyms": [ 1279 | "invert", 1280 | "opposite" 1281 | ], 1282 | "m_Precision": 0, 1283 | "m_PreviewExpanded": false, 1284 | "m_PreviewMode": 0, 1285 | "m_CustomColors": { 1286 | "m_SerializableColors": [] 1287 | } 1288 | } 1289 | 1290 | { 1291 | "m_SGVersion": 0, 1292 | "m_Type": "UnityEditor.ShaderGraph.NormalVectorNode", 1293 | "m_ObjectId": "e57b67ce69e1466eb2476913b77609f1", 1294 | "m_Group": { 1295 | "m_Id": "" 1296 | }, 1297 | "m_Name": "Normal Vector", 1298 | "m_DrawState": { 1299 | "m_Expanded": true, 1300 | "m_Position": { 1301 | "serializedVersion": "2", 1302 | "x": -1508.0, 1303 | "y": 276.0, 1304 | "width": 206.0, 1305 | "height": 131.0 1306 | } 1307 | }, 1308 | "m_Slots": [ 1309 | { 1310 | "m_Id": "23b6dd0c52f64ca8bf0c058dc7dd9dc4" 1311 | } 1312 | ], 1313 | "synonyms": [ 1314 | "surface direction" 1315 | ], 1316 | "m_Precision": 0, 1317 | "m_PreviewExpanded": false, 1318 | "m_PreviewMode": 2, 1319 | "m_CustomColors": { 1320 | "m_SerializableColors": [] 1321 | }, 1322 | "m_Space": 2 1323 | } 1324 | 1325 | { 1326 | "m_SGVersion": 0, 1327 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1328 | "m_ObjectId": "e9f16c0fb80d45fcb1a34a2a86bbce69", 1329 | "m_Id": 1, 1330 | "m_DisplayName": "thickness", 1331 | "m_SlotType": 0, 1332 | "m_Hidden": false, 1333 | "m_ShaderOutputName": "thickness", 1334 | "m_StageCapability": 3, 1335 | "m_Value": 0.0, 1336 | "m_DefaultValue": 0.0, 1337 | "m_Labels": [] 1338 | } 1339 | 1340 | { 1341 | "m_SGVersion": 0, 1342 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 1343 | "m_ObjectId": "f52b9f2a90844cc5a02a0cfcb0c27eaa", 1344 | "m_Id": 2, 1345 | "m_DisplayName": "radius", 1346 | "m_SlotType": 0, 1347 | "m_Hidden": false, 1348 | "m_ShaderOutputName": "radius", 1349 | "m_StageCapability": 3, 1350 | "m_Value": 0.0, 1351 | "m_DefaultValue": 0.0, 1352 | "m_Labels": [] 1353 | } 1354 | 1355 | -------------------------------------------------------------------------------- /ShaderGraph/SubGraphs/ShapeVolume.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aaa1b44ae0c84034388c8b01b0a5f698 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | --------------------------------------------------------------------------------