diff --git a/Assets/Metaballs.meta b/Assets/Metaballs.meta new file mode 100644 index 0000000..caed928 --- /dev/null +++ b/Assets/Metaballs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8c8ad10eb1600f4790eb599e1ac8161 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Materials.meta b/Assets/Metaballs/Materials.meta new file mode 100644 index 0000000..c1ebd29 --- /dev/null +++ b/Assets/Metaballs/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98cd545ac62280f4699ed4795be1d76c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Materials/Blur.mat b/Assets/Metaballs/Materials/Blur.mat new file mode 100644 index 0000000..6cb3851 --- /dev/null +++ b/Assets/Metaballs/Materials/Blur.mat @@ -0,0 +1,123 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6663363066767020329 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blur + m_Shader: {fileID: 4800000, guid: c2cce5cab35b66c4482bc5a1d6f4ad99, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Metaballs/Materials/Blur.mat.meta b/Assets/Metaballs/Materials/Blur.mat.meta new file mode 100644 index 0000000..0e9633e --- /dev/null +++ b/Assets/Metaballs/Materials/Blur.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0359b9610290c564e9a85a22826ef73f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Materials/RenderMetaballRT.mat b/Assets/Metaballs/Materials/RenderMetaballRT.mat new file mode 100644 index 0000000..ca310a7 --- /dev/null +++ b/Assets/Metaballs/Materials/RenderMetaballRT.mat @@ -0,0 +1,127 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4732934821527111394 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: RenderMetaballRT + m_Shader: {fileID: 10751, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - SHADOWCASTER + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.65 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _InvFade: 1 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _SampleGI: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 5 + - _Surface: 1 + - _WorkflowMode: 1 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + - _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Assets/Metaballs/Materials/RenderMetaballRT.mat.meta b/Assets/Metaballs/Materials/RenderMetaballRT.mat.meta new file mode 100644 index 0000000..f98a6dc --- /dev/null +++ b/Assets/Metaballs/Materials/RenderMetaballRT.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba62d2f9845041e498edc0cfd32a8813 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Materials/SphereTraceMetaball.mat b/Assets/Metaballs/Materials/SphereTraceMetaball.mat new file mode 100644 index 0000000..1614191 --- /dev/null +++ b/Assets/Metaballs/Materials/SphereTraceMetaball.mat @@ -0,0 +1,130 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7183074880569773639 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SphereTraceMetaball + m_Shader: {fileID: -6465566751694194690, guid: f0ab7c2228d751f4ca364672fe5fb923, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2999 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - BOOLEAN_82BED64497D74FA4B186DD859BE61CB6: 0 + - BOOLEAN_923933FC876E466F9751F89ADC0FDB12: 0 + - _AlphaClip: 0 + - _AlphaCutoff: 0.5 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - Vector3_ff841d114cec48548b0a41259e363307: {r: 0, g: 0, b: 0, a: 0} + - _Albedo: {r: 0, g: 0.30317068, b: 1, a: 0} + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Emission: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + - _Specular: {r: 0, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/Metaballs/Materials/SphereTraceMetaball.mat.meta b/Assets/Metaballs/Materials/SphereTraceMetaball.mat.meta new file mode 100644 index 0000000..5201d38 --- /dev/null +++ b/Assets/Metaballs/Materials/SphereTraceMetaball.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e7b8326262253394caa8c9c39653fc4f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/RendererFeatures.meta b/Assets/Metaballs/RendererFeatures.meta new file mode 100644 index 0000000..b1db63c --- /dev/null +++ b/Assets/Metaballs/RendererFeatures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e017e53c0b4150f49955b3ad696ff052 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/RendererFeatures/RenderMetaballs.cs b/Assets/Metaballs/RendererFeatures/RenderMetaballs.cs new file mode 100644 index 0000000..1b59b59 --- /dev/null +++ b/Assets/Metaballs/RendererFeatures/RenderMetaballs.cs @@ -0,0 +1,224 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Experimental.Rendering.Universal; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +public class RenderMetaballs : ScriptableRendererFeature +{ + class RenderMetaballsPass : ScriptableRenderPass + { + const string MetaballRTSmallTextureId = "_MetaballRTSmall"; + const string MetaballRTLargeTextureId = "_MetaballRTLarge"; + const string MetaballRTLarge2TextureId = "_MetaballRTLarge2"; + + int _metaballRTSmallId; + int _metaballRTLargeId; + int _metaballRTLarge2Id; + + public Material BlitMaterial; + public Material BlurMaterial; + public Material BlitCopyMaterial; + public Material BlitCopyWithDepthMaterial; + public Material BlitCopyDepthMaterial; + + RenderTargetIdentifier _metaballRTSmall; + RenderTargetIdentifier _metaballRTLarge; + RenderTargetIdentifier _metaballRTLarge2; + RenderTargetIdentifier _cameraTargetId; + RenderTargetIdentifier _cameraDepthTargetId; + + RenderQueueType renderQueueType; + FilteringSettings m_FilteringSettings; + RenderObjects.CustomCameraSettings m_CameraSettings; + string m_ProfilerTag; + ProfilingSampler m_ProfilingSampler; + + public Material overrideMaterial { get; set; } + public int overrideMaterialPassIndex { get; set; } + + List m_ShaderTagIdList = new List(); + + RenderStateBlock m_RenderStateBlock; + + public RenderMetaballsPass(string profilerTag, RenderPassEvent renderPassEvent, string[] shaderTags, + RenderQueueType renderQueueType, int layerMask, RenderObjects.CustomCameraSettings cameraSettings) + { + profilingSampler = new ProfilingSampler(nameof(RenderObjectsPass)); + + m_ProfilerTag = profilerTag; + m_ProfilingSampler = new ProfilingSampler(profilerTag); + this.renderPassEvent = renderPassEvent; + this.renderQueueType = renderQueueType; + this.overrideMaterial = null; + this.overrideMaterialPassIndex = 0; + RenderQueueRange renderQueueRange = (renderQueueType == RenderQueueType.Transparent) + ? RenderQueueRange.transparent + : RenderQueueRange.opaque; + m_FilteringSettings = new FilteringSettings(renderQueueRange, layerMask); + + if (shaderTags != null && shaderTags.Length > 0) + { + foreach (var passName in shaderTags) + m_ShaderTagIdList.Add(new ShaderTagId(passName)); + } + else + { + m_ShaderTagIdList.Add(new ShaderTagId("SRPDefaultUnlit")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForward")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForwardOnly")); + m_ShaderTagIdList.Add(new ShaderTagId("LightweightForward")); + } + + m_RenderStateBlock = new RenderStateBlock(RenderStateMask.Nothing); + m_CameraSettings = cameraSettings; + + BlitCopyMaterial = new Material(Shader.Find("Hidden/BlitCopy")); + BlitCopyWithDepthMaterial = new Material(Shader.Find("Hidden/BlitCopyWithDepth")); + BlitCopyDepthMaterial = new Material(Shader.Find("Hidden/BlitToDepth")); + } + + // This method is called before executing the render pass. + // It can be used to configure render targets and their clear state. Also to create temporary render target textures. + // When empty this render pass will render to the active camera render target. + // You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear. + // The render pipeline will ensure target setup and clearing happens in a performant manner. + public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData) + { + RenderTextureDescriptor smallBlitTargetDescriptor = renderingData.cameraData.cameraTargetDescriptor; + smallBlitTargetDescriptor.width /= 4; + smallBlitTargetDescriptor.height /= 4; + smallBlitTargetDescriptor.colorFormat = RenderTextureFormat.ARGB32; + + RenderTextureDescriptor largeBlitTargetDescriptor = renderingData.cameraData.cameraTargetDescriptor; + largeBlitTargetDescriptor.colorFormat = RenderTextureFormat.ARGB32; + + + var renderer = renderingData.cameraData.renderer; + _metaballRTSmallId = Shader.PropertyToID(MetaballRTSmallTextureId); + _metaballRTLargeId = Shader.PropertyToID(MetaballRTLargeTextureId); + _metaballRTLarge2Id = Shader.PropertyToID(MetaballRTLarge2TextureId); + + cmd.GetTemporaryRT(_metaballRTSmallId, smallBlitTargetDescriptor, FilterMode.Bilinear); + cmd.GetTemporaryRT(_metaballRTLargeId, largeBlitTargetDescriptor, FilterMode.Bilinear); + cmd.GetTemporaryRT(_metaballRTLarge2Id, largeBlitTargetDescriptor, FilterMode.Bilinear); + + _metaballRTSmall = new RenderTargetIdentifier(_metaballRTSmallId); + _metaballRTLarge = new RenderTargetIdentifier(_metaballRTLargeId); + _metaballRTLarge2 = new RenderTargetIdentifier(_metaballRTLarge2Id); + + ConfigureTarget(_metaballRTSmall); + + _cameraTargetId = renderer.cameraColorTarget; + _cameraDepthTargetId = new RenderTargetIdentifier("_CameraDepthTexture");// renderer.cameraDepthTarget; + } + + // Here you can implement the rendering logic. + // Use ScriptableRenderContext to issue drawing commands or execute command buffers + // https://docs.unity3d.com/ScriptReference/Rendering.ScriptableRenderContext.html + // You don't have to call ScriptableRenderContext.submit, the render pipeline will call it at specific points in the pipeline. + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) + { + /* + CommandBuffer cmd = CommandBufferPool.Get(); + Blit(cmd, _source, _destination, BlitMaterial); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + */ + + SortingCriteria sortingCriteria = (renderQueueType == RenderQueueType.Transparent) + ? SortingCriteria.CommonTransparent + : renderingData.cameraData.defaultOpaqueSortFlags; + + DrawingSettings drawingSettings = + CreateDrawingSettings(m_ShaderTagIdList, ref renderingData, sortingCriteria); + drawingSettings.overrideMaterial = overrideMaterial; + drawingSettings.overrideMaterialPassIndex = overrideMaterialPassIndex; + + ref CameraData cameraData = ref renderingData.cameraData; + + // NOTE: Do NOT mix ProfilingScope with named CommandBuffers i.e. CommandBufferPool.Get("name"). + // Currently there's an issue which results in mismatched markers. + CommandBuffer cmd = CommandBufferPool.Get(); + using (new ProfilingScope(cmd, m_ProfilingSampler)) + { + //Clear small RT + cmd.ClearRenderTarget(true, true, new Color(0, 0, 0, 0)); + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + //Blit Camera Depth Texture + Blit(cmd, _cameraDepthTargetId, _metaballRTSmall, BlitCopyDepthMaterial); + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + //Draw to small RT + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref m_FilteringSettings, + ref m_RenderStateBlock); + + if (m_CameraSettings.overrideCamera && m_CameraSettings.restoreCamera) + { + RenderingUtils.SetViewAndProjectionMatrices(cmd, cameraData.GetViewMatrix(), + cameraData.GetGPUProjectionMatrix(), false); + } + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + //Draw to large RT + cmd.SetRenderTarget(_metaballRTLarge); + cmd.ClearRenderTarget(true, true, new Color(0, 0, 0, 0)); + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + Blit(cmd, _metaballRTSmallId, _metaballRTLarge, BlitMaterial); + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + //Blur + cmd.SetGlobalVector("_Offsets", new Vector4(1.5f, 2.0f, 2.5f, 3.0f)); + Blit(cmd, _metaballRTLargeId, _metaballRTLarge2, BlurMaterial); + + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + //Draw to Camera Target + Blit(cmd, _metaballRTLarge2, _cameraTargetId, BlitMaterial); + } + + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + } + + // Cleanup any allocated resources that were created during the execution of this render pass. + public override void OnCameraCleanup(CommandBuffer cmd) + { + cmd.ReleaseTemporaryRT(_metaballRTSmallId); + cmd.ReleaseTemporaryRT(_metaballRTLargeId); + cmd.ReleaseTemporaryRT(_metaballRTLarge2Id); + } + } + + public Material blitMaterial; + public Material blurMaterial; + RenderMetaballsPass _scriptableMetaballsPass; + public RenderObjects.RenderObjectsSettings renderObjectsSettings = new RenderObjects.RenderObjectsSettings(); + + /// + public override void Create() + { + RenderObjects.FilterSettings filter = renderObjectsSettings.filterSettings; + _scriptableMetaballsPass = new RenderMetaballsPass(renderObjectsSettings.passTag, renderObjectsSettings.Event, + filter.PassNames, filter.RenderQueueType, filter.LayerMask, renderObjectsSettings.cameraSettings) + { + BlitMaterial = blitMaterial, + BlurMaterial = blurMaterial + }; + } + + // Here you can inject one or multiple render passes in the renderer. + // This method is called when setting up the renderer once per-camera. + public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) + { + renderer.EnqueuePass(_scriptableMetaballsPass); + } +} \ No newline at end of file diff --git a/Assets/Metaballs/RendererFeatures/RenderMetaballs.cs.meta b/Assets/Metaballs/RendererFeatures/RenderMetaballs.cs.meta new file mode 100644 index 0000000..338f52a --- /dev/null +++ b/Assets/Metaballs/RendererFeatures/RenderMetaballs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: df2b5599ec606184aa283db49989a228 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Scripts.meta b/Assets/Metaballs/Scripts.meta new file mode 100644 index 0000000..a90cd61 --- /dev/null +++ b/Assets/Metaballs/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0691897efc7c969499d3bbd864921e79 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Scripts/MetaballParticleManager.cs b/Assets/Metaballs/Scripts/MetaballParticleManager.cs new file mode 100644 index 0000000..e16f74f --- /dev/null +++ b/Assets/Metaballs/Scripts/MetaballParticleManager.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +[ExecuteAlways] +public class MetaballParticleManager : MonoBehaviour +{ + [SerializeField] ParticleSystem _particleSystem; + Renderer _renderer; + MaterialPropertyBlock _materialPropertyBlock; + + const int MaxParticles = 256; + int _numParticles; + + ParticleSystem.Particle[] _particles = new ParticleSystem.Particle[MaxParticles]; + + readonly Vector4[] _particlesPos = new Vector4[MaxParticles]; + readonly float[] _particlesSize = new float[MaxParticles]; + + static readonly int NumParticles = Shader.PropertyToID("_NumParticles"); + static readonly int ParticlesSize = Shader.PropertyToID("_ParticlesSize"); + static readonly int ParticlesPos = Shader.PropertyToID("_ParticlesPos"); + + void OnEnable() + { + _materialPropertyBlock = new MaterialPropertyBlock(); + _materialPropertyBlock.SetInt(NumParticles, 0); + + _renderer = _particleSystem.GetComponent(); + _renderer.SetPropertyBlock(_materialPropertyBlock); + } + + void OnDisable() + { + _materialPropertyBlock.Clear(); + _materialPropertyBlock = null; + _renderer.SetPropertyBlock(null); + } + + void Update() + { + _numParticles = _particleSystem.particleCount; + _particleSystem.GetParticles(_particles, MaxParticles); + + int i = 0; + foreach (var particle in _particles) + { + _particlesPos[i] = particle.position; + _particlesSize[i] = particle.GetCurrentSize(_particleSystem); + ++i; + + if (i >= _numParticles) break; + } + + _materialPropertyBlock.SetVectorArray(ParticlesPos, _particlesPos); + _materialPropertyBlock.SetFloatArray(ParticlesSize, _particlesSize); + _materialPropertyBlock.SetInt(NumParticles, _numParticles); + _renderer.SetPropertyBlock(_materialPropertyBlock); + } +} diff --git a/Assets/Metaballs/Scripts/MetaballParticleManager.cs.meta b/Assets/Metaballs/Scripts/MetaballParticleManager.cs.meta new file mode 100644 index 0000000..14865ef --- /dev/null +++ b/Assets/Metaballs/Scripts/MetaballParticleManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 302a675dd757afc4997a7f4c5d7c71fc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Shaders.meta b/Assets/Metaballs/Shaders.meta new file mode 100644 index 0000000..4b95184 --- /dev/null +++ b/Assets/Metaballs/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5125a9fd5171d50488a4e164778ebec2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Shaders/Includes.meta b/Assets/Metaballs/Shaders/Includes.meta new file mode 100644 index 0000000..751e9df --- /dev/null +++ b/Assets/Metaballs/Shaders/Includes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3750edc911a62048beecc6e3cbc5ccd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Shaders/Includes/Metaball.hlsl b/Assets/Metaballs/Shaders/Includes/Metaball.hlsl new file mode 100644 index 0000000..dee5624 --- /dev/null +++ b/Assets/Metaballs/Shaders/Includes/Metaball.hlsl @@ -0,0 +1,219 @@ +#ifndef METABALL_INCLUDE +#define METABALL_INCLUDE +// Credit to Scratchapixel at +// https://www.scratchapixel.com/lessons/advanced-rendering/rendering-distance-fields/basic-sphere-tracer +// for the explanation on Metaballs and example code + +#define MAX_PARTICLES 256 + +float4 _ParticlesPos[MAX_PARTICLES]; +float _ParticlesSize[MAX_PARTICLES]; +float _NumParticles; + +float GetDistanceSphere(float3 from, float3 center, float radius) +{ + return length(from - center) - radius; +} + +float GetDistanceMetaball(float3 from) +{ + float sumDensity = 0; + float sumRi = 0; + float minDistance = 100000; + for (int i = 0; i < _NumParticles; ++i) + { + float4 center = _ParticlesPos[i]; + float radius = 0.3 * _ParticlesSize[i]; + float r = length(center - from); + if (r <= radius) + { + sumDensity += 2 * (r * r * r) / (radius * radius * radius) - 3 * (r * r) / (radius * radius) + 1; + } + minDistance = min(minDistance, r - radius); + sumRi += radius; + } + + return max(minDistance, (0.2 - sumDensity) / (3 / 2.0 * sumRi)); +} + +float3 CalculateNormalMetaball(float3 from) +{ + float delta = 10e-5; + float3 normal = float3( + GetDistanceMetaball(from + float3(delta, 0, 0)) - GetDistanceMetaball(from + float3(-delta, 0, 0)), + GetDistanceMetaball(from + float3(0, delta, 0)) - GetDistanceMetaball(from + float3(-0, -delta, 0)), + GetDistanceMetaball(from + float3(0, 0, delta)) - GetDistanceMetaball(from + float3(0, 0, -delta)) + ); + return normalize(normal); +} + + +void SphereTraceSphereP1_float(float3 WorldPosition, float3 ObjectPosition, out float Alpha) +{ + #if defined(SHADERGRAPH_PREVIEW) + Alpha = 1; + #else + float maxDistance = 100; + float threshold = 0.00001; + float t = 0; + int numSteps = 0; + + float outAlpha = 0; + + float3 viewPosition = GetCurrentViewPosition(); + half3 viewDir = SafeNormalize(WorldPosition - viewPosition); + while (t < maxDistance) + { + float minDistance = 1000000; + float3 from = viewPosition + t * viewDir; + float d = GetDistanceSphere(from, float3(0, 0, 0), 0.2); + if (d < minDistance) + { + minDistance = d; + } + + if (minDistance <= threshold * t) + { + outAlpha = 1; + break; + } + + t += minDistance; + ++numSteps; + } + + Alpha = outAlpha; + #endif +} + +void SphereTraceMetaballs_float(float3 WorldPosition, out float3 PositionWS, out float3 NormalWS, out float Alpha, + out float3 ViewDirection) +{ + #if defined(SHADERGRAPH_PREVIEW) + PositionWS = float3(0, 0, 0); + NormalWS = float3(0, 0, 0); + ViewDirection = float3(0, 0, 0); + Alpha = 0; + #else + float maxDistance = 100; + float threshold = 0.00001; + float t = 0; + int numSteps = 0; + + float outAlpha = 0; + + float3 viewPosition = GetCurrentViewPosition(); + half3 viewDir = SafeNormalize(WorldPosition - viewPosition); + while (t < maxDistance) + { + float minDistance = 1000000; + float3 from = viewPosition + t * viewDir; + float d = GetDistanceMetaball(from); + if (d < minDistance) + { + minDistance = d; + } + + if (minDistance <= threshold * t) + { + PositionWS = from; + NormalWS = CalculateNormalMetaball(from); + ViewDirection = viewDir; + outAlpha = 1; + break; + } + + t += minDistance; + ++numSteps; + } + + Alpha = outAlpha; + #endif +} + +void SphereTraceMetaballs_half(half3 WorldPosition, half3 CameraPosition, out half3 PositionWS, out half3 NormalWS, + out half Alpha, out half3 ViewDirection) +{ + #if defined(SHADERGRAPH_PREVIEW) + PositionWS = half3(0, 0, 0); + NormalWS = half3(0, 0, 0); + ViewDirection = half3(0, 0, 0); + Alpha = 0; + #else + half maxDistance = 100; + half threshold = 0.00001; + half t = 0; + int numSteps = 0; + + half outAlpha = 0; + + half3 viewPosition = GetCurrentViewPosition(); + half3 viewDir = SafeNormalize(WorldPosition - viewPosition); + while (t < maxDistance) + { + half minDistance = 1000000; + half3 from = CameraPosition + t * viewDir; + half d = GetDistanceMetaball(from); + if (d < minDistance) + { + minDistance = d; + } + + if (minDistance <= threshold * t) + { + PositionWS = from; + NormalWS = CalculateNormalMetaball(from); + ViewDirection = viewDir; + outAlpha = 1; + break; + } + + t += minDistance; + ++numSteps; + } + + Alpha = outAlpha; + #endif +} + +void PBR_float(float3 positionWS, half3 normalWS, half3 viewDirectionWS, half3 bakedGI, half3 albedo, + half metallic, half3 specular, half smoothness, half occlusion, half3 emission, half alpha, out float3 Color) +{ + #if defined(SHADERGRAPH_PREVIEW) + Color = float3(1, 1, 1); + #else + InputData inputData; + inputData.positionWS = positionWS; + inputData.normalWS = NormalizeNormalPerPixel(normalWS); + inputData.viewDirectionWS = SafeNormalize(-viewDirectionWS); + inputData.shadowCoord = half4(0, 0, 0, 0); + inputData.fogCoord = 0; + inputData.vertexLighting = half3(0, 0, 0); + inputData.normalizedScreenSpaceUV = half2(0, 0); + inputData.shadowMask = half4(0, 0, 0, 0); + inputData.bakedGI = bakedGI; + Color = UniversalFragmentPBR(inputData, albedo, metallic, specular, smoothness, occlusion, emission, alpha); + #endif +} + +void PBR_half(half3 positionWS, half3 normalWS, half3 viewDirectionWS, half3 bakedGI, half3 albedo, + half metallic, half3 specular, half smoothness, half occlusion, half3 emission, half alpha, out half3 Color) +{ + #if defined(SHADERGRAPH_PREVIEW) + Color = half3(1, 1, 1); + #else + InputData inputData; + inputData.positionWS = positionWS; + inputData.normalWS = NormalizeNormalPerPixel(normalWS); + inputData.viewDirectionWS = SafeNormalize(-viewDirectionWS); + inputData.shadowCoord = half4(0, 0, 0, 0); + inputData.fogCoord = 0; + inputData.vertexLighting = half3(0, 0, 0); + inputData.normalizedScreenSpaceUV = half2(0, 0); + inputData.shadowMask = half4(0, 0, 0, 0); + inputData.bakedGI = bakedGI; + Color = UniversalFragmentPBR(inputData, albedo, metallic, specular, smoothness, occlusion, emission, alpha); + #endif +} + +#endif diff --git a/Assets/Metaballs/Shaders/Includes/Metaball.hlsl.meta b/Assets/Metaballs/Shaders/Includes/Metaball.hlsl.meta new file mode 100644 index 0000000..f89145e --- /dev/null +++ b/Assets/Metaballs/Shaders/Includes/Metaball.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: caf3c88af57121045bf42c51439afbe9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Shaders/KawaseBlur.shader b/Assets/Metaballs/Shaders/KawaseBlur.shader new file mode 100644 index 0000000..6bf91e6 --- /dev/null +++ b/Assets/Metaballs/Shaders/KawaseBlur.shader @@ -0,0 +1,89 @@ +Shader "Custom/KawaseBlur" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite Off + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + + half4 _Offsets; + + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + fixed4 applyBlur(const fixed4 color, const half2 uv, const half2 texelResolution, const half offset) + { + fixed4 result = color; + + result += tex2D(_MainTex, uv + half2( offset, offset) * texelResolution); + result += tex2D(_MainTex, uv + half2( offset, -offset) * texelResolution); + result += tex2D(_MainTex, uv + half2(-offset, offset) * texelResolution); + result += tex2D(_MainTex, uv + half2(-offset, -offset) * texelResolution); + result /= 5.0h; + + return result; + } + + fixed applyAlphaBlur(const fixed4 color, const half2 uv, const half2 texelResolution, const half offset) + { + fixed result = color.a; + + result += tex2D(_MainTex, uv + half2( offset, offset) * texelResolution).a; + result += tex2D(_MainTex, uv + half2( offset, -offset) * texelResolution).a; + result += tex2D(_MainTex, uv + half2(-offset, offset) * texelResolution).a; + result += tex2D(_MainTex, uv + half2(-offset, -offset) * texelResolution).a; + result /= 5.0h; + + return result; + } + + fixed4 frag (const v2f input) : SV_Target + { + const half2 texelResolution = _MainTex_TexelSize.xy; + const half2 uv = input.uv; + + fixed4 color = tex2D(_MainTex, uv); + color = applyBlur(color, uv, texelResolution, _Offsets.x); + color.a = applyAlphaBlur(color, uv, texelResolution, _Offsets.y); + color.a = applyAlphaBlur(color, uv, texelResolution, _Offsets.z); + //color.a = applyAlphaBlur(color, uv, texelResolution, _Offsets.w); + + return color; + } + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Metaballs/Shaders/KawaseBlur.shader.meta b/Assets/Metaballs/Shaders/KawaseBlur.shader.meta new file mode 100644 index 0000000..5b5605d --- /dev/null +++ b/Assets/Metaballs/Shaders/KawaseBlur.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c2cce5cab35b66c4482bc5a1d6f4ad99 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Metaballs/Shaders/Metaball.shadergraph b/Assets/Metaballs/Shaders/Metaball.shadergraph new file mode 100644 index 0000000..8084cdf --- /dev/null +++ b/Assets/Metaballs/Shaders/Metaball.shadergraph @@ -0,0 +1,1462 @@ +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "140e2f7efaf8467e970ef02d66788bdd", + "m_Properties": [ + { + "m_Id": "3bd30f1f53a346fda5271657a3f830c4" + }, + { + "m_Id": "e10a83cd20db43c4bc529d92317a6031" + }, + { + "m_Id": "a6e3a2014bc44a4fa7c4be4d2b7a6cca" + }, + { + "m_Id": "ba4b43346e2a4eb899c1f7e56d4f2220" + }, + { + "m_Id": "f55f0a415b7a44638c62b4a77a887b94" + } + ], + "m_Keywords": [], + "m_Nodes": [ + { + "m_Id": "99b42caea85a4cd281259e1d25b31cb8" + }, + { + "m_Id": "38fab48ed79e4f299d526e2b6a6692eb" + }, + { + "m_Id": "0b9c8290d5ce4a92b64de52cd8bc0f45" + }, + { + "m_Id": "5dd1b93cb65d4a939209738d4d380439" + }, + { + "m_Id": "ea0500a6370d4dbcba7d345b0ead263a" + }, + { + "m_Id": "8c4e5abf49eb41e9a4cb9b431b5383db" + }, + { + "m_Id": "07700de0e87649d880ba90b0734c5bab" + }, + { + "m_Id": "a76e2673c55f45199c226c7080f92cf6" + }, + { + "m_Id": "0aac29c14ba14033a686dd1fd155ea24" + }, + { + "m_Id": "54a3ccfd4a93437ea3e538acb8fa4851" + }, + { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + { + "m_Id": "2169c6625651484d9c59da6d1f233ef3" + }, + { + "m_Id": "4b9acbf5f29c41659467379c19071991" + }, + { + "m_Id": "9fdf3b5a29754281b16ae386bf71e775" + }, + { + "m_Id": "1424f887ccc44b44b1dbeb80680e453a" + }, + { + "m_Id": "c09b90d46f1a49cfbabb0a2b2802a1ec" + }, + { + "m_Id": "f651c3b081be4a998819d357a5589ca5" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "1424f887ccc44b44b1dbeb80680e453a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": -1129854196 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2169c6625651484d9c59da6d1f233ef3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": -1785826532 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4b9acbf5f29c41659467379c19071991" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": -216284529 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9fdf3b5a29754281b16ae386bf71e775" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": 736728269 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c09b90d46f1a49cfbabb0a2b2802a1ec" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": -337336241 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "07700de0e87649d880ba90b0734c5bab" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ee3f9d5447564ffaa9fd90f55788f623" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ea0500a6370d4dbcba7d345b0ead263a" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": -369.9999084472656, + "y": -338.9999694824219 + }, + "m_Blocks": [ + { + "m_Id": "99b42caea85a4cd281259e1d25b31cb8" + }, + { + "m_Id": "38fab48ed79e4f299d526e2b6a6692eb" + }, + { + "m_Id": "0b9c8290d5ce4a92b64de52cd8bc0f45" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": -369.9999084472656, + "y": -139.0 + }, + "m_Blocks": [ + { + "m_Id": "5dd1b93cb65d4a939209738d4d380439" + }, + { + "m_Id": "ea0500a6370d4dbcba7d345b0ead263a" + }, + { + "m_Id": "8c4e5abf49eb41e9a4cb9b431b5383db" + }, + { + "m_Id": "07700de0e87649d880ba90b0734c5bab" + }, + { + "m_Id": "a76e2673c55f45199c226c7080f92cf6" + }, + { + "m_Id": "0aac29c14ba14033a686dd1fd155ea24" + }, + { + "m_Id": "54a3ccfd4a93437ea3e538acb8fa4851" + }, + { + "m_Id": "f651c3b081be4a998819d357a5589ca5" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "1cc296f7801141fb87a7978527352a52" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0679f97488184a64804733fd7658527a", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "07700de0e87649d880ba90b0734c5bab", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "8b81bd1b7cdf42f3a307f1bbe9962cba" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0aac29c14ba14033a686dd1fd155ea24", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d2594571e8ed4d62ba3014b8b6df2939" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0b9c8290d5ce4a92b64de52cd8bc0f45", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c9d17a594ffb4add8604c847736620a5" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "0bf8b07b3e4a4872b09ad2523e66aca5", + "m_Id": 736728269, + "m_DisplayName": "Specular", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Vector3_3f277471705e46318bd5500f062f9329", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "0d5b4f9413b74259a1ff5fb0ed68bfb5", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "130fe8581dfa44749509a64b30583802", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "1424f887ccc44b44b1dbeb80680e453a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1271.0, + "y": 29.99999237060547, + "width": 142.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "44c154ce887848458bf0677792f4ce37" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "ba4b43346e2a4eb899c1f7e56d4f2220" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "1cc296f7801141fb87a7978527352a52", + "m_ActiveSubTarget": { + "m_Id": "eb97534ad8bb4d0e9ee7334671fcdfaf" + }, + "m_SurfaceType": 0, + "m_AlphaMode": 0, + "m_TwoSided": false, + "m_AlphaClip": true, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1d990128d1654b2781d7bfbd15ff5a5a", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "2169c6625651484d9c59da6d1f233ef3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1244.0001220703125, + "y": -72.00005340576172, + "width": 115.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "478e9fc50e474b7588db46a12544e4c5" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "3bd30f1f53a346fda5271657a3f830c4" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "26a57ddb9982465f808531bf70a92a50", + "m_Id": 1, + "m_DisplayName": "Color", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "38fab48ed79e4f299d526e2b6a6692eb", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "a7983bb13726423fab855cdd8984a444" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "3bd30f1f53a346fda5271657a3f830c4", + "m_Guid": { + "m_GuidSerialized": "871be227-f763-4281-a81b-1f08fd7ca828" + }, + "m_Name": "Albedo", + "m_DefaultReferenceName": "Color_3bd30f1f53a346fda5271657a3f830c4", + "m_OverrideReferenceName": "_Albedo", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.6226415038108826, + "g": 0.6226415038108826, + "b": 0.6226415038108826, + "a": 0.0 + }, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "428c6c98b0344307b379526b7c1f499c", + "m_Id": -1129854196, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Vector1_de2644bbbf134b5a816ebd78b77e4690", + "m_StageCapability": 3, + "m_Value": 0.5, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "44c154ce887848458bf0677792f4ce37", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "478e9fc50e474b7588db46a12544e4c5", + "m_Id": 0, + "m_DisplayName": "Albedo", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "49bcc152c25d4df0a6532c2f976f3e60", + "m_Id": -1785826532, + "m_DisplayName": "Albedo", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Vector3_a130d5cc23574509bb4ccf654f80c345", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "4b9acbf5f29c41659467379c19071991", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1246.0001220703125, + "y": -38.00006866455078, + "width": 116.99999237060547, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "1d990128d1654b2781d7bfbd15ff5a5a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "e10a83cd20db43c4bc529d92317a6031" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "4d92a22a48e349308b311d370c5adcfd", + "m_Id": -337336241, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Vector3_af02328cc2d34dfbbd13d9f5ce1b281e", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "4e34e2b0ce0a4c5087e1ac75546a628f", + "m_Id": 0, + "m_DisplayName": "Specular", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "54a3ccfd4a93437ea3e538acb8fa4851", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.AlphaClipThreshold", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "758a89a55c704f0d97fe721aaf66cef9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "5dd1b93cb65d4a939209738d4d380439", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "130fe8581dfa44749509a64b30583802" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "758a89a55c704f0d97fe721aaf66cef9", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "88c4361a0e3d41d890113495386ae6d1", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "8b81bd1b7cdf42f3a307f1bbe9962cba", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8c39644db8fd41a7bb6405ef642f1049", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8c4e5abf49eb41e9a4cb9b431b5383db", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "0679f97488184a64804733fd7658527a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "94300cb75ee2426cafa5296ae5d510ad", + "m_Id": 2, + "m_DisplayName": "Alpha", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "99b42caea85a4cd281259e1d25b31cb8", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "88c4361a0e3d41d890113495386ae6d1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9fdf3b5a29754281b16ae386bf71e775", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1252.0001220703125, + "y": -4.000084400177002, + "width": 122.99999237060547, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "4e34e2b0ce0a4c5087e1ac75546a628f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a6e3a2014bc44a4fa7c4be4d2b7a6cca" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "a025ab3869404dcaa2f4ab64791c9fd0", + "m_Id": 0, + "m_DisplayName": "Normal (World Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalWS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 2 +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "a6e3a2014bc44a4fa7c4be4d2b7a6cca", + "m_Guid": { + "m_GuidSerialized": "6b680791-31fb-481c-8208-91c3f6cc0afd" + }, + "m_Name": "Specular", + "m_DefaultReferenceName": "Color_a6e3a2014bc44a4fa7c4be4d2b7a6cca", + "m_OverrideReferenceName": "_Specular", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 0.0 + }, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a76e2673c55f45199c226c7080f92cf6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "e6d0b4b1ae234a8595ba900eedada56c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "a7983bb13726423fab855cdd8984a444", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "ba4b43346e2a4eb899c1f7e56d4f2220", + "m_Guid": { + "m_GuidSerialized": "74180cde-06e9-4d72-aff7-bc2c098601c5" + }, + "m_Name": "Smoothness", + "m_DefaultReferenceName": "Vector1_ba4b43346e2a4eb899c1f7e56d4f2220", + "m_OverrideReferenceName": "_Smoothness", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "c09b90d46f1a49cfbabb0a2b2802a1ec", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1255.0, + "y": 64.0, + "width": 126.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "0d5b4f9413b74259a1ff5fb0ed68bfb5" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f55f0a415b7a44638c62b4a77a887b94" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "c9d17a594ffb4add8604c847736620a5", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d2594571e8ed4d62ba3014b8b6df2939", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d82c58c651344915a0e218ccf6b7539f", + "m_Id": -216284529, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Vector1_335ca55f6309481388af519e908975d2", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "e10a83cd20db43c4bc529d92317a6031", + "m_Guid": { + "m_GuidSerialized": "b71c9874-e4e8-4745-ab5d-2aa63cd79c63" + }, + "m_Name": "Metallic", + "m_DefaultReferenceName": "Vector1_e10a83cd20db43c4bc529d92317a6031", + "m_OverrideReferenceName": "_Metallic", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e6d0b4b1ae234a8595ba900eedada56c", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "ea0500a6370d4dbcba7d345b0ead263a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "8c39644db8fd41a7bb6405ef642f1049" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "eb97534ad8bb4d0e9ee7334671fcdfaf", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 2, + "m_ClearCoat": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SubGraphNode", + "m_ObjectId": "ee3f9d5447564ffaa9fd90f55788f623", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SphereTraceMetaballs", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -940.0001220703125, + "y": -112.00007629394531, + "width": 208.0, + "height": 350.0 + } + }, + "m_Slots": [ + { + "m_Id": "49bcc152c25d4df0a6532c2f976f3e60" + }, + { + "m_Id": "d82c58c651344915a0e218ccf6b7539f" + }, + { + "m_Id": "0bf8b07b3e4a4872b09ad2523e66aca5" + }, + { + "m_Id": "428c6c98b0344307b379526b7c1f499c" + }, + { + "m_Id": "4d92a22a48e349308b311d370c5adcfd" + }, + { + "m_Id": "26a57ddb9982465f808531bf70a92a50" + }, + { + "m_Id": "94300cb75ee2426cafa5296ae5d510ad" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedSubGraph": "{\n \"subGraph\": {\n \"fileID\": -5475051401550479605,\n \"guid\": \"3e0425aecc67598429823555b3a9d936\",\n \"type\": 3\n }\n}", + "m_PropertyGuids": [ + "fa413733-d2cf-449a-859e-bd83189ab9b5", + "1bec8c28-f6f7-4e25-bd03-1ebe66a30182", + "f8b0de1e-7659-4ab0-a3d1-a5c361785663", + "348487e7-bd23-4c00-a91a-35438fa361eb", + "c0fbe363-0b1f-4b74-8a78-201b67fca458" + ], + "m_PropertyIds": [ + -1785826532, + -216284529, + 736728269, + -1129854196, + -337336241 + ] +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "f55f0a415b7a44638c62b4a77a887b94", + "m_Guid": { + "m_GuidSerialized": "1acf2112-0698-4e55-b664-1af1ceea1487" + }, + "m_Name": "Emission", + "m_DefaultReferenceName": "Color_f55f0a415b7a44638c62b4a77a887b94", + "m_OverrideReferenceName": "_Emission", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 0.0 + }, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f651c3b081be4a998819d357a5589ca5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalWS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "a025ab3869404dcaa2f4ab64791c9fd0" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalWS" +} + diff --git a/Assets/Metaballs/Shaders/Metaball.shadergraph.meta b/Assets/Metaballs/Shaders/Metaball.shadergraph.meta new file mode 100644 index 0000000..d657104 --- /dev/null +++ b/Assets/Metaballs/Shaders/Metaball.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f0ab7c2228d751f4ca364672fe5fb923 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Assets/Metaballs/Shaders/SphereTraceMetaballs.shadersubgraph b/Assets/Metaballs/Shaders/SphereTraceMetaballs.shadersubgraph new file mode 100644 index 0000000..5a429fa --- /dev/null +++ b/Assets/Metaballs/Shaders/SphereTraceMetaballs.shadersubgraph @@ -0,0 +1,1603 @@ +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "c67f2755610844b0bbfd88fca164fd74", + "m_Properties": [ + { + "m_Id": "a130d5cc23574509bb4ccf654f80c345" + }, + { + "m_Id": "335ca55f6309481388af519e908975d2" + }, + { + "m_Id": "3f277471705e46318bd5500f062f9329" + }, + { + "m_Id": "de2644bbbf134b5a816ebd78b77e4690" + }, + { + "m_Id": "af02328cc2d34dfbbd13d9f5ce1b281e" + } + ], + "m_Keywords": [], + "m_Nodes": [ + { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + { + "m_Id": "34dfd4d62933443ab9198502a6c138ae" + }, + { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + { + "m_Id": "43f10d06f07340948b66b771d4c3dcfe" + }, + { + "m_Id": "4870218436c8461faa965d9519a68e2f" + }, + { + "m_Id": "98758534cf33460cba1271a5ddd6919c" + }, + { + "m_Id": "54c1f92e5d4340b3af2abe2d79b02b05" + }, + { + "m_Id": "be7ca2d5bcf642209f7b8c91838bd921" + }, + { + "m_Id": "9cf927c29285421a829eb8eae9f5c0c5" + }, + { + "m_Id": "105e000ab2ca4043b6a68cc8da64994d" + }, + { + "m_Id": "0f16808f4ea444ce9244676832e2374d" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "105e000ab2ca4043b6a68cc8da64994d" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 9 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "34dfd4d62933443ab9198502a6c138ae" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "54c1f92e5d4340b3af2abe2d79b02b05" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "54c1f92e5d4340b3af2abe2d79b02b05" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "43f10d06f07340948b66b771d4c3dcfe" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 10 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "357f6d1d9b0d43f1be902b0b0e7fec4a" + }, + "m_SlotId": 5 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "43f10d06f07340948b66b771d4c3dcfe" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4870218436c8461faa965d9519a68e2f" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 4 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "54c1f92e5d4340b3af2abe2d79b02b05" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 11 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "98758534cf33460cba1271a5ddd6919c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 5 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9cf927c29285421a829eb8eae9f5c0c5" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 7 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "be7ca2d5bcf642209f7b8c91838bd921" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fb00c1ff33a4f6088725bb6a9cc6a41" + }, + "m_SlotId": 6 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Sub Graphs", + "m_ConcretePrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + "m_ActiveTargets": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0a6bbd9c218541a19ef38e1f602bee58", + "m_Id": 2, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ViewDirectionNode", + "m_ObjectId": "0f16808f4ea444ce9244676832e2374d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "View Direction", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 685.0, + "y": -499.00006103515627, + "width": 206.0, + "height": 132.0 + } + }, + "m_Slots": [ + { + "m_Id": "22441b8b61914eff95553443b70666e9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "105e000ab2ca4043b6a68cc8da64994d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 397.0, + "y": -123.99998474121094, + "width": 126.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "a79a1f68e32b48e78ee53411b0f946ac" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "af02328cc2d34dfbbd13d9f5ce1b281e" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "158ad622a526499599fe0f622114ed95", + "m_Id": 3, + "m_DisplayName": "BakedGI", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BakedGI", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "17bd06201b4e46e48131637d59f9c4ea", + "m_Id": 4, + "m_DisplayName": "Dynamic UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DynamicUV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "21f53a7302514e01927ce57ee7010eb6", + "m_Id": 0, + "m_DisplayName": "PositionWS", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "PositionWS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "22441b8b61914eff95553443b70666e9", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "26f65c84b90f426baec37a431302b963", + "m_Id": 9, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "335ca55f6309481388af519e908975d2", + "m_Guid": { + "m_GuidSerialized": "1bec8c28-f6f7-4e25-bd03-1ebe66a30182" + }, + "m_Name": "Metallic", + "m_DefaultReferenceName": "Vector1_335ca55f6309481388af519e908975d2", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.PositionNode", + "m_ObjectId": "34dfd4d62933443ab9198502a6c138ae", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -507.0, + "y": 52.0, + "width": 206.0, + "height": 132.0 + } + }, + "m_Slots": [ + { + "m_Id": "b2f86d9c66a145babd15c0d57f776458" + } + ], + "synonyms": [], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 2 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "357f6d1d9b0d43f1be902b0b0e7fec4a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SphereTraceMetaballs (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -245.0, + "y": 51.99997329711914, + "width": 260.0, + "height": 166.0 + } + }, + "m_Slots": [ + { + "m_Id": "a44ad65d3b0545749c85e40e11b9e923" + }, + { + "m_Id": "e730d6912d554fc69bf1b4d190c457f5" + }, + { + "m_Id": "680fa1b35d5345388511c7b34c013507" + }, + { + "m_Id": "e2af59228f50469c8f6c379bfd8d50ff" + }, + { + "m_Id": "ce73bc361da348f7ba2b14d518463c3b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "SphereTraceMetaballs", + "m_FunctionSource": "caf3c88af57121045bf42c51439afbe9", + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", + "m_ObjectId": "3f277471705e46318bd5500f062f9329", + "m_Guid": { + "m_GuidSerialized": "f8b0de1e-7659-4ab0-a3d1-a5c361785663" + }, + "m_Name": "Specular", + "m_DefaultReferenceName": "Vector3_3f277471705e46318bd5500f062f9329", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", + "m_ObjectId": "43f10d06f07340948b66b771d4c3dcfe", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Redirect Node", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1176.0, + "y": 317.0000915527344, + "width": 56.0, + "height": 24.000001907348634 + } + }, + "m_Slots": [ + { + "m_Id": "5fc99205c30547009091904b06ed5ad3" + }, + { + "m_Id": "882a8e42f09e487a9991dd9a894494e2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "4569324cb4d241039abe5e1540f308ee", + "m_Id": 11, + "m_DisplayName": "Color", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "4870218436c8461faa965d9519a68e2f", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 407.9999694824219, + "y": -256.9999694824219, + "width": 114.99999237060547, + "height": 33.999996185302737 + } + }, + "m_Slots": [ + { + "m_Id": "dfd34527164b4036a717c83c6b89cf1b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a130d5cc23574509bb4ccf654f80c345" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "52184aef69c04e919c096debe49f6e22", + "m_Id": 3, + "m_DisplayName": "Static UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "StaticUV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "5326680b242744969620b462cdb4da0c", + "m_Id": 2, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BakedGINode", + "m_ObjectId": "54c1f92e5d4340b3af2abe2d79b02b05", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Baked GI", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 337.0, + "y": -451.0, + "width": 186.0, + "height": 184.0 + } + }, + "m_Slots": [ + { + "m_Id": "5326680b242744969620b462cdb4da0c" + }, + { + "m_Id": "f8c70f3acc4e413999ed742d1619de27" + }, + { + "m_Id": "52184aef69c04e919c096debe49f6e22" + }, + { + "m_Id": "17bd06201b4e46e48131637d59f9c4ea" + }, + { + "m_Id": "b03d67a33ab44ff4ab0742ef2e9e5f4c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_ApplyScaling": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "586f9f0b8731472c958eecd53dbba9a6", + "m_Id": 5, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 3, + "m_Value": 0.5, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "5fb00c1ff33a4f6088725bb6a9cc6a41", + "m_Group": { + "m_Id": "" + }, + "m_Name": "PBR (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1048.9998779296875, + "y": -334.9999694824219, + "width": 223.0, + "height": 517.9999389648438 + } + }, + "m_Slots": [ + { + "m_Id": "4569324cb4d241039abe5e1540f308ee" + }, + { + "m_Id": "21f53a7302514e01927ce57ee7010eb6" + }, + { + "m_Id": "fb72e43a9b2a415ea4511494c849b2e2" + }, + { + "m_Id": "da37d699fab342d597316500227f318c" + }, + { + "m_Id": "158ad622a526499599fe0f622114ed95" + }, + { + "m_Id": "8ce1aa23eec04abc8ced17bada33a204" + }, + { + "m_Id": "586f9f0b8731472c958eecd53dbba9a6" + }, + { + "m_Id": "d2483b08af8b4f8d9978110ed030422a" + }, + { + "m_Id": "b63cfc65721940218a7ffbda27c16513" + }, + { + "m_Id": "9d8b99c4265d46c6a087526160d57d80" + }, + { + "m_Id": "26f65c84b90f426baec37a431302b963" + }, + { + "m_Id": "bebccc0883a947b48f0ca70bf00a6d6a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "PBR", + "m_FunctionSource": "caf3c88af57121045bf42c51439afbe9", + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "5fc99205c30547009091904b06ed5ad3", + "m_Id": 0, + "m_DisplayName": "", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "680fa1b35d5345388511c7b34c013507", + "m_Id": 3, + "m_DisplayName": "NormalWS", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "NormalWS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "8175d4cc33034bd3b134f5e5b5d018b0", + "m_Id": 1, + "m_DisplayName": "Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "882a8e42f09e487a9991dd9a894494e2", + "m_Id": 1, + "m_DisplayName": "", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "8ce1aa23eec04abc8ced17bada33a204", + "m_Id": 4, + "m_DisplayName": "Albedo", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Albedo", + "m_StageCapability": 3, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "98758534cf33460cba1271a5ddd6919c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 405.9999694824219, + "y": -225.99998474121095, + "width": 116.99999237060547, + "height": 33.999996185302737 + } + }, + "m_Slots": [ + { + "m_Id": "c0bfb98cebe9463aa70a300879835cf4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "335ca55f6309481388af519e908975d2" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9cf927c29285421a829eb8eae9f5c0c5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 381.0, + "y": -157.99993896484376, + "width": 142.0, + "height": 33.999996185302737 + } + }, + "m_Slots": [ + { + "m_Id": "edd3369b0e3442bc9dbd986ec21d6bce" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "de2644bbbf134b5a816ebd78b77e4690" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9d8b99c4265d46c6a087526160d57d80", + "m_Id": 8, + "m_DisplayName": "Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", + "m_ObjectId": "a130d5cc23574509bb4ccf654f80c345", + "m_Guid": { + "m_GuidSerialized": "fa413733-d2cf-449a-859e-bd83189ab9b5" + }, + "m_Name": "Albedo", + "m_DefaultReferenceName": "Vector3_a130d5cc23574509bb4ccf654f80c345", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "a44ad65d3b0545749c85e40e11b9e923", + "m_Id": 0, + "m_DisplayName": "WorldPosition", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "WorldPosition", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "a79a1f68e32b48e78ee53411b0f946ac", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", + "m_ObjectId": "af02328cc2d34dfbbd13d9f5ce1b281e", + "m_Guid": { + "m_GuidSerialized": "c0fbe363-0b1f-4b74-8a78-201b67fca458" + }, + "m_Name": "Emission", + "m_DefaultReferenceName": "Vector3_af02328cc2d34dfbbd13d9f5ce1b281e", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "b03d67a33ab44ff4ab0742ef2e9e5f4c", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "b2f86d9c66a145babd15c0d57f776458", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b63cfc65721940218a7ffbda27c16513", + "m_Id": 7, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 3, + "m_Value": 0.5, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "be7ca2d5bcf642209f7b8c91838bd921", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 399.9999694824219, + "y": -192.00003051757813, + "width": 123.0, + "height": 33.999996185302737 + } + }, + "m_Slots": [ + { + "m_Id": "fbb8b05011c044e0ae76d9865291d3fe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "3f277471705e46318bd5500f062f9329" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "bebccc0883a947b48f0ca70bf00a6d6a", + "m_Id": 10, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c0bfb98cebe9463aa70a300879835cf4", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "ce73bc361da348f7ba2b14d518463c3b", + "m_Id": 5, + "m_DisplayName": "ViewDirection", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "ViewDirection", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "d2483b08af8b4f8d9978110ed030422a", + "m_Id": 6, + "m_DisplayName": "Specular", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Specular", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "da37d699fab342d597316500227f318c", + "m_Id": 2, + "m_DisplayName": "ViewDirectionWS", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "ViewDirectionWS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "de2644bbbf134b5a816ebd78b77e4690", + "m_Guid": { + "m_GuidSerialized": "348487e7-bd23-4c00-a91a-35438fa361eb" + }, + "m_Name": "Smoothness", + "m_DefaultReferenceName": "Vector1_de2644bbbf134b5a816ebd78b77e4690", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "dfd34527164b4036a717c83c6b89cf1b", + "m_Id": 0, + "m_DisplayName": "Albedo", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e2af59228f50469c8f6c379bfd8d50ff", + "m_Id": 4, + "m_DisplayName": "Alpha", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "e730d6912d554fc69bf1b4d190c457f5", + "m_Id": 2, + "m_DisplayName": "PositionWS", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "PositionWS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "edd3369b0e3442bc9dbd986ec21d6bce", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", + "m_ObjectId": "f0d30474499b41b9918549f2376b3fde", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Output", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1545.9998779296875, + "y": -112.9999771118164, + "width": 84.99999237060547, + "height": 101.0 + } + }, + "m_Slots": [ + { + "m_Id": "8175d4cc33034bd3b134f5e5b5d018b0" + }, + { + "m_Id": "0a6bbd9c218541a19ef38e1f602bee58" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "IsFirstSlotValid": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "f8c70f3acc4e413999ed742d1619de27", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "fb72e43a9b2a415ea4511494c849b2e2", + "m_Id": 1, + "m_DisplayName": "NormalWS", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalWS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "fbb8b05011c044e0ae76d9865291d3fe", + "m_Id": 0, + "m_DisplayName": "Specular", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + diff --git a/Assets/Metaballs/Shaders/SphereTraceMetaballs.shadersubgraph.meta b/Assets/Metaballs/Shaders/SphereTraceMetaballs.shadersubgraph.meta new file mode 100644 index 0000000..c97c726 --- /dev/null +++ b/Assets/Metaballs/Shaders/SphereTraceMetaballs.shadersubgraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3e0425aecc67598429823555b3a9d936 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} diff --git a/Assets/Metaballs/Shaders/SphereTraceSphere.shadersubgraph b/Assets/Metaballs/Shaders/SphereTraceSphere.shadersubgraph new file mode 100644 index 0000000..f4e2d76 --- /dev/null +++ b/Assets/Metaballs/Shaders/SphereTraceSphere.shadersubgraph @@ -0,0 +1,675 @@ +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "c67f2755610844b0bbfd88fca164fd74", + "m_Properties": [], + "m_Keywords": [], + "m_Nodes": [ + { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + { + "m_Id": "ad6563ebae25440890aa4218c71277ff" + }, + { + "m_Id": "539f686a001048859e16d920f18bc6f0" + }, + { + "m_Id": "2a4632e7ca3d44308e4c1cb4701ddf52" + }, + { + "m_Id": "34dfd4d62933443ab9198502a6c138ae" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2a4632e7ca3d44308e4c1cb4701ddf52" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ad6563ebae25440890aa4218c71277ff" + }, + "m_SlotId": 5 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "34dfd4d62933443ab9198502a6c138ae" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ad6563ebae25440890aa4218c71277ff" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "539f686a001048859e16d920f18bc6f0" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ad6563ebae25440890aa4218c71277ff" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ad6563ebae25440890aa4218c71277ff" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ad6563ebae25440890aa4218c71277ff" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + "m_SlotId": 2 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Sub Graphs", + "m_ConcretePrecision": 0, + "m_OutputNode": { + "m_Id": "f0d30474499b41b9918549f2376b3fde" + }, + "m_ActiveTargets": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "0281192c2568467bbe25449a4cc300b6", + "m_Id": 1, + "m_DisplayName": "Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Scale", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0782c357414b405f98e1cea7c8e492aa", + "m_Id": 2, + "m_DisplayName": "Orthographic", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Orthographic", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0a6bbd9c218541a19ef38e1f602bee58", + "m_Id": 2, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "11c25e7d94814da696123a9ceda94dbf", + "m_Id": 3, + "m_DisplayName": "Color", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "143fe474d07e44c5bfb4bef5878a3fd4", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ObjectNode", + "m_ObjectId": "2a4632e7ca3d44308e4c1cb4701ddf52", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Object", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -314.25, + "y": -71.74998474121094, + "width": 99.00000762939453, + "height": 101.0 + } + }, + "m_Slots": [ + { + "m_Id": "143fe474d07e44c5bfb4bef5878a3fd4" + }, + { + "m_Id": "0281192c2568467bbe25449a4cc300b6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "320dc748e9b64060857be0d7e2645ae8", + "m_Id": 4, + "m_DisplayName": "Alpha", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.PositionNode", + "m_ObjectId": "34dfd4d62933443ab9198502a6c138ae", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -314.25, + "y": -217.75, + "width": 206.0, + "height": 132.0 + } + }, + "m_Slots": [ + { + "m_Id": "b2f86d9c66a145babd15c0d57f776458" + } + ], + "synonyms": [], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "3bdde64bcc7f49818b3f58c975d108b2", + "m_Id": 1, + "m_DisplayName": "CameraPosition", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "CameraPosition", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": -0.8999999761581421 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3f58411f7dab4c629b571402bd57795f", + "m_Id": 6, + "m_DisplayName": "Width", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Width", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "40231d63c2a141218c2d506494024fb1", + "m_Id": 1, + "m_DisplayName": "Direction", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Direction", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CameraNode", + "m_ObjectId": "539f686a001048859e16d920f18bc6f0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Camera", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -314.25, + "y": 29.25000762939453, + "width": 124.0, + "height": 245.0 + } + }, + "m_Slots": [ + { + "m_Id": "f548c0bc60aa477cb20aed7446053316" + }, + { + "m_Id": "40231d63c2a141218c2d506494024fb1" + }, + { + "m_Id": "0782c357414b405f98e1cea7c8e492aa" + }, + { + "m_Id": "9bee60408d8449a3a4753212596f0093" + }, + { + "m_Id": "c2d97606f1f2447b94e4f9b6c2e99b18" + }, + { + "m_Id": "bf676bb4c3ca4e6e9f55b54db8c06682" + }, + { + "m_Id": "3f58411f7dab4c629b571402bd57795f" + }, + { + "m_Id": "ac6b2b428d7b4b70a20a86909fbebfbe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "7ac940d20dd64bc693863b3cec444649", + "m_Id": 5, + "m_DisplayName": "ObjWorldPosition", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "ObjWorldPosition", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "8175d4cc33034bd3b134f5e5b5d018b0", + "m_Id": 1, + "m_DisplayName": "Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9bee60408d8449a3a4753212596f0093", + "m_Id": 3, + "m_DisplayName": "Near Plane", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Near Plane", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ac6b2b428d7b4b70a20a86909fbebfbe", + "m_Id": 7, + "m_DisplayName": "Height", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Height", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "ad6563ebae25440890aa4218c71277ff", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Custom Function", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 151.75, + "y": -136.75, + "width": 226.00001525878907, + "height": 142.0 + } + }, + "m_Slots": [ + { + "m_Id": "11c25e7d94814da696123a9ceda94dbf" + }, + { + "m_Id": "320dc748e9b64060857be0d7e2645ae8" + }, + { + "m_Id": "f027bb40f2da44acbd2f1a492a7ee2b1" + }, + { + "m_Id": "7ac940d20dd64bc693863b3cec444649" + }, + { + "m_Id": "3bdde64bcc7f49818b3f58c975d108b2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "SphereTraceSphere", + "m_FunctionSource": "caf3c88af57121045bf42c51439afbe9", + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "b2f86d9c66a145babd15c0d57f776458", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "bf676bb4c3ca4e6e9f55b54db8c06682", + "m_Id": 5, + "m_DisplayName": "Z Buffer Sign", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Z Buffer Sign", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c2d97606f1f2447b94e4f9b6c2e99b18", + "m_Id": 4, + "m_DisplayName": "Far Plane", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Far Plane", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "f027bb40f2da44acbd2f1a492a7ee2b1", + "m_Id": 0, + "m_DisplayName": "WorldPosition", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "WorldPosition", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", + "m_ObjectId": "f0d30474499b41b9918549f2376b3fde", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Output", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 470.0, + "y": -137.0, + "width": 85.0, + "height": 101.0 + } + }, + "m_Slots": [ + { + "m_Id": "8175d4cc33034bd3b134f5e5b5d018b0" + }, + { + "m_Id": "0a6bbd9c218541a19ef38e1f602bee58" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "IsFirstSlotValid": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "f548c0bc60aa477cb20aed7446053316", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + diff --git a/Assets/Metaballs/Shaders/SphereTraceSphere.shadersubgraph.meta b/Assets/Metaballs/Shaders/SphereTraceSphere.shadersubgraph.meta new file mode 100644 index 0000000..153fefd --- /dev/null +++ b/Assets/Metaballs/Shaders/SphereTraceSphere.shadersubgraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0405b877a6048b544bef763a89fc664b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}