diff --git a/Assets/Test/Custom_LeafWindShaderWithDisplacement.mat b/Assets/Test/Custom_LeafWindShaderWithDisplacement.mat new file mode 100644 index 0000000..34de67c --- /dev/null +++ b/Assets/Test/Custom_LeafWindShaderWithDisplacement.mat @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Custom_LeafWindShaderWithDisplacement + m_Shader: {fileID: 4800000, guid: 89a65b6de0d89b840a334365bcf75607, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 2800000, guid: 016ab36f33e35487bb91a3712c78b36e, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ShakeAmplitude: 0.1 + - _ShakeSpeed: 1 + - _ShakeX: 0.326 + - _ShakeY: 0.171 + - _ShakeZ: -0.394 + - _VertexDisplacementLag: 0.28 + - _VertexDisplacementRandomness: 0.104 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Test/Custom_LeafWindShaderWithDisplacement.mat.meta b/Assets/Test/Custom_LeafWindShaderWithDisplacement.mat.meta new file mode 100644 index 0000000..79b7f5f --- /dev/null +++ b/Assets/Test/Custom_LeafWindShaderWithDisplacement.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 39f79f823e81644cf8d7b3e32df8b3bd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/Wind-Cloth(Vertex Weight).shader b/Assets/Test/Wind-Cloth(Vertex Weight).shader new file mode 100644 index 0000000..f18c6a0 --- /dev/null +++ b/Assets/Test/Wind-Cloth(Vertex Weight).shader @@ -0,0 +1,136 @@ +// Upgrade NOTE: commented out 'float4 unity_LightmapST', a built-in variable +// Upgrade NOTE: commented out 'sampler2D unity_Lightmap', a built-in variable +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' +// Upgrade NOTE: replaced '_World2Object' with 'unity_WorldToObject' +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' +// Upgrade NOTE: replaced tex2D unity_Lightmap with UNITY_SAMPLE_TEX2D + +Shader "Wind/TreeLeaf-Cloth-CutOut(Vertex Weight)" { +Properties { + _MainTex ("Base (RGB) Gloss (A)", 2D) = "gray" {} + _Color ("Main Color", Color) = (1,1,1,1) + _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 + _Wind("Wind params",Vector) = (1,1,1,1) + _WindAmplitude("Wind Amplitude", float) = 0.5 + _WindSpeed("Wind Speed",float) = 0.5 +} + +SubShader { + Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout" "LightMode"="ForwardBase"} + LOD 400 + + CGINCLUDE + #include "UnityCG.cginc" + #include "TerrainEngine.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + #ifndef LIGHTMAP_OFF + // float4 unity_LightmapST; + // sampler2D unity_Lightmap; + #endif + + float _Cutoff = 0.5; + float4 _Color; + float _WindAmplitude; + float _WindSpeed; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 color : COLOR; + #ifndef LIGHTMAP_OFF + float2 lmap : TEXCOORD1; + #endif + }; + + inline float4 AnimateVertex2(float4 pos, float3 normal, float4 animParams,float4 wind,float2 time) + { + // animParams stored in color + // animParams.x = branch phase + // animParams.y = edge flutter factor + // animParams.z = primary factor + // animParams.w = secondary factor + + float fDetailAmp = 0.1f; + float fBranchAmp = 0.3f; + + // Phases (object, vertex, branch) + float fObjPhase = dot(unity_ObjectToWorld[3].xyz, 1); + float fBranchPhase = fObjPhase + animParams.x; + + float fVtxPhase = dot(pos.xyz, animParams.y + fBranchPhase); + + // x is used for edges; y is used for branches + float2 vWavesIn = time + float2(fVtxPhase, fBranchPhase ); + + // 1.975, 0.793, 0.375, 0.193 are good frequencies + float4 vWaves = (frac( vWavesIn.xxyy * float4(1.975, 0.793, 0.375, 0.193) ) * 2.0 - 1.0); + + vWaves = SmoothTriangleWave( vWaves ); + float2 vWavesSum = vWaves.xz + vWaves.yw; + + // Edge (xz) and branch bending (y) + float3 bend = animParams.y * fDetailAmp * normal.xyz; + bend.y = animParams.w * fBranchAmp; + pos.xyz += ((vWavesSum.xyx * bend)*wind.w + (wind.xyz * vWavesSum.y * animParams.w)) * wind.w; + + // Primary bending + // Displace position + pos.xyz += animParams.z * wind.xyz; + + return pos; + } + + v2f vert (appdata_full v) + { + v2f o; + + float bendingFact = 1-v.color.b; + + float4 wind; + wind.xyz = mul((float3x3)unity_WorldToObject,_Wind.xyz); + wind.w = _Wind.w * bendingFact; + + float4 windParams = float4(0,_WindAmplitude,bendingFact.xx); + float windTime = _Time.y * float2(_WindSpeed,1); + float4 VertexInWndPos = AnimateVertex2(v.vertex,v.normal,windParams,wind,windTime); + + o.pos = UnityObjectToClipPos(VertexInWndPos); + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + + + #ifndef LIGHTMAP_OFF + o.lmap = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + + return o; + } + ENDCG + + + Pass { + CGPROGRAM + #pragma debug + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + fixed4 frag (v2f i) : COLOR + { + fixed4 c = tex2D (_MainTex, i.uv); + + #ifndef LIGHTMAP_OFF + fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D(unity_Lightmap, i.lmap)); + c.rgb *= lm; + #endif + + c *= _Color; + clip(c.a-_Cutoff); + return c; + } + ENDCG + } +} +} + + diff --git a/Assets/Test/Wind-Cloth(Vertex Weight).shader.meta b/Assets/Test/Wind-Cloth(Vertex Weight).shader.meta new file mode 100644 index 0000000..9f998da --- /dev/null +++ b/Assets/Test/Wind-Cloth(Vertex Weight).shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9d4d903ac030b48aeabf30d42f42ffcb +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/test.meta b/Assets/Test/test.meta new file mode 100644 index 0000000..9f68bad --- /dev/null +++ b/Assets/Test/test.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a065abec36b3846609ef23c7bfb8c437 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/test/Test_wave_anim_WaveAnimTest.mat b/Assets/Test/test/Test_wave_anim_WaveAnimTest.mat new file mode 100644 index 0000000..0c087b5 --- /dev/null +++ b/Assets/Test/test/Test_wave_anim_WaveAnimTest.mat @@ -0,0 +1,60 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test_wave_anim_WaveAnimTest + m_Shader: {fileID: -6465566751694194690, guid: 861fd29ed501c47f2846dacae621390d, + type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - 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_Ints: [] + m_Floats: + - _QueueControl: 0 + - _QueueOffset: 0 + - _WindAmplitude: 0 + - _WindSpeed: 0 + m_Colors: + - _Wind: {r: 0, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &291855134940589853 +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: 7 diff --git a/Assets/Test/test/Test_wave_anim_WaveAnimTest.mat.meta b/Assets/Test/test/Test_wave_anim_WaveAnimTest.mat.meta new file mode 100644 index 0000000..1cda136 --- /dev/null +++ b/Assets/Test/test/Test_wave_anim_WaveAnimTest.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6b58b2703c6cd4b73871a4327c4da174 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/test/WaveAnimTest.shadergraph b/Assets/Test/test/WaveAnimTest.shadergraph new file mode 100644 index 0000000..850ff10 --- /dev/null +++ b/Assets/Test/test/WaveAnimTest.shadergraph @@ -0,0 +1,1715 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "98557132f2034abba4435ac008fe981b", + "m_Properties": [ + { + "m_Id": "f9ba9d06cd21495e95330de90e89df06" + }, + { + "m_Id": "5cb6a7c3887141cba109f1d0d4a84bca" + }, + { + "m_Id": "3004456005224d428809e2af2c4be949" + }, + { + "m_Id": "c9786d01dbe4401b88a378a897c06516" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "a3f36b3ae9394eed8450b743f648f53e" + } + ], + "m_Nodes": [ + { + "m_Id": "0943fe63088d42efa041e455f21e71d2" + }, + { + "m_Id": "ea742361e9744acb8cd31aa4949b4301" + }, + { + "m_Id": "b952358911ea49fb8f07a4d4cfc07c41" + }, + { + "m_Id": "e840963ab3d244ffaa6bf841a0301395" + }, + { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + { + "m_Id": "2703a6f6f3bf44a19836f57c9a4b35f3" + }, + { + "m_Id": "c5433e403d9e40a59d7dcdb8afbe923b" + }, + { + "m_Id": "42f61ae1c80d48a088c25e98031c4c6c" + }, + { + "m_Id": "6eddda420be843b6b95508357a0b507b" + }, + { + "m_Id": "84ea2d9532eb4ff5a161de3f729b597b" + }, + { + "m_Id": "93f33d041a174d039c003d1ba24b5d8a" + }, + { + "m_Id": "2803cfec9f194fb5974e8777c214b995" + }, + { + "m_Id": "a20a2dbd9fac47428abaa69b840ad02b" + }, + { + "m_Id": "371efd375f804703bc60c3816f4d04c7" + }, + { + "m_Id": "add0750df8c14705991461537098d01f" + }, + { + "m_Id": "c62ea57a43424109b96fc7522d4c2ac3" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2703a6f6f3bf44a19836f57c9a4b35f3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2703a6f6f3bf44a19836f57c9a4b35f3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c62ea57a43424109b96fc7522d4c2ac3" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2803cfec9f194fb5974e8777c214b995" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "371efd375f804703bc60c3816f4d04c7" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 5 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0943fe63088d42efa041e455f21e71d2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "42f61ae1c80d48a088c25e98031c4c6c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6eddda420be843b6b95508357a0b507b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "84ea2d9532eb4ff5a161de3f729b597b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 4 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "93f33d041a174d039c003d1ba24b5d8a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 6 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a20a2dbd9fac47428abaa69b840ad02b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2803cfec9f194fb5974e8777c214b995" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c5433e403d9e40a59d7dcdb8afbe923b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2f894020535647ddab7966d2e56c7582" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c62ea57a43424109b96fc7522d4c2ac3" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e840963ab3d244ffaa6bf841a0301395" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 293.0, + "y": 17.0 + }, + "m_Blocks": [ + { + "m_Id": "0943fe63088d42efa041e455f21e71d2" + }, + { + "m_Id": "ea742361e9744acb8cd31aa4949b4301" + }, + { + "m_Id": "b952358911ea49fb8f07a4d4cfc07c41" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 293.0, + "y": 311.0 + }, + "m_Blocks": [ + { + "m_Id": "e840963ab3d244ffaa6bf841a0301395" + }, + { + "m_Id": "371efd375f804703bc60c3816f4d04c7" + }, + { + "m_Id": "add0750df8c14705991461537098d01f" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Test/wave_anim", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "220627f91f3340f98d55d6f709e1173d" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "07acbe9316044751b2cd32f6550607ac", + "m_Id": 0, + "m_DisplayName": "Wind", + "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": "0943fe63088d42efa041e455f21e71d2", + "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": "f5cd5262457549b4996e5039c82c925c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0a241d2150e5468ca4895923221a3427", + "m_Id": 4, + "m_DisplayName": "speed", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "speed", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "17a4b6b37acc421387b8ac7b42a0a8be", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "2195bf531134456797b974b70fdfe766", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "220627f91f3340f98d55d6f709e1173d", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "9be54a1b27b54d5590cdb2b8c4313bdf" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": true, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.VertexColorNode", + "m_ObjectId": "2703a6f6f3bf44a19836f57c9a4b35f3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Vertex Color", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -604.0, + "y": 131.0, + "width": 118.0, + "height": 94.0 + } + }, + "m_Slots": [ + { + "m_Id": "3d64114a8fb24fa6a12b4fc7a3310473" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "2803cfec9f194fb5974e8777c214b995", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -432.0, + "y": 418.0, + "width": 208.0, + "height": 435.0 + } + }, + "m_Slots": [ + { + "m_Id": "17a4b6b37acc421387b8ac7b42a0a8be" + }, + { + "m_Id": "66edc2bb18574fbd9fac8ea9ccc906b9" + }, + { + "m_Id": "4a9cb457b76a445193ddf016249ffdec" + }, + { + "m_Id": "744476ac612b4c34a2e7d5771f86414e" + }, + { + "m_Id": "6245e95e544f4ecda54c5c8f53b937b8" + }, + { + "m_Id": "e0cb6a26260641358717f934f45987be" + }, + { + "m_Id": "2e7b5aa9c30246cfaed6df1b44bcdc92" + }, + { + "m_Id": "b12659aca315449db271413f45567c9d" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "2e7b5aa9c30246cfaed6df1b44bcdc92", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "2f894020535647ddab7966d2e56c7582", + "m_Group": { + "m_Id": "" + }, + "m_Name": "WindVert (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -89.0, + "y": 153.0, + "width": 208.0, + "height": 374.0 + } + }, + "m_Slots": [ + { + "m_Id": "5d874b9388954afda67f63b5f3e2f623" + }, + { + "m_Id": "5a667668a5754d078f022ee77eaab5c1" + }, + { + "m_Id": "6ed8ebeed0974cffa0f09a6312ffd2d8" + }, + { + "m_Id": "ac18aed58ac64e8cb4c0067dfef79d14" + }, + { + "m_Id": "0a241d2150e5468ca4895923221a3427" + }, + { + "m_Id": "a487beeb464c4941850621a86ab1e75c" + }, + { + "m_Id": "b3b241b77c7c46c5893c19fa1d0c6520" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "WindVert", + "m_FunctionSource": "2ed128fd4492e4362b01175c3d4372e3", + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "3004456005224d428809e2af2c4be949", + "m_Guid": { + "m_GuidSerialized": "0a869f05-4f0f-44fc-99cc-0812d83cd1e1" + }, + "m_Name": "WindSpeed", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "WindSpeed", + "m_DefaultReferenceName": "_WindSpeed", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "371efd375f804703bc60c3816f4d04c7", + "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": "eb6358e5a0fc41a4b002ab016a24f6c2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "3d64114a8fb24fa6a12b4fc7a3310473", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalVectorNode", + "m_ObjectId": "42f61ae1c80d48a088c25e98031c4c6c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Normal Vector", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -625.0, + "y": -10.0, + "width": 206.0, + "height": 131.0 + } + }, + "m_Slots": [ + { + "m_Id": "75de859552d440e8b319ca33dadbd00f" + } + ], + "synonyms": [ + "surface direction" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4a9cb457b76a445193ddf016249ffdec", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "55e7ed677b2f43ff972e2ba047fff85d", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5a667668a5754d078f022ee77eaab5c1", + "m_Id": 1, + "m_DisplayName": "normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "normal", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "5cb6a7c3887141cba109f1d0d4a84bca", + "m_Guid": { + "m_GuidSerialized": "ea7ad4f2-8fca-4929-94c7-f49bf4f6ef27" + }, + "m_Name": "WindAmplitude", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "WindAmplitude", + "m_DefaultReferenceName": "_WindAmplitude", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "5d874b9388954afda67f63b5f3e2f623", + "m_Id": 0, + "m_DisplayName": "pos", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "pos", + "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.NormalMaterialSlot", + "m_ObjectId": "61e22519e853484aaf32f71f2870d0e8", + "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": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6245e95e544f4ecda54c5c8f53b937b8", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "66edc2bb18574fbd9fac8ea9ccc906b9", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "6ed8ebeed0974cffa0f09a6312ffd2d8", + "m_Id": 2, + "m_DisplayName": "vertColor", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "vertColor", + "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.PropertyNode", + "m_ObjectId": "6eddda420be843b6b95508357a0b507b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -604.0, + "y": 234.0, + "width": 104.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "07acbe9316044751b2cd32f6550607ac" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f9ba9d06cd21495e95330de90e89df06" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "744476ac612b4c34a2e7d5771f86414e", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "75de859552d440e8b319ca33dadbd00f", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "84ea2d9532eb4ff5a161de3f729b597b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -621.0, + "y": 277.0, + "width": 135.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "a82613971dd74a31b6eb4b1de6cae0c0" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "3004456005224d428809e2af2c4be949" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8fd4b67b566a41a8b0d6415f6ea4fc2d", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "93f33d041a174d039c003d1ba24b5d8a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -621.0, + "y": 330.0, + "width": 154.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "99c4b9c810c647c28ca84b87fdbbcdf4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "5cb6a7c3887141cba109f1d0d4a84bca" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "99c4b9c810c647c28ca84b87fdbbcdf4", + "m_Id": 0, + "m_DisplayName": "WindAmplitude", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", + "m_ObjectId": "9be54a1b27b54d5590cdb2b8c4313bdf" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a1b6d64974c6499fa66d5d9291d491de", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "a20a2dbd9fac47428abaa69b840ad02b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -777.0, + "y": 352.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c9745c5724b542888f779fc79b07dff9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "c9786d01dbe4401b88a378a897c06516" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "a3f36b3ae9394eed8450b743f648f53e", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "f9ba9d06cd21495e95330de90e89df06" + }, + { + "m_Id": "5cb6a7c3887141cba109f1d0d4a84bca" + }, + { + "m_Id": "3004456005224d428809e2af2c4be949" + }, + { + "m_Id": "c9786d01dbe4401b88a378a897c06516" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a487beeb464c4941850621a86ab1e75c", + "m_Id": 6, + "m_DisplayName": "amplitude", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "amplitude", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a7a2f25f3c1d44f48f90f2bf7d23d966", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a82613971dd74a31b6eb4b1de6cae0c0", + "m_Id": 0, + "m_DisplayName": "WindSpeed", + "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": "ac18aed58ac64e8cb4c0067dfef79d14", + "m_Id": 3, + "m_DisplayName": "wind", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "wind", + "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": "add0750df8c14705991461537098d01f", + "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": "a7a2f25f3c1d44f48f90f2bf7d23d966" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "b12659aca315449db271413f45567c9d", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "b3b241b77c7c46c5893c19fa1d0c6520", + "m_Id": 5, + "m_DisplayName": "aniPos", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "aniPos", + "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": "b952358911ea49fb8f07a4d4cfc07c41", + "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": "dd86009a27bd487989a74d81707f35d2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "bcb3b318c9974741b0b5d7948559d4b7", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.PositionNode", + "m_ObjectId": "c5433e403d9e40a59d7dcdb8afbe923b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -625.0, + "y": -162.0, + "width": 208.0, + "height": 315.0 + } + }, + "m_Slots": [ + { + "m_Id": "f47015ea482d4d05b50bae859ff956df" + } + ], + "synonyms": [ + "location" + ], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 0, + "m_PositionSource": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "c62ea57a43424109b96fc7522d4c2ac3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 15.0, + "y": 674.0, + "width": 120.0, + "height": 149.0 + } + }, + "m_Slots": [ + { + "m_Id": "8fd4b67b566a41a8b0d6415f6ea4fc2d" + }, + { + "m_Id": "a1b6d64974c6499fa66d5d9291d491de" + }, + { + "m_Id": "bcb3b318c9974741b0b5d7948559d4b7" + }, + { + "m_Id": "55e7ed677b2f43ff972e2ba047fff85d" + }, + { + "m_Id": "c9444fdf7967477a941288e2f10128af" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c9444fdf7967477a941288e2f10128af", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "c9745c5724b542888f779fc79b07dff9", + "m_Id": 0, + "m_DisplayName": "Texture2D", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "c9786d01dbe4401b88a378a897c06516", + "m_Guid": { + "m_GuidSerialized": "d1bdef80-57dc-4090-9409-16d189aeda36" + }, + "m_Name": "Texture2D", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Texture2D", + "m_DefaultReferenceName": "_Texture2D", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "dd86009a27bd487989a74d81707f35d2", + "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.Texture2DInputMaterialSlot", + "m_ObjectId": "e0cb6a26260641358717f934f45987be", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "e840963ab3d244ffaa6bf841a0301395", + "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": "2195bf531134456797b974b70fdfe766" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "ea742361e9744acb8cd31aa4949b4301", + "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": "61e22519e853484aaf32f71f2870d0e8" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "eb6358e5a0fc41a4b002ab016a24f6c2", + "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.Vector3MaterialSlot", + "m_ObjectId": "f47015ea482d4d05b50bae859ff956df", + "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.PositionMaterialSlot", + "m_ObjectId": "f5cd5262457549b4996e5039c82c925c", + "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": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector4ShaderProperty", + "m_ObjectId": "f9ba9d06cd21495e95330de90e89df06", + "m_Guid": { + "m_GuidSerialized": "c6ab2d2f-c178-4fe8-9e85-38be75eff683" + }, + "m_Name": "Wind", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Wind", + "m_DefaultReferenceName": "_Wind", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + diff --git a/Assets/Test/test/WaveAnimTest.shadergraph.meta b/Assets/Test/test/WaveAnimTest.shadergraph.meta new file mode 100644 index 0000000..966e373 --- /dev/null +++ b/Assets/Test/test/WaveAnimTest.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 861fd29ed501c47f2846dacae621390d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Assets/Test/test/WindAnim.hlsl b/Assets/Test/test/WindAnim.hlsl new file mode 100644 index 0000000..c075296 --- /dev/null +++ b/Assets/Test/test/WindAnim.hlsl @@ -0,0 +1,69 @@ +//UNITY_SHADER_NO_UPGRADE +#ifndef WIND_ANIM +#define WIND_ANIM + +// SmoothTriangleWave function +inline float SmoothTriangleWave(float x) +{ + // 将输入值限制在 [0, 1] 范围内,使用 frac 函数保证值是周期性的 + x = frac(x); + + // 使用三角函数生成平滑的波形,注意:frac(x) 生成的是 [0, 1] 之间的值 + return 1.0 - abs(2.0 * x - 1.0); // 生成平滑的三角波 +} + +// SmoothTriangleWave function for a 4-component vector +inline float4 SmoothTriangleWave(float4 x) +{ + return float4(SmoothTriangleWave(x.x), SmoothTriangleWave(x.y), SmoothTriangleWave(x.z), SmoothTriangleWave(x.w)); +} + +inline void WindVert_float(float4 pos, float3 normal, float3 vertColor, float4 wind, float speed, float amplitude, out float4 aniPos) +{ + // animParams.x = branch phase + // animParams.y = edge flutter factor + // animParams.z = primary factor + // animParams.w = secondary factor + + + float bendingFact = 1 - vertColor.b; + //wind.xyz = TransformWorldToObject(wind.xyz); + //wind.z = wind.z * bendingFact; + + float4 animParams = float4(0, amplitude, bendingFact.xx); + float time = _Time.y * float2(speed, 1); + + + float fDetailAmp = 0.1f; + float fBranchAmp = 0.3f; + + // Phases (object, vertex, branch) + float fObjPhase = dot(unity_ObjectToWorld[3].xyz, 1); + float fBranchPhase = fObjPhase + animParams.x; + + float fVtxPhase = dot(pos.xyz, animParams.y + fBranchPhase); + + // x is used for edges; y is used for branches + float2 vWavesIn = time + float2(fVtxPhase, fBranchPhase ); + + // 1.975, 0.793, 0.375, 0.193 are good frequencies + float4 vWaves = (frac( vWavesIn.xxyy * float4(1.975, 0.793, 0.375, 0.193) ) * 2.0 - 1.0); + + vWaves = SmoothTriangleWave( vWaves ); + float2 vWavesSum = vWaves.xz + vWaves.yw; + + // Edge (xz) and branch bending (y) + float3 bend = animParams.y * fDetailAmp * normal.xyz; + bend.y = animParams.w * fBranchAmp; + pos.xyz += ((vWavesSum.xyx * bend)*wind.w + (wind.xyz * vWavesSum.y * animParams.w)) * wind.w; + + // Primary bending + // Displace position + pos.xyz += animParams.z * wind.xyz; + + aniPos = pos; + +} + + +#endif diff --git a/Assets/Test/test/WindAnim.hlsl.meta b/Assets/Test/test/WindAnim.hlsl.meta new file mode 100644 index 0000000..9f7422a --- /dev/null +++ b/Assets/Test/test/WindAnim.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2ed128fd4492e4362b01175c3d4372e3 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/test/grass.fbx b/Assets/Test/test/grass.fbx new file mode 100644 index 0000000..323f5cf Binary files /dev/null and b/Assets/Test/test/grass.fbx differ diff --git a/Assets/Test/test/grass.fbx.meta b/Assets/Test/test/grass.fbx.meta new file mode 100644 index 0000000..e1e4253 --- /dev/null +++ b/Assets/Test/test/grass.fbx.meta @@ -0,0 +1,109 @@ +fileFormatVersion: 2 +guid: 6760e96797f4b47659b1116cd1477196 +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/test/home18_flower.tga b/Assets/Test/test/home18_flower.tga new file mode 100644 index 0000000..fa9f7eb Binary files /dev/null and b/Assets/Test/test/home18_flower.tga differ diff --git a/Assets/Test/test/home18_flower.tga.meta b/Assets/Test/test/home18_flower.tga.meta new file mode 100644 index 0000000..96078d8 --- /dev/null +++ b/Assets/Test/test/home18_flower.tga.meta @@ -0,0 +1,153 @@ +fileFormatVersion: 2 +guid: 016ab36f33e35487bb91a3712c78b36e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: