text
stringlengths
7
35.3M
id
stringlengths
11
185
metadata
dict
__index_level_0__
int64
0
2.14k
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' //////////////////////////////////////////// // CameraFilterPack - by VETASOFT 2018 ///// //////////////////////////////////////////// Shader "CameraFilterPack/Glow_Glow_Color" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _MainTex2 ("Blurred (RGB)", 2D) = "white" {} _TimeX ("Time", Range(0.0, 1.0)) = 1.0 _ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,0.) _Amount ("_Amount", Range(0.0, 20.0)) = 5.0 } SubShader { Pass { Cull Off ZWrite Off ZTest Always CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma fragmentoption ARB_precision_hint_fastest #pragma target 3.0 #pragma glsl #include "UnityCG.cginc" uniform sampler2D _MainTex; uniform sampler2D _MainTex2; uniform float _TimeX; uniform float _Amount; uniform float _Value1; uniform float _Value2; uniform float _Value3; struct appdata_t { float4 vertex : POSITION; float4 color : COLOR; float2 uv_MainTex : TEXCOORD0; }; struct v2f { float2 uv_MainTex : TEXCOORD0; float4 vertex : SV_POSITION; float4 color : COLOR; }; v2f vert(appdata_t IN) { v2f OUT; OUT.vertex = UnityObjectToClipPos(IN.vertex); OUT.uv_MainTex = IN.uv_MainTex; OUT.color = IN.color; return OUT; } float4 frag (v2f i) : COLOR { float stepU = _Amount/_ScreenParams.x; float3 result = tex2D(_MainTex,i.uv_MainTex - float2(0, stepU)).rgb; result += tex2D(_MainTex,i.uv_MainTex).rgb; result += tex2D(_MainTex,i.uv_MainTex + float2(0, stepU)).rgb; result /= 3; return float4(result,1.0); } ENDCG } Pass { Cull Off ZWrite Off ZTest Always CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma fragmentoption ARB_precision_hint_fastest #pragma target 3.0 #pragma glsl #include "UnityCG.cginc" uniform sampler2D _MainTex; uniform sampler2D _MainTex2; uniform float _TimeX; uniform float _Value1; uniform float _Value2; uniform float _Value3; uniform float _Amount; uniform float4 _GlowColor; struct appdata_t { float4 vertex : POSITION; float4 color : COLOR; float2 uv_MainTex : TEXCOORD0; }; struct v2f { float2 uv_MainTex : TEXCOORD0; float4 vertex : SV_POSITION; float4 color : COLOR; }; v2f vert(appdata_t IN) { v2f OUT; OUT.vertex = UnityObjectToClipPos(IN.vertex); OUT.uv_MainTex = IN.uv_MainTex; OUT.color = IN.color; return OUT; } float4 frag (v2f i) : COLOR { float3 result=tex2D(_MainTex,i.uv_MainTex.xy).rgb; float3 cm=tex2D(_MainTex2,i.uv_MainTex.xy).rgb; float c=cm*_Value2; result += c*_GlowColor.rgb; return float4(result,1.0); } ENDCG } Pass { Cull Off ZWrite Off ZTest Always CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma fragmentoption ARB_precision_hint_fastest #pragma target 3.0 #pragma glsl #include "UnityCG.cginc" uniform sampler2D _MainTex; uniform sampler2D _MainTex2; uniform float _TimeX; uniform float _Amount; uniform float _Value1; uniform float _Value2; uniform float _Value3; struct appdata_t { float4 vertex : POSITION; float4 color : COLOR; float2 uv_MainTex : TEXCOORD0; }; struct v2f { float2 uv_MainTex : TEXCOORD0; float4 vertex : SV_POSITION; float4 color : COLOR; }; v2f vert(appdata_t IN) { v2f OUT; OUT.vertex = UnityObjectToClipPos(IN.vertex); OUT.uv_MainTex = IN.uv_MainTex; OUT.color = IN.color; return OUT; } float4 frag (v2f i) : COLOR { float stepU = _Amount/_ScreenParams.x; float3 result = tex2D(_MainTex,i.uv_MainTex - float2(stepU, 0)).rgb; result += tex2D(_MainTex,i.uv_MainTex).rgb; result += tex2D(_MainTex,i.uv_MainTex + float2(stepU, 0)).rgb; result /= 3; return float4(result,1.0); } ENDCG } Pass { Cull Off ZWrite Off ZTest Always CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma fragmentoption ARB_precision_hint_fastest #pragma target 3.0 #pragma glsl #include "UnityCG.cginc" uniform sampler2D _MainTex; uniform sampler2D _MainTex2; uniform float _TimeX; uniform float _Amount; uniform float _Value1; uniform float _Value2; uniform float _Value3; struct appdata_t { float4 vertex : POSITION; float4 color : COLOR; float2 uv_MainTex : TEXCOORD0; }; struct v2f { float2 uv_MainTex : TEXCOORD0; float4 vertex : SV_POSITION; float4 color : COLOR; }; v2f vert(appdata_t IN) { v2f OUT; OUT.vertex = UnityObjectToClipPos(IN.vertex); OUT.uv_MainTex = IN.uv_MainTex; OUT.color = IN.color; return OUT; } float4 frag (v2f i) : COLOR { float stepU = _Amount/_ScreenParams.x; float3 result = tex2D(_MainTex,i.uv_MainTex - float2(stepU, 0)).rgb; float l = dot(result,0.33); result = smoothstep(_Value1, _Value1+_Value3, l); return float4(result,1.0); } ENDCG } } }
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Glow_Glow_Color.shader/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Glow_Glow_Color.shader", "repo_id": "jynew", "token_count": 1938 }
813
fileFormatVersion: 2 guid: e0648803b10ef8e4da432318f183cd75 folderAsset: yes timeCreated: 1500446186 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts.meta", "repo_id": "jynew", "token_count": 73 }
814
fileFormatVersion: 2 guid: 956055ac1d9992a44985b5b4e244df79 MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData:
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_AAA_Blood.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_AAA_Blood.cs.meta", "repo_id": "jynew", "token_count": 70 }
815
fileFormatVersion: 2 guid: 09d585fa46db0224a88edf8765b29443 MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData:
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Blur_Radial.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Blur_Radial.cs.meta", "repo_id": "jynew", "token_count": 68 }
816
fileFormatVersion: 2 guid: df1511efe63af4748a617def340d95bb MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData:
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Drawing_Manga_FlashWhite.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Drawing_Manga_FlashWhite.cs.meta", "repo_id": "jynew", "token_count": 66 }
817
fileFormatVersion: 2 guid: 7fb438ad0b8379f49a274bfa973adeed MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData:
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_FX_EarthQuake.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_FX_EarthQuake.cs.meta", "repo_id": "jynew", "token_count": 69 }
818
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' Shader "Custom/BigMap" { Properties { _MainTex("MainTex", 2D) = "white" {} _MainTexTwo("MainTex2", 2D) = "white" {} _ThreValue("ThreValue", range(0,1)) = 0 _ToonEffect("Toon Effect",range(0,1)) = 0.5 _Steps("Steps of toon",range(0,9)) = 3 //_BumpMap ("Normal Map", 2D) = "bump" {} //_BumpScale ("Bump Scale", Range(0.0, 1.0)) = 0.0 } SubShader{ Tags{ "RenderType" = "Opaque" } LOD 150 CGPROGRAM #include "UnityPBSLighting.cginc" #include "Lighting.cginc" // Physically based Standard lighting model, and enable shadows on all light types #pragma surface surf Cartoon fullforwardshadows //vertex:vert // Use shader model 3.0 target, to get nicer looking lighting #pragma target 3.0 //#pragma surface surf Lambert noforwardadd sampler2D _MainTex; sampler2D _MainTexTwo; fixed _ThreValue; float _ToonEffect; float _Steps; //sampler2D _BumpMap; //float _BumpScale; struct Input { float2 uv_MainTex; }; inline float4 LightingCartoon(SurfaceOutput s, fixed3 lightDir, fixed3 viewDir, fixed atten) { float difLight = max(0, dot(normalize(s.Normal), normalize(lightDir))); //difLight = (difLight + 1) / 2;//做亮化处理 //difLight = smoothstep(0, 1, difLight);//使颜色平滑的在[0,1]范围之内 float toon = floor(difLight * _Steps) / _Steps;//把颜色做离散化处理,把diffuse颜色限制在_Steps种(_Steps阶颜色),简化颜色,这样的处理使色阶间能平滑的显示 difLight = lerp(difLight, toon, _ToonEffect);//根据外部我们可控的卡通化程度值_ToonEffect,调节卡通与现实的比重 float4 col; col.rgb = s.Albedo * _LightColor0.rgb * difLight * atten; col.a = s.Alpha; return col; } void surf(Input IN, inout SurfaceOutput o) { fixed4 c = tex2D(_MainTex, IN.uv_MainTex); fixed4 c2 = tex2D(_MainTexTwo, IN.uv_MainTex); c = c * (1 - _ThreValue) + c2 * _ThreValue; //c = fixed4(0,0,1,1); o.Albedo = c.rgb; o.Alpha = c.a; //fixed4 c3 = tex2D(_BumpMap, IN.uv_MainTex); //o.Normal = c3.rgb * 2.0 - 1.0; //o.Normal.z = _BumpScale; } ENDCG } //Fallback "Specular" Fallback "Mobile/VertexLit" }
jynew/jyx2/Assets/3DScene/Shader/BigMap.shader/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Shader/BigMap.shader", "repo_id": "jynew", "token_count": 1115 }
819
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' Shader "Water/SeaWave" { Properties { _WaterTex ("WaterTex", 2D) = "black" {} _WaveTex ("WaveTex", 2D) = "black" {} //海浪 _BumpTex ("BumpTex", 2D) = "bump" {} _GTex ("Gradient", 2D) = "white" {} //海水渐变 _NoiseTex ("Noise", 2D) = "white" {} //海浪躁波 _WaterSpeed("WaterSpeed", float) = 0.74 //海水速度 _WaveSpeed("WaveSpeed", float) = -12.64 //海浪速度 _WaveRange("WaveRange", float) = 0.3 _NoiseRange("NoiseRange", float) = 6.43 _WaveDelta("WaveDelta", float) = 2.43 _Refract("Refract", float) = 0.07 _Specular("Specular", float) = 1.86 _Gloss("Gloss", float) = 0.71 _SpecColor("SpecColor", color) = (1, 1, 1, 1) _LightDir("LightDir", vector) = (0, 50, 30, 0) _Range ("Range", vector) = (0.13, 1.53, 0.37, 0.78) } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent"} LOD 200 zwrite off CGPROGRAM #pragma surface surf WaterLight vertex:vert alpha noshadow #pragma target 3.0 sampler2D _GTex; sampler2D _WaterTex; sampler2D _BumpTex; sampler2D _CameraDepthTexture; sampler2D _NoiseTex; sampler2D _WaveTex; float4 _Range; half _WaterSpeed; half _WaveSpeed; fixed _WaveDelta; half _WaveRange; fixed _Refract; half _Specular; fixed _Gloss; float4 _LightDir; half _NoiseRange; float4 _WaterTex_TexelSize; struct Input { float2 uv_WaterTex; float2 uv_NoiseTex; float4 proj; float3 viewDir; }; fixed4 LightingWaterLight(SurfaceOutput s, fixed3 lightDir, half3 viewDir, fixed atten) { half3 halfVector = normalize(_LightDir + viewDir); float diffFactor = max(0, dot(normalize(_LightDir), s.Normal)) * 0.8 + 0.2; float nh = max(0, dot(halfVector, s.Normal)); float spec = pow(nh, s.Specular * 128.0) * s.Gloss; fixed4 c; c.rgb = (s.Albedo * _LightColor0.rgb * diffFactor + _SpecColor.rgb * spec * _LightColor0.rgb) * (atten); c.a = s.Alpha + spec * _SpecColor.a; return c; } void vert (inout appdata_full v, out Input i) { UNITY_INITIALIZE_OUTPUT(Input, i); i.proj = ComputeScreenPos(UnityObjectToClipPos(v.vertex)); COMPUTE_EYEDEPTH(i.proj.z); } void surf (Input IN, inout SurfaceOutput o) { float2 uv = IN.proj.xy/IN.proj.w; #if UNITY_UV_STARTS_AT_TOP if(_WaterTex_TexelSize.y<0) uv.y = 1 - uv.y; #endif fixed4 water = (tex2D(_WaterTex, IN.uv_WaterTex + float2(_WaterSpeed*_Time.x,0))+tex2D(_WaterTex, float2(1-IN.uv_WaterTex.y,IN.uv_WaterTex.x) + float2(_WaterSpeed*_Time.x,0)))/2; float4 offsetColor = (tex2D(_BumpTex, IN.uv_WaterTex + float2(_WaterSpeed*_Time.x,0))+tex2D(_BumpTex, float2(1-IN.uv_WaterTex.y,IN.uv_WaterTex.x) + float2(_WaterSpeed*_Time.x,0)))/2; half2 offset = UnpackNormal(offsetColor).xy * _Refract; half m_depth = LinearEyeDepth(tex2Dproj (_CameraDepthTexture, IN.proj).r); half deltaDepth = m_depth - IN.proj.z; fixed4 noiseColor = tex2D(_NoiseTex, IN.uv_NoiseTex); fixed4 waterColor = tex2D(_GTex, float2(min(_Range.y, deltaDepth)/_Range.y,1)); fixed4 waveColor = tex2D(_WaveTex, float2(1-min(_Range.z, deltaDepth)/_Range.z+_WaveRange*sin(_Time.x*_WaveSpeed+noiseColor.r*_NoiseRange),1)+offset); waveColor.rgb *= (1-(sin(_Time.x*_WaveSpeed+noiseColor.r*_NoiseRange)+1)/2)*noiseColor.r; fixed4 waveColor2 = tex2D(_WaveTex, float2(1-min(_Range.z, deltaDepth)/_Range.z+_WaveRange*sin(_Time.x*_WaveSpeed+_WaveDelta+noiseColor.r*_NoiseRange),1)+offset); waveColor2.rgb *= (1-(sin(_Time.x*_WaveSpeed+_WaveDelta+noiseColor.r*_NoiseRange)+1)/2)*noiseColor.r; half water_A = 1-min(_Range.z, deltaDepth)/_Range.z; half water_B = min(_Range.w, deltaDepth)/_Range.w; float4 bumpColor = (tex2D(_BumpTex, IN.uv_WaterTex+offset + float2(_WaterSpeed*_Time.x,0))+tex2D(_BumpTex, float2(1-IN.uv_WaterTex.y,IN.uv_WaterTex.x)+offset + float2(_WaterSpeed*_Time.x,0)))/2; o.Normal = UnpackNormal(bumpColor).xyz; o.Specular = _Specular; o.Gloss = _Gloss; o.Albedo = (1 - water_B) + waterColor.rgb * water_B; o.Albedo = o.Albedo * (1 - water.a*water_A) + water.rgb * water.a*water_A; o.Albedo += (waveColor.rgb+waveColor2.rgb) * water_A; o.Alpha = min(_Range.x, deltaDepth)/_Range.x; } ENDCG } //FallBack "Diffuse" }
jynew/jyx2/Assets/3DScene/Shader/SeaWave.shader/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Shader/SeaWave.shader", "repo_id": "jynew", "token_count": 1968 }
820
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: Cartoon_FluffyBlueSky m_Shader: {fileID: 104, guid: 0000000000000000f000000000000000, type: 0} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - _BackTex: m_Texture: {fileID: 2800000, guid: 194d836ae0357412c9171033f025cfb6, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DownTex: m_Texture: {fileID: 2800000, guid: 9d3f135dc99094558ae2215d52221262, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _FrontTex: m_Texture: {fileID: 2800000, guid: d312da641730445f9be994c7c7b73611, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _LeftTex: m_Texture: {fileID: 2800000, guid: 773162277618d4cef97c28405b7cf9d0, type: 3} 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} - _RightTex: m_Texture: {fileID: 2800000, guid: d3efdd0f06e5042708757a698be3cff6, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _UpTex: m_Texture: {fileID: 2800000, guid: ccbc2c3452c714bc7b87c05a5744e24f, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - _Exposure: 1 - _Rotation: 155 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
jynew/jyx2/Assets/3DScene/SkyBox/Cartoon Airbrush FluffyBlueSky/Cartoon_FluffyBlueSky.mat/0
{ "file_path": "jynew/jyx2/Assets/3DScene/SkyBox/Cartoon Airbrush FluffyBlueSky/Cartoon_FluffyBlueSky.mat", "repo_id": "jynew", "token_count": 953 }
821
fileFormatVersion: 2 guid: 3d35ff019b019f14ea1db39878c15dd6 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Tile_3.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Tile_3.meta", "repo_id": "jynew", "token_count": 68 }
822
fileFormatVersion: 2 guid: 9c1ac96761736fc4daff93c092e77a79 folderAsset: yes timeCreated: 1523540016 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/StylizedWater/Effects.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Effects.meta", "repo_id": "jynew", "token_count": 77 }
823
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: serializedVersion: 6 m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: wuminggu m_Shader: {fileID: 4800000, guid: 644d4419f6d30214892dd65158332ba7, type: 3} m_ShaderKeywords: _ENABLE_VC_ON _NORMAL_MAP_ON _SECONDARY_WAVES_ON _UNLIT_ON _USEINTERSECTIONFOAM_ON _USE_VC_INTERSECTION_ON _WORLDSPACETILIBG_ON _WORLDSPACETILING_ON m_LightmapFlags: 0 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - _ColorGradient: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DummyTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _GradientTex: m_Texture: {fileID: 2800000, guid: 7e177bfc0bd15734bb6123a25bd6b7c6, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _Normals: m_Texture: {fileID: 2800000, guid: 6a4951be050ccf74380a80c3b9814cbf, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _Reflection: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _ReflectionTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _RefractionTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _Shadermap: m_Texture: {fileID: 2800000, guid: 79c7ba25d6c5cf644b73f1961a00bfa4, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - _Cutoff: 0.5 - _Depth: 10 - _Depthdarkness: 0 - _ENABLE_GRADIENT: 0 - _ENABLE_SHADOWS: 0 - _ENABLE_VC: 1 - _EdgeFade: 0.51 - _FoamDistortion: 0.45 - _FoamOpacity: 0.069 - _FoamSize: 0.068 - _FoamSpeed: 0.174 - _FoamTiling: 0.05 - _Fresnelexponent: 2.6 - _Glossiness: 1 - _HighlightPanning: 0 - _LIGHTING: 1 - _MACRO_WAVES: 0 - _MacroBlendDistance: 1000 - _Metallicness: 0 - _NORMAL_MAP: 1 - _NormalStrength: 0.261 - _NormalTiling: 0.099999845 - _Pixelate: 0 - _RT_REFRACTION: 0 - _ReflectionFresnel: 2 - _ReflectionRefraction: 0.006 - _ReflectionStrength: 0 - _RefractionAmount: 0.057 - _RimDistance: 0.899 - _RimDistortion: 0.139 - _RimSize: 0.2 - _Rimfalloff: 0.1 - _Rimtiling: 0.5 - _SECONDARY_WAVES: 0 - _SurfaceHighlight: 0.03 - _SurfaceHighlightsDistortion: 0.45 - _SurfaceHighlightsSpeed: 0.1 - _SurfaceHightlighttiling: 0.14999995 - _Surfacehightlightsize: 0 - _Tessellation: 0.01 - _Tiling: 0.955 - _Transparency: 0.616 - _USE_VC_INTERSECTION: 1 - _Unlit: 1 - _UseIntersectionFoam: 1 - _UseIntersectionHighlight: 0 - _WaveFoam: 0 - _WaveHeight: 0 - _WaveSize: 0.5 - _Wavesspeed: 3.58 - _Wavesstrength: 0.031 - _Wavetint: -0.1 - _Worldspacetiling: 0 - __dirty: 1 m_Colors: - _FresnelColor: {r: 0.5, g: 0.8551724, b: 1, a: 0.084} - _RimColor: {r: 0.78773576, g: 0.9858491, b: 1, a: 0.09019608} - _WaterColor: {r: 0.2848403, g: 0.33917457, b: 0.34905353, a: 0.47843137} - _WaterShallowColor: {r: 0.54770374, g: 0.63843375, b: 0.6415094, a: 0.39215687} - _WaveDirection: {r: 0, g: 0, b: 0, a: 0}
jynew/jyx2/Assets/3DScene/StylizedWater/Materials/wuminggu.mat/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Materials/wuminggu.mat", "repo_id": "jynew", "token_count": 1873 }
824
// Stylized Water Shader by Staggart Creations http://u3d.as/A2R // Online documentation can be found at http://staggart.xyz Shader "Hidden/SWS/ShaderMapRenderer" { Properties { _RedInput("Red Channel", 2D) = "black" {} _GreenInput("Green Channel", 2D) = "black" {} _BlueInput("Blue Channel", 2D) = "black" {} //_AlphaInput ("Alpha Channel", 2D) = "black" {} } SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" sampler2D _RedInput; sampler2D _GreenInput; sampler2D _BlueInput; sampler2D _AlphaInput; fixed4 frag (v2f_img IN) : SV_Target { float r = tex2D(_RedInput, IN.uv).rrrr; float g = tex2D(_GreenInput, IN.uv).rrrr; float b = tex2D(_BlueInput, IN.uv).rrrr; //float a = tex2D(_AlphaInput, IN.uv).rrrr; return float4(r, g, b, 1); } ENDCG } } }
jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/Editor/SWS_ShaderMapRenderer.shader/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/Editor/SWS_ShaderMapRenderer.shader", "repo_id": "jynew", "token_count": 416 }
825
fileFormatVersion: 2 guid: 9de5ca44ba99f6b45af77d082a56bef9 timeCreated: 1524326022 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {fileID: 2800000, guid: 1747b2b24c6409145b0fa8b767a67d7e, type: 3} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/StylizedWaterBlur.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/StylizedWaterBlur.cs.meta", "repo_id": "jynew", "token_count": 132 }
826
// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "StylizedWater/Mobile" { Properties { [HideInInspector] __dirty( "", Int ) = 1 _WaterColor("Water Color", Color) = (0.1176471,0.6348885,1,0) _WaterShallowColor("WaterShallowColor", Color) = (0.4191176,0.7596349,1,0) _Wavetint("Wave tint", Range( -1 , 1)) = 0 _RimColor("Rim Color", Color) = (1,1,1,0.5019608) _NormalStrength("NormalStrength", Range( 0 , 1)) = 0.25 _Transparency("Transparency", Range( 0 , 1)) = 0.75 _Glossiness("Glossiness", Range( 0 , 1)) = 0.85 _Worldspacetiling("Worldspace tiling", Float) = 1 _NormalTiling("NormalTiling", Range( 0 , 1)) = 0.9 _EdgeFade("EdgeFade", Range( 0.01 , 3)) = 0.2448298 _RimSize("Rim Size", Range( 0 , 20)) = 5 _Rimfalloff("Rim falloff", Range( 0.1 , 50)) = 3 _Rimtiling("Rim tiling", Float) = 0.5 _FoamOpacity("FoamOpacity", Range( -1 , 1)) = 0.05 _FoamSpeed("FoamSpeed", Range( 0 , 1)) = 0.1 _FoamSize("FoamSize", Float) = 0 _FoamTiling("FoamTiling", Float) = 0.05 _Depth("Depth", Range( 0 , 100)) = 30 _Wavesspeed("Waves speed", Range( 0 , 10)) = 0.75 _WaveHeight("Wave Height", Range( 0 , 1)) = 0.05 _WaveFoam("Wave Foam", Range( 0 , 10)) = 0 _WaveSize("Wave Size", Range( 0 , 10)) = 0.1 _WaveDirection("WaveDirection", Vector) = (1,0,0,0) [Toggle]_USE_VC_INTERSECTION("USE_VC_INTERSECTION", Float) = 0 [Toggle]_UseIntersectionFoam("UseIntersectionFoam", Int) = 0 [Toggle]_ENABLE_VC("ENABLE_VC", Float) = 0 [Toggle]_LIGHTING("LIGHTING", Int) = 0 [NoScaleOffset][Normal]_Normals("Normals", 2D) = "bump" {} [Toggle]_Unlit("Unlit", Float) = 0 [NoScaleOffset]_Shadermap("Shadermap", 2D) = "black" {} [Toggle]_NORMAL_MAP("NORMAL_MAP", Int) = 0 } SubShader { Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "ForceNoShadowCasting" = "True" "IsEmissive" = "true" } LOD 200 Cull Back CGPROGRAM #include "UnityPBSLighting.cginc" #include "UnityCG.cginc" #include "UnityShaderVariables.cginc" #pragma target 3.0 #pragma shader_feature _USEINTERSECTIONFOAM_ON #pragma multi_compile __ _NORMAL_MAP_ON #pragma multi_compile __ _LIGHTING_ON #pragma fragmentoption ARB_precision_hint_fastest #pragma exclude_renderers xbox360 psp2 n3ds wiiu #pragma surface surf StandardCustomLighting alpha:fade keepalpha noshadow nolightmap nodynlightmap nodirlightmap nometa noforwardadd vertex:vertexDataFunc struct Input { float3 worldNormal; INTERNAL_DATA float4 screenPos; float2 data713; float2 texcoord_0; float2 data714; float4 vertexColor : COLOR; float3 worldPos; float3 worldRefl; float3 data746; float2 texcoord_1; }; struct SurfaceOutputCustomLightingCustom { fixed3 Albedo; fixed3 Normal; half3 Emission; half Metallic; half Smoothness; half Occlusion; fixed Alpha; Input SurfInput; UnityGIInput GIData; }; uniform half4 _WaterShallowColor; uniform half4 _WaterColor; uniform sampler2D_float _CameraDepthTexture; uniform float _Depth; uniform sampler2D _Shadermap; uniform float _Worldspacetiling; uniform float _WaveSize; uniform float _Wavesspeed; uniform float4 _WaveDirection; uniform fixed _Wavetint; uniform float4 _RimColor; uniform float _USE_VC_INTERSECTION; uniform float _ENABLE_VC; uniform half _Rimfalloff; uniform float _Rimtiling; uniform half _RimSize; uniform fixed _FoamOpacity; uniform float _FoamTiling; uniform float _FoamSpeed; uniform half _FoamSize; uniform float _WaveFoam; uniform sampler2D _Normals; uniform float _NormalTiling; uniform fixed _NormalStrength; uniform fixed _Glossiness; uniform float _Unlit; uniform fixed _Transparency; uniform half _EdgeFade; uniform fixed _WaveHeight; void vertexDataFunc( inout appdata_full v, out Input o ) { UNITY_INITIALIZE_OUTPUT( Input, o ); o.texcoord_0.xy = v.texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float3 ase_worldPos = mul( unity_ObjectToWorld, v.vertex ); o.data713 = lerp(( -20.0 * o.texcoord_0 ),( (ase_worldPos).xz * float2( 0.1,0.1 ) ),_Worldspacetiling); float2 appendResult500 = (float2(_WaveDirection.x , _WaveDirection.z)); o.data714 = ( ( _Wavesspeed * _Time.x ) * appendResult500 ); o.data746 = _LightColor0.rgb; float3 ase_vertexNormal = v.normal.xyz; o.texcoord_1.xy = v.texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float2 Tiling21 = lerp(( -20.0 * o.texcoord_1 ),( (ase_worldPos).xz * float2( 0.1,0.1 ) ),_Worldspacetiling); float2 WaveSpeed40 = ( ( _Wavesspeed * _Time.x ) * appendResult500 ); float2 HeightmapUV581 = ( ( ( Tiling21 * _WaveSize ) * float2( 0.1,0.1 ) ) + ( WaveSpeed40 * float2( 0.5,0.5 ) ) ); float4 tex2DNode94 = tex2Dlod( _Shadermap, float4( HeightmapUV581, 0.0 , 0.0 ) ); float temp_output_95_0 = ( _WaveHeight * tex2DNode94.g ); float3 Displacement100 = ( ase_vertexNormal * temp_output_95_0 ); v.vertex.xyz += Displacement100; } inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi ) { UnityGIInput data = s.GIData; Input i = s.SurfInput; half4 c = 0; SurfaceOutputStandard s733 = (SurfaceOutputStandard ) 0; float4 ase_screenPos = float4( i.screenPos.xyz , i.screenPos.w + 0.00000000001 ); float4 ase_screenPosNorm = ase_screenPos / ase_screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; //Stylized Water custom depth float screenDepth643 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture,UNITY_PROJ_COORD(ase_screenPos)))); float distanceDepth643 = abs( ( screenDepth643 - LinearEyeDepth( ase_screenPosNorm.z ) ) / ( lerp( 1.0 , ( 1.0 / _ProjectionParams.z ) , unity_OrthoParams.w) ) ); float DepthTexture494 = distanceDepth643; float Depth479 = saturate( ( DepthTexture494 / _Depth ) ); float3 lerpResult478 = lerp( (_WaterShallowColor).rgb , (_WaterColor).rgb , Depth479); float3 WaterColor350 = lerpResult478; float2 Tiling21 = i.data713; float2 WaveSpeed40 = i.data714; float2 HeightmapUV581 = ( ( ( Tiling21 * _WaveSize ) * float2( 0.1,0.1 ) ) + ( WaveSpeed40 * float2( 0.5,0.5 ) ) ); float4 tex2DNode94 = tex2D( _Shadermap, HeightmapUV581 ); float Heightmap99 = tex2DNode94.g; float3 temp_cast_0 = (( Heightmap99 * _Wavetint )).xxx; float3 RimColor102 = (_RimColor).rgb; float4 VertexColors729 = lerp(float4( 0.0,0,0,0 ),i.vertexColor,_ENABLE_VC); float2 temp_output_24_0 = ( Tiling21 * _Rimtiling ); float temp_output_30_0 = ( tex2D( _Shadermap, ( ( 0.5 * temp_output_24_0 ) + WaveSpeed40 ) ).b * tex2D( _Shadermap, ( temp_output_24_0 + ( 1.0 - WaveSpeed40 ) ) ).b ); float Intersection42 = saturate( ( _RimColor.a * ( 1.0 - ( ( ( lerp(DepthTexture494,( 1.0 - (VertexColors729).r ),_USE_VC_INTERSECTION) / _Rimfalloff ) * temp_output_30_0 ) + ( lerp(DepthTexture494,( 1.0 - (VertexColors729).r ),_USE_VC_INTERSECTION) / _RimSize ) ) ) ) ); float3 lerpResult61 = lerp( ( WaterColor350 - temp_cast_0 ) , ( RimColor102 * 3.0 ) , Intersection42); float2 temp_output_634_0 = ( WaveSpeed40 * _FoamSpeed ); float4 tex2DNode67 = tex2D( _Shadermap, ( ( _FoamTiling * Tiling21 ) + temp_output_634_0 + ( Heightmap99 * 0.1 ) ) ); #ifdef _USEINTERSECTIONFOAM_ON float staticSwitch725 = ( 1.0 - tex2DNode67.b ); #else float staticSwitch725 = saturate( ( 1000.0 * ( ( tex2D( _Shadermap, ( ( _FoamTiling * ( Tiling21 * float2( 0.5,0.5 ) ) ) + temp_output_634_0 ) ).r - tex2DNode67.r ) - _FoamSize ) ) ); #endif float Foam73 = ( _FoamOpacity * staticSwitch725 ); float3 temp_cast_1 = (2.0).xxx; float FoamTex244 = staticSwitch725; float WaveFoam221 = saturate( ( pow( ( tex2DNode94.g * _WaveFoam ) , 2.0 ) * FoamTex244 ) ); float3 lerpResult223 = lerp( ( lerpResult61 + Foam73 ) , temp_cast_1 , WaveFoam221); float3 FinalColor114 = lerpResult223; s733.Albedo = FinalColor114; fixed3 _BlankNormal = fixed3(0,0,1); float2 temp_output_705_0 = ( _NormalTiling * Tiling21 ); #ifdef _NORMAL_MAP_ON float2 staticSwitch760 = ( ( float2( 0.25,0.25 ) * temp_output_705_0 ) + WaveSpeed40 ); #else float2 staticSwitch760 = float2( 0.0,0 ); #endif #ifdef _NORMAL_MAP_ON float2 staticSwitch761 = ( temp_output_705_0 + ( 1.0 - WaveSpeed40 ) ); #else float2 staticSwitch761 = float2( 0.0,0 ); #endif #ifdef _NORMAL_MAP_ON float3 staticSwitch763 = ( ( UnpackNormal( tex2D( _Normals, staticSwitch760 ) ) + UnpackNormal( tex2D( _Normals, staticSwitch761 ) ) ) / float3( 2,2,2 ) ); #else float3 staticSwitch763 = _BlankNormal; #endif float3 lerpResult621 = lerp( _BlankNormal , staticSwitch763 , _NormalStrength); float3 NormalMap52 = lerpResult621; s733.Normal = WorldNormalVector( i, NormalMap52); s733.Emission = float3( 0,0,0 ); s733.Metallic = 0.0; float GlossParam754 = _Glossiness; s733.Smoothness = GlossParam754; s733.Occlusion = 1.0; gi.light.ndotl = LambertTerm( s733.Normal, gi.light.dir ); data.light = gi.light; UnityGI gi733 = gi; #ifdef UNITY_PASS_FORWARDBASE Unity_GlossyEnvironmentData g733; g733.roughness = 1 - s733.Smoothness; g733.reflUVW = reflect( -data.worldViewDir, s733.Normal ); gi733 = UnityGlobalIllumination( data, s733.Occlusion, s733.Normal, g733 ); #endif float3 surfResult733 = LightingStandard ( s733, viewDir, gi733 ).rgb; surfResult733 += s733.Emission; float3 ase_worldPos = i.worldPos; float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) ); float dotResult741 = dot( ase_worldlightDir , WorldReflectionVector( i , NormalMap52 ) ); #ifdef _LIGHTING_ON float3 staticSwitch769 = float3( 0.0,0,0 ); #else float3 staticSwitch769 = ( pow( max( 0.0 , dotResult741 ) , ( GlossParam754 * 64.0 ) ) + lerp(( i.data746 * FinalColor114 ),FinalColor114,_Unlit) ); #endif float3 CustomLighting753 = staticSwitch769; #ifdef _LIGHTING_ON float3 staticSwitch734 = surfResult733; #else float3 staticSwitch734 = CustomLighting753; #endif float Opacity121 = saturate( ( ( DepthTexture494 / _EdgeFade ) * ( Intersection42 + saturate( ( Depth479 + _WaterShallowColor.a ) ) ) ) ); c.rgb = staticSwitch734; c.a = ( ( _Transparency * Opacity121 ) - (VertexColors729).g ); return c; } inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi ) { s.GIData = data; } void surf( Input i , inout SurfaceOutputCustomLightingCustom o ) { o.SurfInput = i; o.Normal = float3(0,0,1); } ENDCG } } /*ASEBEGIN Version=13108 1927;29;1906;1004;5782.065;2066.579;4.055762;True;False Node;AmplifyShaderEditor.CommentaryNode;347;-5301.821,-2139.555;Float;False;1499.929;585.7002;Comment;9;21;713;15;703;13;12;17;14;16;UV;1,1,1,1;0;0 Node;AmplifyShaderEditor.WorldPosInputsNode;16;-5223.622,-1759.556;Float;False;0;4;FLOAT3;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;14;-5214.021,-2089.556;Float;False;Constant;_Float0;Float 0;4;0;-20;0;0;0;1;FLOAT Node;AmplifyShaderEditor.SwizzleNode;17;-4998.623,-1765.556;Float;False;FLOAT2;0;2;2;2;1;0;FLOAT3;0,0,0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.TextureCoordinatesNode;12;-5251.821,-1963.256;Float;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.CommentaryNode;348;-5266.808,-1271.853;Float;False;1410.655;586.9989;Comment;8;40;337;39;500;38;35;320;714;Speed/direction;1,1,1,1;0;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-4959.623,-1992.955;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;703;-4807.515,-1705.867;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.1,0.1;False;1;FLOAT2 Node;AmplifyShaderEditor.Vector4Node;320;-5140.667,-905.3926;Float;False;Property;_WaveDirection;WaveDirection;22;0;1,0,0,0;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.TimeNode;38;-5156.112,-1095.253;Float;False;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;35;-5216.808,-1221.853;Float;False;Property;_Wavesspeed;Waves speed;18;0;0.75;0;10;0;1;FLOAT Node;AmplifyShaderEditor.ToggleSwitchNode;15;-4610.623,-1842.556;Float;False;Property;_Worldspacetiling;Worldspace tiling;7;0;1;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;39;-4869.8,-1148.653;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.DynamicAppendNode;500;-4905.578,-869.3902;Float;False;FLOAT2;4;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;3;FLOAT;0.0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;337;-4663.672,-1020.493;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;629;-4041.018,2886.475;Float;False;1369.069;675.6616;Comment;8;581;344;92;88;90;301;87;302;Heightmap UV;1,1,1,1;0;0 Node;AmplifyShaderEditor.VertexToFragmentNode;713;-4287.368,-1833.505;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.GetLocalVarNode;87;-3884.539,2936.475;Float;False;21;0;1;FLOAT2 Node;AmplifyShaderEditor.RangedFloatNode;302;-3991.018,3053.557;Float;False;Property;_WaveSize;Wave Size;21;0;0.1;0;10;0;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;21;-4051.474,-1840.346;Float;False;Tiling;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.VertexToFragmentNode;714;-4435.124,-1031.767;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.RegisterLocalVarNode;40;-4175.821,-1024.427;Float;False;WaveSpeed;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.GetLocalVarNode;90;-3633.135,3269.07;Float;False;40;0;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;301;-3619.018,2987.557;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;88;-3379.885,3068.508;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.1,0.1;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;92;-3377.135,3292.07;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;630;-4266.805,41.43127;Float;False;1022.648;667.8272;Comment;9;22;23;24;355;354;41;356;648;649;Intersection UV;1,1,1,1;0;0 Node;AmplifyShaderEditor.SimpleAddOpNode;344;-3149.219,3179.451;Float;False;2;2;0;FLOAT2;0.0,0;False;1;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.RangedFloatNode;23;-4163.003,367.1515;Float;False;Property;_Rimtiling;Rim tiling;12;0;0.5;0;0;0;1;FLOAT Node;AmplifyShaderEditor.CommentaryNode;407;-2542.945,2823.105;Float;False;1786.026;846.3284;Comment;16;218;100;98;95;97;221;96;230;231;229;232;219;220;99;94;652;Heightmap;1,1,1,1;0;0 Node;AmplifyShaderEditor.VertexColorNode;723;1808.2,-1169.643;Float;False;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;22;-4189.418,265.4469;Float;False;21;0;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;638;-4682.635,1006.549;Float;False;1529.241;677.0369;Comment;12;637;636;64;634;65;604;632;63;633;628;676;677;SF UV;1,1,1,1;0;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;581;-2994.683,3182.493;Float;False;HeightmapUV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;349;-3035.07,-106.9404;Float;False;2778.636;874.3949;Comment;24;42;10;102;426;425;420;497;496;3;5;495;444;222;233;30;29;28;686;709;710;712;732;731;767;Intersection;1,1,1,1;0;0 Node;AmplifyShaderEditor.SamplerNode;94;-2468.452,3199.244;Float;True;Property;_TextureSample6;Texture Sample 6;30;0;None;True;0;False;white;Auto;False;Instance;27;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;41;-3984.751,510.3699;Float;False;40;0;1;FLOAT2 Node;AmplifyShaderEditor.RangedFloatNode;355;-3957.068,164.5515;Float;False;Constant;_Float13;Float 13;34;0;0.5;0;0;0;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;24;-3937.519,289.1349;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.ToggleSwitchNode;726;2042.612,-1200.198;Float;False;Property;_ENABLE_VC;ENABLE_VC;27;1;[Toggle];0;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR Node;AmplifyShaderEditor.GetLocalVarNode;628;-4633.827,1214.088;Float;False;21;0;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;504;-3030.266,-1050.05;Float;False;1001.34;484.8032;Comment;7;494;643;479;642;646;104;647;Depth;1,1,1,1;0;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;729;2354.973,-1172.303;Float;False;VertexColors;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR Node;AmplifyShaderEditor.RangedFloatNode;63;-4337.898,1065.557;Float;False;Property;_FoamTiling;FoamTiling;16;0;0.05;0;0;0;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;99;-1934.15,3240.64;Float;False;Heightmap;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;731;-2991.032,81.64807;Float;False;729;0;1;COLOR Node;AmplifyShaderEditor.SimpleMultiplyOpNode;604;-4228.341,1181.917;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;1;FLOAT2 Node;AmplifyShaderEditor.OneMinusNode;649;-3675.09,515.2559;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.RangedFloatNode;633;-4103.035,1443.05;Float;False;Property;_FoamSpeed;FoamSpeed;14;0;0.1;0;1;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;632;-4045.489,1354.466;Float;False;40;0;1;FLOAT2 Node;AmplifyShaderEditor.GetLocalVarNode;676;-4038.467,1535.054;Float;False;99;0;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;354;-3670.949,251.0045;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2 Node;AmplifyShaderEditor.SWS_Depth;643;-2642.008,-715.7141;Float;False;0;1;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;648;-3438.396,309.2903;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;677;-3741.903,1541.684;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.1;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-3755.193,1130.693;Float;False;2;2;0;FLOAT;0,0;False;1;FLOAT2;0;False;1;FLOAT2 Node;AmplifyShaderEditor.SwizzleNode;732;-2756.032,80.64807;Float;False;FLOAT;0;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;634;-3756.968,1370.898;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleAddOpNode;356;-3443.304,466.8142;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;381;-3964.163,1959.834;Float;False;966.723;492.0804;Comment;8;47;659;342;46;341;339;705;18;Normals UV;1,1,1,1;0;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;65;-3751.245,1242.404;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;311;-3042.07,1036.015;Float;False;2790.748;696.8248;Comment;13;73;624;244;71;721;673;720;670;69;66;67;722;725;Surface highlights;1,1,1,1;0;0 Node;AmplifyShaderEditor.SamplerNode;29;-2921.188,498.8604;Float;True;Property;_TextureSample1;Texture Sample 1;30;0;None;True;0;False;white;Auto;False;Instance;27;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;637;-3439.664,1376.837;Float;False;3;3;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;2;FLOAT;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleAddOpNode;636;-3447.636,1134.132;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SamplerNode;28;-2923.574,303.1307;Float;True;Property;_TextureSample0;Texture Sample 0;30;0;None;True;0;False;white;Auto;False;Instance;27;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;494;-2325.962,-728.4429;Float;False;DepthTexture;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.OneMinusNode;712;-2596.796,86.3121;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;18;-3930.826,2023.59;Float;False;Property;_NormalTiling;NormalTiling;8;0;0.9;0;1;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;46;-3919.359,2134.635;Float;False;21;0;1;FLOAT2 Node;AmplifyShaderEditor.GetLocalVarNode;495;-2833.993,-44.65842;Float;False;494;0;1;FLOAT Node;AmplifyShaderEditor.SamplerNode;66;-2897.47,1109.127;Float;True;Property;_TextureSample4;Texture Sample 4;30;0;None;True;0;False;white;Auto;False;Instance;27;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;30;-2480.348,451.9202;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;5;-2333.595,101.7485;Half;False;Property;_Rimfalloff;Rim falloff;11;0;3;0.1;50;0;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;705;-3544.359,2132.163;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2 Node;AmplifyShaderEditor.GetLocalVarNode;47;-3930.563,2316.432;Float;False;40;0;1;FLOAT2 Node;AmplifyShaderEditor.SamplerNode;67;-2910.186,1325.706;Float;True;Property;_TextureSample5;Texture Sample 5;30;0;None;True;0;False;white;Auto;False;Instance;27;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.ToggleSwitchNode;710;-2401.259,-43.75025;Float;False;Property;_USE_VC_INTERSECTION;USE_VC_INTERSECTION;25;1;[Toggle];0;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;647;-2935.302,-939.4899;Float;False;494;0;1;FLOAT Node;AmplifyShaderEditor.SimpleSubtractOpNode;670;-2475.899,1133.251;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleDivideOpNode;496;-1931.477,76.0475;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.WireNode;709;-1801.515,319.9915;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;3;-2338.022,229.7638;Half;False;Property;_RimSize;Rim Size;10;0;5;0;20;0;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;69;-2428.874,1251.174;Half;False;Property;_FoamSize;FoamSize;15;0;0;0;0;0;1;FLOAT Node;AmplifyShaderEditor.OneMinusNode;659;-3495.744,2325.258;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;342;-3346.247,2027.306;Float;False;2;2;0;FLOAT2;0.25,0.25;False;1;FLOAT2;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.RangedFloatNode;104;-2985.575,-825.7819;Float;False;Property;_Depth;Depth;17;0;30;0;100;0;1;FLOAT Node;AmplifyShaderEditor.SimpleSubtractOpNode;720;-2171.777,1140.326;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleDivideOpNode;646;-2667.876,-898.7989;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.CommentaryNode;503;-3059.798,-1737.311;Float;False;939.0676;526.2443;Comment;7;350;478;477;482;60;765;766;Color;1,1,1,1;0;0 Node;AmplifyShaderEditor.SimpleDivideOpNode;497;-1923.585,198.9694;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;341;-3170.445,2110.015;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleAddOpNode;339;-3176.647,2251.115;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;420;-1688.83,85.64011;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SaturateNode;642;-2494.417,-898.4079;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;425;-1474.603,154.4005;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.ColorNode;477;-3009.798,-1687.31;Half;False;Property;_WaterShallowColor;WaterShallowColor;1;0;0.4191176,0.7596349,1,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;721;-1963.777,1116.389;Float;False;2;2;0;FLOAT;1000.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.StaticSwitch;760;-2883.452,2038.439;Float;False;Property;_NORMAL_MAP;NORMAL_MAP;28;0;1;False;True;;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.CommentaryNode;502;-2522.438,1980.171;Float;False;1882.752;558.178;Comment;9;52;621;128;622;661;660;50;45;763;Small Wave Normals;1,1,1,1;0;0 Node;AmplifyShaderEditor.ColorNode;60;-2998.926,-1491.732;Half;False;Property;_WaterColor;Water Color;0;0;0.1176471,0.6348885,1,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.StaticSwitch;761;-2913.921,2233.657;Float;False;Property;_NORMAL_MAP;NORMAL_MAP;28;0;1;False;True;;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2 Node;AmplifyShaderEditor.OneMinusNode;673;-2429.768,1384.268;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;220;-2340.323,3450.925;Float;False;Property;_WaveFoam;Wave Foam;20;0;0;0;10;0;1;FLOAT Node;AmplifyShaderEditor.OneMinusNode;426;-1174.303,160.3223;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SwizzleNode;765;-2776.609,-1673.693;Float;False;FLOAT3;0;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SaturateNode;722;-1764.92,1139.873;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;479;-2302.576,-901.9539;Float;False;Depth;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.CommentaryNode;352;-3067.381,4011.095;Float;False;2891.381;468.422;Comment;16;114;223;315;224;625;79;61;475;141;62;476;103;111;351;112;110;Master lerp;1,1,1,1;0;0 Node;AmplifyShaderEditor.SamplerNode;50;-2472.438,2257.07;Float;True;Property;_TextureSample3;Texture Sample 3;29;0;None;True;0;False;white;Auto;True;Instance;43;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.SwizzleNode;766;-2751.609,-1528.693;Float;False;FLOAT3;0;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;482;-2974.599,-1316.611;Float;False;479;0;1;FLOAT Node;AmplifyShaderEditor.SamplerNode;45;-2469.642,2030.171;Float;True;Property;_TextureSample2;Texture Sample 2;29;0;None;True;0;False;white;Auto;True;Instance;43;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.ColorNode;10;-1177.727,-39.95768;Float;False;Property;_RimColor;Rim Color;3;0;1,1,1,0.5019608;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.LerpOp;478;-2544.895,-1559.009;Float;False;3;0;FLOAT3;0.0,0,0,0;False;1;FLOAT3;0,0,0,0;False;2;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;110;-2992.428,4167.476;Float;False;99;0;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;232;-1983.623,3559.724;Fixed;False;Constant;_Float7;Float 7;25;0;2;0;0;0;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;112;-3017.381,4318.741;Fixed;False;Property;_Wavetint;Wave tint;2;0;0;-1;1;0;1;FLOAT Node;AmplifyShaderEditor.SwizzleNode;767;-844.6658,-30.29321;Float;False;FLOAT3;0;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;444;-874.3505,111.0203;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;660;-2075.106,2186.271;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;219;-1985.122,3368.425;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.StaticSwitch;725;-1505.115,1302.903;Float;False;Property;_UseIntersectionFoam;UseIntersectionFoam;26;0;0;False;True;;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;103;-2343.248,4199.134;Float;False;102;0;1;FLOAT3 Node;AmplifyShaderEditor.RangedFloatNode;71;-1334.413,1109.331;Fixed;False;Property;_FoamOpacity;FoamOpacity;13;0;0.05;-1;1;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;351;-2662.558,4061.095;Float;False;350;0;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;102;-516.3961,-52.14754;Float;False;RimColor;-1;True;1;0;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;350;-2341.23,-1551.045;Float;False;WaterColor;-1;True;1;0;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;229;-1768.523,3546.525;Float;False;244;0;1;FLOAT Node;AmplifyShaderEditor.PowerNode;231;-1778.023,3372.025;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;111;-2627.316,4156.233;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SaturateNode;686;-683.2039,105.8938;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.Vector3Node;622;-1807.969,2028.126;Fixed;False;Constant;_BlankNormal;BlankNormal;36;0;0,0,1;0;4;FLOAT3;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;244;-980.6179,1365.102;Float;False;FoamTex;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;476;-2342.437,4297.366;Fixed;False;Constant;_Float2;Float 2;34;0;3;0;0;0;1;FLOAT Node;AmplifyShaderEditor.SimpleDivideOpNode;661;-1896.977,2185.114;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;2,2,2;False;1;FLOAT3 Node;AmplifyShaderEditor.RangedFloatNode;128;-1795.855,2332.987;Fixed;False;Property;_NormalStrength;NormalStrength;4;0;0.25;0;1;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;62;-2130.268,4348.27;Float;False;42;0;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;42;-504.6126,92.63463;Float;False;Intersection;-1;True;1;0;FLOAT;0,0,0,0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;230;-1449.523,3376.724;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.StaticSwitch;763;-1554.723,2176.267;Float;False;Property;_NORMAL_MAP;NORMAL_MAP;30;0;1;False;True;;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;475;-2095.437,4208.366;Float;False;2;2;0;FLOAT3;0,0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;624;-958.9775,1155.225;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleSubtractOpNode;141;-2386.586,4073.144;Float;False;2;0;FLOAT3;0,0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.LerpOp;621;-1211.594,2132.534;Float;False;3;0;FLOAT3;0.0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;79;-1771.724,4351.879;Float;False;73;0;1;FLOAT Node;AmplifyShaderEditor.LerpOp;61;-1727.146,4076.186;Float;False;3;0;FLOAT3;0,0,0,0;False;1;FLOAT3;1,1,1,0;False;2;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.CommentaryNode;380;-3073.8,-2416.792;Float;False;2197.571;521.1841;Comment;11;121;657;134;119;687;498;489;480;2;694;695;Opacity;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;764;-3072.667,4644.836;Float;False;1862.706;736.2534;Comment;17;739;753;769;751;768;748;749;745;744;741;755;747;746;738;740;742;758;Lighting;1,1,1,1;0;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;73;-735.7233,1163.7;Float;False;Foam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SaturateNode;652;-1253.644,3383.992;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;758;-3005.049,4801.563;Float;False;52;0;1;FLOAT3 Node;AmplifyShaderEditor.SimpleAddOpNode;625;-1453.824,4079.357;Float;False;2;2;0;FLOAT3;0,0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;224;-1341.485,4376.117;Float;False;221;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;480;-2993.971,-2042.603;Float;False;479;0;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;52;-907.3911,2119.4;Float;False;NormalMap;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;221;-1029.021,3376.225;Float;False;WaveFoam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;315;-1297.257,4235.156;Fixed;False;Constant;_Float9;Float 9;32;0;2;0;0;0;1;FLOAT Node;AmplifyShaderEditor.LerpOp;223;-971.7388,4078.296;Float;False;3;0;FLOAT3;0,0,0,0;False;1;FLOAT3;0.0,0,0,0;False;2;FLOAT;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;738;-3022.667,4694.836;Float;False;1;0;FLOAT;0.0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleAddOpNode;694;-2680.013,-2002.087;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.WorldReflectionVector;740;-2763.121,4805.972;Float;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.LightColorNode;742;-2993.092,5172.526;Float;False;0;3;COLOR;FLOAT3;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;56;1110.652,-247.9698;Fixed;False;Property;_Glossiness;Glossiness;6;0;0.85;0;1;0;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;2;-2985.028,-2246.265;Half;False;Property;_EdgeFade;EdgeFade;9;0;0.2448298;0.01;3;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;119;-2494.39,-2239.521;Float;False;42;0;1;FLOAT Node;AmplifyShaderEditor.VertexToFragmentNode;746;-2780.771,5184.248;Float;False;1;0;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;114;-771.7118,4072.191;Float;False;FinalColor;-1;True;1;0;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;747;-2774.481,5288.084;Float;False;114;0;1;FLOAT3 Node;AmplifyShaderEditor.DotProductOpNode;741;-2492.403,4744.969;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;754;1418.436,-246.6733;Float;False;GlossParam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;755;-2554.393,4974.859;Float;False;754;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;489;-2941.714,-2358.903;Float;False;494;0;1;FLOAT Node;AmplifyShaderEditor.SaturateNode;695;-2526.013,-2013.087;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;134;-2174.178,-2183.131;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleDivideOpNode;498;-2640.725,-2337.706;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;749;-2518.679,5208.56;Float;False;2;2;0;FLOAT3;0.0,0,0,0;False;1;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;744;-2307.534,4978.774;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;64.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMaxOp;745;-2333.309,4722.092;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;687;-1928.494,-2299.849;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.ToggleSwitchNode;768;-2199.795,5193.049;Float;False;Property;_Unlit;Unlit;29;1;[Toggle];0;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.PowerNode;748;-2064.552,4977.665;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;512.0;False;1;FLOAT Node;AmplifyShaderEditor.SaturateNode;657;-1620.808,-2304.757;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;96;-2143.252,2949.544;Fixed;False;Property;_WaveHeight;Wave Height;19;0;0.05;0;1;0;1;FLOAT Node;AmplifyShaderEditor.SimpleAddOpNode;751;-1836.979,5103.686;Float;False;2;2;0;FLOAT;0,0,0,0;False;1;FLOAT3;0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;639;1511.193,43.50829;Float;False;121;0;1;FLOAT Node;AmplifyShaderEditor.RangedFloatNode;117;1524.936,-54.92926;Fixed;False;Property;_Transparency;Transparency;5;0;0.75;0;1;0;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;53;1430.341,-340.943;Float;False;52;0;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;95;-1808.653,3074.04;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;730;1478.936,146.8509;Float;False;729;0;1;COLOR Node;AmplifyShaderEditor.StaticSwitch;769;-1676.233,5082.75;Float;False;Property;_LIGHTING;LIGHTING;30;0;1;False;True;;2;0;FLOAT3;0.0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;121;-1453.981,-2309.958;Float;False;Opacity;-1;True;1;0;FLOAT;0,0,0,0;False;1;FLOAT Node;AmplifyShaderEditor.NormalVertexDataNode;97;-1805.996,2891.624;Float;False;0;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;756;1436.547,-425.2564;Float;False;114;0;1;FLOAT3 Node;AmplifyShaderEditor.CustomStandardSurface;733;1795.785,-370.4509;Float;False;False;6;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,1;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;5;FLOAT;1.0;False;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;753;-1503.72,5083.599;Float;False;CustomLighting;-1;True;1;0;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.GetLocalVarNode;115;1801.9,-156.475;Float;False;753;0;1;FLOAT3 Node;AmplifyShaderEditor.SwizzleNode;728;1734.936,135.8509;Float;False;FLOAT;1;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT Node;AmplifyShaderEditor.SimpleMultiplyOpNode;98;-1490.751,2940.04;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;702;1847.942,-26.74405;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.GetLocalVarNode;101;2035.883,198.4911;Float;False;100;0;1;FLOAT3 Node;AmplifyShaderEditor.SamplerNode;43;2233.069,-970.2504;Float;True;Property;_Normals;Normals;23;2;[NoScaleOffset];[Normal];None;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.VertexToFragmentNode;739;-2749.297,4694.884;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.RegisterLocalVarNode;100;-1057.476,2932.911;Float;False;Displacement;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.OneMinusNode;233;-2231.797,587.783;Float;False;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.StaticSwitch;734;2161.471,-251.5607;Float;False;Property;_LIGHTING;LIGHTING;28;0;1;False;True;;2;0;FLOAT3;0,0,0,0;False;1;FLOAT3;0,0,0,0;False;1;FLOAT3 Node;AmplifyShaderEditor.SimpleSubtractOpNode;724;2044.316,47.10138;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.SamplerNode;27;1820.076,-971.6935;Float;True;Property;_Shadermap;Shadermap;24;1;[NoScaleOffset];None;True;0;False;black;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;222;-1968.1,563.5;Float;False;IntersectionTex;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.RegisterLocalVarNode;218;-1561.298,3137.152;Float;False;WaveHeight;-1;True;1;0;FLOAT;0.0;False;1;FLOAT Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;2385.9,-238;Float;False;True;2;Float;;200;0;CustomLighting;StylizedWater/Mobile;False;False;False;False;False;False;True;True;True;False;True;True;False;False;True;True;False;Back;0;0;False;0;0;Transparent;0.5;True;False;0;False;Transparent;Transparent;All;True;True;True;True;True;True;True;False;True;True;False;False;False;True;True;True;True;False;0;255;255;0;0;0;0;False;0;4;10;25;False;0.5;False;0;Zero;Zero;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;False;Relative;200;;-1;-1;-1;-1;0;0;1;fragmentoption ARB_precision_hint_fastest;14;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;OBJECT;0.0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0 WireConnection;17;0;16;0 WireConnection;13;0;14;0 WireConnection;13;1;12;0 WireConnection;703;0;17;0 WireConnection;15;0;13;0 WireConnection;15;1;703;0 WireConnection;39;0;35;0 WireConnection;39;1;38;1 WireConnection;500;0;320;1 WireConnection;500;1;320;3 WireConnection;337;0;39;0 WireConnection;337;1;500;0 WireConnection;713;0;15;0 WireConnection;21;0;713;0 WireConnection;714;0;337;0 WireConnection;40;0;714;0 WireConnection;301;0;87;0 WireConnection;301;1;302;0 WireConnection;88;0;301;0 WireConnection;92;0;90;0 WireConnection;344;0;88;0 WireConnection;344;1;92;0 WireConnection;581;0;344;0 WireConnection;94;1;581;0 WireConnection;24;0;22;0 WireConnection;24;1;23;0 WireConnection;726;1;723;0 WireConnection;729;0;726;0 WireConnection;99;0;94;2 WireConnection;604;0;628;0 WireConnection;649;0;41;0 WireConnection;354;0;355;0 WireConnection;354;1;24;0 WireConnection;648;0;354;0 WireConnection;648;1;41;0 WireConnection;677;0;676;0 WireConnection;64;0;63;0 WireConnection;64;1;604;0 WireConnection;732;0;731;0 WireConnection;634;0;632;0 WireConnection;634;1;633;0 WireConnection;356;0;24;0 WireConnection;356;1;649;0 WireConnection;65;0;63;0 WireConnection;65;1;628;0 WireConnection;29;1;356;0 WireConnection;637;0;65;0 WireConnection;637;1;634;0 WireConnection;637;2;677;0 WireConnection;636;0;64;0 WireConnection;636;1;634;0 WireConnection;28;1;648;0 WireConnection;494;0;643;0 WireConnection;712;0;732;0 WireConnection;66;1;636;0 WireConnection;30;0;28;3 WireConnection;30;1;29;3 WireConnection;705;0;18;0 WireConnection;705;1;46;0 WireConnection;67;1;637;0 WireConnection;710;0;495;0 WireConnection;710;1;712;0 WireConnection;670;0;66;1 WireConnection;670;1;67;1 WireConnection;496;0;710;0 WireConnection;496;1;5;0 WireConnection;709;0;30;0 WireConnection;659;0;47;0 WireConnection;342;1;705;0 WireConnection;720;0;670;0 WireConnection;720;1;69;0 WireConnection;646;0;647;0 WireConnection;646;1;104;0 WireConnection;497;0;710;0 WireConnection;497;1;3;0 WireConnection;341;0;342;0 WireConnection;341;1;47;0 WireConnection;339;0;705;0 WireConnection;339;1;659;0 WireConnection;420;0;496;0 WireConnection;420;1;709;0 WireConnection;642;0;646;0 WireConnection;425;0;420;0 WireConnection;425;1;497;0 WireConnection;721;1;720;0 WireConnection;760;0;341;0 WireConnection;761;0;339;0 WireConnection;673;0;67;3 WireConnection;426;0;425;0 WireConnection;765;0;477;0 WireConnection;722;0;721;0 WireConnection;479;0;642;0 WireConnection;50;1;761;0 WireConnection;766;0;60;0 WireConnection;45;1;760;0 WireConnection;478;0;765;0 WireConnection;478;1;766;0 WireConnection;478;2;482;0 WireConnection;767;0;10;0 WireConnection;444;0;10;4 WireConnection;444;1;426;0 WireConnection;660;0;45;0 WireConnection;660;1;50;0 WireConnection;219;0;94;2 WireConnection;219;1;220;0 WireConnection;725;0;673;0 WireConnection;725;1;722;0 WireConnection;102;0;767;0 WireConnection;350;0;478;0 WireConnection;231;0;219;0 WireConnection;231;1;232;0 WireConnection;111;0;110;0 WireConnection;111;1;112;0 WireConnection;686;0;444;0 WireConnection;244;0;725;0 WireConnection;661;0;660;0 WireConnection;42;0;686;0 WireConnection;230;0;231;0 WireConnection;230;1;229;0 WireConnection;763;0;661;0 WireConnection;763;1;622;0 WireConnection;475;0;103;0 WireConnection;475;1;476;0 WireConnection;624;0;71;0 WireConnection;624;1;725;0 WireConnection;141;0;351;0 WireConnection;141;1;111;0 WireConnection;621;0;622;0 WireConnection;621;1;763;0 WireConnection;621;2;128;0 WireConnection;61;0;141;0 WireConnection;61;1;475;0 WireConnection;61;2;62;0 WireConnection;73;0;624;0 WireConnection;652;0;230;0 WireConnection;625;0;61;0 WireConnection;625;1;79;0 WireConnection;52;0;621;0 WireConnection;221;0;652;0 WireConnection;223;0;625;0 WireConnection;223;1;315;0 WireConnection;223;2;224;0 WireConnection;694;0;480;0 WireConnection;694;1;477;4 WireConnection;740;0;758;0 WireConnection;746;0;742;1 WireConnection;114;0;223;0 WireConnection;741;0;738;0 WireConnection;741;1;740;0 WireConnection;754;0;56;0 WireConnection;695;0;694;0 WireConnection;134;0;119;0 WireConnection;134;1;695;0 WireConnection;498;0;489;0 WireConnection;498;1;2;0 WireConnection;749;0;746;0 WireConnection;749;1;747;0 WireConnection;744;0;755;0 WireConnection;745;1;741;0 WireConnection;687;0;498;0 WireConnection;687;1;134;0 WireConnection;768;0;749;0 WireConnection;768;1;747;0 WireConnection;748;0;745;0 WireConnection;748;1;744;0 WireConnection;657;0;687;0 WireConnection;751;0;748;0 WireConnection;751;1;768;0 WireConnection;95;0;96;0 WireConnection;95;1;94;2 WireConnection;769;1;751;0 WireConnection;121;0;657;0 WireConnection;733;0;756;0 WireConnection;733;1;53;0 WireConnection;733;4;754;0 WireConnection;753;0;769;0 WireConnection;728;0;730;0 WireConnection;98;0;97;0 WireConnection;98;1;95;0 WireConnection;702;0;117;0 WireConnection;702;1;639;0 WireConnection;739;0;738;0 WireConnection;100;0;98;0 WireConnection;233;0;30;0 WireConnection;734;0;733;0 WireConnection;734;1;115;0 WireConnection;724;0;702;0 WireConnection;724;1;728;0 WireConnection;222;0;233;0 WireConnection;218;0;95;0 WireConnection;0;2;734;0 WireConnection;0;9;724;0 WireConnection;0;11;101;0 ASEEND*/ //CHKSM=63FE132E2B215A9DEFA10BAD3311A4C152952CC4
jynew/jyx2/Assets/3DScene/StylizedWater/Shaders/StylizedWater_Mobile.shader/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Shaders/StylizedWater_Mobile.shader", "repo_id": "jynew", "token_count": 21778 }
827
fileFormatVersion: 2 guid: 84c9a71fcaf76474aa9fa439905109e6 timeCreated: 1526206393 licenseType: Store NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Materials/SWS_DemoSand.mat.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Materials/SWS_DemoSand.mat.meta", "repo_id": "jynew", "token_count": 71 }
828
fileFormatVersion: 2 guid: a3c55ca54eaa70347a90bfea1b2396bf folderAsset: yes timeCreated: 1520180831 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Prefabs.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Prefabs.meta", "repo_id": "jynew", "token_count": 76 }
829
fileFormatVersion: 2 guid: 3ef6fdd02ee48e943bffa1cdaee8fd90 timeCreated: 1526026538 licenseType: Store NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Prefabs/SWS_DemoRock_Small_B.prefab.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Prefabs/SWS_DemoRock_Small_B.prefab.meta", "repo_id": "jynew", "token_count": 73 }
830
fileFormatVersion: 2 guid: 876b0bab914d95a4f8ea27fb31fc60f0 PrefabImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/TileWorldCreator/10_Shandong.prefab.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/10_Shandong.prefab.meta", "repo_id": "jynew", "token_count": 68 }
831
fileFormatVersion: 2 guid: d80d85584be82d543a677143193853d0 PrefabImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/TileWorldCreator/66_Shandong.prefab.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/66_Shandong.prefab.meta", "repo_id": "jynew", "token_count": 64 }
832
fileFormatVersion: 2 guid: dca0befe2c7998f49a3394435397e1c2 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab.meta", "repo_id": "jynew", "token_count": 70 }
833
fileFormatVersion: 2 guid: fabdb8e28ed13c8478f5399be2767073 PrefabImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_02/xxx2.prefab.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_02/xxx2.prefab.meta", "repo_id": "jynew", "token_count": 63 }
834
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1 &3736105251289409344 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 3736105251289447264} - component: {fileID: 3736105251290250048} - component: {fileID: 3736105251291347328} - component: {fileID: 3736105251279918208} m_Layer: 0 m_Name: xxx5 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!4 &3736105251289447264 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3736105251289409344} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &3736105251290250048 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3736105251289409344} m_Mesh: {fileID: 4300000, guid: f3db39242bdc3e84686e26a600e4a75b, type: 3} --- !u!23 &3736105251291347328 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3736105251289409344} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: 5fb7c560bafcd264b8fc12c3564d5301, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 1 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!95 &3736105251279918208 Animator: serializedVersion: 3 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3736105251289409344} m_Enabled: 1 m_Avatar: {fileID: 9000000, guid: f3db39242bdc3e84686e26a600e4a75b, type: 3} m_Controller: {fileID: 0} m_CullingMode: 0 m_UpdateMode: 0 m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorControllerStateOnDisable: 0
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_03/xxx5.prefab/0
{ "file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_03/xxx5.prefab", "repo_id": "jynew", "token_count": 1324 }
835
fileFormatVersion: 2 guid: d86e81c6723dd2040b194e65b14ff42f NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/_materials/xxy2.mat.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/_materials/xxy2.mat.meta", "repo_id": "jynew", "token_count": 58 }
836
fileFormatVersion: 2 guid: f4bc6c6f15cbf474ab89e08f91902993 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3DScene/Volumetric Light/Source/LB_MaoCao 1.mat.meta/0
{ "file_path": "jynew/jyx2/Assets/3DScene/Volumetric Light/Source/LB_MaoCao 1.mat.meta", "repo_id": "jynew", "token_count": 74 }
837
fileFormatVersion: 2 guid: a2ba8588f45692f4ea2fa5afa9faf434 folderAsset: yes timeCreated: 1481126944 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Actions.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Actions.meta", "repo_id": "jynew", "token_count": 76 }
838
fileFormatVersion: 2 guid: 52f451731ec183e43ab18f0896f7172a folderAsset: yes timeCreated: 1481126944 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Graphs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Graphs.meta", "repo_id": "jynew", "token_count": 75 }
839
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEditor; using UnityEngine; namespace AmplifyShaderEditor { public class ConfirmationWindow { public delegate ShaderLoadResult OnConfirmationSelected( bool value, Shader shader, Material material ); public event OnConfirmationSelected OnConfirmationSelectedEvt; private const string m_yesStr = "Yes"; private const string m_noStr = "No"; private bool m_isActive = false; private string m_currentMessage; private GUIStyle m_areaStyle; private GUIContent m_content; private GUIStyle m_buttonStyle; private GUIStyle m_labelStyle; private Shader m_shader; private Material m_material; private Rect m_area; private bool m_autoDeactivate = true; public ConfirmationWindow( float x, float y, float width, float height ) { m_content = new GUIContent( GUIContent.none ); m_area = new Rect( x, y, width, height ); } public void Destroy() { m_shader = null; OnConfirmationSelectedEvt = null; } public void ActivateConfirmation( Shader shader, Material material, string message, OnConfirmationSelected evt, bool autoDeactivate = true ) { OnConfirmationSelectedEvt = evt; m_currentMessage = message; m_shader = shader; m_material = material; m_autoDeactivate = autoDeactivate; m_isActive = true; } public void OnGUI() { if ( m_areaStyle == null ) { m_areaStyle = new GUIStyle( UIUtils.TextArea ); m_areaStyle.stretchHeight = true; m_areaStyle.stretchWidth = true; m_areaStyle.fontSize = ( int ) Constants.DefaultTitleFontSize; } if ( m_buttonStyle == null ) { m_buttonStyle = UIUtils.Button; } if ( m_labelStyle == null ) { m_labelStyle = new GUIStyle( UIUtils.Label ); m_labelStyle.alignment = TextAnchor.MiddleCenter; m_labelStyle.wordWrap = true; } m_area.x = ( int ) ( 0.5f * UIUtils.CurrentWindow.CameraInfo.width ); m_area.y = ( int ) ( 0.5f * UIUtils.CurrentWindow.CameraInfo.height ); GUILayout.BeginArea( m_area, m_content, m_areaStyle ); { EditorGUILayout.BeginVertical(); { EditorGUILayout.Separator(); EditorGUILayout.LabelField( m_currentMessage, m_labelStyle ); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); { if ( GUILayout.Button( m_yesStr, m_buttonStyle ) ) { if ( OnConfirmationSelectedEvt != null ) OnConfirmationSelectedEvt( true, m_shader, m_material ); if ( m_autoDeactivate ) Deactivate(); } if ( GUILayout.Button( m_noStr, m_buttonStyle ) ) { if ( OnConfirmationSelectedEvt != null ) OnConfirmationSelectedEvt( false, m_shader, m_material ); if ( m_autoDeactivate ) Deactivate(); } } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndVertical(); } GUILayout.EndArea(); } public void Deactivate() { m_isActive = false; OnConfirmationSelectedEvt = null; } public bool IsActive { get { return m_isActive; } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/ConfirmationWindow.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/ConfirmationWindow.cs", "repo_id": "jynew", "token_count": 1284 }
840
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using UnityEditor; namespace AmplifyShaderEditor { public enum MenuAnchor { TOP_LEFT = 0, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, NONE } public enum MenuAutoSize { MATCH_VERTICAL = 0, MATCH_HORIZONTAL, NONE } public class MenuParent { protected AmplifyShaderEditorWindow m_parentWindow = null; protected const float MinimizeButtonXSpacing = 5; protected const float MinimizeButtonYSpacing = 5.5f; protected const float ResizeAreaWidth = 5; protected const float MinimizeCollisionAdjust = 5; protected GUIStyle m_style; protected GUIContent m_content; protected Rect m_maximizedArea; protected Rect m_transformedArea; protected Rect m_resizeArea; protected MenuAnchor m_anchor; protected MenuAutoSize m_autoSize; protected bool m_isActive = true; protected bool m_isMaximized = true; protected bool m_lockOnMinimize = false; protected bool m_preLockState = false; protected Rect m_minimizedArea; protected Rect m_minimizeButtonPos; protected float m_realWidth; protected GUIStyle m_empty = new GUIStyle(); protected float m_resizeDelta; protected bool m_isResizing = false; protected bool m_resizable = false; protected GUIStyle m_resizeAreaStyle; protected bool m_isMouseInside = false; protected Vector2 m_currentScrollPos; public MenuParent( AmplifyShaderEditorWindow parentWindow, float x, float y, float width, float height, string name, MenuAnchor anchor = MenuAnchor.NONE, MenuAutoSize autoSize = MenuAutoSize.NONE ) { m_parentWindow = parentWindow; m_anchor = anchor; m_autoSize = autoSize; m_maximizedArea = new Rect( x, y, width, height ); m_content = new GUIContent( GUIContent.none ); m_content.text = name; m_transformedArea = new Rect(); m_resizeArea = new Rect(); m_resizeArea.width = ResizeAreaWidth; m_resizeAreaStyle = GUIStyle.none; m_currentScrollPos = Vector2.zero; } public void SetMinimizedArea( float x, float y, float width, float height ) { m_minimizedArea = new Rect( x, y, width, height ); } protected void InitDraw( Rect parentPosition, Vector2 mousePosition, int mouseButtonId ) { if ( m_style == null ) { m_style = new GUIStyle( UIUtils.TextArea ); m_style.stretchHeight = true; m_style.stretchWidth = true; m_style.fontSize = ( int ) Constants.DefaultTitleFontSize; m_style.fontStyle = FontStyle.Normal; Texture minimizeTex = UIUtils.GetCustomStyle( CustomStyle.MaximizeButton ).normal.background; m_minimizeButtonPos = new Rect( 0, 0, minimizeTex.width, minimizeTex.height ); } Rect currentArea = m_isMaximized ? m_maximizedArea : m_minimizedArea; if ( m_isMaximized ) { if ( m_resizable ) { if ( m_isResizing ) { if ( m_anchor == MenuAnchor.TOP_LEFT ) m_resizeDelta = ( ParentWindow.CurrentEvent.mousePosition.x - m_maximizedArea.width ); else if ( m_anchor == MenuAnchor.TOP_RIGHT ) m_resizeDelta = ParentWindow.CurrentEvent.mousePosition.x - ( parentPosition.width - m_maximizedArea.width); } } m_realWidth = m_maximizedArea.width; if ( m_resizable ) { if ( m_anchor == MenuAnchor.TOP_LEFT ) { currentArea.width += m_resizeDelta; m_realWidth += m_resizeDelta; } else if ( m_anchor == MenuAnchor.TOP_RIGHT ) { currentArea.width -= m_resizeDelta; m_realWidth -= m_resizeDelta; } } } else { if ( currentArea.x < 0 ) { m_realWidth = currentArea.width + currentArea.x; } else if ( ( currentArea.x + currentArea.width ) > parentPosition.width ) { m_realWidth = parentPosition.width - currentArea.x; } if ( m_realWidth < 0 ) m_realWidth = 0; } switch ( m_anchor ) { case MenuAnchor.TOP_LEFT: { m_transformedArea.x = currentArea.x; m_transformedArea.y = currentArea.y; if ( m_isMaximized ) { m_minimizeButtonPos.x = m_transformedArea.x + m_transformedArea.width - m_minimizeButtonPos.width - MinimizeButtonXSpacing; m_minimizeButtonPos.y = m_transformedArea.y + MinimizeButtonYSpacing; m_resizeArea.x = m_transformedArea.x + m_transformedArea.width; m_resizeArea.y = m_minimizeButtonPos.y; m_resizeArea.height = m_transformedArea.height; } else { float width = ( m_transformedArea.width - m_transformedArea.x ); m_minimizeButtonPos.x = m_transformedArea.x + width * 0.5f - m_minimizeButtonPos.width * 0.5f; m_minimizeButtonPos.y = m_transformedArea.height * 0.5f - m_minimizeButtonPos.height * 0.5f; } } break; case MenuAnchor.TOP_CENTER: { m_transformedArea.x = parentPosition.width * 0.5f + currentArea.x; m_transformedArea.y = currentArea.y; } break; case MenuAnchor.TOP_RIGHT: { m_transformedArea.x = parentPosition.width - currentArea.x - currentArea.width; m_transformedArea.y = currentArea.y; if ( m_isMaximized ) { m_minimizeButtonPos.x = m_transformedArea.x + MinimizeButtonXSpacing; m_minimizeButtonPos.y = m_transformedArea.y + MinimizeButtonYSpacing; m_resizeArea.x = m_transformedArea.x - ResizeAreaWidth; m_resizeArea.y = m_minimizeButtonPos.y; m_resizeArea.height = m_transformedArea.height; } else { float width = ( parentPosition.width - m_transformedArea.x ); m_minimizeButtonPos.x = m_transformedArea.x + width * 0.5f - m_minimizeButtonPos.width * 0.5f; m_minimizeButtonPos.y = m_transformedArea.height * 0.5f - m_minimizeButtonPos.height * 0.5f; } } break; case MenuAnchor.MIDDLE_LEFT: { m_transformedArea.x = currentArea.x; m_transformedArea.y = parentPosition.height * 0.5f + currentArea.y; } break; case MenuAnchor.MIDDLE_CENTER: { m_transformedArea.x = parentPosition.width * 0.5f + currentArea.x; m_transformedArea.y = parentPosition.height * 0.5f + currentArea.y; } break; case MenuAnchor.MIDDLE_RIGHT: { m_transformedArea.x = parentPosition.width - currentArea.x - currentArea.width; m_transformedArea.y = parentPosition.height * 0.5f + currentArea.y; } break; case MenuAnchor.BOTTOM_LEFT: { m_transformedArea.x = currentArea.x; m_transformedArea.y = parentPosition.height - currentArea.y - currentArea.height; } break; case MenuAnchor.BOTTOM_CENTER: { m_transformedArea.x = parentPosition.width * 0.5f + currentArea.x; m_transformedArea.y = parentPosition.height - currentArea.y - currentArea.height; } break; case MenuAnchor.BOTTOM_RIGHT: { m_transformedArea.x = parentPosition.width - currentArea.x - currentArea.width; m_transformedArea.y = parentPosition.height - currentArea.y - currentArea.height; } break; case MenuAnchor.NONE: { m_transformedArea.x = currentArea.x; m_transformedArea.y = currentArea.y; } break; } switch ( m_autoSize ) { case MenuAutoSize.MATCH_HORIZONTAL: { m_transformedArea.width = parentPosition.width - m_transformedArea.x; m_transformedArea.height = currentArea.height; } break; case MenuAutoSize.MATCH_VERTICAL: { m_transformedArea.width = currentArea.width; m_transformedArea.height = parentPosition.height - m_transformedArea.y; } break; case MenuAutoSize.NONE: { m_transformedArea.width = currentArea.width; m_transformedArea.height = currentArea.height; } break; } } public virtual void Draw( Rect parentPosition, Vector2 mousePosition, int mouseButtonId, bool hasKeyboadFocus ) { InitDraw( parentPosition, mousePosition, mouseButtonId ); if ( ParentWindow.CurrentEvent.type == EventType.MouseDrag && ParentWindow.CurrentEvent.button > 0 /*catches both middle and right mouse button*/ ) { m_isMouseInside = IsInside( mousePosition ); if ( m_isMouseInside ) { m_currentScrollPos.x += Constants.MenuDragSpeed * ParentWindow.CurrentEvent.delta.x; if ( m_currentScrollPos.x < 0 ) m_currentScrollPos.x = 0; m_currentScrollPos.y += Constants.MenuDragSpeed * ParentWindow.CurrentEvent.delta.y; if ( m_currentScrollPos.y < 0 ) m_currentScrollPos.y = 0; } } } public void PostDraw() { if ( !m_isMaximized ) { m_transformedArea.height = 35; GUI.Label( m_transformedArea, m_content, m_style ); } Color colorBuffer = GUI.color; GUI.color = EditorGUIUtility.isProSkin ? Color.white : Color.black; bool guiEnabledBuffer = GUI.enabled; GUI.enabled = !m_lockOnMinimize; Rect buttonArea = m_minimizeButtonPos; buttonArea.x -= MinimizeCollisionAdjust; buttonArea.width += 2 * MinimizeCollisionAdjust; buttonArea.y -= MinimizeCollisionAdjust; buttonArea.height += 2 * MinimizeCollisionAdjust; if ( m_parentWindow.CameraDrawInfo.CurrentEventType == EventType.Repaint ) GUI.Label( m_minimizeButtonPos, string.Empty, UIUtils.GetCustomStyle( m_isMaximized ? CustomStyle.MinimizeButton : CustomStyle.MaximizeButton ) ); if( m_parentWindow.CameraDrawInfo.CurrentEventType == EventType.MouseDown && buttonArea.Contains( m_parentWindow.CameraDrawInfo.MousePosition ) ) //if ( GUI.Button( buttonArea, string.Empty, m_empty ) ) { m_isMaximized = !m_isMaximized; m_resizeDelta = 0; } if ( m_resizable && m_isMaximized ) { EditorGUIUtility.AddCursorRect( m_resizeArea, MouseCursor.ResizeHorizontal ); if ( !m_isResizing && GUI.RepeatButton( m_resizeArea, string.Empty, m_resizeAreaStyle ) ) { m_isResizing = true; } else { if ( m_isResizing ) { if ( ParentWindow.CurrentEvent.isMouse && ParentWindow.CurrentEvent.type != EventType.MouseDrag ) { m_isResizing = false; } } } if ( m_realWidth < buttonArea.width ) { // Auto-minimize m_isMaximized = false; m_resizeDelta = 0; m_isResizing = false; } else { float halfSizeWindow = 0.5f * ParentWindow.position.width; if ( m_realWidth > halfSizeWindow ) { m_realWidth = 0.5f * ParentWindow.position.width; if ( m_resizeDelta > 0 ) { m_resizeDelta = m_realWidth - m_maximizedArea.width; } else { m_resizeDelta = m_maximizedArea.width - m_realWidth; } } } } GUI.enabled = guiEnabledBuffer; GUI.color = colorBuffer; } public void OnLostFocus() { if ( m_isResizing ) { m_isResizing = false; } } virtual public void Destroy() { m_empty = null; m_resizeAreaStyle = null; } public float InitialX { get { return m_maximizedArea.x; } set { m_maximizedArea.x = value; } } public float Width { get { return m_maximizedArea.width; } set { m_maximizedArea.width = value; } } public float RealWidth { get { return m_realWidth; } } public float Height { get { return m_maximizedArea.height; } set { m_maximizedArea.height = value; } } public Rect Size { get { return m_maximizedArea; } } public virtual bool IsInside( Vector2 position ) { if ( !m_isActive ) return false; return m_transformedArea.Contains( position ); } public bool IsMaximized { get { return m_isMaximized; } set { m_isMaximized = value; } } public Rect TransformedArea { get { return m_transformedArea; } } public bool Resizable { set { m_resizable = value; } } public bool IsResizing { get { return m_isResizing; } } public bool LockOnMinimize { set { if ( m_lockOnMinimize == value ) return; m_lockOnMinimize = value; if ( value ) { m_preLockState = m_isMaximized; m_isMaximized = false; } else { m_isMaximized = m_preLockState; } } } public bool IsActive { get { return m_isActive; } } public AmplifyShaderEditorWindow ParentWindow { get { return m_parentWindow; } set { m_parentWindow = value; } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/MenuParent.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/MenuParent.cs", "repo_id": "jynew", "token_count": 5300 }
841
fileFormatVersion: 2 guid: 20dad8f4196f0e643a9c56d1202e74dc timeCreated: 1481126954 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/PortLegendInfo.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/PortLegendInfo.cs.meta", "repo_id": "jynew", "token_count": 102 }
842
fileFormatVersion: 2 guid: 08d94054f82fc06498060596f83da0ba folderAsset: yes timeCreated: 1481126943 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Native.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Native.meta", "repo_id": "jynew", "token_count": 74 }
843
fileFormatVersion: 2 guid: ab3a976b3cb79ad41986d2f7d4439642 timeCreated: 1481126958 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector2.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector2.cs.meta", "repo_id": "jynew", "token_count": 102 }
844
fileFormatVersion: 2 guid: 86df2da3da3b1eb4493b968b47030b17 timeCreated: 1481126957 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/IntNode.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/IntNode.cs.meta", "repo_id": "jynew", "token_count": 101 }
845
fileFormatVersion: 2 guid: 266391c3c4308014e9ce246e5484b917 timeCreated: 1481126954 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/ConstantShaderVariable.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/ConstantShaderVariable.cs.meta", "repo_id": "jynew", "token_count": 100 }
846
fileFormatVersion: 2 guid: 2ce97203c4871664493f8760d88d0d4d folderAsset: yes timeCreated: 1481126946 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform.meta", "repo_id": "jynew", "token_count": 76 }
847
fileFormatVersion: 2 guid: 008fd07cf3f9a7140a9e23be43733f7c timeCreated: 1481126953 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform/ProjectionMatrixNode.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform/ProjectionMatrixNode.cs.meta", "repo_id": "jynew", "token_count": 103 }
848
fileFormatVersion: 2 guid: b598d9ebc2d7be44a97270732f55f9bc timeCreated: 1484747592 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform/WorldToTangentMatrix.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform/WorldToTangentMatrix.cs.meta", "repo_id": "jynew", "token_count": 102 }
849
// Amplify Shader Editor - Visual Shader vEditing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using UnityEditor; using System; namespace AmplifyShaderEditor { [Serializable] [NodeAttributes( "Static Switch", "Logical Operators", "Creates a shader keyword toggle", Available = true )] public sealed class StaticSwitch : PropertyNode { [SerializeField] private int m_defaultValue = 0; [SerializeField] private int m_materialValue = 0; [SerializeField] private int m_multiCompile = 0; [SerializeField] private int m_currentKeywordId = 0; [SerializeField] private string m_currentKeyword = string.Empty; [SerializeField] private bool m_createToggle = true; private GUIContent m_checkContent; private GUIContent m_popContent; private int m_conditionId = -1; private const int MinComboSize = 50; private const int MaxComboSize = 105; private Rect m_varRect; private Rect m_imgRect; private bool m_editing; enum KeywordModeType { Toggle = 0, ToggleOff, KeywordEnum, } [SerializeField] private KeywordModeType m_keywordModeType = KeywordModeType.Toggle; private const string StaticSwitchStr = "Static Switch"; private const string MaterialToggleStr = "Material Toggle"; private const string ToggleMaterialValueStr = "Material Value"; private const string ToggleDefaultValueStr = "Default Value"; private const string AmountStr = "Amount"; private const string KeywordStr = "Keyword"; private const string CustomStr = "Custom"; private const string ToggleTypeStr = "Toggle Type"; private const string TypeStr = "Type"; private const string ModeStr = "Mode"; private const string KeywordTypeStr = "Keyword Type"; private const string KeywordNameStr = "Keyword Name"; public readonly static string[] KeywordTypeList = { "Shader Feature", "Multi Compile"/*, "Define Symbol"*/ }; public readonly static int[] KeywordTypeInt = { 0, 1/*, 2*/ }; [SerializeField] private string[] m_defaultKeywordNames = { "Key0", "Key1", "Key2", "Key3", "Key4", "Key5", "Key6", "Key7", "Key8" }; [SerializeField] private string[] m_keywordEnumList = { "Key0", "Key1" }; int m_keywordEnumAmount = 2; protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); AddOutputPort( WirePortDataType.FLOAT, Constants.EmptyPortValue ); AddInputPort( WirePortDataType.FLOAT, false, "False", -1, MasterNodePortCategory.Fragment, 1 ); AddInputPort( WirePortDataType.FLOAT, false, "True", -1, MasterNodePortCategory.Fragment, 0 ); for( int i = 2; i < 9; i++ ) { AddInputPort( WirePortDataType.FLOAT, false, m_defaultKeywordNames[ i ] ); m_inputPorts[ i ].Visible = false; } m_headerColor = new Color( 0.0f, 0.55f, 0.45f, 1f ); m_customPrefix = KeywordStr+" "; m_autoWrapProperties = false; m_freeType = false; m_useVarSubtitle = true; m_allowPropertyDuplicates = true; m_showTitleWhenNotEditing = false; m_currentParameterType = PropertyType.Property; m_checkContent = new GUIContent(); m_checkContent.image = UIUtils.CheckmarkIcon; m_popContent = new GUIContent(); m_popContent.image = UIUtils.PopupIcon; m_previewShaderGUID = "0b708c11c68e6a9478ac97fe3643eab1"; m_showAutoRegisterUI = true; } public override void SetPreviewInputs() { base.SetPreviewInputs(); if( m_conditionId == -1 ) m_conditionId = Shader.PropertyToID( "_Condition" ); if( m_createToggle ) PreviewMaterial.SetInt( m_conditionId, m_materialValue ); else PreviewMaterial.SetInt( m_conditionId, m_defaultValue ); } protected override void OnUniqueIDAssigned() { base.OnUniqueIDAssigned(); if( m_createToggle ) UIUtils.RegisterPropertyNode( this ); else UIUtils.UnregisterPropertyNode( this ); } public override void Destroy() { base.Destroy(); UIUtils.UnregisterPropertyNode( this ); } public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true ) { base.OnInputPortConnected( portId, otherNodeId, otherPortId, activateNode ); UpdateConnections(); } public override void OnConnectedOutputNodeChanges( int inputPortId, int otherNodeId, int otherPortId, string name, WirePortDataType type ) { base.OnConnectedOutputNodeChanges( inputPortId, otherNodeId, otherPortId, name, type ); UpdateConnections(); } public override void OnInputPortDisconnected( int portId ) { base.OnInputPortDisconnected( portId ); UpdateConnections(); } private void UpdateConnections() { WirePortDataType mainType = WirePortDataType.FLOAT; int highest = UIUtils.GetPriority( mainType ); for( int i = 0; i < m_inputPorts.Count; i++ ) { if( m_inputPorts[ i ].IsConnected ) { WirePortDataType portType = m_inputPorts[ i ].GetOutputConnection().DataType; if( UIUtils.GetPriority( portType ) > highest ) { mainType = portType; highest = UIUtils.GetPriority( portType ); } } } for( int i = 0; i < m_inputPorts.Count; i++ ) { m_inputPorts[ i ].ChangeType( mainType, false ); } m_outputPorts[ 0 ].ChangeType( mainType, false ); } public override string GetPropertyValue() { if( m_createToggle ) if( m_keywordModeType == KeywordModeType.KeywordEnum && m_keywordEnumAmount > 0 ) return PropertyAttributes + "[" + m_keywordModeType.ToString() + "(" + GetKeywordEnumPropertyList() + ")] " + m_propertyName + "(\"" + m_propertyInspectorName + "\", Float) = " + m_defaultValue; else return PropertyAttributes + "[" + m_keywordModeType.ToString() + "(" + GetPropertyValStr() + ")] " + m_propertyName + "(\"" + m_propertyInspectorName + "\", Float) = " + m_defaultValue; else return string.Empty; } public string KeywordEnumList(int index) { if( m_variableMode == VariableMode.Fetch ) return m_keywordEnumList[index]; else return m_keywordEnumList[index].ToUpper(); } public override string PropertyName { get { if( m_variableMode == VariableMode.Fetch ) return m_currentKeyword; else return base.PropertyName.ToUpper(); } } public override string GetPropertyValStr() { if( m_keywordModeType == KeywordModeType.KeywordEnum ) return PropertyName; else if( m_variableMode == VariableMode.Fetch ) return m_currentKeyword; else return PropertyName + ( m_createToggle ? OnOffStr : "_ON" ); } private string GetKeywordEnumPropertyList() { string result = string.Empty; for( int i = 0; i < m_keywordEnumList.Length; i++ ) { if( i == 0 ) result = m_keywordEnumList[ i ]; else result += "," + m_keywordEnumList[ i ]; } return result; } private string GetKeywordEnumPragmaList() { string result = string.Empty; for( int i = 0; i < m_keywordEnumList.Length; i++ ) { if( i == 0 ) result = PropertyName + "_" + KeywordEnumList(i); else result += " " + PropertyName + "_" + KeywordEnumList( i ); } return result; } public override string GetUniformValue() { return string.Empty; } public override bool GetUniformData( out string dataType, out string dataName ) { dataType = string.Empty; dataName = string.Empty; return false; } public override void DrawProperties() { //base.DrawProperties(); NodeUtils.DrawPropertyGroup( ref m_propertiesFoldout, Constants.ParameterLabelStr, PropertyGroup ); NodeUtils.DrawPropertyGroup( ref m_visibleCustomAttrFoldout, CustomAttrStr, DrawCustomAttributes, DrawCustomAttrAddRemoveButtons ); CheckPropertyFromInspector(); } void DrawEnumList() { EditorGUI.BeginChangeCheck(); m_keywordEnumAmount = EditorGUILayoutIntSlider( AmountStr, m_keywordEnumAmount, 2, 9 ); if( EditorGUI.EndChangeCheck() ) { CurrentSelectedInput = Mathf.Clamp( CurrentSelectedInput, 0, m_keywordEnumAmount - 1 ); UpdateLabels(); } EditorGUI.indentLevel++; for( int i = 0; i < m_keywordEnumList.Length; i++ ) { EditorGUI.BeginChangeCheck(); m_keywordEnumList[ i ] = EditorGUILayoutTextField( "Item " + i, m_keywordEnumList[ i ] ); if( EditorGUI.EndChangeCheck() ) { m_keywordEnumList[ i ] = UIUtils.RemoveInvalidEnumCharacters( m_keywordEnumList[ i ] ); m_keywordEnumList[ i ] = m_keywordEnumList[ i ].Replace( " ", "" ); // sad face :( does not support spaces m_inputPorts[ i ].Name = m_keywordEnumList[ i ]; m_defaultKeywordNames[ i ] = m_inputPorts[ i ].Name; } } EditorGUI.indentLevel--; } public void UpdateLabels() { int maxinputs = m_keywordModeType == KeywordModeType.KeywordEnum ? m_keywordEnumAmount : 2; m_keywordEnumAmount = Mathf.Clamp( m_keywordEnumAmount, 0, maxinputs ); m_keywordEnumList = new string[ maxinputs ]; for( int i = 0; i < maxinputs; i++ ) { m_keywordEnumList[ i ] = m_defaultKeywordNames[ i ]; m_inputPorts[ i ].Name = m_keywordEnumList[ i ]; } if( m_keywordModeType != KeywordModeType.KeywordEnum ) { m_inputPorts[ 0 ].Name = "False"; m_inputPorts[ 1 ].Name = "True"; } for( int i = 0; i < m_inputPorts.Count; i++ ) { m_inputPorts[ i ].Visible = ( i < maxinputs ); } m_sizeIsDirty = true; } void PropertyGroup() { EditorGUI.BeginChangeCheck(); m_keywordModeType = (KeywordModeType)EditorGUILayoutEnumPopup( TypeStr, m_keywordModeType ); if( EditorGUI.EndChangeCheck() ) { UpdateLabels(); } m_variableMode = (VariableMode)EditorGUILayoutEnumPopup( ModeStr, m_variableMode ); if( m_variableMode == VariableMode.Create ) { EditorGUI.BeginChangeCheck(); m_multiCompile = EditorGUILayoutIntPopup( KeywordTypeStr, m_multiCompile, KeywordTypeList, KeywordTypeInt ); if( EditorGUI.EndChangeCheck() ) { BeginPropertyFromInspectorCheck(); } } if( m_keywordModeType != KeywordModeType.KeywordEnum ) { if( m_variableMode == VariableMode.Create ) { ShowPropertyInspectorNameGUI(); ShowPropertyNameGUI( true ); bool guiEnabledBuffer = GUI.enabled; GUI.enabled = false; EditorGUILayout.TextField( KeywordNameStr, GetPropertyValStr() ); GUI.enabled = guiEnabledBuffer; } else { ShowPropertyInspectorNameGUI(); EditorGUI.BeginChangeCheck(); m_currentKeywordId = EditorGUILayoutPopup( KeywordStr, m_currentKeywordId, UIUtils.AvailableKeywords ); if( EditorGUI.EndChangeCheck() ) { if( m_currentKeywordId != 0 ) { m_currentKeyword = UIUtils.AvailableKeywords[ m_currentKeywordId ]; } } if( m_currentKeywordId == 0 ) { EditorGUI.BeginChangeCheck(); m_currentKeyword = EditorGUILayoutTextField( CustomStr, m_currentKeyword ); if( EditorGUI.EndChangeCheck() ) { m_currentKeyword = UIUtils.RemoveInvalidCharacters( m_currentKeyword ); } } } } else { ShowPropertyInspectorNameGUI(); ShowPropertyNameGUI( true ); DrawEnumList(); } ShowAutoRegister(); EditorGUI.BeginChangeCheck(); m_createToggle = EditorGUILayoutToggle( MaterialToggleStr, m_createToggle ); if( EditorGUI.EndChangeCheck() ) { if( m_createToggle ) UIUtils.RegisterPropertyNode( this ); else UIUtils.UnregisterPropertyNode( this ); } if( m_createToggle ) { EditorGUILayout.BeginHorizontal(); GUILayout.Space( 20 ); m_propertyTab = GUILayout.Toolbar( m_propertyTab, LabelToolbarTitle ); EditorGUILayout.EndHorizontal(); switch( m_propertyTab ) { default: case 0: { EditorGUI.BeginChangeCheck(); if( m_keywordModeType != KeywordModeType.KeywordEnum ) m_materialValue = EditorGUILayoutToggle( ToggleMaterialValueStr, m_materialValue == 1 ) ? 1 : 0; else m_materialValue = EditorGUILayoutPopup( ToggleMaterialValueStr, m_materialValue, m_keywordEnumList ); if( EditorGUI.EndChangeCheck() ) m_requireMaterialUpdate = true; } break; case 1: { if( m_keywordModeType != KeywordModeType.KeywordEnum ) m_defaultValue = EditorGUILayoutToggle( ToggleDefaultValueStr, m_defaultValue == 1 ) ? 1 : 0; else m_defaultValue = EditorGUILayoutPopup( ToggleDefaultValueStr, m_materialValue, m_keywordEnumList ); } break; } } //EditorGUILayout.HelpBox( "Keyword Type:\n" + // "The difference is that unused variants of \"Shader Feature\" shaders will not be included into game build while \"Multi Compile\" variants are included regardless of their usage.\n\n" + // "So \"Shader Feature\" makes most sense for keywords that will be set on the materials, while \"Multi Compile\" for keywords that will be set from code globally.\n\n" + // "You can set keywords using the material property using the \"Property Name\" or you can set the keyword directly using the \"Keyword Name\".", MessageType.None ); } public override void OnNodeLayout( DrawInfo drawInfo ) { float finalSize = 0; if( m_keywordModeType == KeywordModeType.KeywordEnum ) { GUIContent dropdown = new GUIContent( m_inputPorts[ CurrentSelectedInput ].Name ); int cacheSize = UIUtils.GraphDropDown.fontSize; UIUtils.GraphDropDown.fontSize = 10; Vector2 calcSize = UIUtils.GraphDropDown.CalcSize( dropdown ); UIUtils.GraphDropDown.fontSize = cacheSize; finalSize = Mathf.Clamp( calcSize.x, MinComboSize, MaxComboSize ); if( m_insideSize.x != finalSize ) { m_insideSize.Set( finalSize, 25 ); m_sizeIsDirty = true; } } base.OnNodeLayout( drawInfo ); if( m_keywordModeType != KeywordModeType.KeywordEnum ) { m_varRect = m_remainingBox; m_varRect.size = Vector2.one * 22 * drawInfo.InvertedZoom; m_varRect.center = m_remainingBox.center; if( m_showPreview ) m_varRect.y = m_remainingBox.y; } else { m_varRect = m_remainingBox; m_varRect.width = finalSize * drawInfo.InvertedZoom; m_varRect.height = 16 * drawInfo.InvertedZoom; m_varRect.x = m_remainingBox.xMax - m_varRect.width; m_varRect.y += 1 * drawInfo.InvertedZoom; m_imgRect = m_varRect; m_imgRect.x = m_varRect.xMax - 16 * drawInfo.InvertedZoom; m_imgRect.width = 16 * drawInfo.InvertedZoom; m_imgRect.height = m_imgRect.width; } } public override void DrawGUIControls( DrawInfo drawInfo ) { base.DrawGUIControls( drawInfo ); if( drawInfo.CurrentEventType != EventType.MouseDown || !m_createToggle ) return; if( m_varRect.Contains( drawInfo.MousePosition ) ) { m_editing = true; } else if( m_editing ) { m_editing = false; } } private int CurrentSelectedInput { get { return m_materialMode ? m_materialValue : m_defaultValue; } set { if( m_materialMode ) m_materialValue = value; else m_defaultValue = value; } } public override void Draw( DrawInfo drawInfo ) { base.Draw( drawInfo ); if( m_editing ) { if( m_keywordModeType != KeywordModeType.KeywordEnum ) { if( GUI.Button( m_varRect, GUIContent.none, UIUtils.GraphButton ) ) { CurrentSelectedInput = CurrentSelectedInput == 1 ? 0 : 1; m_editing = false; if( m_materialMode ) m_requireMaterialUpdate = true; } if( CurrentSelectedInput == 1 ) { GUI.Label( m_varRect, m_checkContent, UIUtils.GraphButtonIcon ); } } else { EditorGUI.BeginChangeCheck(); CurrentSelectedInput = EditorGUIPopup( m_varRect, CurrentSelectedInput, m_keywordEnumList, UIUtils.GraphDropDown ); if( EditorGUI.EndChangeCheck() ) { m_editing = false; if( m_materialMode ) m_requireMaterialUpdate = true; } } } } public override void OnNodeRepaint( DrawInfo drawInfo ) { base.OnNodeRepaint( drawInfo ); if( !m_isVisible ) return; if( m_createToggle && ContainerGraph.LodLevel <= ParentGraph.NodeLOD.LOD2 ) { if( !m_editing ) { if( m_keywordModeType != KeywordModeType.KeywordEnum ) { GUI.Label( m_varRect, GUIContent.none, UIUtils.GraphButton ); if( CurrentSelectedInput == 1 ) GUI.Label( m_varRect, m_checkContent, UIUtils.GraphButtonIcon ); } else { GUI.Label( m_varRect, m_keywordEnumList[ CurrentSelectedInput ], UIUtils.GraphDropDown ); GUI.Label( m_imgRect, m_popContent, UIUtils.GraphButtonIcon ); } } } } private string OnOffStr { get { switch( m_keywordModeType ) { default: case KeywordModeType.Toggle: return "_ON"; case KeywordModeType.ToggleOff: return "_OFF"; } } } void RegisterPragmas( ref MasterNodeDataCollector dataCollector ) { if( m_variableMode == VariableMode.Create ) { if( m_keywordModeType == KeywordModeType.KeywordEnum ) { if( m_multiCompile == 1 ) dataCollector.AddToPragmas( UniqueId, "multi_compile " + GetKeywordEnumPragmaList() ); else if( m_multiCompile == 0 ) dataCollector.AddToPragmas( UniqueId, "shader_feature " + GetKeywordEnumPragmaList() ); } else { if( m_multiCompile == 1 ) dataCollector.AddToPragmas( UniqueId, "multi_compile __ " + PropertyName + OnOffStr ); else if( m_multiCompile == 0 ) dataCollector.AddToPragmas( UniqueId, "shader_feature " + PropertyName + OnOffStr ); } } } protected override void RegisterProperty( ref MasterNodeDataCollector dataCollector ) { base.RegisterProperty( ref dataCollector ); RegisterPragmas( ref dataCollector ); } public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { if( m_outputPorts[ 0 ].IsLocalValue( dataCollector.PortCategory ) ) return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ); base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); //if( m_keywordModeType == KeywordModeType.KeywordEnum ) RegisterPragmas( ref dataCollector ); string outType = UIUtils.PrecisionWirePortToCgType( m_currentPrecisionType, m_outputPorts[ 0 ].DataType ); if( m_keywordModeType == KeywordModeType.KeywordEnum ) { string defaultKey = "\t" + outType + " staticSwitch" + OutputId + " = " + m_inputPorts[ m_defaultValue ].GeneratePortInstructions( ref dataCollector ) + ";"; string[] allOutputs = new string[ m_keywordEnumAmount ]; for( int i = 0; i < m_keywordEnumAmount; i++ ) allOutputs[ i ] = m_inputPorts[ i ].GeneratePortInstructions( ref dataCollector ); for( int i = 0; i < m_keywordEnumAmount; i++ ) { string keyword = PropertyName + "_" + KeywordEnumList( i ); if( i == 0 ) dataCollector.AddLocalVariable( UniqueId, "#if defined(" + keyword + ")", true ); else dataCollector.AddLocalVariable( UniqueId, "#elif defined(" + keyword + ")", true ); if( m_defaultValue == i ) dataCollector.AddLocalVariable( UniqueId, defaultKey, true ); else dataCollector.AddLocalVariable( UniqueId, "\t" + outType + " staticSwitch" + OutputId + " = " + allOutputs[ i ] + ";", true ); } dataCollector.AddLocalVariable( UniqueId, "#else", true ); dataCollector.AddLocalVariable( UniqueId, defaultKey, true ); dataCollector.AddLocalVariable( UniqueId, "#endif", true ); } else { string falseCode = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ); string trueCode = m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector ); if( m_variableMode == VariableMode.Fetch ) dataCollector.AddLocalVariable( UniqueId, "#ifdef " + m_currentKeyword, true ); else dataCollector.AddLocalVariable( UniqueId, "#ifdef " + PropertyName + OnOffStr, true ); dataCollector.AddLocalVariable( UniqueId, "\t" + outType + " staticSwitch" + OutputId + " = " + trueCode + ";", true ); dataCollector.AddLocalVariable( UniqueId, "#else", true ); dataCollector.AddLocalVariable( UniqueId, "\t" + outType + " staticSwitch" + OutputId + " = " + falseCode + ";", true ); dataCollector.AddLocalVariable( UniqueId, "#endif", true ); } m_outputPorts[ 0 ].SetLocalValue( "staticSwitch" + OutputId , dataCollector.PortCategory ); return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ); } public override void DrawTitle( Rect titlePos ) { SetAdditonalTitleTextOnCallback( GetPropertyValStr(), ( instance, newSubTitle ) => instance.AdditonalTitleContent.text = string.Format( Constants.SubTitleVarNameFormatStr, newSubTitle ) ); if( !m_isEditing && ContainerGraph.LodLevel <= ParentGraph.NodeLOD.LOD3 ) { GUI.Label( titlePos, StaticSwitchStr, UIUtils.GetCustomStyle( CustomStyle.NodeTitle ) ); } } public override void UpdateMaterial( Material mat ) { base.UpdateMaterial( mat ); if( UIUtils.IsProperty( m_currentParameterType ) && !InsideShaderFunction ) { if( m_keywordModeType == KeywordModeType.KeywordEnum ) { for( int i = 0; i < m_keywordEnumAmount; i++ ) { string key = PropertyName + "_" + KeywordEnumList( i ); mat.DisableKeyword( key ); } mat.EnableKeyword( PropertyName + "_" + KeywordEnumList( m_materialValue )); } else { int final = m_materialValue; if( m_keywordModeType == KeywordModeType.ToggleOff ) final = final == 1 ? 0 : 1; mat.SetFloat( m_propertyName, m_materialValue ); if( final == 1 ) mat.EnableKeyword( GetPropertyValStr() ); else mat.DisableKeyword( GetPropertyValStr() ); } } } public override void SetMaterialMode( Material mat, bool fetchMaterialValues ) { base.SetMaterialMode( mat, fetchMaterialValues ); if( fetchMaterialValues && m_materialMode && UIUtils.IsProperty( m_currentParameterType ) && mat.HasProperty( m_propertyName ) ) { m_materialValue = mat.GetInt( m_propertyName ); } } public override void ForceUpdateFromMaterial( Material material ) { if( UIUtils.IsProperty( m_currentParameterType ) && material.HasProperty( m_propertyName ) ) m_materialValue = material.GetInt( m_propertyName ); } public override void ReadFromString( ref string[] nodeParams ) { base.ReadFromString( ref nodeParams ); m_multiCompile = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); if( UIUtils.CurrentShaderVersion() > 14403 ) { m_defaultValue = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); if( UIUtils.CurrentShaderVersion() > 14101 ) { m_materialValue = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); } } else { m_defaultValue = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ) ? 1 : 0; if( UIUtils.CurrentShaderVersion() > 14101 ) { m_materialValue = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ) ? 1 : 0; } } if( UIUtils.CurrentShaderVersion() > 13104 ) { m_createToggle = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ); m_currentKeyword = GetCurrentParam( ref nodeParams ); m_currentKeywordId = UIUtils.GetKeywordId( m_currentKeyword ); } if( UIUtils.CurrentShaderVersion() > 14001 ) { m_keywordModeType = (KeywordModeType)Enum.Parse( typeof( KeywordModeType ), GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 14403 ) { m_keywordEnumAmount = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); for( int i = 0; i < m_keywordEnumAmount; i++ ) { m_defaultKeywordNames[ i ] = GetCurrentParam( ref nodeParams ); } UpdateLabels(); } if( m_createToggle ) UIUtils.RegisterPropertyNode( this ); else UIUtils.UnregisterPropertyNode( this ); } public override void ReadFromDeprecated( ref string[] nodeParams, Type oldType = null ) { base.ReadFromDeprecated( ref nodeParams, oldType ); { m_currentKeyword = GetCurrentParam( ref nodeParams ); m_currentKeywordId = UIUtils.GetKeywordId( m_currentKeyword ); m_createToggle = false; m_keywordModeType = KeywordModeType.Toggle; m_variableMode = VariableMode.Fetch; } } public override void WriteToString( ref string nodeInfo, ref string connectionsInfo ) { base.WriteToString( ref nodeInfo, ref connectionsInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_multiCompile ); IOUtils.AddFieldValueToString( ref nodeInfo, m_defaultValue ); IOUtils.AddFieldValueToString( ref nodeInfo, m_materialValue ); IOUtils.AddFieldValueToString( ref nodeInfo, m_createToggle ); IOUtils.AddFieldValueToString( ref nodeInfo, m_currentKeyword ); IOUtils.AddFieldValueToString( ref nodeInfo, m_keywordModeType ); IOUtils.AddFieldValueToString( ref nodeInfo, m_keywordEnumAmount ); for( int i = 0; i < m_keywordEnumAmount; i++ ) { IOUtils.AddFieldValueToString( ref nodeInfo, m_keywordEnumList[ i ] ); } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/StaticSwitch.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/StaticSwitch.cs", "repo_id": "jynew", "token_count": 9994 }
850
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; namespace AmplifyShaderEditor { public class DrawInfo { public Rect TransformedCameraArea; public Rect CameraArea; public Vector2 MousePosition; public Vector2 CameraOffset; public float InvertedZoom; public bool LeftMouseButtonPressed; public EventType CurrentEventType; public Vector2 TransformedMousePos; public bool ZoomChanged; } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/DrawInfo.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/DrawInfo.cs", "repo_id": "jynew", "token_count": 151 }
851
fileFormatVersion: 2 guid: 2134a58fb8235524d84046a051bce6b5 timeCreated: 1481126954 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/HelperFuncs/WorldSpaceLightDirHlpNode.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/HelperFuncs/WorldSpaceLightDirHlpNode.cs.meta", "repo_id": "jynew", "token_count": 102 }
852
using System; namespace AmplifyShaderEditor { [Serializable] [NodeAttributes( "RGB to HSV", "Image Effects", "Converts from RGB to HSV color space" )] public sealed class RGBToHSVNode : ParentNode { public static readonly string RGBToHSVHeader = "RGBToHSV( {0} )"; public static readonly string[] RGBToHSVFunction = { "{0}3 RGBToHSV({0}3 c)\n", "{\n", "\t{0}4 K = {0}4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n", "\t{0}4 p = lerp( {0}4( c.bg, K.wz ), {0}4( c.gb, K.xy ), step( c.b, c.g ) );\n", "\t{0}4 q = lerp( {0}4( p.xyw, c.r ), {0}4( c.r, p.yzx ), step( p.x, c.r ) );\n", "\t{0} d = q.x - min( q.w, q.y );\n", "\t{0} e = 1.0e-10;\n", "\treturn {0}3( abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n", "}" }; public static readonly bool[] RGBToHSVFlags = { true, false, true, true, true, true, true, true, false}; protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); AddInputPort( WirePortDataType.FLOAT3, false, "RGB" ); AddOutputPort( WirePortDataType.FLOAT3, "HSV" ); AddOutputPort( WirePortDataType.FLOAT, "Hue" ); AddOutputPort( WirePortDataType.FLOAT, "Saturation" ); AddOutputPort( WirePortDataType.FLOAT, "Value" ); m_previewShaderGUID = "0f2f09b49bf4954428aafa2dfe1a9a09"; m_useInternalPortData = true; m_autoWrapProperties = true; } public override void DrawProperties() { base.DrawProperties(); DrawPrecisionProperty(); } public void AddRGBToHSVFunction( ref MasterNodeDataCollector dataCollector, string precisionString ) { if( !dataCollector.HasFunction( RGBToHSVHeader ) ) { //Hack to be used util indent is properly used int currIndent = UIUtils.ShaderIndentLevel; if( dataCollector.MasterNodeCategory == AvailableShaderTypes.Template ) { UIUtils.ShaderIndentLevel = 0; } else { UIUtils.ShaderIndentLevel = 1; UIUtils.ShaderIndentLevel++; } string finalFunction = string.Empty; for( int i = 0; i < RGBToHSVFunction.Length; i++ ) { finalFunction += UIUtils.ShaderIndentTabs + ( RGBToHSVFlags[ i ] ? string.Format( RGBToHSVFunction[ i ], precisionString ) : RGBToHSVFunction[ i ] ); } UIUtils.ShaderIndentLevel--; UIUtils.ShaderIndentLevel = currIndent; dataCollector.AddFunction( RGBToHSVHeader, finalFunction ); } } public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { if ( m_outputPorts[ 0 ].IsLocalValue( dataCollector.PortCategory ) ) return GetOutputVectorItem( 0, outputId, m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ) ); string precisionString = UIUtils.PrecisionWirePortToCgType( m_currentPrecisionType, WirePortDataType.FLOAT ); AddRGBToHSVFunction( ref dataCollector, precisionString ); string rgbValue = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ); RegisterLocalVariable( 0, string.Format( RGBToHSVHeader, rgbValue ), ref dataCollector, "hsvTorgb" + OutputId ); return GetOutputVectorItem( 0, outputId, m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ) ); } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/ImageEffects/RGBToHSVNode.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/ImageEffects/RGBToHSVNode.cs", "repo_id": "jynew", "token_count": 1557 }
853
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using System; using System.Collections.Generic; using UnityEngine; using UnityEditor; namespace AmplifyShaderEditor { [Serializable] public class AdditionalDefinesHelper { private const string AdditionalDefinesStr = " Additional Defines"; private const float ShaderKeywordButtonLayoutWidth = 15; private ParentNode m_currentOwner; [SerializeField] private List<string> m_additionalDefines = new List<string>(); public List<string> DefineList { get { return m_additionalDefines; } set { m_additionalDefines = value; } } [SerializeField] private List<string> m_outsideDefines = new List<string>(); public List<string> OutsideList { get { return m_outsideDefines; } set { m_outsideDefines = value; } } public void Draw( ParentNode owner ) { m_currentOwner = owner; bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedAdditionalDefines; NodeUtils.DrawPropertyGroup( ref value, AdditionalDefinesStr, DrawMainBody, DrawButtons ); owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedAdditionalDefines = value; } void DrawButtons() { EditorGUILayout.Separator(); // Add keyword if( GUILayout.Button( string.Empty, UIUtils.PlusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { m_additionalDefines.Add( string.Empty ); EditorGUI.FocusTextInControl( null ); } //Remove keyword if( GUILayout.Button( string.Empty, UIUtils.MinusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { if( m_additionalDefines.Count > 0 ) { m_additionalDefines.RemoveAt( m_additionalDefines.Count - 1 ); EditorGUI.FocusTextInControl( null ); } } } void DrawMainBody() { EditorGUILayout.Separator(); int itemCount = m_additionalDefines.Count; int markedToDelete = -1; for( int i = 0; i < itemCount; i++ ) { EditorGUILayout.BeginHorizontal(); { EditorGUI.BeginChangeCheck(); m_additionalDefines[ i ] = EditorGUILayout.TextField( m_additionalDefines[ i ] ); if( EditorGUI.EndChangeCheck() ) { m_additionalDefines[ i ] = UIUtils.RemoveShaderInvalidCharacters( m_additionalDefines[ i ] ); } // Add new port if( m_currentOwner.GUILayoutButton( string.Empty, UIUtils.PlusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { m_additionalDefines.Insert( i + 1, string.Empty ); EditorGUI.FocusTextInControl( null ); } //Remove port if( m_currentOwner.GUILayoutButton( string.Empty, UIUtils.MinusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { markedToDelete = i; } } EditorGUILayout.EndHorizontal(); } if( markedToDelete > -1 ) { if( m_additionalDefines.Count > markedToDelete ) { m_additionalDefines.RemoveAt( markedToDelete ); EditorGUI.FocusTextInControl( null ); } } EditorGUILayout.Separator(); EditorGUILayout.HelpBox( "Please add your defines without the #define keywords", MessageType.Info ); } public void ReadFromString( ref uint index, ref string[] nodeParams ) { int count = Convert.ToInt32( nodeParams[ index++ ] ); for( int i = 0; i < count; i++ ) { m_additionalDefines.Add( nodeParams[ index++ ] ); } } public void WriteToString( ref string nodeInfo ) { IOUtils.AddFieldValueToString( ref nodeInfo, m_additionalDefines.Count ); for( int i = 0; i < m_additionalDefines.Count; i++ ) { IOUtils.AddFieldValueToString( ref nodeInfo, m_additionalDefines[ i ] ); } } public void AddToDataCollector( ref MasterNodeDataCollector dataCollector ) { for( int i = 0; i < m_additionalDefines.Count; i++ ) { if( !string.IsNullOrEmpty( m_additionalDefines[ i ] ) ) dataCollector.AddToDefines( -1, m_additionalDefines[ i ] ); } for( int i = 0; i < m_outsideDefines.Count; i++ ) { if( !string.IsNullOrEmpty( m_outsideDefines[ i ] ) ) dataCollector.AddToDefines( -1, m_outsideDefines[ i ] ); } } public void Destroy() { m_additionalDefines.Clear(); m_additionalDefines = null; m_currentOwner = null; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/AdditionalDefinesHelper.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/AdditionalDefinesHelper.cs", "repo_id": "jynew", "token_count": 1670 }
854
using System; using UnityEngine; using UnityEditor; using System.Collections.Generic; namespace AmplifyShaderEditor { [Serializable] public class CustomTagData { private const string TagFormat = "\"{0}\"=\"{1}\""; public string TagName; public string TagValue; public int TagId = -1; public bool TagFoldout = true; [SerializeField] private TemplateSpecialTags m_specialTag = TemplateSpecialTags.None; [SerializeField] private RenderType m_renderType = RenderType.Opaque; [SerializeField] private RenderQueue m_renderQueue = RenderQueue.Geometry; [SerializeField] private int m_renderQueueOffset = 0; public CustomTagData() { TagName = string.Empty; TagValue = string.Empty; m_specialTag = TemplateSpecialTags.None; m_renderType = RenderType.Opaque; m_renderQueue = RenderQueue.Geometry; m_renderQueueOffset = 0; } public CustomTagData( CustomTagData other ) { TagName = other.TagName; TagValue = other.TagValue; TagId = other.TagId; TagFoldout = other.TagFoldout; m_specialTag = other.m_specialTag; m_renderType = other.m_renderType; m_renderQueue = other.m_renderQueue; m_renderQueueOffset = other.m_renderQueueOffset; } public void SetTagValue( params string[] value ) { TagValue = value[ 0 ]; switch( m_specialTag ) { case TemplateSpecialTags.RenderType: m_renderType = TemplateHelperFunctions.StringToRenderType[ value[ 0 ] ]; break; case TemplateSpecialTags.Queue: { if( value.Length == 2 ) { m_renderQueue = TemplateHelperFunctions.StringToRenderQueue[ value[ 0 ] ]; int.TryParse( value[ 1 ], out m_renderQueueOffset ); } else { int indexPlus = value[ 0 ].IndexOf( '+' ); if( indexPlus > 0 ) { string[] args = value[ 0 ].Split( '+' ); m_renderQueue = TemplateHelperFunctions.StringToRenderQueue[ args[ 0 ] ]; int.TryParse( args[ 1 ], out m_renderQueueOffset ); } else { int indexMinus = value[ 0 ].IndexOf( '-' ); if( indexMinus > 0 ) { string[] args = value[ 0 ].Split( '-' ); m_renderQueue = TemplateHelperFunctions.StringToRenderQueue[ args[ 0 ] ]; int.TryParse( args[ 1 ], out m_renderQueueOffset ); m_renderQueueOffset *= -1; } else { m_renderQueue = TemplateHelperFunctions.StringToRenderQueue[ value[ 0 ] ]; m_renderQueueOffset = 0; } } } BuildQueueTagValue(); } break; } } void CheckSpecialTag() { if( TagName.Equals( Constants.RenderTypeHelperStr ) ) { m_specialTag = TemplateSpecialTags.RenderType; m_renderType = TemplateHelperFunctions.StringToRenderType[ TagValue ]; } else if( TagName.Equals( Constants.RenderQueueHelperStr ) ) { m_specialTag = TemplateSpecialTags.Queue; SetTagValue( TagValue ); } else { m_specialTag = TemplateSpecialTags.None; } } public CustomTagData( string name, string value, int id ) { TagName = name; TagValue = value; TagId = id; CheckSpecialTag(); } //Used on Template based shaders loading public CustomTagData( string data, int id ) { TagId = id; string[] arr = data.Split( IOUtils.VALUE_SEPARATOR ); if( arr.Length > 1 ) { TagName = arr[ 0 ]; TagValue = arr[ 1 ]; } if( arr.Length > 2 ) { m_specialTag = (TemplateSpecialTags)Enum.Parse( typeof( TemplateSpecialTags ), arr[ 2 ] ); switch( m_specialTag ) { case TemplateSpecialTags.RenderType: { m_renderType = (RenderType)Enum.Parse( typeof( RenderType ), TagValue ); } break; case TemplateSpecialTags.Queue: { if( arr.Length == 4 ) { m_renderQueue = (RenderQueue)Enum.Parse( typeof( RenderQueue ), TagValue ); int.TryParse( arr[ 3 ], out m_renderQueueOffset ); } BuildQueueTagValue(); } break; } } else if( UIUtils.CurrentShaderVersion() < 15600 ) { CheckSpecialTag(); } } //Used on Standard Surface shaders loading public CustomTagData( string data ) { string[] arr = data.Split( IOUtils.VALUE_SEPARATOR ); if( arr.Length > 1 ) { TagName = arr[ 0 ]; TagValue = arr[ 1 ]; } } public override string ToString() { switch( m_specialTag ) { case TemplateSpecialTags.RenderType: return TagName + IOUtils.VALUE_SEPARATOR + TagValue + IOUtils.VALUE_SEPARATOR + m_specialTag; case TemplateSpecialTags.Queue: return TagName + IOUtils.VALUE_SEPARATOR + m_renderQueue.ToString() + IOUtils.VALUE_SEPARATOR + m_specialTag + IOUtils.VALUE_SEPARATOR + m_renderQueueOffset; } return TagName + IOUtils.VALUE_SEPARATOR + TagValue; } public string GenerateTag() { return string.Format( TagFormat, TagName, TagValue ); } public void BuildQueueTagValue() { TagValue = m_renderQueue.ToString(); if( m_renderQueueOffset > 0 ) { TagValue += "+" + m_renderQueueOffset; } else if( m_renderQueueOffset < 0 ) { TagValue += m_renderQueueOffset; } } public TemplateSpecialTags SpecialTag { get { return m_specialTag; } set { m_specialTag = value; switch( value ) { case TemplateSpecialTags.RenderType: { TagValue = m_renderType.ToString(); } break; case TemplateSpecialTags.Queue: { BuildQueueTagValue(); } break; } } } public RenderType RenderType { get { return m_renderType; } set { m_renderType = value; TagValue = value.ToString(); } } public RenderQueue RenderQueue { get { return m_renderQueue; } set { m_renderQueue = value; } } public int RenderQueueOffset { get { return m_renderQueueOffset; } set { m_renderQueueOffset = value; } } public bool IsValid { get { return ( !string.IsNullOrEmpty( TagValue ) && !string.IsNullOrEmpty( TagName ) ); } } } [Serializable] public class CustomTagsHelper { private const string CustomTagsStr = " Custom SubShader Tags"; private const string TagNameStr = "Name"; private const string TagValueStr = "Value"; private const float ShaderKeywordButtonLayoutWidth = 15; private ParentNode m_currentOwner; [SerializeField] private List<CustomTagData> m_availableTags = new List<CustomTagData>(); public void Draw( ParentNode owner ) { m_currentOwner = owner; bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedCustomTags; NodeUtils.DrawPropertyGroup( ref value, CustomTagsStr, DrawMainBody, DrawButtons ); owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedCustomTags = value; } void DrawButtons() { EditorGUILayout.Separator(); // Add tag if( GUILayout.Button( string.Empty, UIUtils.PlusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { m_availableTags.Add( new CustomTagData() ); EditorGUI.FocusTextInControl( null ); } //Remove tag if( GUILayout.Button( string.Empty, UIUtils.MinusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { if( m_availableTags.Count > 0 ) { m_availableTags.RemoveAt( m_availableTags.Count - 1 ); EditorGUI.FocusTextInControl( null ); } } } void DrawMainBody() { EditorGUILayout.Separator(); int itemCount = m_availableTags.Count; if( itemCount == 0 ) { EditorGUILayout.HelpBox( "Your list is Empty!\nUse the plus button to add one.", MessageType.Info ); } int markedToDelete = -1; float originalLabelWidth = EditorGUIUtility.labelWidth; for( int i = 0; i < itemCount; i++ ) { m_availableTags[ i ].TagFoldout = m_currentOwner.EditorGUILayoutFoldout( m_availableTags[ i ].TagFoldout, string.Format( "[{0}] - {1}", i, m_availableTags[ i ].TagName ) ); if( m_availableTags[ i ].TagFoldout ) { EditorGUI.indentLevel += 1; EditorGUIUtility.labelWidth = 70; //Tag Name EditorGUI.BeginChangeCheck(); m_availableTags[ i ].TagName = EditorGUILayout.TextField( TagNameStr, m_availableTags[ i ].TagName ); if( EditorGUI.EndChangeCheck() ) { m_availableTags[ i ].TagName = UIUtils.RemoveShaderInvalidCharacters( m_availableTags[ i ].TagName ); } //Tag Value EditorGUI.BeginChangeCheck(); m_availableTags[ i ].TagValue = EditorGUILayout.TextField( TagValueStr, m_availableTags[ i ].TagValue ); if( EditorGUI.EndChangeCheck() ) { m_availableTags[ i ].TagValue = UIUtils.RemoveShaderInvalidCharacters( m_availableTags[ i ].TagValue ); } EditorGUIUtility.labelWidth = originalLabelWidth; EditorGUILayout.BeginHorizontal(); { GUILayout.Label( " " ); // Add new port if( m_currentOwner.GUILayoutButton( string.Empty, UIUtils.PlusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { m_availableTags.Insert( i + 1, new CustomTagData() ); EditorGUI.FocusTextInControl( null ); } //Remove port if( m_currentOwner.GUILayoutButton( string.Empty, UIUtils.MinusStyle, GUILayout.Width( ShaderKeywordButtonLayoutWidth ) ) ) { markedToDelete = i; } } EditorGUILayout.EndHorizontal(); EditorGUI.indentLevel -= 1; } } if( markedToDelete > -1 ) { if( m_availableTags.Count > markedToDelete ) { m_availableTags.RemoveAt( markedToDelete ); EditorGUI.FocusTextInControl( null ); } } EditorGUILayout.Separator(); } public void ReadFromString( ref uint index, ref string[] nodeParams ) { int count = Convert.ToInt32( nodeParams[ index++ ] ); for( int i = 0; i < count; i++ ) { m_availableTags.Add( new CustomTagData( nodeParams[ index++ ] ) ); } } public void WriteToString( ref string nodeInfo ) { int tagsCount = m_availableTags.Count; IOUtils.AddFieldValueToString( ref nodeInfo, tagsCount ); for( int i = 0; i < tagsCount; i++ ) { IOUtils.AddFieldValueToString( ref nodeInfo, m_availableTags[ i ].ToString() ); } } public string GenerateCustomTags() { int tagsCount = m_availableTags.Count; string result = tagsCount == 0 ? string.Empty : " "; for( int i = 0; i < tagsCount; i++ ) { if( m_availableTags[ i ].IsValid ) { result += m_availableTags[ i ].GenerateTag(); if( i < tagsCount - 1 ) { result += " "; } } } return result; } public void Destroy() { m_availableTags.Clear(); m_availableTags = null; m_currentOwner = null; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/CustomTagsHelper.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/CustomTagsHelper.cs", "repo_id": "jynew", "token_count": 4452 }
855
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using UnityEditor; using System; namespace AmplifyShaderEditor { [Serializable] [NodeAttributes( "Switch by Pipeline", "Functions", "Executes branch according to current pipeline", NodeAvailabilityFlags = (int)NodeAvailability.ShaderFunction )] public sealed class FunctionSwitchByPipeline : ParentNode { protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); AddInputPort( WirePortDataType.FLOAT, false, "Standard" ); AddInputPort( WirePortDataType.FLOAT, false, "Lightweight" ); AddInputPort( WirePortDataType.FLOAT, false, "HD" ); AddOutputPort( WirePortDataType.FLOAT, Constants.EmptyPortValue ); } public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true ) { base.OnInputPortConnected( portId, otherNodeId, otherPortId, activateNode ); m_inputPorts[ portId ].MatchPortToConnection(); UpdateOutputPort(); } public override void OnConnectedOutputNodeChanges( int outputPortId, int otherNodeId, int otherPortId, string name, WirePortDataType type ) { base.OnConnectedOutputNodeChanges( outputPortId, otherNodeId, otherPortId, name, type ); m_inputPorts[ outputPortId ].MatchPortToConnection(); UpdateOutputPort(); } void UpdateOutputPort() { switch( m_containerGraph.CurrentSRPType ) { case TemplateSRPType.BuiltIn: m_outputPorts[ 0 ].ChangeType( m_inputPorts[ 0 ].DataType, false ); break; case TemplateSRPType.Lightweight: m_outputPorts[ 0 ].ChangeType( m_inputPorts[ 1 ].DataType, false ); break; case TemplateSRPType.HD: m_outputPorts[ 0 ].ChangeType( m_inputPorts[ 2 ].DataType, false ); break; } } public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); switch( dataCollector.CurrentSRPType ) { case TemplateSRPType.BuiltIn: return m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ); case TemplateSRPType.Lightweight: return m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector ); case TemplateSRPType.HD: return m_inputPorts[ 2 ].GeneratePortInstructions( ref dataCollector ); } return "0"; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/FunctionSwitchByPipeline.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/FunctionSwitchByPipeline.cs", "repo_id": "jynew", "token_count": 858 }
856
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using System; using System.Collections.Generic; using UnityEngine; using UnityEditor; using UnityEditorInternal; namespace AmplifyShaderEditor { public enum VertexMode { Relative, Absolute } public enum RenderPath { All, ForwardOnly, DeferredOnly } public enum StandardShaderLightModel { Standard, StandardSpecular, Lambert, BlinnPhong, Unlit, CustomLighting } public enum CullMode { Back, Front, Off } public enum AlphaMode { Opaque = 0, Masked = 1, Transparent = 2, // Transparent (alpha:fade) Translucent = 3, Premultiply = 4, // Alpha Premul (alpha:premul) Custom = 5, } public enum RenderType { Opaque, Transparent, TransparentCutout, Background, Overlay, TreeOpaque, TreeTransparentCutout, TreeBillboard, Grass, GrassBillboard, Custom } public enum RenderQueue { Background, Geometry, AlphaTest, Transparent, Overlay } public enum RenderPlatforms { d3d9, d3d11, glcore, gles, gles3, metal, d3d11_9x, xbox360, xboxone, ps4, psp2, n3ds, wiiu } [Serializable] public class NodeCache { public int TargetNodeId = -1; public int TargetPortId = -1; public NodeCache( int targetNodeId, int targetPortId ) { SetData( targetNodeId, targetPortId ); } public void SetData( int targetNodeId, int targetPortId ) { TargetNodeId = targetNodeId; TargetPortId = targetPortId; } public void Invalidate() { TargetNodeId = -1; TargetPortId = -1; } public bool IsValid { get { return ( TargetNodeId >= 0 ); } } public override string ToString() { return "TargetNodeId " + TargetNodeId + " TargetPortId " + TargetPortId; } } [Serializable] public class CacheNodeConnections { public Dictionary<string, List<NodeCache>> NodeCacheArray; public CacheNodeConnections() { NodeCacheArray = new Dictionary<string, List<NodeCache>>(); } public void Add( string key, NodeCache value ) { if( NodeCacheArray.ContainsKey( key ) ) { NodeCacheArray[ key ].Add( value ); } else { NodeCacheArray.Add( key, new List<NodeCache>() ); NodeCacheArray[ key ].Add( value ); } } public NodeCache Get( string key, int idx = 0 ) { if( NodeCacheArray.ContainsKey( key ) ) { if( idx < NodeCacheArray[ key ].Count ) return NodeCacheArray[ key ][ idx ]; } return null; } public List<NodeCache> GetList( string key ) { if( NodeCacheArray.ContainsKey( key ) ) { return NodeCacheArray[ key ]; } return null; } public void Clear() { foreach( KeyValuePair<string, List<NodeCache>> kvp in NodeCacheArray ) { kvp.Value.Clear(); } NodeCacheArray.Clear(); } } [Serializable] [NodeAttributes( "Standard Surface Output", "Master", "Surface shader generator output", null, KeyCode.None, false )] public sealed class StandardSurfaceOutputNode : MasterNode, ISerializationCallbackReceiver { private readonly static string[] VertexLitFunc = { "\t\tinline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )", "\t\t{", "\t\t\treturn half4 ( 0, 0, 0, s.Alpha );", "\t\t}\n"}; private readonly static string[] FadeModeOptions = { "Opaque", "Masked", "Transparent", "Translucent", "Alpha Premultipled", "Custom" }; private const string VertexModeStr = "Vertex Output"; private readonly static GUIContent RenderPathContent = new GUIContent( "Render Path", "Selects and generates passes for the supported rendering paths\nDefault: All" ); private const string ShaderModelStr = "Shader Model"; private readonly static GUIContent LightModelContent = new GUIContent( "Light Model", "Surface shader lighting model defines how the surface reflects light\nDefault: Standard" ); private readonly static GUIContent ShaderLODContent = new GUIContent( "Shader LOD", "Shader LOD" ); private readonly static GUIContent CullModeContent = new GUIContent( "Cull Mode", "Polygon culling mode prevents rendering of either back-facing or front-facing polygons to save performance, turn it off if you want to render both sides\nDefault: Back" ); private const string DiscardStr = "Opacity Mask"; private const string VertexDisplacementStr = "Local Vertex Offset"; private const string VertexPositionStr = "Local Vertex Position"; private const string VertexDataStr = "VertexData"; private const string VertexNormalStr = "Local Vertex Normal"; private const string CustomLightingStr = "Custom Lighting"; private const string AlbedoStr = "Albedo"; private const string NormalStr = "Normal"; private const string EmissionStr = "Emission"; private const string MetallicStr = "Metallic"; private const string SmoothnessStr = "Smoothness"; private const string OcclusionDataStr = "Occlusion"; private const string OcclusionLabelStr = "Ambient Occlusion"; private const string TransmissionStr = "Transmission"; private const string TranslucencyStr = "Translucency"; private const string RefractionStr = "Refraction"; private const string AlphaStr = "Opacity"; private const string AlphaDataStr = "Alpha"; private const string DebugStr = "Debug"; private const string SpecularStr = "Specular"; private const string GlossStr = "Gloss"; private const string CustomRenderTypeStr = "Custom Type"; private readonly static GUIContent AlphaModeContent = new GUIContent( " Blend Mode", "Defines how the surface blends with the background\nDefault: Opaque" ); private const string OpacityMaskClipValueStr = "Mask Clip Value"; private readonly static GUIContent OpacityMaskClipValueContent = new GUIContent( "Mask Clip Value", "Default clip value to be compared with opacity alpha ( 0 = fully Opaque, 1 = fully Masked )\nDefault: 0.5" ); private readonly static GUIContent CastShadowsContent = new GUIContent( "Cast Shadows", "Generates a shadow caster pass for vertex modifications and point lights in forward rendering\nDefault: ON" ); private readonly static GUIContent ReceiveShadowsContent = new GUIContent( "Receive Shadows", "Untick it to disable shadow receiving, this includes self-shadowing (only for forward rendering) \nDefault: ON" ); private readonly static GUIContent QueueIndexContent = new GUIContent( "Queue Index", "Value to offset the render queue, accepts both positive values to render later and negative values to render sooner\nDefault: 0" ); private readonly static GUIContent RefractionLayerStr = new GUIContent( "Refraction Layer", "Use it to group or ungroup different refraction shaders into the same or different grabpass (only for forward rendering) \nDefault: 0" ); private readonly static GUIContent AlphaToCoverageStr = new GUIContent( "Alpha To Coverage", "" ); private readonly static GUIContent RenderQueueContent = new GUIContent( "Render Queue", "Base rendering queue index\n(Background = 1000, Geometry = 2000, AlphaTest = 2450, Transparent = 3000, Overlay = 4000)\nDefault: Geometry" ); private readonly static GUIContent RenderTypeContent = new GUIContent( "Render Type", "Categorizes shaders into several predefined groups, usually to be used with screen shader effects\nDefault: Opaque" ); private const string ShaderInputOrderStr = "Shader Input Order"; [SerializeField] private BlendOpsHelper m_blendOpsHelper = new BlendOpsHelper(); [SerializeField] private StencilBufferOpHelper m_stencilBufferHelper = new StencilBufferOpHelper(); [SerializeField] private ZBufferOpHelper m_zBufferHelper = new ZBufferOpHelper(); [SerializeField] private OutlineOpHelper m_outlineHelper = new OutlineOpHelper(); [SerializeField] private TessellationOpHelper m_tessOpHelper = new TessellationOpHelper(); [SerializeField] private ColorMaskHelper m_colorMaskHelper = new ColorMaskHelper(); [SerializeField] private RenderingPlatformOpHelper m_renderingPlatformOpHelper = new RenderingPlatformOpHelper(); [SerializeField] private RenderingOptionsOpHelper m_renderingOptionsOpHelper = new RenderingOptionsOpHelper(); [SerializeField] private BillboardOpHelper m_billboardOpHelper = new BillboardOpHelper(); [SerializeField] private FallbackPickerHelper m_fallbackHelper = null; //legacy [SerializeField] private AdditionalIncludesHelper m_additionalIncludes = new AdditionalIncludesHelper(); //legacy [SerializeField] private AdditionalPragmasHelper m_additionalPragmas = new AdditionalPragmasHelper(); //legacy [SerializeField] private AdditionalDefinesHelper m_additionalDefines = new AdditionalDefinesHelper(); [SerializeField] private TemplateAdditionalDirectivesHelper m_additionalDirectives = new TemplateAdditionalDirectivesHelper(" Additional Directives"); [SerializeField] private AdditionalSurfaceOptionsHelper m_additionalSurfaceOptions = new AdditionalSurfaceOptionsHelper(); [SerializeField] private UsePassHelper m_usePass; [SerializeField] private CustomTagsHelper m_customTagsHelper = new CustomTagsHelper(); [SerializeField] private DependenciesHelper m_dependenciesHelper = new DependenciesHelper(); [SerializeField] private StandardShaderLightModel m_currentLightModel; [SerializeField] private StandardShaderLightModel m_lastLightModel; [SerializeField] private CullMode m_cullMode = CullMode.Back; [SerializeField] private InlineProperty m_inlineCullMode = new InlineProperty(); [SerializeField] private AlphaMode m_alphaMode = AlphaMode.Opaque; [SerializeField] private RenderType m_renderType = RenderType.Opaque; [SerializeField] private string m_customRenderType = string.Empty; [SerializeField] private RenderQueue m_renderQueue = RenderQueue.Geometry; [SerializeField] private RenderPath m_renderPath = RenderPath.All; [SerializeField] private VertexMode m_vertexMode = VertexMode.Relative; [SerializeField] private bool m_customBlendMode = false; [SerializeField] private float m_opacityMaskClipValue = 0.5f; [SerializeField] private InlineProperty m_inlineOpacityMaskClipValue = new InlineProperty(); [SerializeField] private int m_customLightingPortId = -1; [SerializeField] private int m_emissionPortId = -1; [SerializeField] private int m_discardPortId = -1; [SerializeField] private int m_opacityPortId = -1; [SerializeField] private int m_vertexPortId = -1; [SerializeField] private bool m_keepAlpha = true; [SerializeField] private bool m_castShadows = true; //[SerializeField] private bool m_customShadowCaster = false; [SerializeField] private bool m_receiveShadows = true; [SerializeField] private int m_queueOrder = 0; [SerializeField] private int m_grabOrder = 0; [SerializeField] private bool m_alphaToCoverage = false; private InputPort m_transmissionPort; private InputPort m_translucencyPort; private InputPort m_tessellationPort; private bool m_previousTranslucencyOn = false; private bool m_previousRefractionOn = false; [SerializeField] private CacheNodeConnections m_cacheNodeConnections = new CacheNodeConnections(); private bool m_usingProSkin = false; private GUIStyle m_inspectorFoldoutStyle; private GUIStyle m_inspectorToolbarStyle; private GUIStyle m_inspectorTooldropdownStyle; private bool m_customBlendAvailable = false; private Color m_cachedColor = Color.white; private float m_titleOpacity = 0.5f; private float m_boxOpacity = 0.5f; private InputPort m_refractionPort; private InputPort m_normalPort; private GUIStyle m_inspectorDefaultStyle; [SerializeField] private ReordenatorNode m_specColorReorder = null; [SerializeField] private int m_specColorOrderIndex = -1; [SerializeField] private ReordenatorNode m_maskClipReorder = null; [SerializeField] private int m_maskClipOrderIndex = -1; [SerializeField] private ReordenatorNode m_translucencyReorder = null; [SerializeField] private int m_translucencyOrderIndex = -1; [SerializeField] private ReordenatorNode m_refractionReorder = null; [SerializeField] private int m_refractionOrderIndex = -1; [SerializeField] private ReordenatorNode m_tessellationReorder = null; [SerializeField] private int m_tessellationOrderIndex = -1; private bool m_previousTessellationOn = false; private bool m_initialize = true; private bool m_checkChanges = true; private bool m_lightModelChanged = true; private PropertyNode m_dummyProperty = null; protected override void CommonInit( int uniqueId ) { m_currentLightModel = m_lastLightModel = StandardShaderLightModel.Standard; m_textLabelWidth = 120; m_autoDrawInternalPortData = false; base.CommonInit( uniqueId ); m_zBufferHelper.ParentSurface = this; m_tessOpHelper.ParentSurface = this; } public override void OnEnable() { base.OnEnable(); if( m_usePass == null ) { m_usePass = ScriptableObject.CreateInstance<UsePassHelper>(); m_usePass.ModuleName = " Additional Use Passes"; } if( m_fallbackHelper == null ) m_fallbackHelper = ScriptableObject.CreateInstance<FallbackPickerHelper>(); } public override void AddMasterPorts() { int vertexCorrection = 2; int index = vertexCorrection + 2; base.AddMasterPorts(); switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: { AddInputPort( WirePortDataType.FLOAT3, false, AlbedoStr, vertexCorrection + 1, MasterNodePortCategory.Fragment, 0 ); AddInputPort( WirePortDataType.FLOAT3, false, NormalStr, vertexCorrection + 0, MasterNodePortCategory.Fragment, 1 ); m_normalPort = m_inputPorts[ m_inputPorts.Count - 1 ]; AddInputPort( WirePortDataType.FLOAT3, false, EmissionStr, index++, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT, false, MetallicStr, index++, MasterNodePortCategory.Fragment, 3 ); AddInputPort( WirePortDataType.FLOAT, false, SmoothnessStr, index++, MasterNodePortCategory.Fragment, 4 ); AddInputPort( WirePortDataType.FLOAT, false, OcclusionLabelStr, OcclusionDataStr, index++, MasterNodePortCategory.Fragment, 5 ); } break; case StandardShaderLightModel.StandardSpecular: { AddInputPort( WirePortDataType.FLOAT3, false, AlbedoStr, vertexCorrection + 1, MasterNodePortCategory.Fragment, 0 ); AddInputPort( WirePortDataType.FLOAT3, false, NormalStr, vertexCorrection + 0, MasterNodePortCategory.Fragment, 1 ); m_normalPort = m_inputPorts[ m_inputPorts.Count - 1 ]; AddInputPort( WirePortDataType.FLOAT3, false, EmissionStr, index++, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT3, false, SpecularStr, index++, MasterNodePortCategory.Fragment, 3 ); AddInputPort( WirePortDataType.FLOAT, false, SmoothnessStr, index++, MasterNodePortCategory.Fragment, 4 ); AddInputPort( WirePortDataType.FLOAT, false, OcclusionLabelStr, OcclusionDataStr, index++, MasterNodePortCategory.Fragment, 5 ); } break; case StandardShaderLightModel.CustomLighting: { AddInputPort( WirePortDataType.FLOAT3, false, AlbedoStr, vertexCorrection + 1, MasterNodePortCategory.Fragment, 0 ); AddInputPort( WirePortDataType.FLOAT3, false, NormalStr, vertexCorrection + 0, MasterNodePortCategory.Fragment, 1 ); m_normalPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; AddInputPort( WirePortDataType.FLOAT3, false, EmissionStr, index++, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT, false, SpecularStr, index++, MasterNodePortCategory.Fragment, 3 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; AddInputPort( WirePortDataType.FLOAT, false, GlossStr, index++, MasterNodePortCategory.Fragment, 4 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; } break; case StandardShaderLightModel.Unlit: { AddInputPort( WirePortDataType.FLOAT3, false, AlbedoStr, vertexCorrection + 1, MasterNodePortCategory.Fragment, 0 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; AddInputPort( WirePortDataType.FLOAT3, false, NormalStr, vertexCorrection + 0, MasterNodePortCategory.Fragment, 1 ); m_normalPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; AddInputPort( WirePortDataType.FLOAT3, false, EmissionStr, index++, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT, false, SpecularStr, index++, MasterNodePortCategory.Fragment, 3 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; AddInputPort( WirePortDataType.FLOAT, false, GlossStr, index++, MasterNodePortCategory.Fragment, 4 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true; } break; case StandardShaderLightModel.Lambert: { AddInputPort( WirePortDataType.FLOAT3, false, AlbedoStr, vertexCorrection + 1, MasterNodePortCategory.Fragment, 0 ); AddInputPort( WirePortDataType.FLOAT3, false, NormalStr, vertexCorrection + 0, MasterNodePortCategory.Fragment, 1 ); m_normalPort = m_inputPorts[ m_inputPorts.Count - 1 ]; AddInputPort( WirePortDataType.FLOAT3, false, EmissionStr, index++, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT, false, SpecularStr, index++, MasterNodePortCategory.Fragment, 3 ); AddInputPort( WirePortDataType.FLOAT, false, GlossStr, index++, MasterNodePortCategory.Fragment, 4 ); } break; case StandardShaderLightModel.BlinnPhong: { AddInputPort( WirePortDataType.FLOAT3, false, AlbedoStr, vertexCorrection + 1, MasterNodePortCategory.Fragment, 0 ); AddInputPort( WirePortDataType.FLOAT3, false, NormalStr, vertexCorrection + 0, MasterNodePortCategory.Fragment, 1 ); m_normalPort = m_inputPorts[ m_inputPorts.Count - 1 ]; AddInputPort( WirePortDataType.FLOAT3, false, EmissionStr, index++, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT, false, SpecularStr, index++, MasterNodePortCategory.Fragment, 3 ); AddInputPort( WirePortDataType.FLOAT, false, GlossStr, index++, MasterNodePortCategory.Fragment, 4 ); } break; } // instead of setting in the switch emission port is always at position 2; m_emissionPortId = 2; AddInputPort( WirePortDataType.FLOAT3, false, TransmissionStr, index++, MasterNodePortCategory.Fragment, 6 ); m_transmissionPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_inputPorts[ m_inputPorts.Count - 1 ].Locked = ( m_currentLightModel == StandardShaderLightModel.Standard ) || ( m_currentLightModel == StandardShaderLightModel.StandardSpecular ) ? false : true; AddInputPort( WirePortDataType.FLOAT3, false, TranslucencyStr, index++, MasterNodePortCategory.Fragment, 7 ); m_translucencyPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_inputPorts[ m_inputPorts.Count - 1 ].Locked = ( m_currentLightModel == StandardShaderLightModel.Standard ) || ( m_currentLightModel == StandardShaderLightModel.StandardSpecular ) ? false : true; AddInputPort( WirePortDataType.FLOAT, false, RefractionStr, index + 2, MasterNodePortCategory.Fragment, 8 ); m_refractionPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_inputPorts[ m_inputPorts.Count - 1 ].Locked = ( m_alphaMode == AlphaMode.Opaque || m_alphaMode == AlphaMode.Masked || m_currentLightModel == StandardShaderLightModel.Unlit || m_currentLightModel == StandardShaderLightModel.CustomLighting ); AddInputPort( WirePortDataType.FLOAT, false, AlphaStr, index++, MasterNodePortCategory.Fragment, 9 ); m_inputPorts[ m_inputPorts.Count - 1 ].DataName = AlphaDataStr; m_opacityPortId = m_inputPorts.Count - 1; m_inputPorts[ m_inputPorts.Count - 1 ].Locked = ( m_alphaMode == AlphaMode.Opaque || m_alphaMode == AlphaMode.Masked ); AddInputPort( WirePortDataType.FLOAT, false, DiscardStr, index++, MasterNodePortCategory.Fragment, 10 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = ( m_alphaMode != AlphaMode.Masked && m_alphaMode != AlphaMode.Custom ); m_discardPortId = m_inputPorts.Count - 1; // This is done to take the index + 2 from refraction port into account and not overlap indexes index++; AddInputPort( WirePortDataType.FLOAT3, false, CustomLightingStr, index++, MasterNodePortCategory.Fragment, 13 ); m_inputPorts[ m_inputPorts.Count - 1 ].Locked = ( m_currentLightModel != StandardShaderLightModel.CustomLighting ); m_inputPorts[ m_inputPorts.Count - 1 ].GenType = PortGenType.CustomLighting; m_customLightingPortId = m_inputPorts.Count - 1; //////////////////////////////////////////////////////////////////////////////////////////////// // Vertex functions - Adding ordex index in order to force these to be the last ones // Well now they have been moved to be the first ones so operations on vertex are to be taken into account // by dither, screen position and similar nodes //////////////////////////////////////////////////////////////////////////////////////////////// m_vertexPortId = m_inputPorts.Count; m_tessOpHelper.VertexOffsetIndexPort = m_vertexPortId; AddInputPort( WirePortDataType.FLOAT3, false, ( m_vertexMode == VertexMode.Relative ? VertexDisplacementStr : VertexPositionStr ), VertexDataStr, 0/*index++*/, MasterNodePortCategory.Vertex, 11 ); AddInputPort( WirePortDataType.FLOAT3, false, VertexNormalStr, 1/*index++*/, MasterNodePortCategory.Vertex, 12 ); //AddInputPort( WirePortDataType.FLOAT3, false, CustomLightModelStr, index++, MasterNodePortCategory.Fragment, 13 ); //m_inputPorts[ m_inputPorts.Count - 1 ].Locked = true;// !(m_currentLightModel == StandardShaderLightModel.CustomLighting); AddInputPort( WirePortDataType.FLOAT4, false, TessellationOpHelper.TessellationPortStr, index++, MasterNodePortCategory.Tessellation, 14 ); m_tessellationPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_tessOpHelper.MasterNodeIndexPort = m_tessellationPort.PortId; //////////////////////////////////////////////////////////////////////////////////// AddInputPort( WirePortDataType.FLOAT3, false, DebugStr, index++, MasterNodePortCategory.Debug, 15 ); for( int i = 0; i < m_inputPorts.Count; i++ ) { m_inputPorts[ i ].CustomColor = Color.white; } m_sizeIsDirty = true; } public override void ForcePortType() { int portId = 0; switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: { m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); } break; case StandardShaderLightModel.StandardSpecular: { m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); } break; case StandardShaderLightModel.CustomLighting: { m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); } break; case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: { m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); } break; case StandardShaderLightModel.BlinnPhong: { m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); } break; } //Transmission m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); //Translucency m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); //Refraction m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); //Alpha m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); //Discard m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT, false ); //Custom Lighting m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); //Vertex Offset m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); //Vertex Normal m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); //Tessellation m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT4, false ); //Debug m_inputPorts[ portId++ ].ChangeType( WirePortDataType.FLOAT3, false ); } public override void SetName( string name ) { ShaderName = name; } public void DrawInspectorProperty() { if( m_inspectorDefaultStyle == null ) { m_inspectorDefaultStyle = UIUtils.GetCustomStyle( CustomStyle.ResetToDefaultInspectorButton ); } DrawCustomInspector(); } private void RecursiveLog() { List<PropertyNode> nodes = UIUtils.PropertyNodesList(); nodes.Sort( ( x, y ) => { return x.OrderIndex.CompareTo( y.OrderIndex ); } ); for( int i = 0; i < nodes.Count; i++ ) { if( ( nodes[ i ] is ReordenatorNode ) ) ( nodes[ i ] as ReordenatorNode ).RecursiveLog(); else Debug.Log( nodes[ i ].OrderIndex + " " + nodes[ i ].PropertyName ); } } public void DrawGeneralOptions() { DrawShaderName(); DrawCurrentShaderType(); EditorGUI.BeginChangeCheck(); m_currentLightModel = (StandardShaderLightModel)EditorGUILayoutEnumPopup( LightModelContent, m_currentLightModel ); if( EditorGUI.EndChangeCheck() ) { ContainerGraph.ChangedLightingModel = true; if( m_currentLightModel == StandardShaderLightModel.CustomLighting ) { ContainerGraph.ParentWindow.CurrentNodeAvailability = NodeAvailability.CustomLighting; //ContainerGraph.CurrentCanvasMode = NodeAvailability.CustomLighting; } else { ContainerGraph.ParentWindow.CurrentNodeAvailability = NodeAvailability.SurfaceShader; //ContainerGraph.CurrentCanvasMode = NodeAvailability.SurfaceShader; } } m_shaderModelIdx = EditorGUILayoutPopup( ShaderModelStr, m_shaderModelIdx, ShaderModelTypeArr ); EditorGUI.BeginChangeCheck(); DrawPrecisionProperty(); if( EditorGUI.EndChangeCheck() ) ContainerGraph.CurrentPrecision = m_currentPrecisionType; //m_cullMode = (CullMode)EditorGUILayoutEnumPopup( CullModeContent, m_cullMode ); UndoParentNode inst = this; m_inlineCullMode.CustomDrawer( ref inst, ( x ) => { m_cullMode = (CullMode)EditorGUILayoutEnumPopup( CullModeContent, m_cullMode ); }, CullModeContent.text ); //m_inlineCullMode.Value = (int)m_cullMode; //m_inlineCullMode.EnumTypePopup( ref inst, CullModeContent.text, Enum.GetNames( typeof( CullMode ) ) ); //m_cullMode = (CullMode) m_inlineCullMode.Value; m_renderPath = (RenderPath)EditorGUILayoutEnumPopup( RenderPathContent, m_renderPath ); m_castShadows = EditorGUILayoutToggle( CastShadowsContent, m_castShadows ); m_receiveShadows = EditorGUILayoutToggle( ReceiveShadowsContent, m_receiveShadows ); m_queueOrder = EditorGUILayoutIntField( QueueIndexContent, m_queueOrder ); EditorGUI.BeginChangeCheck(); m_vertexMode = (VertexMode)EditorGUILayoutEnumPopup( VertexModeStr, m_vertexMode ); if( EditorGUI.EndChangeCheck() ) { m_inputPorts[ m_vertexPortId ].Name = m_vertexMode == VertexMode.Relative ? VertexDisplacementStr : VertexPositionStr; m_sizeIsDirty = true; } m_shaderLOD = Mathf.Clamp( EditorGUILayoutIntField( ShaderLODContent, m_shaderLOD ), 0, Shader.globalMaximumLOD ); ////m_lodCrossfade = EditorGUILayoutToggle( LODCrossfadeContent, m_lodCrossfade ); m_fallbackHelper.Draw( this ); DrawInspectorProperty(); } public void ShowOpacityMaskValueUI() { EditorGUI.BeginChangeCheck(); UndoParentNode inst = this; m_inlineOpacityMaskClipValue.CustomDrawer( ref inst, ( x ) => { m_opacityMaskClipValue = EditorGUILayoutFloatField( OpacityMaskClipValueContent, m_opacityMaskClipValue ); }, OpacityMaskClipValueContent.text ); if( EditorGUI.EndChangeCheck() ) { m_checkChanges = true; if( m_currentMaterial != null && m_currentMaterial.HasProperty( IOUtils.MaskClipValueName ) ) { m_currentMaterial.SetFloat( IOUtils.MaskClipValueName, m_opacityMaskClipValue ); } } } public override void DrawProperties() { if( m_inspectorFoldoutStyle == null || EditorGUIUtility.isProSkin != m_usingProSkin ) m_inspectorFoldoutStyle = new GUIStyle( GUI.skin.GetStyle( "foldout" ) ); if( m_inspectorToolbarStyle == null || EditorGUIUtility.isProSkin != m_usingProSkin ) { m_inspectorToolbarStyle = new GUIStyle( GUI.skin.GetStyle( "toolbarbutton" ) ) { fixedHeight = 20 }; } if( m_inspectorTooldropdownStyle == null || EditorGUIUtility.isProSkin != m_usingProSkin ) { m_inspectorTooldropdownStyle = new GUIStyle( GUI.skin.GetStyle( "toolbardropdown" ) ) { fixedHeight = 20 }; m_inspectorTooldropdownStyle.margin.bottom = 2; } if( EditorGUIUtility.isProSkin != m_usingProSkin ) m_usingProSkin = EditorGUIUtility.isProSkin; base.DrawProperties(); EditorGUILayout.BeginVertical(); { EditorGUILayout.Separator(); m_titleOpacity = 0.5f; m_boxOpacity = ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ); m_cachedColor = GUI.color; // General bool generalIsVisible = ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedGeneralShaderOptions; NodeUtils.DrawPropertyGroup( ref generalIsVisible, GeneralFoldoutStr, DrawGeneralOptions ); ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedGeneralShaderOptions = generalIsVisible; //Blend Mode GUI.color = new Color( m_cachedColor.r, m_cachedColor.g, m_cachedColor.b, m_titleOpacity ); EditorGUILayout.BeginHorizontal( m_inspectorToolbarStyle ); GUI.color = m_cachedColor; bool blendOptionsVisible = GUILayout.Toggle( ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedBlendOptions, AlphaModeContent, UIUtils.MenuItemToggleStyle, GUILayout.ExpandWidth( true ) ); if( Event.current.button == Constants.FoldoutMouseId ) { ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedBlendOptions = blendOptionsVisible; } if( !EditorGUIUtility.isProSkin ) GUI.color = new Color( 0.25f, 0.25f, 0.25f, 1f ); float boxSize = 60; switch( m_alphaMode ) { case AlphaMode.Transparent: boxSize = 85; break; case AlphaMode.Translucent: boxSize = 80; break; case AlphaMode.Premultiply: boxSize = 120; break; } EditorGUI.BeginChangeCheck(); m_alphaMode = (AlphaMode)EditorGUILayoutPopup( string.Empty, (int)m_alphaMode, FadeModeOptions, UIUtils.InspectorPopdropdownStyle, GUILayout.Width( boxSize ), GUILayout.Height( 19 ) ); if( EditorGUI.EndChangeCheck() ) { UpdateFromBlendMode(); } GUI.color = m_cachedColor; EditorGUILayout.EndHorizontal(); m_customBlendAvailable = ( m_alphaMode == AlphaMode.Custom || m_alphaMode == AlphaMode.Opaque ); if( ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedBlendOptions ) { GUI.color = new Color( m_cachedColor.r, m_cachedColor.g, m_cachedColor.b, m_boxOpacity ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); GUI.color = m_cachedColor; EditorGUI.indentLevel++; EditorGUILayout.Separator(); EditorGUI.BeginChangeCheck(); m_renderType = (RenderType)EditorGUILayoutEnumPopup( RenderTypeContent, m_renderType ); if( m_renderType == RenderType.Custom ) { EditorGUI.BeginChangeCheck(); m_customRenderType = EditorGUILayoutTextField( CustomRenderTypeStr, m_customRenderType ); if( EditorGUI.EndChangeCheck() ) { m_customRenderType = UIUtils.RemoveInvalidCharacters( m_customRenderType ); } } m_renderQueue = (RenderQueue)EditorGUILayoutEnumPopup( RenderQueueContent, m_renderQueue ); if( EditorGUI.EndChangeCheck() ) { if( m_renderType == RenderType.Opaque && m_renderQueue == RenderQueue.Geometry ) m_alphaMode = AlphaMode.Opaque; else if( m_renderType == RenderType.TransparentCutout && m_renderQueue == RenderQueue.AlphaTest ) m_alphaMode = AlphaMode.Masked; else if( m_renderType == RenderType.Transparent && m_renderQueue == RenderQueue.Transparent ) m_alphaMode = AlphaMode.Transparent; else if( m_renderType == RenderType.Opaque && m_renderQueue == RenderQueue.Transparent ) m_alphaMode = AlphaMode.Translucent; else m_alphaMode = AlphaMode.Custom; UpdateFromBlendMode(); } bool bufferedEnabled = GUI.enabled; GUI.enabled = ( m_alphaMode == AlphaMode.Masked || m_alphaMode == AlphaMode.Custom ); m_inputPorts[ m_discardPortId ].Locked = !GUI.enabled; ShowOpacityMaskValueUI(); GUI.enabled = bufferedEnabled; EditorGUI.BeginDisabledGroup( !( m_alphaMode == AlphaMode.Transparent || m_alphaMode == AlphaMode.Premultiply || m_alphaMode == AlphaMode.Translucent || m_alphaMode == AlphaMode.Custom ) ); m_grabOrder = EditorGUILayoutIntField( RefractionLayerStr, m_grabOrder ); float cachedLabelWidth = EditorGUIUtility.labelWidth; EditorGUIUtility.labelWidth = 130; m_alphaToCoverage = EditorGUILayoutToggle( AlphaToCoverageStr, m_alphaToCoverage ); EditorGUIUtility.labelWidth = cachedLabelWidth; EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); if( !m_customBlendAvailable ) { EditorGUILayout.HelpBox( "Advanced options are only available for Custom blend modes", MessageType.Warning ); } EditorGUI.BeginDisabledGroup( !m_customBlendAvailable ); m_blendOpsHelper.Draw( this, m_customBlendAvailable ); m_colorMaskHelper.Draw( this ); EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); EditorGUI.indentLevel--; EditorGUILayout.EndVertical(); } m_stencilBufferHelper.Draw( this ); m_tessOpHelper.Draw( this, m_inspectorToolbarStyle, m_currentMaterial, m_tessellationPort.IsConnected ); m_outlineHelper.Draw( this, m_inspectorToolbarStyle, m_currentMaterial ); m_billboardOpHelper.Draw( this ); m_zBufferHelper.Draw( this, m_inspectorToolbarStyle, m_customBlendAvailable ); m_renderingOptionsOpHelper.Draw( this ); m_renderingPlatformOpHelper.Draw( this ); //m_additionalDefines.Draw( this ); //m_additionalIncludes.Draw( this ); //m_additionalPragmas.Draw( this ); m_additionalSurfaceOptions.Draw( this ); m_usePass.Draw( this ); m_additionalDirectives.Draw( this ); m_customTagsHelper.Draw( this ); m_dependenciesHelper.Draw( this ); DrawMaterialInputs( m_inspectorToolbarStyle ); } EditorGUILayout.EndVertical(); } public override void OnNodeLogicUpdate( DrawInfo drawInfo ) { base.OnNodeLogicUpdate( drawInfo ); if( m_initialize ) { m_initialize = false; if( m_dummyProperty == null ) { m_dummyProperty = ScriptableObject.CreateInstance<PropertyNode>(); m_dummyProperty.ContainerGraph = ContainerGraph; } } if( m_currentLightModel != m_lastLightModel ) m_lightModelChanged = true; if( m_lightModelChanged ) { m_lightModelChanged = false; if( m_currentLightModel == StandardShaderLightModel.BlinnPhong ) { if( m_specColorReorder == null ) { m_specColorReorder = ScriptableObject.CreateInstance<ReordenatorNode>(); m_specColorReorder.ContainerGraph = ContainerGraph; m_specColorReorder.OrderIndex = m_specColorOrderIndex; m_specColorReorder.Init( "_SpecColor", "Specular Color", null ); } UIUtils.RegisterPropertyNode( m_specColorReorder ); } else { if( m_specColorReorder != null ) UIUtils.UnregisterPropertyNode( m_specColorReorder ); } if( m_currentLightModel == StandardShaderLightModel.CustomLighting && m_masterNodeCategory == 0 ) ContainerGraph.CurrentCanvasMode = NodeAvailability.CustomLighting; else if( m_masterNodeCategory == 0 ) ContainerGraph.CurrentCanvasMode = NodeAvailability.SurfaceShader; CacheCurrentSettings(); m_lastLightModel = m_currentLightModel; DeleteAllInputConnections( true, true ); AddMasterPorts(); ConnectFromCache(); } if( drawInfo.CurrentEventType != EventType.Layout ) return; if( m_transmissionPort != null && m_transmissionPort.IsConnected && m_renderPath != RenderPath.ForwardOnly ) { m_renderPath = RenderPath.ForwardOnly; UIUtils.ShowMessage( "Render Path changed to Forward Only since transmission only works in forward rendering" ); } if( m_translucencyPort != null && m_translucencyPort.IsConnected && m_renderPath != RenderPath.ForwardOnly ) { m_renderPath = RenderPath.ForwardOnly; UIUtils.ShowMessage( "Render Path changed to Forward Only since translucency only works in forward rendering" ); } if( m_translucencyPort.IsConnected != m_previousTranslucencyOn ) m_checkChanges = true; if( m_refractionPort.IsConnected != m_previousRefractionOn ) m_checkChanges = true; if( ( m_tessOpHelper.EnableTesselation && !m_tessellationPort.IsConnected ) != m_previousTessellationOn ) m_checkChanges = true; m_previousTranslucencyOn = m_translucencyPort.IsConnected; m_previousRefractionOn = m_refractionPort.IsConnected; m_previousTessellationOn = ( m_tessOpHelper.EnableTesselation && !m_tessellationPort.IsConnected ); if( m_checkChanges ) { if( m_translucencyPort.IsConnected ) { if( m_translucencyReorder == null ) { List<PropertyNode> translucencyList = new List<PropertyNode>(); for( int i = 0; i < 6; i++ ) { translucencyList.Add( m_dummyProperty ); } m_translucencyReorder = ScriptableObject.CreateInstance<ReordenatorNode>(); m_translucencyReorder.ContainerGraph = ContainerGraph; m_translucencyReorder.OrderIndex = m_translucencyOrderIndex; m_translucencyReorder.Init( "_TranslucencyGroup", "Translucency", translucencyList ); } UIUtils.RegisterPropertyNode( m_translucencyReorder ); } else { if( m_translucencyReorder != null ) UIUtils.UnregisterPropertyNode( m_translucencyReorder ); } if( m_refractionPort.IsConnected ) { if( m_refractionReorder == null ) { List<PropertyNode> refractionList = new List<PropertyNode>(); for( int i = 0; i < 1; i++ ) { refractionList.Add( m_dummyProperty ); } m_refractionReorder = ScriptableObject.CreateInstance<ReordenatorNode>(); m_refractionReorder.ContainerGraph = ContainerGraph; m_refractionReorder.OrderIndex = m_refractionOrderIndex; m_refractionReorder.Init( "_RefractionGroup", "Refraction", refractionList ); } UIUtils.RegisterPropertyNode( m_refractionReorder ); } else { if( m_refractionReorder != null ) UIUtils.UnregisterPropertyNode( m_refractionReorder ); } if( m_tessOpHelper.EnableTesselation && !m_tessellationPort.IsConnected ) { if( m_tessellationReorder == null ) { List<PropertyNode> tessellationList = new List<PropertyNode>(); for( int i = 0; i < 4; i++ ) { tessellationList.Add( m_dummyProperty ); } m_tessellationReorder = ScriptableObject.CreateInstance<ReordenatorNode>(); m_tessellationReorder.ContainerGraph = ContainerGraph; m_tessellationReorder.OrderIndex = m_tessellationOrderIndex; m_tessellationReorder.Init( "_TessellationGroup", "Tessellation", tessellationList ); m_tessellationReorder.HeaderTitle = "Tesselation"; } UIUtils.RegisterPropertyNode( m_tessellationReorder ); } else { if( m_tessellationReorder != null ) UIUtils.UnregisterPropertyNode( m_tessellationReorder ); } if( m_inputPorts[ m_discardPortId ].Available && !m_inlineOpacityMaskClipValue.IsValid ) { if( m_maskClipReorder == null ) { // Create dragable clip material property m_maskClipReorder = ScriptableObject.CreateInstance<ReordenatorNode>(); m_maskClipReorder.ContainerGraph = ContainerGraph; m_maskClipReorder.OrderIndex = m_maskClipOrderIndex; m_maskClipReorder.Init( "_Cutoff", "Mask Clip Value", null ); } UIUtils.RegisterPropertyNode( m_maskClipReorder ); } else { if( m_maskClipReorder != null ) UIUtils.UnregisterPropertyNode( m_maskClipReorder ); } m_checkChanges = false; } } public override void OnNodeRepaint( DrawInfo drawInfo ) { base.OnNodeRepaint( drawInfo ); if( m_containerGraph.IsInstancedShader || m_renderingOptionsOpHelper.ForceEnableInstancing ) { DrawInstancedIcon( drawInfo ); } } private void CacheCurrentSettings() { m_cacheNodeConnections.Clear(); for( int portId = 0; portId < m_inputPorts.Count; portId++ ) { if( m_inputPorts[ portId ].IsConnected ) { WireReference connection = m_inputPorts[ portId ].GetConnection(); m_cacheNodeConnections.Add( m_inputPorts[ portId ].Name, new NodeCache( connection.NodeId, connection.PortId ) ); } } } private void ConnectFromCache() { for( int i = 0; i < m_inputPorts.Count; i++ ) { NodeCache cache = m_cacheNodeConnections.Get( m_inputPorts[ i ].Name ); if( cache != null ) { UIUtils.SetConnection( UniqueId, m_inputPorts[ i ].PortId, cache.TargetNodeId, cache.TargetPortId ); } } } public override void UpdateMaterial( Material mat ) { base.UpdateMaterial( mat ); if( m_alphaMode == AlphaMode.Masked || m_alphaMode == AlphaMode.Custom ) { if( mat.HasProperty( IOUtils.MaskClipValueName ) ) mat.SetFloat( IOUtils.MaskClipValueName, m_opacityMaskClipValue ); } } public override void SetMaterialMode( Material mat, bool fetchMaterialValues ) { base.SetMaterialMode( mat, fetchMaterialValues ); if( m_alphaMode == AlphaMode.Masked || m_alphaMode == AlphaMode.Custom ) { if( fetchMaterialValues && m_materialMode && mat.HasProperty( IOUtils.MaskClipValueName ) ) { m_opacityMaskClipValue = mat.GetFloat( IOUtils.MaskClipValueName ); } } } public override void ForceUpdateFromMaterial( Material material ) { m_tessOpHelper.UpdateFromMaterial( material ); m_outlineHelper.UpdateFromMaterial( material ); if( m_alphaMode == AlphaMode.Masked || m_alphaMode == AlphaMode.Custom ) { if( material.HasProperty( IOUtils.MaskClipValueName ) ) m_opacityMaskClipValue = material.GetFloat( IOUtils.MaskClipValueName ); } } public override void UpdateMasterNodeMaterial( Material material ) { m_currentMaterial = material; UpdateMaterialEditor(); } void UpdateMaterialEditor() { FireMaterialChangedEvt(); } public string CreateInstructionsForVertexPort( InputPort port ) { //Vertex displacement and per vertex custom data WireReference connection = port.GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); string vertexInstructions = node.GetValueFromOutputStr( connection.PortId, port.DataType, ref m_currentDataCollector, false ); if( m_currentDataCollector.DirtySpecialLocalVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.SpecialLocalVariables, UniqueId, false ); m_currentDataCollector.ClearSpecialLocalVariables(); } if( m_currentDataCollector.DirtyVertexVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.VertexLocalVariables, UniqueId, false ); m_currentDataCollector.ClearVertexLocalVariables(); } return vertexInstructions; } public void CreateInstructionsForPort( InputPort port, string portName, bool addCustomDelimiters = false, string customDelimiterIn = null, string customDelimiterOut = null, bool ignoreLocalVar = false, bool normalIsConnected = false ) { WireReference connection = port.GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); string newInstruction = node.GetValueFromOutputStr( connection.PortId, port.DataType, ref m_currentDataCollector, ignoreLocalVar ); if( m_currentDataCollector.DirtySpecialLocalVariables ) { m_currentDataCollector.AddInstructions( m_currentDataCollector.SpecialLocalVariables ); m_currentDataCollector.ClearSpecialLocalVariables(); } if( m_currentDataCollector.DirtyVertexVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.VertexLocalVariables, port.NodeId, false ); m_currentDataCollector.ClearVertexLocalVariables(); } if( m_currentDataCollector.ForceNormal && !normalIsConnected ) { m_currentDataCollector.AddToStartInstructions( "\t\t\t" + Constants.OutputVarStr + ".Normal = float3(0,0,1);\n" ); m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = false; } m_currentDataCollector.AddInstructions( addCustomDelimiters ? customDelimiterIn : ( "\t\t\t" + portName + " = " ) ); m_currentDataCollector.AddInstructions( newInstruction ); m_currentDataCollector.AddInstructions( addCustomDelimiters ? customDelimiterOut : ";\n" ); } public string CreateInstructionStringForPort( InputPort port, bool ignoreLocalVar = false ) { WireReference connection = port.GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); string newInstruction = node.GetValueFromOutputStr( connection.PortId, port.DataType, ref m_currentDataCollector, ignoreLocalVar ); if( m_currentDataCollector.DirtySpecialLocalVariables ) { m_currentDataCollector.AddInstructions( m_currentDataCollector.SpecialLocalVariables ); m_currentDataCollector.ClearSpecialLocalVariables(); } if( m_currentDataCollector.DirtyVertexVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.VertexLocalVariables, port.NodeId, false ); m_currentDataCollector.ClearVertexLocalVariables(); } if( m_currentDataCollector.ForceNormal ) { m_currentDataCollector.AddToStartInstructions( "\t\t\t" + Constants.OutputVarStr + ".Normal = float3(0,0,1);\n" ); m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = false; } return newInstruction; } public override Shader Execute( string pathname, bool isFullPath ) { ForcePortType(); ForceReordering(); UpdateFromBlendMode(); base.Execute( pathname, isFullPath ); RegisterStandaloneFuntions(); bool isInstancedShader = m_renderingOptionsOpHelper.ForceEnableInstancing || UIUtils.IsInstancedShader(); bool hasVirtualTexture = UIUtils.HasVirtualTexture(); bool hasTranslucency = false; bool hasTransmission = false; bool hasEmission = false; bool hasOpacity = false; bool hasOpacityMask = false; bool hasRefraction = false; //bool hasVertexOffset = false; //bool hasCustomLightingAlpha = false; bool hasCustomLightingMask = false; string customLightingCode = string.Empty; string customLightingAlphaCode = string.Empty; string customLightingMaskCode = string.Empty; string customLightingInstructions = string.Empty; string refractionCode = string.Empty; string refractionInstructions = string.Empty; string refractionFix = string.Empty; string aboveUsePasses = string.Empty; string bellowUsePasses = string.Empty; m_usePass.BuildUsePassInfo( ref aboveUsePasses, ref bellowUsePasses, "\t\t" ); m_currentDataCollector.TesselationActive = m_tessOpHelper.EnableTesselation; m_currentDataCollector.CurrentRenderPath = m_renderPath; StandardShaderLightModel cachedLightModel = m_currentLightModel; NodeAvailability cachedAvailability = ContainerGraph.CurrentCanvasMode; bool debugIsUsingCustomLighting = false; bool usingDebugPort = false; if( m_inputPorts[ m_inputPorts.Count - 1 ].IsConnected ) { usingDebugPort = true; debugIsUsingCustomLighting = m_currentLightModel == StandardShaderLightModel.CustomLighting; m_currentDataCollector.GenType = PortGenType.CustomLighting; m_currentLightModel = StandardShaderLightModel.CustomLighting; ContainerGraph.CurrentCanvasMode = NodeAvailability.CustomLighting; } if( isInstancedShader ) { m_currentDataCollector.AddToPragmas( UniqueId, IOUtils.InstancedPropertiesHeader ); } if( m_renderingOptionsOpHelper.SpecularHighlightToggle || m_renderingOptionsOpHelper.ReflectionsToggle ) m_currentDataCollector.AddToProperties( UniqueId, "[Header(Forward Rendering Options)]", 10001 ); if( m_renderingOptionsOpHelper.SpecularHighlightToggle ) { m_currentDataCollector.AddToProperties( UniqueId, "[ToggleOff] _SpecularHighlights(\"Specular Highlights\", Float) = 1.0", 10002 ); m_currentDataCollector.AddToPragmas( UniqueId, "shader_feature _SPECULARHIGHLIGHTS_OFF" ); } if( m_renderingOptionsOpHelper.ReflectionsToggle ) { m_currentDataCollector.AddToProperties( UniqueId, "[ToggleOff] _GlossyReflections(\"Reflections\", Float) = 1.0", 10003 ); m_currentDataCollector.AddToPragmas( UniqueId, "shader_feature _GLOSSYREFLECTIONS_OFF" ); } // See if each node is being used on frag and/or vert ports SetupNodeCategories(); m_containerGraph.CheckPropertiesAutoRegister( ref m_currentDataCollector ); if( m_refractionPort.IsConnected || m_inputPorts[ m_inputPorts.Count - 1 ].IsConnected ) { m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = true; } //this.PropagateNodeData( nodeData ); string tags = "\"RenderType\" = \"{0}\" \"Queue\" = \"{1}\""; string finalRenderType = ( m_renderType == RenderType.Custom && m_customRenderType.Length > 0 ) ? m_customRenderType : m_renderType.ToString(); tags = string.Format( tags, finalRenderType, ( m_renderQueue + ( ( m_queueOrder >= 0 ) ? "+" : string.Empty ) + m_queueOrder ) ); //if ( !m_customBlendMode ) { if( m_alphaMode == AlphaMode.Transparent || m_alphaMode == AlphaMode.Premultiply ) { //tags += " \"IgnoreProjector\" = \"True\""; if( !m_renderingOptionsOpHelper.IgnoreProjectorValue ) { Debug.Log( string.Format( "Setting Ignore Projector to True since it's requires by Blend Mode {0}.", m_alphaMode ) ); m_renderingOptionsOpHelper.IgnoreProjectorValue = true; } } } tags += m_renderingOptionsOpHelper.IgnoreProjectorTag; tags += m_renderingOptionsOpHelper.ForceNoShadowCastingTag; tags += m_renderingOptionsOpHelper.DisableBatchingTag; //add virtual texture support if( hasVirtualTexture ) { tags += " \"Amplify\" = \"True\" "; } //tags = "Tags{ " + tags + " }"; string outputStruct = ""; switch( m_currentLightModel ) { case StandardShaderLightModel.CustomLighting: outputStruct = "SurfaceOutputCustomLightingCustom"; break; case StandardShaderLightModel.Standard: outputStruct = "SurfaceOutputStandard"; break; case StandardShaderLightModel.StandardSpecular: outputStruct = "SurfaceOutputStandardSpecular"; break; case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: outputStruct = "SurfaceOutput"; break; } if( m_currentLightModel == StandardShaderLightModel.CustomLighting ) { m_currentDataCollector.AddToIncludes( UniqueId, Constants.UnityPBSLightingLib ); m_currentDataCollector.ChangeCustomInputHeader( m_currentLightModel.ToString() + Constants.CustomLightStructStr ); m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Albedo", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Normal", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Emission", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half Metallic", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half Smoothness", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half Occlusion", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half Alpha", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "Input SurfInput", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "UnityGIInput GIData", true ); } // Need to sort before creating local vars so they can inspect the normal port correctly SortedList<int, InputPort> sortedPorts = new SortedList<int, InputPort>(); for( int i = 0; i < m_inputPorts.Count; i++ ) { sortedPorts.Add( m_inputPorts[ i ].OrderId, m_inputPorts[ i ] ); } bool normalIsConnected = m_normalPort.IsConnected; m_tessOpHelper.Reset(); if( m_inputPorts[ m_inputPorts.Count - 1 ].IsConnected ) { //Debug Port active InputPort debugPort = m_inputPorts[ m_inputPorts.Count - 1 ]; m_currentDataCollector.PortCategory = debugPort.Category; if( debugIsUsingCustomLighting ) { m_currentDataCollector.UsingCustomOutput = true; WireReference connection = m_inputPorts[ m_inputPorts.Count - 1 ].GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); customLightingCode = node.GetValueFromOutputStr( connection.PortId, WirePortDataType.FLOAT3, ref m_currentDataCollector, false ); customLightingInstructions = m_currentDataCollector.CustomOutput; if( m_currentDataCollector.ForceNormal ) { m_currentDataCollector.AddToStartInstructions( "\t\t\t" + Constants.OutputVarStr + ".Normal = float3(0,0,1);\n" ); m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = false; } if( m_currentDataCollector.DirtyVertexVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.VertexLocalVariables, UniqueId, false ); m_currentDataCollector.ClearVertexLocalVariables(); } m_currentDataCollector.UsingCustomOutput = false; } else { CreateInstructionsForPort( debugPort, Constants.OutputVarStr + ".Emission", false, null, null, false, false ); } } else { MasterNodePortCategory currentCategory = sortedPorts[ 0 ].Category; //Collect data from standard nodes for( int i = 0; i < sortedPorts.Count; i++ ) { // prepare ports for custom lighting m_currentDataCollector.GenType = sortedPorts[ i ].GenType; if( m_currentLightModel == StandardShaderLightModel.CustomLighting && sortedPorts[ i ].Name.Equals( AlphaStr ) ) ContainerGraph.ResetNodesLocalVariablesIfNot( MasterNodePortCategory.Vertex ); if( sortedPorts[ i ].IsConnected ) { m_currentDataCollector.PortCategory = sortedPorts[ i ].Category; if( sortedPorts[ i ].Name.Equals( NormalStr ) )// Normal Map is Connected { m_currentDataCollector.DirtyNormal = true; } if( sortedPorts[ i ].Name.Equals( TranslucencyStr ) ) { hasTranslucency = true; } if( sortedPorts[ i ].Name.Equals( TransmissionStr ) ) { hasTransmission = true; } if( sortedPorts[ i ].Name.Equals( EmissionStr ) ) { hasEmission = true; } if( sortedPorts[ i ].Name.Equals( RefractionStr ) ) { hasRefraction = true; } if( sortedPorts[ i ].Name.Equals( AlphaStr ) ) { hasOpacity = true; } if( sortedPorts[ i ].Name.Equals( DiscardStr ) ) { hasOpacityMask = true; } if( hasRefraction ) { m_currentDataCollector.AddToInput( UniqueId, SurfaceInputs.SCREEN_POS ); m_currentDataCollector.AddToInput( UniqueId, SurfaceInputs.WORLD_POS ); //not necessary, just being safe m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = true; if( m_grabOrder != 0 ) { m_currentDataCollector.AddGrabPass( "RefractionGrab" + m_grabOrder ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform sampler2D RefractionGrab" + m_grabOrder + ";" ); } else { m_currentDataCollector.AddGrabPass( "" ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform sampler2D _GrabTexture;" ); } m_currentDataCollector.AddToUniforms( UniqueId, "uniform float _ChromaticAberration;" ); m_currentDataCollector.AddToProperties( UniqueId, "[Header(Refraction)]", m_refractionReorder.OrderIndex ); m_currentDataCollector.AddToProperties( UniqueId, "_ChromaticAberration(\"Chromatic Aberration\", Range( 0 , 0.3)) = 0.1", m_refractionReorder.OrderIndex + 1 ); m_currentDataCollector.AddToPragmas( UniqueId, "multi_compile _ALPHAPREMULTIPLY_ON" ); } if( hasTranslucency || hasTransmission ) { //Translucency and Transmission Generation //Add properties and uniforms m_currentDataCollector.AddToIncludes( UniqueId, Constants.UnityPBSLightingLib ); if( hasTranslucency ) { m_currentDataCollector.AddToProperties( UniqueId, "[Header(Translucency)]", m_translucencyReorder.OrderIndex ); m_currentDataCollector.AddToProperties( UniqueId, "_Translucency(\"Strength\", Range( 0 , 50)) = 1", m_translucencyReorder.OrderIndex + 1 ); m_currentDataCollector.AddToProperties( UniqueId, "_TransNormalDistortion(\"Normal Distortion\", Range( 0 , 1)) = 0.1", m_translucencyReorder.OrderIndex + 2 ); m_currentDataCollector.AddToProperties( UniqueId, "_TransScattering(\"Scaterring Falloff\", Range( 1 , 50)) = 2", m_translucencyReorder.OrderIndex + 3 ); m_currentDataCollector.AddToProperties( UniqueId, "_TransDirect(\"Direct\", Range( 0 , 1)) = 1", m_translucencyReorder.OrderIndex + 4 ); m_currentDataCollector.AddToProperties( UniqueId, "_TransAmbient(\"Ambient\", Range( 0 , 1)) = 0.2", m_translucencyReorder.OrderIndex + 5 ); m_currentDataCollector.AddToProperties( UniqueId, "_TransShadow(\"Shadow\", Range( 0 , 1)) = 0.9", m_translucencyReorder.OrderIndex + 6 ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform half _Translucency;" ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform half _TransNormalDistortion;" ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform half _TransScattering;" ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform half _TransDirect;" ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform half _TransAmbient;" ); m_currentDataCollector.AddToUniforms( UniqueId, "uniform half _TransShadow;" ); } //Add custom struct switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: outputStruct = "SurfaceOutput" + m_currentLightModel.ToString() + Constants.CustomLightStructStr; break; } m_currentDataCollector.ChangeCustomInputHeader( m_currentLightModel.ToString() + Constants.CustomLightStructStr ); m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Albedo", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Normal", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Emission", true ); switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: m_currentDataCollector.AddToCustomInput( UniqueId, "half Metallic", true ); break; case StandardShaderLightModel.StandardSpecular: m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Specular", true ); break; } m_currentDataCollector.AddToCustomInput( UniqueId, "half Smoothness", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half Occlusion", true ); m_currentDataCollector.AddToCustomInput( UniqueId, "half Alpha", true ); if( hasTranslucency ) m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Translucency", true ); if( hasTransmission ) m_currentDataCollector.AddToCustomInput( UniqueId, "half3 Transmission", true ); } if( sortedPorts[ i ].Name.Equals( DiscardStr ) ) { //Discard Op Node if( m_currentLightModel == StandardShaderLightModel.CustomLighting ) { hasCustomLightingMask = true; m_currentDataCollector.UsingCustomOutput = true; m_currentDataCollector.GenType = PortGenType.CustomLighting; WireReference connection = sortedPorts[ i ].GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); customLightingMaskCode = node.GetValueFromOutputStr( connection.PortId, WirePortDataType.FLOAT, ref m_currentDataCollector, false ); customLightingMaskCode = "clip( " + customLightingMaskCode + " - " + m_inlineOpacityMaskClipValue.GetValueOrProperty( IOUtils.MaskClipValueName, false ) + " )"; customLightingInstructions = m_currentDataCollector.CustomOutput; m_currentDataCollector.GenType = PortGenType.NonCustomLighting; m_currentDataCollector.UsingCustomOutput = false; continue; } else { string clipIn = "\t\t\tclip( "; string clipOut = " - " + m_inlineOpacityMaskClipValue.GetValueOrProperty( IOUtils.MaskClipValueName, false ) + " );\n"; if( m_alphaToCoverage && m_castShadows ) { clipIn = "\t\t\t#if UNITY_PASS_SHADOWCASTER\n" + clipIn; clipOut = clipOut + "\t\t\t#endif\n"; } CreateInstructionsForPort( sortedPorts[ i ], Constants.OutputVarStr + "." + sortedPorts[ i ].DataName, true, clipIn, clipOut, false, normalIsConnected ); } } else if( sortedPorts[ i ].DataName.Equals( VertexDataStr ) ) { string vertexInstructions = CreateInstructionsForVertexPort( sortedPorts[ i ] ); m_currentDataCollector.AddToVertexDisplacement( vertexInstructions, m_vertexMode ); } else if( sortedPorts[ i ].DataName.Equals( VertexNormalStr ) ) { string vertexInstructions = CreateInstructionsForVertexPort( sortedPorts[ i ] ); m_currentDataCollector.AddToVertexNormal( vertexInstructions ); } else if( m_tessOpHelper.IsTessellationPort( sortedPorts[ i ].PortId ) && sortedPorts[ i ].IsConnected /* && m_tessOpHelper.EnableTesselation*/) { //Vertex displacement and per vertex custom data WireReference connection = sortedPorts[ i ].GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); string vertexInstructions = node.GetValueFromOutputStr( connection.PortId, sortedPorts[ i ].DataType, ref m_currentDataCollector, false ); if( m_currentDataCollector.DirtySpecialLocalVariables ) { m_tessOpHelper.AddAdditionalData( m_currentDataCollector.SpecialLocalVariables ); m_currentDataCollector.ClearSpecialLocalVariables(); } if( m_currentDataCollector.DirtyVertexVariables ) { m_tessOpHelper.AddAdditionalData( m_currentDataCollector.VertexLocalVariables ); m_currentDataCollector.ClearVertexLocalVariables(); } m_tessOpHelper.AddCustomFunction( vertexInstructions ); } else if( sortedPorts[ i ].Name.Equals( RefractionStr ) ) { ContainerGraph.ResetNodesLocalVariables(); m_currentDataCollector.UsingCustomOutput = true; refractionFix = " + 0.00001 * i.screenPos * i.worldPos"; m_currentDataCollector.AddInstructions( "\t\t\to.Normal = o.Normal" + refractionFix + ";\n" ); refractionCode = CreateInstructionStringForPort( sortedPorts[ i ], false ); refractionInstructions = m_currentDataCollector.CustomOutput; m_currentDataCollector.UsingCustomOutput = false; } else if( sortedPorts[ i ].Name.Equals( CustomLightingStr ) ) { m_currentDataCollector.UsingCustomOutput = true; WireReference connection = sortedPorts[ i ].GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); customLightingCode = node.GetValueFromOutputStr( connection.PortId, WirePortDataType.FLOAT3, ref m_currentDataCollector, false ); customLightingInstructions = m_currentDataCollector.CustomOutput; if( m_currentDataCollector.ForceNormal ) { m_currentDataCollector.AddToStartInstructions( "\t\t\t" + Constants.OutputVarStr + ".Normal = float3(0,0,1);\n" ); m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = false; } if( m_currentDataCollector.DirtyVertexVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.VertexLocalVariables, UniqueId, false ); m_currentDataCollector.ClearVertexLocalVariables(); } m_currentDataCollector.UsingCustomOutput = false; } else if( sortedPorts[ i ].Name.Equals( AlphaStr ) && m_currentLightModel == StandardShaderLightModel.CustomLighting ) { m_currentDataCollector.UsingCustomOutput = true; m_currentDataCollector.GenType = PortGenType.CustomLighting; WireReference connection = sortedPorts[ i ].GetConnection(); ParentNode node = UIUtils.GetNode( connection.NodeId ); customLightingAlphaCode = node.GetValueFromOutputStr( connection.PortId, WirePortDataType.FLOAT, ref m_currentDataCollector, false ); customLightingInstructions = m_currentDataCollector.CustomOutput; if( m_currentDataCollector.ForceNormal ) { m_currentDataCollector.AddToStartInstructions( "\t\t\t" + Constants.OutputVarStr + ".Normal = float3(0,0,1);\n" ); m_currentDataCollector.DirtyNormal = true; m_currentDataCollector.ForceNormal = false; } if( m_currentDataCollector.DirtyVertexVariables ) { m_currentDataCollector.AddVertexInstruction( m_currentDataCollector.VertexLocalVariables, UniqueId, false ); m_currentDataCollector.ClearVertexLocalVariables(); } m_currentDataCollector.GenType = PortGenType.NonCustomLighting; m_currentDataCollector.UsingCustomOutput = false; } else { // Surface shader instruccions // if working on normals and have normal dependent node then ignore local var generation CreateInstructionsForPort( sortedPorts[ i ], Constants.OutputVarStr + "." + sortedPorts[ i ].DataName, false, null, null, false, normalIsConnected ); } } else if( sortedPorts[ i ].Name.Equals( AlphaStr ) ) { if( m_currentLightModel != StandardShaderLightModel.CustomLighting ) { m_currentDataCollector.AddInstructions( string.Format( "\t\t\t{0}.{1} = 1;\n", Constants.OutputVarStr, sortedPorts[ i ].DataName ) ); } } } m_billboardOpHelper.FillDataCollectorWithInternalData( ref m_currentDataCollector ); } if( ( m_castShadows && m_alphaToCoverage ) || ( m_castShadows && hasOpacity ) || ( m_castShadows && ( m_currentDataCollector.UsingWorldNormal || m_currentDataCollector.UsingWorldReflection || m_currentDataCollector.UsingViewDirection ) ) || ( m_castShadows && m_inputPorts[ m_discardPortId ].Available && m_inputPorts[ m_discardPortId ].IsConnected && m_currentLightModel == StandardShaderLightModel.CustomLighting ) ) m_customShadowCaster = true; else m_customShadowCaster = false; //m_customShadowCaster = true; for( int i = 0; i < 4; i++ ) { if( m_currentDataCollector.GetChannelUsage( i ) == TextureChannelUsage.Required ) { string channelName = UIUtils.GetChannelName( i ); m_currentDataCollector.AddToProperties( -1, UIUtils.GetTex2DProperty( channelName, TexturePropertyValues.white ), -1 ); } } m_currentDataCollector.AddToProperties( -1, IOUtils.DefaultASEDirtyCheckProperty, 10000 ); if( m_inputPorts[ m_discardPortId ].Available && m_inputPorts[ m_discardPortId ].IsConnected ) { if( m_inlineOpacityMaskClipValue.IsValid ) { RangedFloatNode fnode = UIUtils.GetNode( m_inlineOpacityMaskClipValue.NodeId ) as RangedFloatNode; if( fnode != null ) { m_currentDataCollector.AddToProperties( fnode.UniqueId, fnode.GetPropertyValue(), fnode.OrderIndex ); m_currentDataCollector.AddToUniforms( fnode.UniqueId, fnode.GetUniformValue() ); } else { IntNode inode = UIUtils.GetNode( m_inlineOpacityMaskClipValue.NodeId ) as IntNode; m_currentDataCollector.AddToProperties( inode.UniqueId, inode.GetPropertyValue(), inode.OrderIndex ); m_currentDataCollector.AddToUniforms( inode.UniqueId, inode.GetUniformValue() ); } } else { m_currentDataCollector.AddToProperties( -1, string.Format( IOUtils.MaskClipValueProperty, OpacityMaskClipValueStr, m_opacityMaskClipValue ), ( m_maskClipReorder != null ) ? m_maskClipReorder.OrderIndex : -1 ); m_currentDataCollector.AddToUniforms( -1, string.Format( IOUtils.MaskClipValueUniform, m_opacityMaskClipValue ) ); } } if( !m_currentDataCollector.DirtyInputs ) m_currentDataCollector.AddToInput( UniqueId, "half filler", true ); if( m_currentLightModel == StandardShaderLightModel.BlinnPhong ) m_currentDataCollector.AddToProperties( -1, "_SpecColor(\"Specular Color\",Color)=(1,1,1,1)", m_specColorReorder.OrderIndex ); //Tesselation if( m_tessOpHelper.EnableTesselation ) { m_tessOpHelper.AddToDataCollector( ref m_currentDataCollector, m_tessellationReorder != null ? m_tessellationReorder.OrderIndex : -1 ); if( !m_currentDataCollector.DirtyPerVertexData ) { m_currentDataCollector.OpenPerVertexHeader( false ); } } if( m_outlineHelper.EnableOutline || ( m_currentDataCollector.UsingCustomOutlineColor || m_currentDataCollector.CustomOutlineSelectedAlpha > 0 || m_currentDataCollector.UsingCustomOutlineWidth ) ) { m_outlineHelper.AddToDataCollector( ref m_currentDataCollector ); } #if !UNITY_2017_1_OR_NEWER if( m_renderingOptionsOpHelper.LodCrossfade ) { m_currentDataCollector.AddToPragmas( UniqueId, "multi_compile _ LOD_FADE_CROSSFADE" ); m_currentDataCollector.AddToStartInstructions( "\t\t\tUNITY_APPLY_DITHER_CROSSFADE(i);\n" ); m_currentDataCollector.AddToInput( UniqueId, "UNITY_DITHER_CROSSFADE_COORDS", false ); m_currentDataCollector.AddVertexInstruction( "UNITY_TRANSFER_DITHER_CROSSFADE( " + Constants.VertexShaderOutputStr + ", " + Constants.VertexShaderInputStr + ".vertex )", UniqueId, true ); } #endif //m_additionalIncludes.AddToDataCollector( ref m_currentDataCollector ); //m_additionalPragmas.AddToDataCollector( ref m_currentDataCollector ); //m_additionalDefines.AddToDataCollector( ref m_currentDataCollector ); m_additionalDirectives.AddAllToDataCollector( ref m_currentDataCollector ); //m_currentDataCollector.CloseInputs(); m_currentDataCollector.CloseCustomInputs(); m_currentDataCollector.CloseProperties(); m_currentDataCollector.ClosePerVertexHeader(); //build Shader Body string ShaderBody = string.Empty; OpenShaderBody( ref ShaderBody, m_shaderName ); { //set properties if( m_currentDataCollector.DirtyProperties ) { ShaderBody += m_currentDataCollector.BuildPropertiesString(); } //set subshader OpenSubShaderBody( ref ShaderBody ); { // Add extra depth pass m_zBufferHelper.DrawExtraDepthPass( ref ShaderBody ); // Add optionalPasses if( m_outlineHelper.EnableOutline || ( m_currentDataCollector.UsingCustomOutlineColor || m_currentDataCollector.CustomOutlineSelectedAlpha > 0 || m_currentDataCollector.UsingCustomOutlineWidth ) ) { if( !usingDebugPort ) AddMultilineBody( ref ShaderBody, m_outlineHelper.OutlineFunctionBody( ref m_currentDataCollector, isInstancedShader, m_customShadowCaster, UIUtils.RemoveInvalidCharacters( ShaderName ), ( m_billboardOpHelper.IsBillboard && !usingDebugPort ? m_billboardOpHelper.GetInternalMultilineInstructions() : null ), ref m_tessOpHelper, ShaderModelTypeArr[ m_shaderModelIdx ] ) ); } //Add SubShader tags if( hasEmission ) { tags += " \"IsEmissive\" = \"true\" "; } tags += m_customTagsHelper.GenerateCustomTags(); tags = "Tags{ " + tags + " }"; if( !string.IsNullOrEmpty( aboveUsePasses ) ) { ShaderBody += aboveUsePasses; } AddRenderTags( ref ShaderBody, tags ); AddShaderLOD( ref ShaderBody, m_shaderLOD ); AddRenderState( ref ShaderBody, "Cull", m_inlineCullMode.GetValueOrProperty( m_cullMode.ToString() ) ); m_customBlendAvailable = ( m_alphaMode == AlphaMode.Custom || m_alphaMode == AlphaMode.Opaque ); if( ( m_zBufferHelper.IsActive && m_customBlendAvailable ) || m_outlineHelper.UsingZWrite || m_outlineHelper.UsingZTest ) { ShaderBody += m_zBufferHelper.CreateDepthInfo( m_outlineHelper.UsingZWrite, m_outlineHelper.UsingZTest ); } if( m_stencilBufferHelper.Active ) { ShaderBody += m_stencilBufferHelper.CreateStencilOp( this ); } if( m_blendOpsHelper.Active ) { ShaderBody += m_blendOpsHelper.CreateBlendOps(); } if( m_alphaToCoverage ) { ShaderBody += "\t\tAlphaToMask On\n"; } // Build Color Mask m_colorMaskHelper.BuildColorMask( ref ShaderBody, m_customBlendAvailable ); //ShaderBody += "\t\tZWrite " + _zWriteMode + '\n'; //ShaderBody += "\t\tZTest " + _zTestMode + '\n'; //Add GrabPass if( m_currentDataCollector.DirtyGrabPass ) { ShaderBody += m_currentDataCollector.GrabPass; } // build optional parameters string OptionalParameters = string.Empty; // addword standard to custom lighting to accepts standard lighting models string standardCustomLighting = string.Empty; if( m_currentLightModel == StandardShaderLightModel.CustomLighting ) standardCustomLighting = "Standard"; //add cg program if( m_customShadowCaster ) OpenCGInclude( ref ShaderBody ); else OpenCGProgram( ref ShaderBody ); { //Add Defines if( m_currentDataCollector.DirtyDefines ) ShaderBody += m_currentDataCollector.Defines; //Add Includes if( m_customShadowCaster ) { m_currentDataCollector.AddToIncludes( UniqueId, Constants.UnityPBSLightingLib ); m_currentDataCollector.AddToIncludes( UniqueId, "Lighting.cginc" ); } if( m_currentDataCollector.DirtyIncludes ) ShaderBody += m_currentDataCollector.Includes; //define as surface shader and specify lighting model if( UIUtils.GetTextureArrayNodeAmount() > 0 && m_shaderModelIdx < 3 ) { Debug.Log( "Automatically changing Shader Model to 3.5 since it's the minimum required by texture arrays." ); m_shaderModelIdx = 3; } // if tessellation is active then we need be at least using shader model 4.6 if( m_tessOpHelper.EnableTesselation && m_shaderModelIdx < 6 ) { Debug.Log( "Automatically changing Shader Model to 4.6 since it's the minimum required by tessellation." ); m_shaderModelIdx = 6; } // if translucency is ON change render path if( hasTranslucency && m_renderPath != RenderPath.ForwardOnly ) { Debug.Log( "Automatically changing Render Path to Forward Only since translucency only works in forward rendering." ); m_renderPath = RenderPath.ForwardOnly; } // if outline is ON change render path if( m_outlineHelper.EnableOutline && m_renderPath != RenderPath.ForwardOnly ) { Debug.Log( "Automatically changing Render Path to Forward Only since outline only works in forward rendering." ); m_renderPath = RenderPath.ForwardOnly; } // if transmission is ON change render path if( hasTransmission && m_renderPath != RenderPath.ForwardOnly ) { Debug.Log( "Automatically changing Render Path to Forward Only since transmission only works in forward rendering." ); m_renderPath = RenderPath.ForwardOnly; } // if refraction is ON change render path if( hasRefraction && m_renderPath != RenderPath.ForwardOnly ) { Debug.Log( "Automatically changing Render Path to Forward Only since refraction only works in forward rendering." ); m_renderPath = RenderPath.ForwardOnly; } ShaderBody += string.Format( IOUtils.PragmaTargetHeader, ShaderModelTypeArr[ m_shaderModelIdx ] ); //Add pragmas (needs check to see if all pragmas work with custom shadow caster) if( m_currentDataCollector.DirtyPragmas/* && !m_customShadowCaster */) ShaderBody += m_currentDataCollector.Pragmas; if(m_currentDataCollector.DirtyAdditionalDirectives) ShaderBody += m_currentDataCollector.StandardAdditionalDirectives; //if ( !m_customBlendMode ) { switch( m_alphaMode ) { case AlphaMode.Opaque: case AlphaMode.Masked: break; case AlphaMode.Transparent: { OptionalParameters += "alpha:fade" + Constants.OptionalParametersSep; } break; case AlphaMode.Premultiply: { OptionalParameters += "alpha:premul" + Constants.OptionalParametersSep; } break; } } if( m_keepAlpha ) { OptionalParameters += "keepalpha" + Constants.OptionalParametersSep; } if( hasRefraction ) { OptionalParameters += "finalcolor:RefractionF" + Constants.OptionalParametersSep; } if( !m_customShadowCaster && m_castShadows ) { OptionalParameters += "addshadow" + Constants.OptionalParametersSep; } if( m_castShadows ) { OptionalParameters += "fullforwardshadows" + Constants.OptionalParametersSep; } if( !m_receiveShadows ) { OptionalParameters += "noshadow" + Constants.OptionalParametersSep; } if( m_renderingOptionsOpHelper.IsOptionActive( " Add Pass" ) && usingDebugPort ) { OptionalParameters += "noforwardadd" + Constants.OptionalParametersSep; } if( m_renderingOptionsOpHelper.ForceDisableInstancing ) { OptionalParameters += "noinstancing" + Constants.OptionalParametersSep; } switch( m_renderPath ) { case RenderPath.All: break; case RenderPath.DeferredOnly: OptionalParameters += "exclude_path:forward" + Constants.OptionalParametersSep; break; case RenderPath.ForwardOnly: OptionalParameters += "exclude_path:deferred" + Constants.OptionalParametersSep; break; } //Add code generation options m_renderingOptionsOpHelper.Build( ref OptionalParameters ); if( !m_customShadowCaster ) { string customLightSurface = string.Empty; if( hasTranslucency || hasTransmission ) customLightSurface = "Custom"; m_renderingPlatformOpHelper.SetRenderingPlatforms( ref ShaderBody ); //Check if Custom Vertex is being used and add tag if( m_currentDataCollector.DirtyPerVertexData ) OptionalParameters += "vertex:" + Constants.VertexDataFunc + Constants.OptionalParametersSep; if( m_tessOpHelper.EnableTesselation && !usingDebugPort ) { m_tessOpHelper.WriteToOptionalParams( ref OptionalParameters ); } m_additionalSurfaceOptions.WriteToOptionalSurfaceOptions( ref OptionalParameters ); AddShaderPragma( ref ShaderBody, "surface surf " + standardCustomLighting + m_currentLightModel.ToString() + customLightSurface + Constants.OptionalParametersSep + OptionalParameters ); } else { if( /*m_currentDataCollector.UsingWorldNormal ||*/ m_currentDataCollector.UsingInternalData ) { ShaderBody += "\t\t#ifdef UNITY_PASS_SHADOWCASTER\n"; ShaderBody += "\t\t\t#undef INTERNAL_DATA\n"; ShaderBody += "\t\t\t#undef WorldReflectionVector\n"; ShaderBody += "\t\t\t#undef WorldNormalVector\n"; ShaderBody += "\t\t\t#define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2;\n"; ShaderBody += "\t\t\t#define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)))\n"; ShaderBody += "\t\t\t#define WorldNormalVector(data,normal) half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))\n"; ShaderBody += "\t\t#endif\n"; } } if( m_currentDataCollector.UsingHigherSizeTexcoords ) { ShaderBody += "\t\t#undef TRANSFORM_TEX\n"; ShaderBody += "\t\t#define TRANSFORM_TEX(tex,name) float4(tex.xy * name##_ST.xy + name##_ST.zw, tex.z, tex.w)\n"; } if( m_currentDataCollector.DirtyAppData ) ShaderBody += m_currentDataCollector.CustomAppData; // Add Input struct if( m_currentDataCollector.DirtyInputs ) ShaderBody += "\t\t" + m_currentDataCollector.Inputs + "\t\t};" + "\n\n"; // Add Custom Lighting struct if( m_currentDataCollector.DirtyCustomInput ) ShaderBody += m_currentDataCollector.CustomInput + "\n\n"; //Add Uniforms if( m_currentDataCollector.DirtyUniforms ) ShaderBody += m_currentDataCollector.Uniforms + "\n"; // Add Array Derivatives Macros if( m_currentDataCollector.UsingArrayDerivatives ) { ShaderBody += "\t\t#if defined(UNITY_COMPILER_HLSL2GLSL) || defined(SHADER_TARGET_SURFACE_ANALYSIS)\n"; ShaderBody += "\t\t\t#define ASE_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) UNITY_SAMPLE_TEX2DARRAY (tex,coord)\n"; ShaderBody += "\t\t#else\n"; ShaderBody += "\t\t\t#define ASE_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) tex.SampleGrad (sampler##tex,coord,dx,dy)\n"; ShaderBody += "\t\t#endif\n\n"; } //Add Instanced Properties if( isInstancedShader && m_currentDataCollector.DirtyInstancedProperties ) { m_currentDataCollector.SetupInstancePropertiesBlock( UIUtils.RemoveInvalidCharacters( ShaderName ) ); ShaderBody += m_currentDataCollector.InstancedProperties + "\n"; } if( m_currentDataCollector.DirtyFunctions ) ShaderBody += m_currentDataCollector.Functions + "\n"; //Tesselation if( m_tessOpHelper.EnableTesselation && !usingDebugPort ) { ShaderBody += m_tessOpHelper.GetCurrentTessellationFunction + "\n"; } //Add Custom Vertex Data if( m_currentDataCollector.DirtyPerVertexData ) { ShaderBody += m_currentDataCollector.VertexData; } if( m_currentLightModel == StandardShaderLightModel.Unlit ) { for( int i = 0; i < VertexLitFunc.Length; i++ ) { ShaderBody += VertexLitFunc[ i ] + "\n"; } } //Add custom lighting if( m_currentLightModel == StandardShaderLightModel.CustomLighting ) { ShaderBody += "\t\tinline half4 LightingStandard" + m_currentLightModel.ToString() + "( inout " + outputStruct + " " + Constants.CustomLightOutputVarStr + ", half3 viewDir, UnityGI gi )\n\t\t{\n"; ShaderBody += "\t\t\tUnityGIInput data = s.GIData;\n"; ShaderBody += "\t\t\tInput i = s.SurfInput;\n"; ShaderBody += "\t\t\thalf4 c = 0;\n"; if( m_currentDataCollector.UsingLightAttenuation ) { ShaderBody += "\t\t\t#ifdef UNITY_PASS_FORWARDBASE\n"; ShaderBody += "\t\t\tfloat ase_lightAtten = data.atten;\n"; ShaderBody += "\t\t\tif( _LightColor0.a == 0)\n"; ShaderBody += "\t\t\tase_lightAtten = 0;\n"; ShaderBody += "\t\t\t#else\n"; ShaderBody += "\t\t\tfloat3 ase_lightAttenRGB = gi.light.color / ( ( _LightColor0.rgb ) + 0.000001 );\n"; ShaderBody += "\t\t\tfloat ase_lightAtten = max( max( ase_lightAttenRGB.r, ase_lightAttenRGB.g ), ase_lightAttenRGB.b );\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t\t#if defined(HANDLE_SHADOWS_BLENDING_IN_GI)\n"; ShaderBody += "\t\t\thalf bakedAtten = UnitySampleBakedOcclusion(data.lightmapUV.xy, data.worldPos);\n"; ShaderBody += "\t\t\tfloat zDist = dot(_WorldSpaceCameraPos - data.worldPos, UNITY_MATRIX_V[2].xyz);\n"; ShaderBody += "\t\t\tfloat fadeDist = UnityComputeShadowFadeDistance(data.worldPos, zDist);\n"; ShaderBody += "\t\t\tase_lightAtten = UnityMixRealtimeAndBakedShadows(data.atten, bakedAtten, UnityComputeShadowFade(fadeDist));\n"; ShaderBody += "\t\t\t#endif\n"; } //if( m_currentDataCollector.dirtyc ) ShaderBody += customLightingInstructions; ShaderBody += "\t\t\tc.rgb = " + ( !string.IsNullOrEmpty( customLightingCode ) ? customLightingCode : "0" ) + ";\n"; ShaderBody += "\t\t\tc.a = " + ( !string.IsNullOrEmpty( customLightingAlphaCode ) ? customLightingAlphaCode : "1" ) + ";\n"; if( m_alphaMode == AlphaMode.Premultiply || ( ( m_alphaMode == AlphaMode.Custom || m_alphaMode == AlphaMode.Opaque ) && m_blendOpsHelper.CurrentBlendRGB.IndexOf( "Premultiplied" ) > -1 ) ) ShaderBody += "\t\t\tc.rgb *= c.a;\n"; if( hasCustomLightingMask ) ShaderBody += "\t\t\t" + customLightingMaskCode + ";\n"; ShaderBody += "\t\t\treturn c;\n"; ShaderBody += "\t\t}\n\n"; //Add GI function ShaderBody += "\t\tinline void LightingStandard" + m_currentLightModel.ToString() + "_GI( inout " + outputStruct + " " + Constants.CustomLightOutputVarStr + ", UnityGIInput data, inout UnityGI gi )\n\t\t{\n"; ShaderBody += "\t\t\ts.GIData = data;\n"; //ShaderBody += "\t\t\tUNITY_GI(gi, " + Constants.CustomLightOutputVarStr + ", data);\n"; ShaderBody += "\t\t}\n\n"; } //Add custom lighting function if( hasTranslucency || hasTransmission ) { ShaderBody += "\t\tinline half4 Lighting" + m_currentLightModel.ToString() + Constants.CustomLightStructStr + "(" + outputStruct + " " + Constants.CustomLightOutputVarStr + ", half3 viewDir, UnityGI gi )\n\t\t{\n"; if( hasTranslucency ) { ShaderBody += "\t\t\t#if !DIRECTIONAL\n"; ShaderBody += "\t\t\tfloat3 lightAtten = gi.light.color;\n"; ShaderBody += "\t\t\t#else\n"; ShaderBody += "\t\t\tfloat3 lightAtten = lerp( _LightColor0.rgb, gi.light.color, _TransShadow );\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t\thalf3 lightDir = gi.light.dir + " + Constants.CustomLightOutputVarStr + ".Normal * _TransNormalDistortion;\n"; ShaderBody += "\t\t\thalf transVdotL = pow( saturate( dot( viewDir, -lightDir ) ), _TransScattering );\n"; ShaderBody += "\t\t\thalf3 translucency = lightAtten * (transVdotL * _TransDirect + gi.indirect.diffuse * _TransAmbient) * " + Constants.CustomLightOutputVarStr + ".Translucency;\n"; ShaderBody += "\t\t\thalf4 c = half4( " + Constants.CustomLightOutputVarStr + ".Albedo * translucency * _Translucency, 0 );\n\n"; } if( hasTransmission ) { ShaderBody += "\t\t\thalf3 transmission = max(0 , -dot(" + Constants.CustomLightOutputVarStr + ".Normal, gi.light.dir)) * gi.light.color * " + Constants.CustomLightOutputVarStr + ".Transmission;\n"; ShaderBody += "\t\t\thalf4 d = half4(" + Constants.CustomLightOutputVarStr + ".Albedo * transmission , 0);\n\n"; } ShaderBody += "\t\t\tSurfaceOutput" + m_currentLightModel.ToString() + " r;\n"; ShaderBody += "\t\t\tr.Albedo = " + Constants.CustomLightOutputVarStr + ".Albedo;\n"; ShaderBody += "\t\t\tr.Normal = " + Constants.CustomLightOutputVarStr + ".Normal;\n"; ShaderBody += "\t\t\tr.Emission = " + Constants.CustomLightOutputVarStr + ".Emission;\n"; switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: ShaderBody += "\t\t\tr.Metallic = " + Constants.CustomLightOutputVarStr + ".Metallic;\n"; break; case StandardShaderLightModel.StandardSpecular: ShaderBody += "\t\t\tr.Specular = " + Constants.CustomLightOutputVarStr + ".Specular;\n"; break; } ShaderBody += "\t\t\tr.Smoothness = " + Constants.CustomLightOutputVarStr + ".Smoothness;\n"; ShaderBody += "\t\t\tr.Occlusion = " + Constants.CustomLightOutputVarStr + ".Occlusion;\n"; ShaderBody += "\t\t\tr.Alpha = " + Constants.CustomLightOutputVarStr + ".Alpha;\n"; ShaderBody += "\t\t\treturn Lighting" + m_currentLightModel.ToString() + " (r, viewDir, gi)" + ( hasTranslucency ? " + c" : "" ) + ( hasTransmission ? " + d" : "" ) + ";\n"; ShaderBody += "\t\t}\n\n"; //Add GI function ShaderBody += "\t\tinline void Lighting" + m_currentLightModel.ToString() + Constants.CustomLightStructStr + "_GI(" + outputStruct + " " + Constants.CustomLightOutputVarStr + ", UnityGIInput data, inout UnityGI gi )\n\t\t{\n"; ShaderBody += "\t\t\t#if defined(UNITY_PASS_DEFERRED) && UNITY_ENABLE_REFLECTION_BUFFERS\n"; ShaderBody += "\t\t\t\tgi = UnityGlobalIllumination(data, " + Constants.CustomLightOutputVarStr + ".Occlusion, " + Constants.CustomLightOutputVarStr + ".Normal);\n"; ShaderBody += "\t\t\t#else\n"; ShaderBody += "\t\t\t\tUNITY_GLOSSY_ENV_FROM_SURFACE( g, " + Constants.CustomLightOutputVarStr + ", data );\n"; ShaderBody += "\t\t\t\tgi = UnityGlobalIllumination( data, " + Constants.CustomLightOutputVarStr + ".Occlusion, " + Constants.CustomLightOutputVarStr + ".Normal, g );\n"; ShaderBody += "\t\t\t#endif\n"; //ShaderBody += "\t\t\tUNITY_GI(gi, " + Constants.CustomLightOutputVarStr + ", data);\n"; ShaderBody += "\t\t}\n\n"; } if( hasRefraction ) { ShaderBody += "\t\tinline float4 Refraction( Input " + Constants.InputVarStr + ", " + outputStruct + " " + Constants.OutputVarStr + ", float indexOfRefraction, float chomaticAberration ) {\n"; ShaderBody += "\t\t\tfloat3 worldNormal = " + Constants.OutputVarStr + ".Normal;\n"; ShaderBody += "\t\t\tfloat4 screenPos = " + Constants.InputVarStr + ".screenPos;\n"; ShaderBody += "\t\t\t#if UNITY_UV_STARTS_AT_TOP\n"; ShaderBody += "\t\t\t\tfloat scale = -1.0;\n"; ShaderBody += "\t\t\t#else\n"; ShaderBody += "\t\t\t\tfloat scale = 1.0;\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t\tfloat halfPosW = screenPos.w * 0.5;\n"; ShaderBody += "\t\t\tscreenPos.y = ( screenPos.y - halfPosW ) * _ProjectionParams.x * scale + halfPosW;\n"; ShaderBody += "\t\t\t#if SHADER_API_D3D9 || SHADER_API_D3D11\n"; ShaderBody += "\t\t\t\tscreenPos.w += 0.00000000001;\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t\tfloat2 projScreenPos = ( screenPos / screenPos.w ).xy;\n"; ShaderBody += "\t\t\tfloat3 worldViewDir = normalize( UnityWorldSpaceViewDir( " + Constants.InputVarStr + ".worldPos ) );\n"; ShaderBody += "\t\t\tfloat3 refractionOffset = ( ( ( ( indexOfRefraction - 1.0 ) * mul( UNITY_MATRIX_V, float4( worldNormal, 0.0 ) ) ) * ( 1.0 / ( screenPos.z + 1.0 ) ) ) * ( 1.0 - dot( worldNormal, worldViewDir ) ) );\n"; ShaderBody += "\t\t\tfloat2 cameraRefraction = float2( refractionOffset.x, -( refractionOffset.y * _ProjectionParams.x ) );\n"; string grabpass = "_GrabTexture"; if( m_grabOrder != 0 ) grabpass = "RefractionGrab" + m_grabOrder; ShaderBody += "\t\t\tfloat4 redAlpha = tex2D( " + grabpass + ", ( projScreenPos + cameraRefraction ) );\n"; ShaderBody += "\t\t\tfloat green = tex2D( " + grabpass + ", ( projScreenPos + ( cameraRefraction * ( 1.0 - chomaticAberration ) ) ) ).g;\n"; ShaderBody += "\t\t\tfloat blue = tex2D( " + grabpass + ", ( projScreenPos + ( cameraRefraction * ( 1.0 + chomaticAberration ) ) ) ).b;\n"; ShaderBody += "\t\t\treturn float4( redAlpha.r, green, blue, redAlpha.a );\n"; ShaderBody += "\t\t}\n\n"; ShaderBody += "\t\tvoid RefractionF( Input " + Constants.InputVarStr + ", " + outputStruct + " " + Constants.OutputVarStr + ", inout half4 color )\n"; ShaderBody += "\t\t{\n"; ShaderBody += "\t\t\t#ifdef UNITY_PASS_FORWARDBASE\n"; ShaderBody += refractionInstructions; ShaderBody += "\t\t\tcolor.rgb = color.rgb + Refraction( " + Constants.InputVarStr + ", " + Constants.OutputVarStr + ", " + refractionCode + ", _ChromaticAberration ) * ( 1 - color.a );\n"; ShaderBody += "\t\t\tcolor.a = 1;\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t}\n\n"; } //Add Surface Shader body ShaderBody += "\t\tvoid surf( Input " + Constants.InputVarStr + " , inout " + outputStruct + " " + Constants.OutputVarStr + " )\n\t\t{\n"; { // Pass input information to custom lighting function if( m_currentLightModel == StandardShaderLightModel.CustomLighting ) ShaderBody += "\t\t\t" + Constants.OutputVarStr + ".SurfInput = " + Constants.InputVarStr + ";\n"; //add local vars if( m_currentDataCollector.DirtyLocalVariables ) ShaderBody += m_currentDataCollector.LocalVariables; //add nodes ops if( m_currentDataCollector.DirtyInstructions ) ShaderBody += m_currentDataCollector.Instructions; } ShaderBody += "\t\t}\n"; } CloseCGProgram( ref ShaderBody ); //Add custom Shadow Caster if( m_customShadowCaster ) { OpenCGProgram( ref ShaderBody ); string customLightSurface = hasTranslucency || hasTransmission ? "Custom" : ""; m_renderingPlatformOpHelper.SetRenderingPlatforms( ref ShaderBody ); //Check if Custom Vertex is being used and add tag if( m_currentDataCollector.DirtyPerVertexData ) OptionalParameters += "vertex:" + Constants.VertexDataFunc + Constants.OptionalParametersSep; if( m_tessOpHelper.EnableTesselation && !usingDebugPort ) { m_tessOpHelper.WriteToOptionalParams( ref OptionalParameters ); } //if ( hasRefraction ) // ShaderBody += "\t\t#pragma multi_compile _ALPHAPREMULTIPLY_ON\n"; m_additionalSurfaceOptions.WriteToOptionalSurfaceOptions( ref OptionalParameters ); AddShaderPragma( ref ShaderBody, "surface surf " + standardCustomLighting + m_currentLightModel.ToString() + customLightSurface + Constants.OptionalParametersSep + OptionalParameters ); CloseCGProgram( ref ShaderBody ); ShaderBody += "\t\tPass\n"; ShaderBody += "\t\t{\n"; ShaderBody += "\t\t\tName \"ShadowCaster\"\n"; ShaderBody += "\t\t\tTags{ \"LightMode\" = \"ShadowCaster\" }\n"; ShaderBody += "\t\t\tZWrite On\n"; if( m_alphaToCoverage ) ShaderBody += "\t\t\tAlphaToMask Off\n"; ShaderBody += "\t\t\tCGPROGRAM\n"; ShaderBody += "\t\t\t#pragma vertex vert\n"; ShaderBody += "\t\t\t#pragma fragment frag\n"; ShaderBody += "\t\t\t#pragma target " + ShaderModelTypeArr[ m_shaderModelIdx ] + "\n"; //ShaderBody += "\t\t\t#pragma multi_compile_instancing\n"; ShaderBody += "\t\t\t#pragma multi_compile_shadowcaster\n"; ShaderBody += "\t\t\t#pragma multi_compile UNITY_PASS_SHADOWCASTER\n"; ShaderBody += "\t\t\t#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2\n"; ShaderBody += "\t\t\t#include \"HLSLSupport.cginc\"\n"; #if UNITY_2018_3_OR_NEWER //Preventing WebGL to throw error Duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' ShaderBody += "\t\t\t#if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN )\n"; #else ShaderBody += "\t\t\t#if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN )\n"; #endif ShaderBody += "\t\t\t\t#define CAN_SKIP_VPOS\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t\t#include \"UnityCG.cginc\"\n"; ShaderBody += "\t\t\t#include \"Lighting.cginc\"\n"; ShaderBody += "\t\t\t#include \"UnityPBSLighting.cginc\"\n"; if( !( m_alphaToCoverage && hasOpacity && hasOpacityMask ) ) if( hasOpacity ) ShaderBody += "\t\t\tsampler3D _DitherMaskLOD;\n"; //ShaderBody += "\t\t\tsampler3D _DitherMaskLOD;\n"; ShaderBody += "\t\t\tstruct v2f\n"; ShaderBody += "\t\t\t{\n"; ShaderBody += "\t\t\t\tV2F_SHADOW_CASTER;\n"; int texcoordIndex = 1; for( int i = 0; i < m_currentDataCollector.PackSlotsList.Count; i++ ) { int size = 4 - m_currentDataCollector.PackSlotsList[ i ]; if( size > 0 ) { ShaderBody += "\t\t\t\tfloat" + size + " customPack" + ( i + 1 ) + " : TEXCOORD" + ( i + 1 ) + ";\n"; } texcoordIndex++; } if( !m_currentDataCollector.UsingInternalData ) ShaderBody += "\t\t\t\tfloat3 worldPos : TEXCOORD" + ( texcoordIndex++ ) + ";\n"; if( m_currentDataCollector.UsingScreenPos ) ShaderBody += "\t\t\t\tfloat4 screenPos : TEXCOORD" + ( texcoordIndex++ ) + ";\n"; if( /*m_currentDataCollector.UsingWorldNormal || m_currentDataCollector.UsingWorldPosition ||*/ m_currentDataCollector.UsingInternalData || m_currentDataCollector.DirtyNormal ) { ShaderBody += "\t\t\t\tfloat4 tSpace0 : TEXCOORD" + ( texcoordIndex++ ) + ";\n"; ShaderBody += "\t\t\t\tfloat4 tSpace1 : TEXCOORD" + ( texcoordIndex++ ) + ";\n"; ShaderBody += "\t\t\t\tfloat4 tSpace2 : TEXCOORD" + ( texcoordIndex++ ) + ";\n"; } else if( !m_currentDataCollector.UsingInternalData && m_currentDataCollector.UsingWorldNormal ) { ShaderBody += "\t\t\t\tfloat3 worldNormal : TEXCOORD" + ( texcoordIndex++ ) + ";\n"; } if( m_currentDataCollector.UsingVertexColor ) ShaderBody += "\t\t\t\thalf4 color : COLOR0;\n"; ShaderBody += "\t\t\t\tUNITY_VERTEX_INPUT_INSTANCE_ID\n"; ShaderBody += "\t\t\t};\n"; ShaderBody += "\t\t\tv2f vert( "+m_currentDataCollector.CustomAppDataName + " v )\n"; ShaderBody += "\t\t\t{\n"; ShaderBody += "\t\t\t\tv2f o;\n"; ShaderBody += "\t\t\t\tUNITY_SETUP_INSTANCE_ID( v );\n"; ShaderBody += "\t\t\t\tUNITY_INITIALIZE_OUTPUT( v2f, o );\n"; ShaderBody += "\t\t\t\tUNITY_TRANSFER_INSTANCE_ID( v, o );\n"; if( m_currentDataCollector.DirtyPerVertexData || m_currentDataCollector.CustomShadowCoordsList.Count > 0 ) ShaderBody += "\t\t\t\tInput customInputData;\n"; if( m_currentDataCollector.DirtyPerVertexData ) { ShaderBody += "\t\t\t\tvertexDataFunc( v" + ( m_currentDataCollector.TesselationActive ? "" : ", customInputData" ) + " );\n"; } ShaderBody += "\t\t\t\tfloat3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;\n"; ShaderBody += "\t\t\t\thalf3 worldNormal = UnityObjectToWorldNormal( v.normal );\n"; if( m_currentDataCollector.UsingInternalData || m_currentDataCollector.DirtyNormal ) { ShaderBody += "\t\t\t\thalf3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz );\n"; ShaderBody += "\t\t\t\thalf tangentSign = v.tangent.w * unity_WorldTransformParams.w;\n"; ShaderBody += "\t\t\t\thalf3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign;\n"; ShaderBody += "\t\t\t\to.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x );\n"; ShaderBody += "\t\t\t\to.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y );\n"; ShaderBody += "\t\t\t\to.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z );\n"; } else if( !m_currentDataCollector.UsingInternalData && m_currentDataCollector.UsingWorldNormal ) { ShaderBody += "\t\t\t\to.worldNormal = worldNormal;\n"; } for( int i = 0; i < m_currentDataCollector.CustomShadowCoordsList.Count; i++ ) { int size = UIUtils.GetChannelsAmount( m_currentDataCollector.CustomShadowCoordsList[ i ].DataType ); string channels = string.Empty; for( int j = 0; j < size; j++ ) { channels += Convert.ToChar( 120 + m_currentDataCollector.CustomShadowCoordsList[ i ].TextureIndex + j ); } channels = channels.Replace( '{', 'w' ); ShaderBody += "\t\t\t\to.customPack" + ( m_currentDataCollector.CustomShadowCoordsList[ i ].TextureSlot + 1 ) + "." + channels + " = customInputData." + m_currentDataCollector.CustomShadowCoordsList[ i ].CoordName + ";\n"; //TODO: TEMPORARY SOLUTION, this needs to go somewhere else, there's no need for these comparisons if( m_currentDataCollector.CustomShadowCoordsList[ i ].CoordName.StartsWith( "uv_" ) ) { ShaderBody += "\t\t\t\to.customPack" + ( m_currentDataCollector.CustomShadowCoordsList[ i ].TextureSlot + 1 ) + "." + channels + " = v.texcoord;\n"; } else if( m_currentDataCollector.CustomShadowCoordsList[ i ].CoordName.StartsWith( "uv2_" ) ) { ShaderBody += "\t\t\t\to.customPack" + ( m_currentDataCollector.CustomShadowCoordsList[ i ].TextureSlot + 1 ) + "." + channels + " = v.texcoord1;\n"; } else if( m_currentDataCollector.CustomShadowCoordsList[ i ].CoordName.StartsWith( "uv3_" ) ) { ShaderBody += "\t\t\t\to.customPack" + ( m_currentDataCollector.CustomShadowCoordsList[ i ].TextureSlot + 1 ) + "." + channels + " = v.texcoord2;\n"; } else if( m_currentDataCollector.CustomShadowCoordsList[ i ].CoordName.StartsWith( "uv4_" ) ) { ShaderBody += "\t\t\t\to.customPack" + ( m_currentDataCollector.CustomShadowCoordsList[ i ].TextureSlot + 1 ) + "." + channels + " = v.texcoord3;\n"; } } if( !m_currentDataCollector.UsingInternalData ) ShaderBody += "\t\t\t\to.worldPos = worldPos;\n"; ShaderBody += "\t\t\t\tTRANSFER_SHADOW_CASTER_NORMALOFFSET( o )\n"; if( m_currentDataCollector.UsingScreenPos ) ShaderBody += "\t\t\t\to.screenPos = ComputeScreenPos( o.pos );\n"; if( m_currentDataCollector.UsingVertexColor ) ShaderBody += "\t\t\t\to.color = v.color;\n"; ShaderBody += "\t\t\t\treturn o;\n"; ShaderBody += "\t\t\t}\n"; ShaderBody += "\t\t\thalf4 frag( v2f IN\n"; ShaderBody += "\t\t\t#if !defined( CAN_SKIP_VPOS )\n"; ShaderBody += "\t\t\t, UNITY_VPOS_TYPE vpos : VPOS\n"; ShaderBody += "\t\t\t#endif\n"; ShaderBody += "\t\t\t) : SV_Target\n"; ShaderBody += "\t\t\t{\n"; ShaderBody += "\t\t\t\tUNITY_SETUP_INSTANCE_ID( IN );\n"; ShaderBody += "\t\t\t\tInput surfIN;\n"; ShaderBody += "\t\t\t\tUNITY_INITIALIZE_OUTPUT( Input, surfIN );\n"; for( int i = 0; i < m_currentDataCollector.CustomShadowCoordsList.Count; i++ ) { int size = UIUtils.GetChannelsAmount( m_currentDataCollector.CustomShadowCoordsList[ i ].DataType ); string channels = string.Empty; for( int j = 0; j < size; j++ ) { channels += Convert.ToChar( 120 + m_currentDataCollector.CustomShadowCoordsList[ i ].TextureIndex + j ); } channels = channels.Replace( '{', 'w' ); ShaderBody += "\t\t\t\tsurfIN." + m_currentDataCollector.CustomShadowCoordsList[ i ].CoordName + " = IN.customPack" + ( m_currentDataCollector.CustomShadowCoordsList[ i ].TextureSlot + 1 ) + "." + channels + ";\n"; } if( m_currentDataCollector.UsingInternalData ) ShaderBody += "\t\t\t\tfloat3 worldPos = float3( IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w );\n"; else ShaderBody += "\t\t\t\tfloat3 worldPos = IN.worldPos;\n"; ShaderBody += "\t\t\t\thalf3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );\n"; if( m_currentDataCollector.UsingViewDirection && !m_currentDataCollector.DirtyNormal ) ShaderBody += "\t\t\t\tsurfIN.viewDir = worldViewDir;\n"; else if( m_currentDataCollector.UsingViewDirection ) ShaderBody += "\t\t\t\tsurfIN.viewDir = IN.tSpace0.xyz * worldViewDir.x + IN.tSpace1.xyz * worldViewDir.y + IN.tSpace2.xyz * worldViewDir.z;\n"; if( m_currentDataCollector.UsingWorldPosition ) ShaderBody += "\t\t\t\tsurfIN.worldPos = worldPos;\n"; if( m_currentDataCollector.UsingWorldNormal && m_currentDataCollector.UsingInternalData ) ShaderBody += "\t\t\t\tsurfIN.worldNormal = float3( IN.tSpace0.z, IN.tSpace1.z, IN.tSpace2.z );\n"; else if( !m_currentDataCollector.UsingInternalData && m_currentDataCollector.UsingWorldNormal ) ShaderBody += "\t\t\t\tsurfIN.worldNormal = IN.worldNormal;\n"; if( m_currentDataCollector.UsingWorldReflection ) ShaderBody += "\t\t\t\tsurfIN.worldRefl = -worldViewDir;\n"; if( m_currentDataCollector.UsingInternalData ) { ShaderBody += "\t\t\t\tsurfIN.internalSurfaceTtoW0 = IN.tSpace0.xyz;\n"; ShaderBody += "\t\t\t\tsurfIN.internalSurfaceTtoW1 = IN.tSpace1.xyz;\n"; ShaderBody += "\t\t\t\tsurfIN.internalSurfaceTtoW2 = IN.tSpace2.xyz;\n"; } if( m_currentDataCollector.UsingScreenPos ) ShaderBody += "\t\t\t\tsurfIN.screenPos = IN.screenPos;\n"; if( m_currentDataCollector.UsingVertexColor ) ShaderBody += "\t\t\t\tsurfIN.vertexColor = IN.color;\n"; ShaderBody += "\t\t\t\t" + outputStruct + " o;\n"; ShaderBody += "\t\t\t\tUNITY_INITIALIZE_OUTPUT( " + outputStruct + ", o )\n"; ShaderBody += "\t\t\t\tsurf( surfIN, o );\n"; if( ( hasOpacity || hasOpacityMask ) && m_currentLightModel == StandardShaderLightModel.CustomLighting ) { ShaderBody += "\t\t\t\tUnityGI gi;\n"; ShaderBody += "\t\t\t\tUNITY_INITIALIZE_OUTPUT( UnityGI, gi );\n"; ShaderBody += "\t\t\t\to.Alpha = LightingStandardCustomLighting( o, worldViewDir, gi ).a;\n"; } ShaderBody += "\t\t\t\t#if defined( CAN_SKIP_VPOS )\n"; ShaderBody += "\t\t\t\tfloat2 vpos = IN.pos;\n"; ShaderBody += "\t\t\t\t#endif\n"; if( ( m_alphaToCoverage && hasOpacity && m_inputPorts[ m_discardPortId ].IsConnected ) ) { } else if( hasOpacity ) { ShaderBody += "\t\t\t\thalf alphaRef = tex3D( _DitherMaskLOD, float3( vpos.xy * 0.25, o.Alpha * 0.9375 ) ).a;\n"; ShaderBody += "\t\t\t\tclip( alphaRef - 0.01 );\n"; } ShaderBody += "\t\t\t\tSHADOW_CASTER_FRAGMENT( IN )\n"; ShaderBody += "\t\t\t}\n"; ShaderBody += "\t\t\tENDCG\n"; ShaderBody += "\t\t}\n"; } } if( !string.IsNullOrEmpty( bellowUsePasses ) ) { ShaderBody += bellowUsePasses; } CloseSubShaderBody( ref ShaderBody ); if( m_dependenciesHelper.HasDependencies ) { ShaderBody += m_dependenciesHelper.GenerateDependencies(); } if( m_fallbackHelper.Active ) { ShaderBody += m_fallbackHelper.TabbedFallbackShader; } else if( m_castShadows || m_receiveShadows ) { AddShaderProperty( ref ShaderBody, "Fallback", "Diffuse" ); } if( !string.IsNullOrEmpty( m_customInspectorName ) ) { AddShaderProperty( ref ShaderBody, "CustomEditor", m_customInspectorName ); } } CloseShaderBody( ref ShaderBody ); if( usingDebugPort ) { m_currentLightModel = cachedLightModel; ContainerGraph.CurrentCanvasMode = cachedAvailability; } // Generate Graph info ShaderBody += ContainerGraph.ParentWindow.GenerateGraphInfo(); //TODO: Remove current SaveDebugShader and uncomment SaveToDisk as soon as pathname is editable if( !String.IsNullOrEmpty( pathname ) ) { IOUtils.StartSaveThread( ShaderBody, ( isFullPath ? pathname : ( IOUtils.dataPath + pathname ) ) ); } else { IOUtils.StartSaveThread( ShaderBody, Application.dataPath + "/AmplifyShaderEditor/Samples/Shaders/" + m_shaderName + ".shader" ); } // Load new shader into material if( CurrentShader == null ) { AssetDatabase.Refresh( ImportAssetOptions.ForceUpdate ); CurrentShader = Shader.Find( ShaderName ); } //else //{ // // need to always get asset datapath because a user can change and asset location from the project window // AssetDatabase.ImportAsset( AssetDatabase.GetAssetPath( m_currentShader ) ); // //ShaderUtil.UpdateShaderAsset( m_currentShader, ShaderBody ); //} if( m_currentShader != null ) { m_currentDataCollector.UpdateShaderImporter( ref m_currentShader ); if( m_currentMaterial != null ) { if( m_currentShader != m_currentMaterial.shader ) m_currentMaterial.shader = m_currentShader; #if UNITY_5_6_OR_NEWER if ( isInstancedShader ) { m_currentMaterial.enableInstancing = true; } #endif m_currentDataCollector.UpdateMaterialOnPropertyNodes( m_currentMaterial ); UpdateMaterialEditor(); // need to always get asset datapath because a user can change and asset location from the project window //AssetDatabase.ImportAsset( AssetDatabase.GetAssetPath( m_currentMaterial ) ); } } m_currentDataCollector.Destroy(); m_currentDataCollector = null; return m_currentShader; } public override void UpdateFromShader( Shader newShader ) { if( m_currentMaterial != null && m_currentMaterial.shader != newShader ) { m_currentMaterial.shader = newShader; } CurrentShader = newShader; } public override void Destroy() { base.Destroy(); if( m_dummyProperty != null ) { m_dummyProperty.Destroy(); GameObject.DestroyImmediate( m_dummyProperty ); m_dummyProperty = null; } m_translucencyPort = null; m_transmissionPort = null; m_refractionPort = null; m_normalPort = null; m_renderingOptionsOpHelper.Destroy(); m_renderingOptionsOpHelper = null; m_additionalIncludes.Destroy(); m_additionalIncludes = null; m_additionalPragmas.Destroy(); m_additionalPragmas = null; m_additionalDefines.Destroy(); m_additionalDefines = null; m_additionalSurfaceOptions.Destroy(); m_additionalSurfaceOptions = null; m_additionalDirectives.Destroy(); m_additionalDirectives = null; m_customTagsHelper.Destroy(); m_customTagsHelper = null; m_dependenciesHelper.Destroy(); m_dependenciesHelper = null; m_renderingPlatformOpHelper = null; m_inspectorDefaultStyle = null; m_inspectorFoldoutStyle = null; m_zBufferHelper = null; m_stencilBufferHelper = null; m_blendOpsHelper = null; m_tessOpHelper.Destroy(); m_tessOpHelper = null; m_outlineHelper.Destroy(); m_outlineHelper = null; m_colorMaskHelper.Destroy(); m_colorMaskHelper = null; m_billboardOpHelper = null; m_fallbackHelper.Destroy(); GameObject.DestroyImmediate( m_fallbackHelper ); m_fallbackHelper = null; m_usePass.Destroy(); GameObject.DestroyImmediate( m_usePass ); m_usePass = null; } public override int VersionConvertInputPortId( int portId ) { int newPort = portId; //added translucency input after occlusion if( UIUtils.CurrentShaderVersion() <= 2404 ) { switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: if( portId >= 6 ) newPort += 1; break; case StandardShaderLightModel.CustomLighting: case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: if( portId >= 5 ) newPort += 1; break; } } portId = newPort; //added transmission input after occlusion if( UIUtils.CurrentShaderVersion() < 2407 ) { switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: if( portId >= 6 ) newPort += 1; break; case StandardShaderLightModel.CustomLighting: case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: if( portId >= 5 ) newPort += 1; break; } } portId = newPort; //added tessellation ports if( UIUtils.CurrentShaderVersion() < 3002 ) { switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: if( portId >= 13 ) newPort += 1; break; case StandardShaderLightModel.CustomLighting: case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: if( portId >= 10 ) newPort += 1; break; } } portId = newPort; //added refraction after translucency if( UIUtils.CurrentShaderVersion() < 3204 ) { switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: if( portId >= 8 ) newPort += 1; break; case StandardShaderLightModel.CustomLighting: case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: if( portId >= 7 ) newPort += 1; break; } } portId = newPort; //removed custom lighting port //if ( UIUtils.CurrentShaderVersion() < 10003 ) //runs everytime because this system is only used after 5000 version { switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: if( portId >= 13 ) newPort -= 1; break; case StandardShaderLightModel.CustomLighting: case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: if( portId >= 12 ) newPort -= 1; break; } } portId = newPort; //if( UIUtils.CurrentShaderVersion() < 13802 ) //runs everytime because this system is only used after 5000 version { switch( m_currentLightModel ) { case StandardShaderLightModel.Standard: case StandardShaderLightModel.StandardSpecular: if( portId >= 11 ) newPort += 1; break; case StandardShaderLightModel.CustomLighting: case StandardShaderLightModel.Unlit: case StandardShaderLightModel.Lambert: case StandardShaderLightModel.BlinnPhong: if( portId >= 10 ) newPort += 1; break; } } portId = newPort; return newPort; } public override void ReadFromString( ref string[] nodeParams ) { try { base.ReadFromString( ref nodeParams ); m_currentLightModel = (StandardShaderLightModel)Enum.Parse( typeof( StandardShaderLightModel ), GetCurrentParam( ref nodeParams ) ); if( CurrentMasterNodeCategory == AvailableShaderTypes.SurfaceShader && m_currentLightModel == StandardShaderLightModel.CustomLighting ) { ContainerGraph.CurrentCanvasMode = NodeAvailability.CustomLighting; ContainerGraph.ParentWindow.CurrentNodeAvailability = NodeAvailability.CustomLighting; } else if( CurrentMasterNodeCategory == AvailableShaderTypes.SurfaceShader ) { ContainerGraph.CurrentCanvasMode = NodeAvailability.SurfaceShader; ContainerGraph.ParentWindow.CurrentNodeAvailability = NodeAvailability.SurfaceShader; } //if ( _shaderCategory.Length > 0 ) // _shaderCategory = UIUtils.RemoveInvalidCharacters( _shaderCategory ); ShaderName = GetCurrentParam( ref nodeParams ); if( m_shaderName.Length > 0 ) ShaderName = UIUtils.RemoveShaderInvalidCharacters( ShaderName ); m_renderingOptionsOpHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); m_cullMode = (CullMode)Enum.Parse( typeof( CullMode ), GetCurrentParam( ref nodeParams ) ); m_zBufferHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); string alphaMode = GetCurrentParam( ref nodeParams ); if( UIUtils.CurrentShaderVersion() < 4003 ) { if( alphaMode.Equals( "Fade" ) ) { alphaMode = "Transparent"; } else if( alphaMode.Equals( "Transparent" ) ) { alphaMode = "Premultiply"; } } m_alphaMode = (AlphaMode)Enum.Parse( typeof( AlphaMode ), alphaMode ); m_opacityMaskClipValue = Convert.ToSingle( GetCurrentParam( ref nodeParams ) ); m_keepAlpha = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ); m_keepAlpha = true; m_castShadows = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ); m_queueOrder = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); if( UIUtils.CurrentShaderVersion() > 11 ) { m_customBlendMode = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ); m_renderType = (RenderType)Enum.Parse( typeof( RenderType ), GetCurrentParam( ref nodeParams ) ); if( UIUtils.CurrentShaderVersion() > 14305 ) { m_customRenderType = GetCurrentParam( ref nodeParams ); } m_renderQueue = (RenderQueue)Enum.Parse( typeof( RenderQueue ), GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 2402 ) { m_renderPath = (RenderPath)Enum.Parse( typeof( RenderPath ), GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 2405 ) { m_renderingPlatformOpHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 2500 ) { m_colorMaskHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 2501 ) { m_stencilBufferHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 2504 ) { m_tessOpHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 2505 ) { m_receiveShadows = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 3202 ) { m_blendOpsHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 3203 ) { m_grabOrder = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 5003 ) { m_outlineHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 5110 ) { m_billboardOpHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 6101 ) { m_vertexMode = (VertexMode)Enum.Parse( typeof( VertexMode ), GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 6102 ) { m_shaderLOD = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); m_fallbackHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 7102 ) { m_maskClipOrderIndex = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); m_translucencyOrderIndex = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); m_refractionOrderIndex = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); m_tessellationOrderIndex = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 10010 && UIUtils.CurrentShaderVersion() < 15312 ) { m_additionalIncludes.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 11006 ) { m_customTagsHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 13102 && UIUtils.CurrentShaderVersion() < 15312 ) { m_additionalPragmas.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 13205 ) { m_alphaToCoverage = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 13903 ) { m_dependenciesHelper.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 14005 && UIUtils.CurrentShaderVersion() < 15312 ) { m_additionalDefines.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 14501 ) { m_inlineCullMode.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 14502 ) { m_specColorOrderIndex = Convert.ToInt32( GetCurrentParam( ref nodeParams ) ); } if( UIUtils.CurrentShaderVersion() > 15204 ) { m_inlineOpacityMaskClipValue.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } if( UIUtils.CurrentShaderVersion() > 15311 ) { m_additionalDirectives.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); m_additionalSurfaceOptions.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } else { m_additionalDirectives.AddItems( AdditionalLineType.Define, m_additionalDefines.DefineList ); m_additionalDirectives.AddItems( AdditionalLineType.Include, m_additionalIncludes.IncludeList ); m_additionalDirectives.AddItems( AdditionalLineType.Pragma, m_additionalPragmas.PragmaList ); } if( UIUtils.CurrentShaderVersion() > 15402 ) { m_usePass.ReadFromString( ref m_currentReadParamIdx, ref nodeParams ); } m_lightModelChanged = true; m_lastLightModel = m_currentLightModel; DeleteAllInputConnections( true ); AddMasterPorts(); UpdateFromBlendMode(); m_customBlendMode = TestCustomBlendMode(); ContainerGraph.CurrentPrecision = m_currentPrecisionType; } catch( Exception e ) { Debug.Log( e ); } } public override void RefreshExternalReferences() { base.RefreshExternalReferences(); // change port connection from emission to the new custom lighting port if( m_currentLightModel == StandardShaderLightModel.CustomLighting && m_inputPorts[ m_emissionPortId ].IsConnected && UIUtils.CurrentShaderVersion() < 13802 ) { OutputPort port = m_inputPorts[ m_emissionPortId ].GetOutputConnection( 0 ); m_inputPorts[ m_emissionPortId ].FullDeleteConnections(); UIUtils.SetConnection( m_inputPorts[ m_customLightingPortId ].NodeId, m_inputPorts[ m_customLightingPortId ].PortId, port.NodeId, port.PortId ); } } public override void WriteToString( ref string nodeInfo, ref string connectionsInfo ) { base.WriteToString( ref nodeInfo, ref connectionsInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_currentLightModel ); IOUtils.AddFieldValueToString( ref nodeInfo, m_shaderName ); m_renderingOptionsOpHelper.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_cullMode ); m_zBufferHelper.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_alphaMode ); IOUtils.AddFieldValueToString( ref nodeInfo, m_opacityMaskClipValue ); IOUtils.AddFieldValueToString( ref nodeInfo, m_keepAlpha ); IOUtils.AddFieldValueToString( ref nodeInfo, m_castShadows ); IOUtils.AddFieldValueToString( ref nodeInfo, m_queueOrder ); IOUtils.AddFieldValueToString( ref nodeInfo, m_customBlendMode ); IOUtils.AddFieldValueToString( ref nodeInfo, m_renderType ); IOUtils.AddFieldValueToString( ref nodeInfo, m_customRenderType ); IOUtils.AddFieldValueToString( ref nodeInfo, m_renderQueue ); IOUtils.AddFieldValueToString( ref nodeInfo, m_renderPath ); m_renderingPlatformOpHelper.WriteToString( ref nodeInfo ); m_colorMaskHelper.WriteToString( ref nodeInfo ); m_stencilBufferHelper.WriteToString( ref nodeInfo ); m_tessOpHelper.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_receiveShadows ); m_blendOpsHelper.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_grabOrder ); m_outlineHelper.WriteToString( ref nodeInfo ); m_billboardOpHelper.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_vertexMode ); IOUtils.AddFieldValueToString( ref nodeInfo, m_shaderLOD ); m_fallbackHelper.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, ( m_maskClipReorder != null ) ? m_maskClipReorder.OrderIndex : -1 ); IOUtils.AddFieldValueToString( ref nodeInfo, ( m_translucencyReorder != null ) ? m_translucencyReorder.OrderIndex : -1 ); IOUtils.AddFieldValueToString( ref nodeInfo, ( m_refractionReorder != null ) ? m_refractionReorder.OrderIndex : -1 ); IOUtils.AddFieldValueToString( ref nodeInfo, ( m_tessellationReorder != null ) ? m_tessellationReorder.OrderIndex : -1 ); //m_additionalIncludes.WriteToString( ref nodeInfo ); m_customTagsHelper.WriteToString( ref nodeInfo ); //m_additionalPragmas.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, m_alphaToCoverage ); m_dependenciesHelper.WriteToString( ref nodeInfo ); //m_additionalDefines.WriteToString( ref nodeInfo ); m_inlineCullMode.WriteToString( ref nodeInfo ); IOUtils.AddFieldValueToString( ref nodeInfo, ( m_specColorReorder != null ) ? m_specColorReorder.OrderIndex : -1 ); m_inlineOpacityMaskClipValue.WriteToString( ref nodeInfo ); m_additionalDirectives.WriteToString( ref nodeInfo ); m_additionalSurfaceOptions.WriteToString( ref nodeInfo ); m_usePass.WriteToString( ref nodeInfo ); } private bool TestCustomBlendMode() { switch( m_alphaMode ) { case AlphaMode.Opaque: { if( m_renderType == RenderType.Opaque && m_renderQueue == RenderQueue.Geometry ) return false; } break; case AlphaMode.Masked: { if( m_renderType == RenderType.TransparentCutout && m_renderQueue == RenderQueue.AlphaTest ) return false; } break; case AlphaMode.Transparent: case AlphaMode.Premultiply: { if( m_renderType == RenderType.Transparent && m_renderQueue == RenderQueue.Transparent ) return false; } break; case AlphaMode.Translucent: { if( m_renderType == RenderType.Opaque && m_renderQueue == RenderQueue.Transparent ) return false; } break; } return true; } private void UpdateFromBlendMode() { m_checkChanges = true; bool lockRefractionPort = false; if( m_currentLightModel == StandardShaderLightModel.Unlit || m_currentLightModel == StandardShaderLightModel.CustomLighting ) { lockRefractionPort = true; } switch( m_alphaMode ) { case AlphaMode.Opaque: { m_renderType = RenderType.Opaque; m_renderQueue = RenderQueue.Geometry; m_keepAlpha = true; m_refractionPort.Locked = true; m_inputPorts[ m_opacityPortId ].Locked = true; m_inputPorts[ m_discardPortId ].Locked = true; } break; case AlphaMode.Masked: { m_renderType = RenderType.TransparentCutout; m_renderQueue = RenderQueue.AlphaTest; m_keepAlpha = true; m_refractionPort.Locked = true; m_inputPorts[ m_opacityPortId ].Locked = true; m_inputPorts[ m_discardPortId ].Locked = false; } break; case AlphaMode.Transparent: case AlphaMode.Premultiply: { m_renderType = RenderType.Transparent; m_renderQueue = RenderQueue.Transparent; m_refractionPort.Locked = false || lockRefractionPort; m_inputPorts[ m_opacityPortId ].Locked = false; m_inputPorts[ m_discardPortId ].Locked = true; } break; case AlphaMode.Translucent: { m_renderType = RenderType.Opaque; m_renderQueue = RenderQueue.Transparent; m_refractionPort.Locked = false || lockRefractionPort; m_inputPorts[ m_opacityPortId ].Locked = false; m_inputPorts[ m_discardPortId ].Locked = true; } break; case AlphaMode.Custom: { m_refractionPort.Locked = false || lockRefractionPort; m_inputPorts[ m_opacityPortId ].Locked = false; m_inputPorts[ m_discardPortId ].Locked = false; } break; } m_blendOpsHelper.SetBlendOpsFromBlendMode( m_alphaMode, ( m_alphaMode == AlphaMode.Custom || m_alphaMode == AlphaMode.Opaque ) ); } public StandardShaderLightModel CurrentLightingModel { get { return m_currentLightModel; } } public CullMode CurrentCullMode { get { return m_cullMode; } } //public AdditionalIncludesHelper AdditionalIncludes { get { return m_additionalIncludes; } set { m_additionalIncludes = value; } } //public AdditionalPragmasHelper AdditionalPragmas { get { return m_additionalPragmas; } set { m_additionalPragmas = value; } } //public AdditionalDefinesHelper AdditionalDefines { get { return m_additionalDefines; } set { m_additionalDefines = value; } } public TemplateAdditionalDirectivesHelper AdditionalDirectives { get { return m_additionalDirectives; } } public OutlineOpHelper OutlineHelper { get { return m_outlineHelper; } } public float OpacityMaskClipValue { get { return m_opacityMaskClipValue; } } public InlineProperty InlineOpacityMaskClipValue { get { return m_inlineOpacityMaskClipValue; } set { m_inlineOpacityMaskClipValue = value; } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/StandardSurface.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/StandardSurface.cs", "repo_id": "jynew", "token_count": 51902 }
857
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> namespace AmplifyShaderEditor { [System.Serializable] [NodeAttributes( "World To Object", "Object Transform", "Transforms input to Object Space" )] public sealed class WorldToObjectTransfNode : ParentTransfNode { protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); m_matrixName = "unity_WorldToObject"; m_matrixHDName = "GetWorldToObjectMatrix()"; m_previewShaderGUID = "79a5efd1e3309f54d8ba3e7fdf5e459b"; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Misc/Transformation/WorldToObjectTransfNode.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Misc/Transformation/WorldToObjectTransfNode.cs", "repo_id": "jynew", "token_count": 209 }
858
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using UnityEditor; namespace AmplifyShaderEditor { public class NodeUtils { public delegate void DrawPropertySection(); public static void DrawPropertyGroup( string sectionName, DrawPropertySection DrawSection ) { Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal( UIUtils.MenuItemToolbarStyle ); GUI.color = cachedColor; GUILayout.Label( sectionName, UIUtils.MenuItemToggleStyle ); EditorGUILayout.EndHorizontal(); cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); GUI.color = cachedColor; DrawSection(); EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); } public static void DrawNestedPropertyGroup( ref bool foldoutValue, string sectionName, DrawPropertySection DrawSection, int horizontalSpacing = 15 ) { GUILayout.BeginHorizontal(); { GUILayout.Space( horizontalSpacing ); EditorGUILayout.BeginVertical( EditorStyles.helpBox ); { Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal(); { GUI.color = cachedColor; bool value = GUILayout.Toggle( foldoutValue, sectionName, UIUtils.MenuItemToggleStyle ); if( Event.current.button == Constants.FoldoutMouseId ) { foldoutValue = value; } } EditorGUILayout.EndHorizontal(); EditorGUI.indentLevel--; if( foldoutValue ) { cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); { EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); { GUI.color = cachedColor; DrawSection(); } EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); } } EditorGUI.indentLevel++; } EditorGUILayout.EndVertical(); } GUILayout.EndHorizontal(); } public static void DrawNestedPropertyGroup( ref bool foldoutValue, string sectionName, DrawPropertySection DrawSection, DrawPropertySection HeaderSection ) { GUILayout.BeginHorizontal(); { GUILayout.Space( 15 ); EditorGUILayout.BeginVertical( EditorStyles.helpBox ); Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal(); GUI.color = cachedColor; bool value = GUILayout.Toggle( foldoutValue, sectionName, UIUtils.MenuItemToggleStyle ); if( Event.current.button == Constants.FoldoutMouseId ) { foldoutValue = value; } HeaderSection(); EditorGUILayout.EndHorizontal(); EditorGUI.indentLevel--; if( foldoutValue ) { cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); GUI.color = cachedColor; DrawSection(); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); } EditorGUI.indentLevel++; EditorGUILayout.EndVertical(); } GUILayout.EndHorizontal(); } public static void DrawNestedPropertyGroup( UndoParentNode owner, ref bool foldoutValue, ref bool enabledValue, string sectionName, DrawPropertySection DrawSection ) { GUILayout.BeginHorizontal(); { GUILayout.Space( 15 ); EditorGUILayout.BeginVertical( EditorStyles.helpBox ); Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal(); GUI.color = cachedColor; bool value = GUILayout.Toggle( foldoutValue, sectionName, UIUtils.MenuItemToggleStyle ); if( Event.current.button == Constants.FoldoutMouseId ) { foldoutValue = value; } value = ( (object)owner != null ) ? owner.GUILayoutToggle( enabledValue, string.Empty,UIUtils.MenuItemEnableStyle, GUILayout.Width( 16 ) ) : GUILayout.Toggle( enabledValue, string.Empty, UIUtils.MenuItemEnableStyle, GUILayout.Width( 16 ) ); if( Event.current.button == Constants.FoldoutMouseId ) { enabledValue = value; } EditorGUILayout.EndHorizontal(); EditorGUI.indentLevel--; if( foldoutValue ) { cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); GUI.color = cachedColor; DrawSection(); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); } EditorGUI.indentLevel++; EditorGUILayout.EndVertical(); } GUILayout.EndHorizontal(); } public static void DrawPropertyGroup( ref bool foldoutValue, string sectionName, DrawPropertySection DrawSection ) { Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal( UIUtils.MenuItemToolbarStyle ); GUI.color = cachedColor; bool value = GUILayout.Toggle( foldoutValue, sectionName, UIUtils.MenuItemToggleStyle ); if( Event.current.button == Constants.FoldoutMouseId ) { foldoutValue = value; } EditorGUILayout.EndHorizontal(); if( foldoutValue ) { cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); { GUI.color = cachedColor; EditorGUI.indentLevel++; DrawSection(); EditorGUI.indentLevel--; EditorGUILayout.Separator(); } EditorGUILayout.EndVertical(); } } public static void DrawPropertyGroup( ref bool foldoutValue, string sectionName, DrawPropertySection DrawSection, DrawPropertySection HeaderSection ) { Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal( UIUtils.MenuItemToolbarStyle ); GUI.color = cachedColor; bool value = GUILayout.Toggle( foldoutValue, sectionName, UIUtils.MenuItemToggleStyle ); if( Event.current.button == Constants.FoldoutMouseId ) { foldoutValue = value; } HeaderSection(); EditorGUILayout.EndHorizontal(); if( foldoutValue ) { cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); { GUI.color = cachedColor; EditorGUI.indentLevel++; DrawSection(); EditorGUI.indentLevel--; EditorGUILayout.Separator(); } EditorGUILayout.EndVertical(); } } public static bool DrawPropertyGroup( UndoParentNode owner, ref bool foldoutValue, ref bool enabledValue, string sectionName, DrawPropertySection DrawSection ) { bool enableChanged = false; Color cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, 0.5f ); EditorGUILayout.BeginHorizontal( UIUtils.MenuItemToolbarStyle ); GUI.color = cachedColor; bool value = GUILayout.Toggle( foldoutValue, sectionName, UIUtils.MenuItemToggleStyle, GUILayout.ExpandWidth( true ) ); if( Event.current.button == Constants.FoldoutMouseId ) { foldoutValue = value; } EditorGUI.BeginChangeCheck(); value = ( (object)owner != null ) ? owner.EditorGUILayoutToggle( string.Empty, enabledValue, UIUtils.MenuItemEnableStyle, GUILayout.Width( 16 ) ) : EditorGUILayout.Toggle( string.Empty, enabledValue, UIUtils.MenuItemEnableStyle, GUILayout.Width( 16 ) ); if( Event.current.button == Constants.FoldoutMouseId ) { enabledValue = value; } if( EditorGUI.EndChangeCheck() ) { enableChanged = true; } EditorGUILayout.EndHorizontal(); if( foldoutValue ) { cachedColor = GUI.color; GUI.color = new Color( cachedColor.r, cachedColor.g, cachedColor.b, ( EditorGUIUtility.isProSkin ? 0.5f : 0.25f ) ); EditorGUILayout.BeginVertical( UIUtils.MenuItemBackgroundStyle ); GUI.color = cachedColor; EditorGUILayout.Separator(); EditorGUI.BeginDisabledGroup( !enabledValue ); EditorGUI.indentLevel += 1; DrawSection(); EditorGUI.indentLevel -= 1; EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); } return enableChanged; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUtils.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUtils.cs", "repo_id": "jynew", "token_count": 3537 }
859
fileFormatVersion: 2 guid: 599ae67e52ac45f46acc0efd9285b97c timeCreated: 1481126956 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/FmodOpNode.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/FmodOpNode.cs.meta", "repo_id": "jynew", "token_count": 101 }
860
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using System; namespace AmplifyShaderEditor { [Serializable] [NodeAttributes( "Divide", "Math Operators", "Division of two values ( A / B )", null, KeyCode.D )] public sealed class SimpleDivideOpNode : DynamicTypeNode { protected override void CommonInit( int uniqueId ) { m_dynamicRestrictions = new WirePortDataType[] { WirePortDataType.OBJECT, WirePortDataType.FLOAT, WirePortDataType.FLOAT2, WirePortDataType.FLOAT3, WirePortDataType.FLOAT4, WirePortDataType.COLOR, WirePortDataType.FLOAT3x3, WirePortDataType.FLOAT4x4, WirePortDataType.INT }; base.CommonInit( uniqueId ); m_allowMatrixCheck = true; m_previewShaderGUID = "409f06d00d1094849b0834c52791fa72"; } public override string BuildResults( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { SetExtensibleInputData( outputId, ref dataCollector, ignoreLocalvar ); string result = "( " + m_extensibleInputResults[ 0 ]; for ( int i = 1; i < m_extensibleInputResults.Count; i++ ) { result += " / " + m_extensibleInputResults[ i ]; } result += " )"; return result; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/SimpleNodes/SimpleDivideOpNode.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/SimpleNodes/SimpleDivideOpNode.cs", "repo_id": "jynew", "token_count": 503 }
861
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using System; namespace AmplifyShaderEditor { [Serializable] [NodeAttributes( "Panner", "UV Coordinates", "Pans UV texture coordinates according to its inputs" )] public sealed class PannerNode : ParentNode { private const string _speedXStr = "Speed X"; private const string _speedYStr = "Speed Y"; //[SerializeField] //private float m_speedX = 1f; //[SerializeField] //private float m_speedY = 1f; private int m_cachedUsingEditorId = -1; //private int m_cachedSpeedXId = -1; //private int m_cachedSpeedYId = -1; protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); AddInputPort( WirePortDataType.FLOAT2, false, "UV" ,-1,MasterNodePortCategory.Fragment,0); AddInputPort( WirePortDataType.FLOAT2, false, "Speed", -1, MasterNodePortCategory.Fragment, 2 ); AddInputPort( WirePortDataType.FLOAT, false, "Time", -1, MasterNodePortCategory.Fragment, 1 ); AddOutputPort( WirePortDataType.FLOAT2, "Out" ); m_textLabelWidth = 70; // m_autoWrapProperties = true; m_useInternalPortData = true; m_previewShaderGUID = "6f89a5d96bdad114b9bbd0c236cac622"; m_inputPorts[ 2 ].FloatInternalData = 1; } //public override void DrawProperties() //{ // base.DrawProperties(); // m_speedX = EditorGUILayoutFloatField( _speedXStr, m_speedX ); // m_speedY = EditorGUILayoutFloatField( _speedYStr, m_speedY ); //} public override void SetPreviewInputs() { base.SetPreviewInputs(); if ( m_cachedUsingEditorId == -1 ) m_cachedUsingEditorId = Shader.PropertyToID( "_UsingEditor" ); //if ( m_cachedSpeedXId == -1 ) // m_cachedSpeedXId = Shader.PropertyToID( "_SpeedX" ); //if ( m_cachedSpeedYId == -1 ) // m_cachedSpeedYId = Shader.PropertyToID( "_SpeedY" ); PreviewMaterial.SetFloat( m_cachedUsingEditorId, ( m_inputPorts[ 2 ].IsConnected ? 0 : 1 ) ); //PreviewMaterial.SetFloat( m_cachedSpeedXId, m_speedX ); //PreviewMaterial.SetFloat( m_cachedSpeedYId, m_speedY ); } public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { if( m_outputPorts[ 0 ].IsLocalValue( dataCollector.PortCategory ) ) return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ); string timePort = m_inputPorts[ 2 ].GeneratePortInstructions( ref dataCollector ); if( !m_inputPorts[ 2 ].IsConnected ) { if( !( dataCollector.IsTemplate && dataCollector.IsSRP ) ) dataCollector.AddToIncludes( UniqueId, Constants.UnityShaderVariables ); timePort += " * _Time.y"; } string speed = m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector ); string result = "( " + timePort + " * " + speed + " + " + m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ) + ")"; RegisterLocalVariable( 0, result, ref dataCollector, "panner" + OutputId ); return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ); } public override void ReadFromString( ref string[] nodeParams ) { base.ReadFromString( ref nodeParams ); if( UIUtils.CurrentShaderVersion() < 13107 ) { // The internal data for the new port can be set in here since it didn't existed // on older shader versions float speedX = Convert.ToSingle( GetCurrentParam( ref nodeParams ) ); float speedY = Convert.ToSingle( GetCurrentParam( ref nodeParams ) ); m_inputPorts[ 1 ].Vector2InternalData = new Vector2( speedX, speedY ); } } public override void ReadInputDataFromString( ref string[] nodeParams ) { base.ReadInputDataFromString( ref nodeParams ); if( UIUtils.CurrentShaderVersion() < 13107 ) { //Time Port must be rewritten after internal data is read // already existed in previous shaders m_inputPorts[ 2 ].FloatInternalData = 1; } } public override void WriteToString( ref string nodeInfo, ref string connectionsInfo ) { base.WriteToString( ref nodeInfo, ref connectionsInfo ); //IOUtils.AddFieldValueToString( ref nodeInfo, m_speedX ); //IOUtils.AddFieldValueToString( ref nodeInfo, m_speedY ); } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/PannerNode.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/PannerNode.cs", "repo_id": "jynew", "token_count": 1555 }
862
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using System; namespace AmplifyShaderEditor { [NodeAttributes( "Unpack Scale Normal", "Textures", "Applies UnpackNormal/UnpackScaleNormal function" )] [Serializable] public class UnpackScaleNormalNode : ParentNode { protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); AddInputPort( WirePortDataType.FLOAT4, false, "Value" ); AddInputPort( WirePortDataType.FLOAT, false, "Scale" ); m_inputPorts[ 1 ].FloatInternalData = 1; AddOutputVectorPorts( WirePortDataType.FLOAT3, "XYZ" ); m_useInternalPortData = true; m_previewShaderGUID = "8b0ae05e25d280c45af81ded56f8012e"; } public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { string src = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ); bool isScaledNormal = false; if ( m_inputPorts[ 1 ].IsConnected ) { isScaledNormal = true; } else { if ( m_inputPorts[ 1 ].FloatInternalData != 1 ) { isScaledNormal = true; } } string normalMapUnpackMode = string.Empty; string scaleValue = isScaledNormal?m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector ):"1.0"; normalMapUnpackMode = string.Format( TemplateHelperFunctions.CreateUnpackNormalStr( dataCollector, isScaledNormal, scaleValue ), src); if( isScaledNormal && !( dataCollector.IsTemplate && dataCollector.IsSRP ) ) { dataCollector.AddToIncludes( UniqueId, Constants.UnityStandardUtilsLibFuncs ); } int outputUsage = 0; for ( int i = 0; i < m_outputPorts.Count; i++ ) { if ( m_outputPorts[ i ].IsConnected ) outputUsage += 1; } if ( outputUsage > 1 ) { string varName = "localUnpackNormal" + UniqueId; dataCollector.AddLocalVariable( UniqueId, "float3 " + varName + " = " + normalMapUnpackMode + ";" ); return GetOutputVectorItem( 0, outputId, varName ); } else { return GetOutputVectorItem( 0, outputId, normalMapUnpackMode ); } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/UnpackScaleNormalNode.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/UnpackScaleNormalNode.cs", "repo_id": "jynew", "token_count": 827 }
863
fileFormatVersion: 2 guid: ef1fe46d0cc472e45ad13ac737db2c1e timeCreated: 1493993914 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/ObjectScaleNode.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/ObjectScaleNode.cs.meta", "repo_id": "jynew", "token_count": 103 }
864
namespace AmplifyShaderEditor { public class TessellationParentNode : ParentNode { protected override void CommonInit( int uniqueId ) { base.CommonInit( uniqueId ); m_useInternalPortData = true; } public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) { if ( dataCollector.PortCategory != MasterNodePortCategory.Tessellation ) { UIUtils.ShowMessage( m_nodeAttribs.Name + " can only be used on Master Node Tessellation port" ); return "(-1)"; } return BuildTessellationFunction( ref dataCollector ); } protected virtual string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector ) { return string.Empty; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs", "repo_id": "jynew", "token_count": 250 }
865
// Amplify Shader Editor - Visual Shader Editing Tool // Copyright (c) Amplify Creations, Lda <[email protected]> using UnityEngine; using System.Collections.Generic; namespace AmplifyShaderEditor { public class PreMadeShaders { public static readonly string FlatColorSequenceId = "Flat Color"; private Dictionary<string, ActionSequence> m_actionLib; public PreMadeShaders() { m_actionLib = new Dictionary<string, ActionSequence>(); ActionSequence sequence = new ActionSequence( FlatColorSequenceId ); sequence.AddToSequence( new CreateNodeActionData( 1, typeof( ColorNode ), new Vector2( -250, 125 ) ) ); sequence.AddToSequence( new CreateConnectionActionData( 0, 4, 1, 0 ) ); m_actionLib.Add( sequence.Name, sequence ); } public ActionSequence GetSequence( string name ) { if ( m_actionLib.ContainsKey( name ) ) { return m_actionLib[ name ]; } return null; } public void Destroy() { var items = m_actionLib.GetEnumerator(); while ( items.MoveNext() ) { items.Current.Value.Destroy(); } m_actionLib.Clear(); m_actionLib = null; } public ActionSequence FlatColorSequence { get { return m_actionLib[ FlatColorSequenceId ]; } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/PreMadeShaders.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/PreMadeShaders.cs", "repo_id": "jynew", "token_count": 445 }
866
fileFormatVersion: 2 guid: e1d9e34bd7946e247aa6d28b2859c6b1 timeCreated: 1511259305 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateColorMaskModule.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateColorMaskModule.cs.meta", "repo_id": "jynew", "token_count": 103 }
867
fileFormatVersion: 2 guid: 1e6749bf88e2d0f4ab5812f084973f4c timeCreated: 1517831575 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatePass.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatePass.cs.meta", "repo_id": "jynew", "token_count": 104 }
868
fileFormatVersion: 2 guid: d11e7a9026804bd46962c527fe30d933 timeCreated: 1496053368 licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateVertexData.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateVertexData.cs.meta", "repo_id": "jynew", "token_count": 100 }
869
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; namespace AmplifyShaderEditor { [CustomEditor( typeof( Texture2DArray ) )] public class CustomTexture2DArrayInspector : UnityEditor.Editor { Texture2DArray m_target; [SerializeField] float m_index; Shader m_textureArrayPreview; Material m_previewMaterial; GUIStyle slider = null; GUIStyle thumb = null; GUIContent m_allButton = null; [SerializeField] bool m_seeAll; void OnEnable() { m_target = ( target as Texture2DArray ); m_textureArrayPreview = AssetDatabase.LoadAssetAtPath<Shader>( AssetDatabase.GUIDToAssetPath( "610c24aad350fba4583068c6c22fa428" ) ); m_previewMaterial = new Material( m_textureArrayPreview ); slider = null; thumb = null; } public override void OnPreviewGUI( Rect r, GUIStyle background ) { base.OnPreviewGUI( r, background ); m_previewMaterial.SetTexture( "_MainTex", m_target ); m_previewMaterial.SetFloat( "_Index", m_index ); EditorGUI.DrawPreviewTexture( r, m_target, m_previewMaterial, ScaleMode.ScaleToFit, 1f ); } private void OnDisable() { DestroyImmediate( m_previewMaterial ); m_previewMaterial = null; } public override void OnInspectorGUI() { if( slider == null ) slider = "preSlider"; if( thumb == null ) thumb = "preSliderThumb"; if( m_allButton == null ) m_allButton = EditorGUIUtility.IconContent( "PreTextureMipMapLow" ); base.OnInspectorGUI(); } public override bool HasPreviewGUI() { return true; } public override void OnPreviewSettings() { base.OnPreviewSettings(); m_seeAll = GUILayout.Toggle( m_seeAll, m_allButton, "preButton" ); EditorGUI.BeginDisabledGroup( m_seeAll ); m_index = Mathf.Round( GUILayout.HorizontalSlider( m_index, 0, m_target.depth - 1, slider, thumb ) ); EditorGUI.EndDisabledGroup(); } public override void OnInteractivePreviewGUI( Rect r, GUIStyle background ) { //base.OnInteractivePreviewGUI( r, background ); if( m_seeAll ) { int columns = Mathf.CeilToInt( Mathf.Sqrt( m_target.depth ) ); float sizeX = r.width / columns - 20; float centerY = ( columns * columns ) - m_target.depth; int rows = columns; if( centerY >= columns ) rows--; float sizeY = ( r.height - 16 ) / rows - 15; if( centerY >= columns ) centerY = sizeY * 0.5f; else centerY = 0; Rect smallRect = r; if( rows > 1 ) smallRect.y += ( 15 / ( rows - 1 ) ); else smallRect.y += 15; smallRect.x = r.x + 10; smallRect.width = sizeX; smallRect.height = sizeY; for( int i = 0; i < m_target.depth; i++ ) { m_previewMaterial.SetTexture( "_MainTex", m_target ); m_previewMaterial.SetFloat( "_Index", i ); EditorGUI.DrawPreviewTexture( smallRect, m_target, m_previewMaterial, ScaleMode.ScaleToFit, 1 ); Rect dropRect = smallRect; float diff = smallRect.height - smallRect.width; if( diff > 0 ) dropRect.y -= diff * 0.5f; dropRect.y += 16; EditorGUI.DropShadowLabel( dropRect, "[" + i + "]" ); smallRect.x += sizeX + 20; if( ( ( i + 1 ) % ( columns ) ) == 0 ) { smallRect.x = r.x + 10; smallRect.height = sizeY; smallRect.y += sizeY + 30; } } } else { m_previewMaterial.SetTexture( "_MainTex", m_target ); m_previewMaterial.SetFloat( "_Index", m_index ); EditorGUI.DrawPreviewTexture( r, m_target, m_previewMaterial, ScaleMode.ScaleToFit, 1f ); EditorGUI.DropShadowLabel( r, "[" + m_index + "]" ); } } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/CustomTexture2DArrayInspector.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/CustomTexture2DArrayInspector.cs", "repo_id": "jynew", "token_count": 1497 }
870
using UnityEngine; namespace AmplifyShaderEditor { public static class RectExtension { private static Rect ValidateBoundaries( this Rect thisRect ) { if ( thisRect.yMin > thisRect.yMax ) { float yMin = thisRect.yMin; thisRect.yMin = thisRect.yMax; thisRect.yMax = yMin; } if ( thisRect.xMin > thisRect.xMax ) { float xMin = thisRect.xMin; thisRect.xMin = thisRect.xMax; thisRect.xMax = xMin; } return thisRect; } public static bool Includes( this Rect thisRect , Rect other ) { thisRect = thisRect.ValidateBoundaries(); other = other.ValidateBoundaries(); if ( other.xMin >= thisRect.xMin && other.xMax <= thisRect.xMax ) { if ( other.yMin >= thisRect.yMin && other.yMax <= thisRect.yMax ) { return true; } } return false; } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/RectExtension.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/RectExtension.cs", "repo_id": "jynew", "token_count": 359 }
871
fileFormatVersion: 2 guid: 0932db7ec1402c2489679c4b72eab5eb folderAsset: yes timeCreated: 1481126943 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources.meta", "repo_id": "jynew", "token_count": 76 }
872
Shader "Hidden/AbsOpNode" { Properties { _A ("_A", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; float4 frag(v2f_img i) : SV_Target { return abs(tex2D( _A, i.uv )); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_AbsOpNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_AbsOpNode.shader", "repo_id": "jynew", "token_count": 174 }
873
Shader "Hidden/ColorSpaceDouble" { SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" float4 frag( v2f_img i ) : SV_Target { return unity_ColorSpaceDouble; } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ColorSpaceDouble.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ColorSpaceDouble.shader", "repo_id": "jynew", "token_count": 129 }
874
Shader "Hidden/DesaturateNode" { Properties { _A ( "_RBG", 2D ) = "white" {} _B ( "_Fraction", 2D ) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag uniform sampler2D _A; uniform sampler2D _B; float4 frag ( v2f_img i ) : SV_Target { float3 rgb = tex2D ( _A, i.uv ).rgb; float fraction = tex2D ( _B, i.uv ).r; float dotResult = dot ( rgb, float3( 0.299, 0.587, 0.114 ) ); float3 finalColor = lerp ( rgb, dotResult.xxx, fraction ); return float4( finalColor, 1 ); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_DesaturateNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_DesaturateNode.shader", "repo_id": "jynew", "token_count": 311 }
875
Shader "Hidden/FunctionInputNode" { Properties { _A ("_A", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; int _Type; float4 frag(v2f_img i) : SV_Target { if( _Type == 1 ) { return tex2D( _A, i.uv ).r; } else if( _Type == 2 ) { return float4(tex2D( _A, i.uv ).rg,0,0); } else if( _Type == 3 ) { return float4(tex2D( _A, i.uv ).rgb,0); } else { return tex2D( _A, i.uv ); } } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_FunctionInputNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_FunctionInputNode.shader", "repo_id": "jynew", "token_count": 336 }
876
Shader "Hidden/IndirectSpecularLight" { Properties { _Skybox("_Skybox", CUBE) = "white" {} _A ("Normal", 2D) = "white" {} _B ("Smoothness", 2D) = "white" {} _C ("Occlusion", 2D) = "white" {} } SubShader { Pass // not connected { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" uniform samplerCUBE _Skybox; sampler2D _A; sampler2D _B; sampler2D _C; float4 frag(v2f_img i) : SV_Target { float2 xy = 2 * i.uv - 1; float z = -sqrt(1-saturate(dot(xy,xy))); float3 worldNormal = normalize(float3(xy, z)); float3 vertexPos = float3(xy, z); float3 worldViewDir = normalize(float3(0,0,-5) - vertexPos); float3 worldRefl = -worldViewDir; worldRefl = normalize(reflect( worldRefl, worldNormal )); float3 sky = texCUBElod( _Skybox, float4(worldRefl, (1-saturate(tex2D(_B,i.uv).r)) * 6) ).rgb; return float4(sky * tex2D(_C,i.uv).r, 1); } ENDCG } Pass // connected { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" uniform samplerCUBE _Skybox; sampler2D _A; sampler2D _B; sampler2D _C; float4 frag(v2f_img i) : SV_Target { float2 xy = 2 * i.uv - 1; float z = -sqrt(1-saturate(dot(xy,xy))); float3 vertexPos = float3(xy, z); float3 normal = normalize(vertexPos); float3 worldNormal = UnityObjectToWorldNormal(normal); float3 tangent = normalize(float3( -z, xy.y*0.01, xy.x )); float3 worldPos = mul(unity_ObjectToWorld, float4(vertexPos,1)).xyz; float3 worldViewDir = normalize(float3(0,0,-5) - vertexPos); float3 worldTangent = UnityObjectToWorldDir(tangent); float tangentSign = -1; float3 worldBinormal = normalize( cross(worldNormal, worldTangent) * tangentSign); float4 tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); float4 tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); float4 tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); float3 worldRefl = -worldViewDir; float2 sphereUVs = i.uv; sphereUVs.x = atan2(vertexPos.x, -vertexPos.z) / (UNITY_PI) + 0.5; // Needs further checking //float3 tangentNormal = tex2Dlod(_A, float4(sphereUVs,0,0)).xyz; float3 tangentNormal = tex2D(_A, sphereUVs).xyz; worldRefl = reflect( worldRefl, half3( dot( tSpace0.xyz, tangentNormal ), dot( tSpace1.xyz, tangentNormal ), dot( tSpace2.xyz, tangentNormal ) ) ); float3 sky = texCUBElod( _Skybox, float4(worldRefl, (1-saturate(tex2D(_B,i.uv).r)) * 6) ).rgb; return float4(sky * tex2D(_C,i.uv).r, 1); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_IndirectSpecularLight.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_IndirectSpecularLight.shader", "repo_id": "jynew", "token_count": 1321 }
877
Shader "Hidden/LinearToGammaNode" { Properties { _A ("_A", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; float4 frag(v2f_img i) : SV_Target { float4 c = tex2D( _A, i.uv ); c.rgb = LinearToGammaSpace( c.rgb ); return c; } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_LinearToGammaNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_LinearToGammaNode.shader", "repo_id": "jynew", "token_count": 207 }
878
Shader "Hidden/NormalizeNode" { Properties { _A ("_A", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; float4 frag(v2f_img i) : SV_Target { return normalize(tex2D( _A, i.uv )); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_NormalizeNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_NormalizeNode.shader", "repo_id": "jynew", "token_count": 175 }
879
Shader "Hidden/PiNode" { SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" sampler2D _A; float4 frag(v2f_img i) : SV_Target { return tex2D( _A, i.uv ).r * UNITY_PI; } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_PiNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_PiNode.shader", "repo_id": "jynew", "token_count": 151 }
880
Shader "Hidden/ReflectOpNode" { Properties { _A ("_Incident", 2D) = "white" {} _B ("_Normal", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; sampler2D _B; float4 frag(v2f_img i) : SV_Target { float4 a = tex2D( _A, i.uv ); float4 b = tex2D( _B, i.uv ); return reflect(a, b); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ReflectOpNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ReflectOpNode.shader", "repo_id": "jynew", "token_count": 237 }
881
Shader "Hidden/SaturateNode" { Properties { _A ("_A", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; float4 frag(v2f_img i) : SV_Target { return saturate(tex2D( _A, i.uv )); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SaturateNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SaturateNode.shader", "repo_id": "jynew", "token_count": 176 }
882
Shader "Hidden/SimpleMaxOp" { Properties { _A ("_A", 2D) = "white" {} _B ("_B", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; sampler2D _B; float4 frag(v2f_img i) : SV_Target { float4 a = tex2D( _A, i.uv ); float4 b = tex2D( _B, i.uv ); return max( a, b ); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SimpleMaxOp.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SimpleMaxOp.shader", "repo_id": "jynew", "token_count": 235 }
883
Shader "Hidden/SinTimeNode" { SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" float _EditorTime; float4 frag( v2f_img i ) : SV_Target { float4 t = _EditorTime; t.x = _EditorTime / 8; t.y = _EditorTime / 4; t.z = _EditorTime / 2; return sin(t); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SinTimeNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SinTimeNode.shader", "repo_id": "jynew", "token_count": 194 }
884
Shader "Hidden/SwitchByFaceNode" { Properties { _A ("_Front", 2D) = "white" {} _B ("_Back", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; sampler2D _B; float4 frag( v2f_img i, half ase_vface : VFACE ) : SV_Target { float4 front = tex2D( _A, i.uv ); float4 back = tex2D( _B, i.uv ); return ( ( ase_vface > 0 ) ? ( front ) : ( back ) ); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SwitchByFaceNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SwitchByFaceNode.shader", "repo_id": "jynew", "token_count": 259 }
885
Shader "Hidden/TangentVertexDataNode" { SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" float4 frag( v2f_img i ) : SV_Target { float2 xy = 2 * i.uv - 1; float z = -sqrt(1-saturate(dot(xy,xy))); float3 tangent = normalize(float3( -z, xy.y*0.01, xy.x )); return float4((tangent), 1); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_TangentVertexDataNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_TangentVertexDataNode.shader", "repo_id": "jynew", "token_count": 211 }
886
Shader "Hidden/TexturePropertyNode" { Properties { _Sampler ("_Sampler", 2D) = "white" {} _Sampler3D ("_Sampler3D", 3D) = "white" {} _Array ("_Array", 2DArray) = "white" {} _Cube( "_Cube", CUBE) = "white" {} _Default ("_Default", Int) = 0 _Type ("_Type", Int) = 0 } SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #pragma exclude_renderers d3d9 #pragma target 3.5 #include "UnityCG.cginc" UNITY_DECLARE_TEX2DARRAY( _Array ); samplerCUBE _Cube; sampler2D _Sampler; sampler3D _Sampler3D; int _Default; int _Type; float4 frag( v2f_img i ) : SV_Target { if(_Default == 1) { return 1; } else if(_Default == 2) { return 0; } else if(_Default == 3) { return 0.5f; } else if(_Default == 4) { return float4(0.5,0.5,1,1); } else { if( _Type == 4 ) return UNITY_SAMPLE_TEX2DARRAY( _Array, float3( i.uv, 0 ) ); else if( _Type == 3 ) return texCUBE( _Cube, float3(i.uv,0) ); else if( _Type == 2 ) return tex3D( _Sampler3D, float3(i.uv,0) ); else return tex2D( _Sampler, i.uv); } } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_TexturePropertyNode.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_TexturePropertyNode.shader", "repo_id": "jynew", "token_count": 658 }
887
Shader "Hidden/Vector4Node" { Properties { _InputVector ("_InputVector", Vector) = (0,0,0,0) } SubShader { Pass { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag float4 _InputVector; float4 frag( v2f_img i ) : SV_Target { return _InputVector; } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_Vector4Node.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_Vector4Node.shader", "repo_id": "jynew", "token_count": 168 }
888
Shader "Hidden/WorldNormalVector" { Properties { _A ("_WorldNormal", 2D) = "white" {} } SubShader { Pass //not connected { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag float4 frag(v2f_img i) : SV_Target { float2 xy = 2 * i.uv - 1; float z = -sqrt(1-saturate(dot(xy,xy))); float3 worldNormal = normalize(float3(xy, z)); return float4(worldNormal, 1); } ENDCG } Pass //connected { CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert_img #pragma fragment frag sampler2D _A; float4 frag(v2f_img i) : SV_Target { float2 xy = 2 * i.uv - 1; float z = -sqrt(1-saturate(dot(xy,xy))); float3 vertexPos = float3(xy, z); float3 normal = normalize(vertexPos); float3 worldNormal = UnityObjectToWorldNormal(normal); float3 tangent = normalize(float3( -z, xy.y*0.01, xy.x )); float3 worldPos = mul(unity_ObjectToWorld, float4(vertexPos,1)).xyz; float3 worldTangent = UnityObjectToWorldDir(tangent); float tangentSign = -1; float3 worldBinormal = normalize( cross(worldNormal, worldTangent) * tangentSign); float4 tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); float4 tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); float4 tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); float2 sphereUVs = i.uv; sphereUVs.x = (atan2(vertexPos.x, -vertexPos.z) / (UNITY_PI) + 0.5); // Needs further checking //float3 tangentNormal = tex2Dlod(_A, float4(sphereUVs,0,0)).xyz; float3 tangentNormal = tex2D(_A, sphereUVs).xyz; worldNormal = fixed3( dot( tSpace0.xyz, tangentNormal ), dot( tSpace1.xyz, tangentNormal ), dot( tSpace2.xyz, tangentNormal ) ); return float4(worldNormal, 1); } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_WorldNormalVector.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_WorldNormalVector.shader", "repo_id": "jynew", "token_count": 850 }
889
Shader "Hidden/WorldTransformParams" { SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" float4 frag( v2f_img i ) : SV_Target { return unity_WorldTransformParams; } ENDCG } } }
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_WorldTransformParams.shader/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_WorldTransformParams.shader", "repo_id": "jynew", "token_count": 131 }
890
fileFormatVersion: 2 guid: 326bea850683cca44ae7af083d880d70 timeCreated: 1512498793 licenseType: Store NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/ShaderFunctions/ComputeFilterWidth.asset.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/ShaderFunctions/ComputeFilterWidth.asset.meta", "repo_id": "jynew", "token_count": 67 }
891
fileFormatVersion: 2 guid: 37452fdfb732e1443b7e39720d05b708 timeCreated: 1513337564 licenseType: Store NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/ShaderFunctions/Four Splats First Pass Terrain.asset.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/ShaderFunctions/Four Splats First Pass Terrain.asset.meta", "repo_id": "jynew", "token_count": 72 }
892
fileFormatVersion: 2 guid: 051d65e7699b41a4c800363fd0e822b2 timeCreated: 1510748744 licenseType: Store NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/ShaderFunctions/RadialUVDistortion.asset.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/ShaderFunctions/RadialUVDistortion.asset.meta", "repo_id": "jynew", "token_count": 73 }
893
fileFormatVersion: 2 guid: 50fc796413bac8b40aff70fb5a886273 timeCreated: 1491397480 licenseType: Store ShaderImporter: defaultTextures: - _MainTex: {fileID: 2800000, guid: 02f71419854c0d845a930c9e0a0bf775, type: 3} - _SecondTex: {fileID: 2800000, guid: 03a7d169469c1af41bb03241a7b7e23d, type: 3} - _ThirdTex: {fileID: 2800000, guid: c3512c25766a40245ac94c6b1722d76e, type: 3} - _FourthTex: {fileID: 2800000, guid: e0f922c44762291498cc62e0917609be, type: 3} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Shaders/Unlit-ColoredAlpha.shader.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Shaders/Unlit-ColoredAlpha.shader.meta", "repo_id": "jynew", "token_count": 236 }
894
{ "name": "Animancer" }
jynew/jyx2/Assets/3rd/Animancer/Animancer.asmdef/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Animancer.asmdef", "repo_id": "jynew", "token_count": 16 }
895
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0.44657725, g: 0.49641258, b: 0.57481515, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &54416158 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 54416159} - component: {fileID: 54416162} - component: {fileID: 54416161} - component: {fileID: 54416160} m_Layer: 5 m_Name: Play from Start m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &54416159 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 54416158} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 752757352} m_Father: {fileID: 579976149} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -75} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &54416160 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 54416158} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 54416161} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: PlayFromStart m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &54416161 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 54416158} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &54416162 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 54416158} m_CullTransparentMesh: 0 --- !u!1 &114200736 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 114200737} - component: {fileID: 114200740} - component: {fileID: 114200739} - component: {fileID: 114200738} m_Layer: 5 m_Name: Play from Start then Idle m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &114200737 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 114200736} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1882400647} m_Father: {fileID: 579976149} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -110} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &114200738 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 114200736} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 114200739} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: PlayFromStartThenIdle m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &114200739 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 114200736} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &114200740 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 114200736} m_CullTransparentMesh: 0 --- !u!1 &133064414 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 133064415} - component: {fileID: 133064417} - component: {fileID: 133064416} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &133064415 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 133064414} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1000560854} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &133064416 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 133064414} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Good CrossFade from Start then Idle --- !u!222 &133064417 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 133064414} m_CullTransparentMesh: 0 --- !u!1 &182465828 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 182465829} - component: {fileID: 182465832} - component: {fileID: 182465831} - component: {fileID: 182465830} m_Layer: 5 m_Name: Bad CrossFade from Start m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &182465829 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 182465828} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1238422994} m_Father: {fileID: 579976149} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -215} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &182465830 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 182465828} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 182465831} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: BadCrossFadeFromStart m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &182465831 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 182465828} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &182465832 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 182465828} m_CullTransparentMesh: 0 --- !u!1 &255205004 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 255205005} - component: {fileID: 255205008} - component: {fileID: 255205007} - component: {fileID: 255205006} m_Layer: 5 m_Name: CrossFade then Idle m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &255205005 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255205004} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1599254085} m_Father: {fileID: 579976149} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -180} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &255205006 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255205004} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 255205007} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: CrossFadeThenIdle m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &255205007 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255205004} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &255205008 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255205004} m_CullTransparentMesh: 0 --- !u!1 &409050515 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 409050516} - component: {fileID: 409050519} - component: {fileID: 409050518} - component: {fileID: 409050517} m_Layer: 5 m_Name: Play then Idle m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &409050516 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 409050515} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1784175593} m_Father: {fileID: 579976149} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -40} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &409050517 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 409050515} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 409050518} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: PlayThenIdle m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &409050518 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 409050515} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &409050519 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 409050515} m_CullTransparentMesh: 0 --- !u!1 &579976145 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 579976149} - component: {fileID: 579976148} - component: {fileID: 579976147} - component: {fileID: 579976146} m_Layer: 5 m_Name: Canvas m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &579976146 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 579976145} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_IgnoreReversedGraphics: 1 m_BlockingObjects: 0 m_BlockingMask: serializedVersion: 2 m_Bits: 4294967295 --- !u!114 &579976147 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 579976145} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_UiScaleMode: 0 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 m_ReferenceResolution: {x: 800, y: 600} m_ScreenMatchMode: 0 m_MatchWidthOrHeight: 1 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 --- !u!223 &579976148 Canvas: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 579976145} m_Enabled: 1 serializedVersion: 3 m_RenderMode: 0 m_Camera: {fileID: 0} m_PlaneDistance: 100 m_PixelPerfect: 0 m_ReceivesEvents: 1 m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 m_AdditionalShaderChannelsFlag: 0 m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 --- !u!224 &579976149 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 579976145} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 887495922} - {fileID: 409050516} - {fileID: 54416159} - {fileID: 114200737} - {fileID: 1271232712} - {fileID: 255205005} - {fileID: 182465829} - {fileID: 1256272470} - {fileID: 1000560854} m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} --- !u!1 &599696931 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 599696932} - component: {fileID: 599696934} - component: {fileID: 599696933} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &599696932 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 599696931} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1256272470} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &599696933 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 599696931} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Good CrossFade from Start --- !u!222 &599696934 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 599696931} m_CullTransparentMesh: 0 --- !u!1 &752757351 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 752757352} - component: {fileID: 752757354} - component: {fileID: 752757353} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &752757352 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 752757351} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 54416159} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &752757353 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 752757351} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Play from Start --- !u!222 &752757354 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 752757351} m_CullTransparentMesh: 0 --- !u!1 &887495921 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 887495922} - component: {fileID: 887495925} - component: {fileID: 887495924} - component: {fileID: 887495923} m_Layer: 5 m_Name: Play m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &887495922 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 887495921} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1160843755} m_Father: {fileID: 579976149} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -5} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &887495923 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 887495921} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 887495924} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: Play m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &887495924 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 887495921} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &887495925 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 887495921} m_CullTransparentMesh: 0 --- !u!1 &914384631 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 914384635} - component: {fileID: 914384634} - component: {fileID: 914384633} - component: {fileID: 914384632} m_Layer: 0 m_Name: Plane m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!64 &914384632 MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 914384631} m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 3 m_Convex: 0 m_CookingOptions: 14 m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &914384633 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 914384631} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: bc28db22991ead048a61c46b6d7d7bc5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &914384634 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 914384631} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &914384635 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 914384631} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1000560853 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1000560854} - component: {fileID: 1000560857} - component: {fileID: 1000560856} - component: {fileID: 1000560855} m_Layer: 5 m_Name: Good CrossFade from Start then Idle m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1000560854 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1000560853} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 133064415} m_Father: {fileID: 579976149} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -285} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &1000560855 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1000560853} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 1000560856} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: GoodCrossFadeFromStartThenIdle m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &1000560856 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1000560853} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &1000560857 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1000560853} m_CullTransparentMesh: 0 --- !u!1 &1082604774 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1082604775} - component: {fileID: 1082604777} - component: {fileID: 1082604776} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1082604775 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1082604774} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1271232712} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1082604776 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1082604774} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: CrossFade --- !u!222 &1082604777 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1082604774} m_CullTransparentMesh: 0 --- !u!1 &1160843754 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1160843755} - component: {fileID: 1160843757} - component: {fileID: 1160843756} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1160843755 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1160843754} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 887495922} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1160843756 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1160843754} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Play --- !u!222 &1160843757 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1160843754} m_CullTransparentMesh: 0 --- !u!1 &1238422993 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1238422994} - component: {fileID: 1238422996} - component: {fileID: 1238422995} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1238422994 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1238422993} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 182465829} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1238422995 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1238422993} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Bad CrossFade from Start --- !u!222 &1238422996 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1238422993} m_CullTransparentMesh: 0 --- !u!1 &1256272469 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1256272470} - component: {fileID: 1256272473} - component: {fileID: 1256272472} - component: {fileID: 1256272471} m_Layer: 5 m_Name: Good CrossFade from Start m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1256272470 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1256272469} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 599696932} m_Father: {fileID: 579976149} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -250} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &1256272471 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1256272469} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 1256272472} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: GoodCrossFadeFromStart m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &1256272472 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1256272469} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &1256272473 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1256272469} m_CullTransparentMesh: 0 --- !u!1 &1271232711 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1271232712} - component: {fileID: 1271232715} - component: {fileID: 1271232714} - component: {fileID: 1271232713} m_Layer: 5 m_Name: CrossFade m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1271232712 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1271232711} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1082604775} m_Father: {fileID: 579976149} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 5, y: -145} m_SizeDelta: {x: 250, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &1271232713 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1271232711} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: m_HighlightedSprite: {fileID: 0} m_PressedSprite: {fileID: 0} m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 1271232714} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2069834675} m_MethodName: CrossFade m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &1271232714 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1271232711} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 --- !u!222 &1271232715 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1271232711} m_CullTransparentMesh: 0 --- !u!1 &1505652894 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1505652897} - component: {fileID: 1505652896} - component: {fileID: 1505652895} m_Layer: 0 m_Name: EventSystem m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1505652895 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1505652894} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_HorizontalAxis: Horizontal m_VerticalAxis: Vertical m_SubmitButton: Submit m_CancelButton: Cancel m_InputActionsPerSecond: 10 m_RepeatDelay: 0.5 m_ForceModuleActive: 0 --- !u!114 &1505652896 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1505652894} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_FirstSelected: {fileID: 0} m_sendNavigationEvents: 1 m_DragThreshold: 10 --- !u!4 &1505652897 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1505652894} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1599254084 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1599254085} - component: {fileID: 1599254087} - component: {fileID: 1599254086} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1599254085 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1599254084} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 255205005} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1599254086 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1599254084} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: CrossFade then Idle --- !u!222 &1599254087 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1599254084} m_CullTransparentMesh: 0 --- !u!1 &1767716482 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1767716484} - component: {fileID: 1767716483} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1767716483 Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1767716482} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: -1 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.05 m_NormalBias: 0.4 m_NearPlane: 0.2 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 4 m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1767716484 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1767716482} m_LocalRotation: {x: -0.4082179, y: 0.2345698, z: -0.10938169, w: -0.8754261} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1858931399} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &1784175592 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1784175593} - component: {fileID: 1784175595} - component: {fileID: 1784175594} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1784175593 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1784175592} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 409050516} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1784175594 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1784175592} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Play then Idle --- !u!222 &1784175595 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1784175592} m_CullTransparentMesh: 0 --- !u!1 &1858931395 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1858931399} - component: {fileID: 1858931398} - component: {fileID: 1858931397} - component: {fileID: 1858931396} - component: {fileID: 1858931400} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &1858931396 AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1858931395} m_Enabled: 1 --- !u!124 &1858931397 Behaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1858931395} m_Enabled: 1 --- !u!20 &1858931398 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1858931395} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.5019608, g: 0.627451, b: 0.8784314, a: 0} m_projectionMatrixMode: 1 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} m_GateFitMode: 2 m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 60 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &1858931399 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1858931395} m_LocalRotation: {x: 0, y: 0.973249, z: 0, w: -0.22975294} m_LocalPosition: {x: 1, y: 1, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1767716484} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1858931400 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1858931395} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d1ae14bf1f98371428ee080a75de9aa0, type: 3} m_Name: m_EditorClassIdentifier: _FocalPoint: {x: 0, y: 1, z: 0} _MouseButton: 1 _Sensitivity: {x: 15, y: -10, z: -0.1} --- !u!1 &1882400646 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1882400647} - component: {fileID: 1882400649} - component: {fileID: 1882400648} m_Layer: 5 m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1882400647 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1882400646} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 114200737} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1882400648 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1882400646} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Play from Start then Idle --- !u!222 &1882400649 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1882400646} m_CullTransparentMesh: 0 --- !u!1001 &2069834672 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 100006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_Name value: DefaultHumanoid objectReference: {fileID: 0} - target: {fileID: 9500000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_ApplyRootMotion value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.x value: -0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} --- !u!1 &2069834673 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 2069834672} m_PrefabAsset: {fileID: 0} --- !u!95 &2069834674 stripped Animator: m_CorrespondingSourceObject: {fileID: 9500000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 2069834672} m_PrefabAsset: {fileID: 0} --- !u!114 &2069834675 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2069834673} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: dfff62a1b6849774f990c02242787aff, type: 3} m_Name: m_EditorClassIdentifier: _Animancer: {fileID: 2069834676} _Idle: {fileID: 7400000, guid: c2ecee9424461bf4e864486b30ec0e9e, type: 2} _Action: {fileID: 7400000, guid: 6b6754727a425b241bd179af348a5153, type: 2} --- !u!114 &2069834676 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2069834673} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0ad50f81b1d25c441943c37a89ba23f6, type: 3} m_Name: m_EditorClassIdentifier: _Animator: {fileID: 2069834674} _ActionOnDisable: 0
jynew/jyx2/Assets/3rd/Animancer/Examples/01 Basics/02 Playing And Fading/Playing And Fading.unity/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/01 Basics/02 Playing And Fading/Playing And Fading.unity", "repo_id": "jynew", "token_count": 34483 }
896
// Animancer // https://kybernetik.com.au/animancer // Copyright 2021 Kybernetik // #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value. using System; using UnityEngine; namespace Animancer.Examples.Basics { /// <summary> /// Demonstrates how to use a <see cref="NamedAnimancerComponent"/> to play animations by name. /// </summary> /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/basics/named-animations">Named Animations</see></example> /// https://kybernetik.com.au/animancer/api/Animancer.Examples.Basics/NamedAnimations /// [AddComponentMenu(Strings.ExamplesMenuPrefix + "Basics - Named Animations")] [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(Basics) + "/" + nameof(NamedAnimations))] public sealed class NamedAnimations : MonoBehaviour { /************************************************************************************************************************/ [SerializeField] private NamedAnimancerComponent _Animancer; [SerializeField] private AnimationClip _Walk; [SerializeField] private AnimationClip _Run; /************************************************************************************************************************/ // Idle. /************************************************************************************************************************/ // Called by a UI Button. /// <summary> /// Plays the idle animation by name. This requires the animation to already have a state in the /// <see cref="NamedAnimancerComponent"/>, which has already been done in this example by adding it to the /// <see cref="NamedAnimancerComponent.Animations"/> list in the Inspector. /// <para></para> /// If it has not been added, this method will simply do nothing. /// </summary> public void PlayIdle() { _Animancer.TryPlay("Humanoid-Idle"); } /************************************************************************************************************************/ // Walk. /************************************************************************************************************************/ // Called by a UI Button. /// <summary> /// Plays the walk animation by name. Unlike the idle animation, this one has not been added to the /// Inspector list so it will not exist and this method will log a warning unless you call /// <see cref="InitialiseWalkState"/> first. /// </summary> public void PlayWalk() { var state = _Animancer.TryPlay("Humanoid-Walk"); if (state == null) Debug.LogWarning("No state has been registered with 'Humanoid-Walk' as its key yet."); // _Animancer.TryPlay(_Walk.name); would also work, // but if we are going to use the clip we should really just use _Animancer.Play(_Walk); } /************************************************************************************************************************/ // Called by a UI Button. /// <summary> /// Creates a state for the walk animation so that <see cref="PlayWalk"/> can play it. /// </summary> /// <remarks> /// Calling this method more than once will throw an <see cref="ArgumentException"/> because a state already /// exists with the key it's trying to use (the animation's name). /// <para></para> /// If we wanted to allow repeated calls we could use /// <see cref="AnimancerLayer.GetOrCreateState(AnimationClip, bool)"/> instead, which would create a state the /// first time then return the same one every time after that. /// <para></para> /// If we wanted to actually create multiple states for the same animation, we would have to use the optional /// `key` parameter to specify a different key for each of them. /// </remarks> public void InitialiseWalkState() { _Animancer.States.Create(_Walk); Debug.Log("Created a state to play " + _Walk, this); } /************************************************************************************************************************/ // Run. /************************************************************************************************************************/ // Called by a UI Button. /// <summary> /// Plays the run animation using a direct reference to show that the ability to play animations by /// name in a <see cref="NamedAnimancerComponent"/> does not prevent it from also using direct references like /// the base <see cref="AnimancerComponent"/>. /// </summary> public void PlayRun() { _Animancer.Play(_Run); // What actually happens internally looks more like this: // object key = _Animancer.GetKey(_Run); // var state = _Animancer.GetOrCreate(key, _Run); // _Animancer.Play(state); // The base AnimancerComponent.GetKey returns the AnimationClip to use as its own key, but // NamedAnimancerComponent overrides it to instead return the clip's name. This is a bit less // efficient, but it allows us to use clips (like we are here) or names (like with the idle) // interchangeably. // After the 'Run' state has been created, we could do any of the following: // _Animancer.GetState(_Run) or GetState("Run"). // _Animancer.Play(_Run) or Play("Run"). // Same for CrossFade, and CrossFadeFromStart. } /************************************************************************************************************************/ } }
jynew/jyx2/Assets/3rd/Animancer/Examples/01 Basics/04 Named Animations/NamedAnimations.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/01 Basics/04 Named Animations/NamedAnimations.cs", "repo_id": "jynew", "token_count": 1939 }
897
fileFormatVersion: 2 guid: c96e2773a3c77da489a21ae218fbcdf0 labels: - Example MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/02 Fine Control/02 Doors/ClickToInteract.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/02 Fine Control/02 Doors/ClickToInteract.cs.meta", "repo_id": "jynew", "token_count": 101 }
898
fileFormatVersion: 2 guid: 87d3c58c482b7b346b14d094d7dfe0a4 labels: - Example folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/02 Fine Control/04 Update Rate.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/02 Fine Control/04 Update Rate.meta", "repo_id": "jynew", "token_count": 80 }
899
fileFormatVersion: 2 guid: 9e115319934f3d74da38fccdc46a78a9 labels: - BlendTree - Example DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/03 Locomotion/03 Linear Blending/Linear Blending.unity.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/03 Locomotion/03 Linear Blending/Linear Blending.unity.meta", "repo_id": "jynew", "token_count": 76 }
900
// Animancer // https://kybernetik.com.au/animancer // Copyright 2021 Kybernetik // #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value. using Animancer.Examples.FineControl; using UnityEngine; namespace Animancer.Examples.Locomotion { /// <summary> /// A <see cref="SpiderBot"/> with a <see cref="MixerState.Transition2D"/> and <see cref="Rigidbody"/> to allow the /// bot to move in any direction. /// </summary> /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/locomotion/directional-blending">Directional Blending</see></example> /// https://kybernetik.com.au/animancer/api/Animancer.Examples.Locomotion/SpiderBotAdvanced /// [AddComponentMenu(Strings.ExamplesMenuPrefix + "Locomotion - Spider Bot Advanced")] [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(Locomotion) + "/" + nameof(SpiderBotAdvanced))] public sealed class SpiderBotAdvanced : SpiderBot { /************************************************************************************************************************/ [SerializeField] private Rigidbody _Body; [SerializeField] private float _TurnSpeed = 90; [SerializeField] private float _MovementSpeed = 1.5f; [SerializeField] private float _SprintMultiplier = 2; /************************************************************************************************************************/ [SerializeField] private MixerState.Transition2D _Move; protected override ITransition MovementAnimation => _Move; /************************************************************************************************************************/ private Vector3 _MovementDirection; protected override bool IsMoving => _MovementDirection != Vector3.zero; /************************************************************************************************************************/ protected override void Awake() { base.Awake(); // Create the movement state but don't play it yet. // This ensures that we can access _MovementAnimation.State in other methods before actually playing it. Animancer.States.GetOrCreate(_Move); } /************************************************************************************************************************/ protected override void Update() { // Calculate the movement direction and call the base method to wake up or go to sleep if necessary. _MovementDirection = GetMovementDirection(); base.Update(); // If the movement state is playing and not fading out: if (_Move.State.IsActive) { // Rotate towards the same Y angle as the camera. var eulerAngles = transform.eulerAngles; var targetEulerY = Camera.main.transform.eulerAngles.y; eulerAngles.y = Mathf.MoveTowardsAngle(eulerAngles.y, targetEulerY, _TurnSpeed * Time.deltaTime); transform.eulerAngles = eulerAngles; // The movement direction is in world space, so we need to convert it to local space to be appropriate // for the current rotation by using dot-products to determine how much of that direction lies along // each axis. This would be unnecessary if we did not rotate at all. _Move.State.Parameter = new Vector2( Vector3.Dot(transform.right, _MovementDirection), Vector3.Dot(transform.forward, _MovementDirection)); // Set its speed depending on whether you are sprinting or not. var isSprinting = Input.GetMouseButton(0); _Move.State.Speed = isSprinting ? _SprintMultiplier : 1; } else// Otherwise stop it entirely. { _Move.State.Parameter = Vector2.zero; _Move.State.Speed = 0; } } /************************************************************************************************************************/ private Vector3 GetMovementDirection() { // Get a ray from the main camera in the direction of the mouse cursor. var ray = Camera.main.ScreenPointToRay(Input.mousePosition); // Do a raycast with it and stop trying to move it it does not hit anything. // Note that this object is set to the Ignore Raycast layer so that the raycast will not hit it. if (!Physics.Raycast(ray, out var raycastHit))// Note the exclamation mark ! return Vector3.zero; // If the ray hit something, calculate the horizontal direction from this object to that point. var direction = raycastHit.point - transform.position; direction.y = 0; // If we are close to the destination, stop moving. // We could use an arbitrary small value like 0.1, but that would not work if the speed is too high. // Instead, we can calculate the distance it will actually move in a single frame at max speed to determine // if it would arrive or pass the destination next frame. var distance = direction.magnitude; if (distance < _MovementSpeed * _SprintMultiplier * Time.fixedDeltaTime) { return Vector3.zero; } else { // Otherwise normalize the direction so that we do not change speed based on distance. // Calling direction.Normalize() would do the same thing, but would calculate the magnitude again. return direction / distance; } } /************************************************************************************************************************/ private void FixedUpdate() { // Move the rigidbody in the desired direction. _Body.velocity = _MovementDirection * _Move.State.Speed * _MovementSpeed; } /************************************************************************************************************************/ } }
jynew/jyx2/Assets/3rd/Animancer/Examples/03 Locomotion/04 Directional Blending/SpiderBotAdvanced.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/03 Locomotion/04 Directional Blending/SpiderBotAdvanced.cs", "repo_id": "jynew", "token_count": 2244 }
901
fileFormatVersion: 2 guid: 4fecddbb026038a4a89cd738eac23448 labels: - Animal - Bird - CC0 - Chick - Critter - Example - OpenGameArt - Patvanmackelberg - Sprite NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/04 Directional Sprites/01 Basic Movement/Critters/ChickWalk.asset.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/04 Directional Sprites/01 Basic Movement/Critters/ChickWalk.asset.meta", "repo_id": "jynew", "token_count": 114 }
902
fileFormatVersion: 2 guid: 069737427246caa42909f411d20fe8d5 labels: - CC0 - ChasersGaming - Doctor - Example - MedicalExaminer - Nurse - Sprite NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/04 Directional Sprites/02 Character Controller/Medical Examiner/MedicalExaminer-Push.asset.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/04 Directional Sprites/02 Character Controller/Medical Examiner/MedicalExaminer-Push.asset.meta", "repo_id": "jynew", "token_count": 103 }
903
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 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: 8b5b6ac0c7ebd7b41b307d920db7b245, type: 3} m_Name: Pirate-Push m_EditorClassIdentifier: _Up: {fileID: 74069382908488320} _Right: {fileID: 74156264778171974} _Down: {fileID: 74017076652453214} _Left: {fileID: 74868366223029584} _UpRight: {fileID: 74611587823370512} _DownRight: {fileID: 74200566239974608} _DownLeft: {fileID: 74179914786045396} _UpLeft: {fileID: 74563714835209734} --- !u!74 &74017076652453214 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushDown serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300022, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300070, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300118, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300166, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300022, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300070, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300118, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300166, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74069382908488320 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushUp serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300030, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300078, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300126, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300174, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300030, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300078, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300126, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300174, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74156264778171974 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushRight serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300026, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300074, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300122, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300170, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300026, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300074, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300122, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300170, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74179914786045396 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushDownLeft serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300020, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300068, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300116, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300164, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300020, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300068, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300116, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300164, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74200566239974608 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushDownRight serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300024, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300072, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300120, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300168, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300024, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300072, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300120, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300168, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74563714835209734 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushUpLeft serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300016, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300064, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300112, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300160, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300016, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300064, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300112, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300160, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74611587823370512 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushUpRight serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300028, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300076, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300124, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300172, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300028, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300076, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300124, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300172, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] --- !u!74 &74868366223029584 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Pirate-PushLeft serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: - curve: - time: 0 value: {fileID: 21300018, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.25 value: {fileID: 21300066, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.5 value: {fileID: 21300114, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - time: 0.75 value: {fileID: 21300162, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} attribute: m_Sprite path: classID: 212 script: {fileID: 0} m_SampleRate: 4 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - serializedVersion: 2 path: 0 attribute: 0 script: {fileID: 0} typeID: 212 customType: 23 isPPtrCurve: 1 pptrCurveMapping: - {fileID: 21300018, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300066, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300114, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} - {fileID: 21300162, guid: f9b7d7c041011704e8272376a8d358c8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: []
jynew/jyx2/Assets/3rd/Animancer/Examples/04 Directional Sprites/02 Character Controller/Pirate/Pirate-Push.asset/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/04 Directional Sprites/02 Character Controller/Pirate/Pirate-Push.asset", "repo_id": "jynew", "token_count": 8921 }
904
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0.44657737, g: 0.49641174, b: 0.5748169, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &152260733 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 152260736} - component: {fileID: 152260735} - component: {fileID: 152260734} m_Layer: 0 m_Name: Animancer Events Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!102 &152260734 TextMesh: serializedVersion: 3 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 152260733} m_Text: 'Animancer Events' m_OffsetZ: 0 m_CharacterSize: 1 m_LineSpacing: 1 m_Anchor: 7 m_Alignment: 1 m_TabSize: 4 m_FontSize: 25 m_FontStyle: 0 m_RichText: 1 m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Color: serializedVersion: 2 rgba: 4294967295 --- !u!23 &152260735 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 152260733} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!4 &152260736 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 152260733} m_LocalRotation: {x: 0, y: 1, z: 0, w: -0.00000004371139} m_LocalPosition: {x: -1, y: 2, z: 0} m_LocalScale: {x: 0.099999994, y: 0.099999994, z: 0.099999994} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &554499554 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 554499557} - component: {fileID: 554499556} - component: {fileID: 554499555} m_Layer: 0 m_Name: Animation Events Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!102 &554499555 TextMesh: serializedVersion: 3 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 554499554} m_Text: 'Animation Events' m_OffsetZ: 0 m_CharacterSize: 1 m_LineSpacing: 1 m_Anchor: 7 m_Alignment: 1 m_TabSize: 4 m_FontSize: 25 m_FontStyle: 0 m_RichText: 1 m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Color: serializedVersion: 2 rgba: 4294967295 --- !u!23 &554499556 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 554499554} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!4 &554499557 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 554499554} m_LocalRotation: {x: 0, y: 1, z: 0, w: -0.00000004371139} m_LocalPosition: {x: 1, y: 2, z: 0} m_LocalScale: {x: 0.099999994, y: 0.099999994, z: 0.099999994} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &697055065 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 100006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_Name value: DefaultHumanoid Animancer objectReference: {fileID: 0} - target: {fileID: 9500000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_ApplyRootMotion value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.x value: -1 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} --- !u!1 &697055066 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 697055065} m_PrefabAsset: {fileID: 0} --- !u!95 &697055067 stripped Animator: m_CorrespondingSourceObject: {fileID: 9500000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 697055065} m_PrefabAsset: {fileID: 0} --- !u!1 &697055068 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100104, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 697055065} m_PrefabAsset: {fileID: 0} --- !u!1 &697055069 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100028, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 697055065} m_PrefabAsset: {fileID: 0} --- !u!114 &697055070 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 697055066} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 7b0eab787e57cb4448737b74a7cb585c, type: 3} m_Name: m_EditorClassIdentifier: _Animancer: {fileID: 697055071} _Walk: _FadeDuration: 0.25 _Events: _NormalizedTimes: - 0.04 - 0.54 - NaN _Callbacks: - m_PersistentCalls: m_Calls: - m_Target: {fileID: 697055070} m_MethodName: PlaySound m_Mode: 2 m_Arguments: m_ObjectArgument: {fileID: 697055073} m_ObjectArgumentAssemblyTypeName: UnityEngine.AudioSource, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PersistentCalls: m_Calls: - m_Target: {fileID: 697055070} m_MethodName: PlaySound m_Mode: 2 m_Arguments: m_ObjectArgument: {fileID: 697055072} m_ObjectArgumentAssemblyTypeName: UnityEngine.AudioSource, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 m_CallState: 2 m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null _Clip: {fileID: 7400000, guid: fd6e0d48a65905843a5f784b7acb18f0, type: 2} _Speed: 1 _NormalizedStartTime: NaN _Sounds: - {fileID: 8300000, guid: 81ceff7a17400b746bdbb583997dce37, type: 3} - {fileID: 8300000, guid: f4d9ce80f3a80444da89c3b545852a46, type: 3} - {fileID: 8300000, guid: 477c245df486a6d4a9a1afb74a6295d8, type: 3} - {fileID: 8300000, guid: 6f975515fe61d0c41a00c399dea7cb42, type: 3} --- !u!114 &697055071 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 697055066} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0ad50f81b1d25c441943c37a89ba23f6, type: 3} m_Name: m_EditorClassIdentifier: _Animator: {fileID: 697055067} _ActionOnDisable: 0 --- !u!82 &697055072 AudioSource: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 697055068} m_Enabled: 1 serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 Priority: 128 DopplerLevel: 1 MinDistance: 1 MaxDistance: 25 Pan2D: 0 rolloffMode: 1 BypassEffects: 0 BypassListenerEffects: 0 BypassReverbZones: 0 rolloffCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 panLevelCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 spreadCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 reverbZoneMixCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 --- !u!82 &697055073 AudioSource: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 697055069} m_Enabled: 1 serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 Priority: 128 DopplerLevel: 1 MinDistance: 1 MaxDistance: 25 Pan2D: 0 rolloffMode: 1 BypassEffects: 0 BypassListenerEffects: 0 BypassReverbZones: 0 rolloffCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 panLevelCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 spreadCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 reverbZoneMixCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 --- !u!1001 &828971707 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 100006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_Name value: DefaultHumanoid Animation objectReference: {fileID: 0} - target: {fileID: 9500000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_ApplyRootMotion value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.x value: 1 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - target: {fileID: 400006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} --- !u!1 &828971708 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100006, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 828971707} m_PrefabAsset: {fileID: 0} --- !u!1 &828971709 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100104, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 828971707} m_PrefabAsset: {fileID: 0} --- !u!1 &828971710 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100028, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 828971707} m_PrefabAsset: {fileID: 0} --- !u!95 &828971711 stripped Animator: m_CorrespondingSourceObject: {fileID: 9500000, guid: c9f3e1113795a054c939de9883b31fed, type: 3} m_PrefabInstance: {fileID: 828971707} m_PrefabAsset: {fileID: 0} --- !u!114 &828971712 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 828971708} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 91342707efab4304598fd35a5d6e8ec6, type: 3} m_Name: m_EditorClassIdentifier: _Animancer: {fileID: 828971715} _Walk: _FadeDuration: 0.25 _Events: _NormalizedTimes: [] _Callbacks: [] _Clip: {fileID: 7400000, guid: e772eafca55a04d4a98ba5411b4d21ef, type: 2} _Speed: 1 _NormalizedStartTime: NaN _Sounds: - {fileID: 8300000, guid: 81ceff7a17400b746bdbb583997dce37, type: 3} - {fileID: 8300000, guid: f4d9ce80f3a80444da89c3b545852a46, type: 3} - {fileID: 8300000, guid: 477c245df486a6d4a9a1afb74a6295d8, type: 3} - {fileID: 8300000, guid: 6f975515fe61d0c41a00c399dea7cb42, type: 3} _FootSources: - {fileID: 828971714} - {fileID: 828971713} --- !u!82 &828971713 AudioSource: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 828971709} m_Enabled: 1 serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 Priority: 128 DopplerLevel: 1 MinDistance: 1 MaxDistance: 25 Pan2D: 0 rolloffMode: 1 BypassEffects: 0 BypassListenerEffects: 0 BypassReverbZones: 0 rolloffCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 panLevelCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 spreadCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 reverbZoneMixCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 --- !u!82 &828971714 AudioSource: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 828971710} m_Enabled: 1 serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 Priority: 128 DopplerLevel: 1 MinDistance: 1 MaxDistance: 25 Pan2D: 0 rolloffMode: 1 BypassEffects: 0 BypassListenerEffects: 0 BypassReverbZones: 0 rolloffCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 panLevelCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 spreadCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 reverbZoneMixCustomCurve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 --- !u!114 &828971715 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 828971708} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0ad50f81b1d25c441943c37a89ba23f6, type: 3} m_Name: m_EditorClassIdentifier: _Animator: {fileID: 828971711} _ActionOnDisable: 0 --- !u!1 &1009442553 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1009442557} - component: {fileID: 1009442556} - component: {fileID: 1009442555} - component: {fileID: 1009442554} m_Layer: 0 m_Name: Plane m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!64 &1009442554 MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1009442553} m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 3 m_Convex: 0 m_CookingOptions: 14 m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1009442555 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1009442553} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: bc28db22991ead048a61c46b6d7d7bc5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1009442556 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1009442553} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &1009442557 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1009442553} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1457585706 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1457585708} - component: {fileID: 1457585707} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1457585707 Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1457585706} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: -1 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.05 m_NormalBias: 0.4 m_NearPlane: 0.2 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 4 m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1457585708 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1457585706} m_LocalRotation: {x: -0.4082179, y: 0.2345698, z: -0.10938169, w: -0.8754261} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2074747450} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &2074747446 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2074747450} - component: {fileID: 2074747449} - component: {fileID: 2074747448} - component: {fileID: 2074747447} - component: {fileID: 2074747451} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &2074747447 AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074747446} m_Enabled: 1 --- !u!124 &2074747448 Behaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074747446} m_Enabled: 1 --- !u!20 &2074747449 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074747446} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.5019608, g: 0.627451, b: 0.8784314, a: 0} m_projectionMatrixMode: 1 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} m_GateFitMode: 2 m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 60 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &2074747450 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074747446} m_LocalRotation: {x: 0, y: 0.9870875, z: 0, w: -0.1601823} m_LocalPosition: {x: 1.0000002, y: 1, z: 3.0000002} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1457585708} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &2074747451 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074747446} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d1ae14bf1f98371428ee080a75de9aa0, type: 3} m_Name: m_EditorClassIdentifier: _FocalPoint: {x: 0, y: 1, z: 0} _MouseButton: 1 _Sensitivity: {x: 15, y: -10, z: -0.1}
jynew/jyx2/Assets/3rd/Animancer/Examples/05 Events/01 Footstep Events/Footstep Events.unity/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/05 Events/01 Footstep Events/Footstep Events.unity", "repo_id": "jynew", "token_count": 15747 }
905
fileFormatVersion: 2 guid: 3ffe8623e092810418d762728e8e6fd9 labels: - CC0 - Cris - Documentation - Example TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/05 Events/01 Footstep Events/Footsteps On Concrete/License.txt.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/05 Events/01 Footstep Events/Footsteps On Concrete/License.txt.meta", "repo_id": "jynew", "token_count": 82 }
906
// Animancer // https://kybernetik.com.au/animancer // Copyright 2021 Kybernetik // #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value. using UnityEngine; namespace Animancer.Examples.Events { /// <summary>A <see cref="GolfHitController"/> that uses Animation Events.</summary> /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/events/golf">Golf Events</see></example> /// https://kybernetik.com.au/animancer/api/Animancer.Examples.Events/GolfHitControllerAnimation /// [AddComponentMenu(Strings.ExamplesMenuPrefix + "Golf Events - Animation")] [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(Events) + "/" + nameof(GolfHitControllerAnimation))] public sealed class GolfHitControllerAnimation : GolfHitController { /************************************************************************************************************************/ /// <summary> /// Calls the base <see cref="GolfHitController.Awake"/> method and register /// <see cref="GolfHitController.EndSwing"/> to be called whenever the swing animation ends. /// <para></para> /// Normally Animancer could call the registered method at the End Time defined in the transition, but in this /// case the <see cref="AnimationClip"/> used with this script has an Animation Event with the Function Name /// "End", which will execute the registered method when that event time passes. /// </summary> protected override void Awake() { base.Awake(); _Swing.Events.OnEnd = EndSwing; } /************************************************************************************************************************/ /// <summary> /// Calls <see cref="GolfHitController.HitBall"/>. The <see cref="AnimationClip"/> used with this script has an /// Animation Event with the Function Name "Event", which will cause it to execute this method. /// <para></para> /// Normally you would just have the event use "HitBall" as its Function Name directly, but the same animation /// is also being used for <see cref="GolfHitControllerAnimationSimple"/> which relies on the Function Name /// being "Event". /// </summary> private void Event() { HitBall(); } /************************************************************************************************************************/ /// <summary>Calls <see cref="EndEventReceiver.End"/>.</summary> /// <remarks> /// Called by Animation Events with the Function Name "End". /// <para></para> /// Note that Unity will allocate some garbage every time it triggers an Animation Event with an /// <see cref="AnimationEvent"/> parameter. /// </remarks> private void End(AnimationEvent animationEvent) { EndEventReceiver.End(_Animancer, animationEvent); } /************************************************************************************************************************/ } }
jynew/jyx2/Assets/3rd/Animancer/Examples/05 Events/02 Golf Events/GolfHitControllerAnimation.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/05 Events/02 Golf Events/GolfHitControllerAnimation.cs", "repo_id": "jynew", "token_count": 1013 }
907
// Animancer // https://kybernetik.com.au/animancer // Copyright 2021 Kybernetik // #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value. using System; using UnityEngine; using UnityEngine.UI; namespace Animancer.Examples.StateMachines.GameManager { /// <summary>A game manager that acts as an enum-based state machine.</summary> /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/fsm/game-manager">Game Manager</see></example> /// https://kybernetik.com.au/animancer/api/Animancer.Examples.StateMachines.GameManager/GameManagerEnum /// [AddComponentMenu(Strings.ExamplesMenuPrefix + "Game Manager - Enum")] [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(StateMachines) + "." + nameof(GameManager) + "/" + nameof(GameManagerEnum))] public sealed class GameManagerEnum : MonoBehaviour { /************************************************************************************************************************/ [SerializeField] private Transform _Camera; [SerializeField] private float _IntroductionOrbitSpeed = 45; [SerializeField] private float _IntroductionOrbitRadius = 3; [SerializeField] private Vector3 _ReadyCameraPosition = new Vector3(0.25f, 1, -2); [SerializeField] private Vector3 _ReadyCameraRotation = Vector3.zero; [SerializeField] private float _CameraTurnSpeedFactor = 5; [SerializeField] private Text _Text; [SerializeField] private Image _FadeImage; [SerializeField] private float _FadeSpeed = 2; [SerializeField] private Events.GolfHitController _Golfer; [SerializeField] private Rigidbody _Ball; /************************************************************************************************************************/ public enum State { /// <summary>Camera orbiting the player, waiting for the player to click.</summary> Introduction, /// <summary>Waiting for player input to hit the ball.</summary> Ready, /// <summary>Waiting the the character to hit the ball and the ball to stop.</summary> Action, /// <summary>Fading the screen to black.</summary> FadeOut, /// <summary>Fading the screen back in after resetting the ball.</summary> FadeIn, } /************************************************************************************************************************/ private State _CurrentState; public State CurrentState { get => _CurrentState; set { _CurrentState = value; OnEnterState(); } } /************************************************************************************************************************/ private void Awake() { OnEnterState(); } /************************************************************************************************************************/ private void OnEnterState() { switch (_CurrentState) { case State.Introduction: _Text.gameObject.SetActive(true); _Text.text = "Welcome to the Game Manager example\nClick to start playing"; _FadeImage.gameObject.SetActive(false); _Golfer.EndSwing(); break; case State.Ready: _Camera.position = _ReadyCameraPosition; _Camera.eulerAngles = _ReadyCameraRotation; _Text.gameObject.SetActive(true); _Text.text = "Click to hit the ball"; _FadeImage.gameObject.SetActive(false); _Golfer.enabled = true; break; case State.Action: _Text.gameObject.SetActive(true); _FadeImage.gameObject.SetActive(false); _Golfer.enabled = false; break; case State.FadeOut: _Text.gameObject.SetActive(false); _FadeImage.gameObject.SetActive(true); _FadeImage.color = new Color(0, 0, 0, 0); break; case State.FadeIn: _Camera.position = _ReadyCameraPosition; _Camera.eulerAngles = _ReadyCameraRotation; _Text.gameObject.SetActive(false); _FadeImage.gameObject.SetActive(true); _FadeImage.color = new Color(0, 0, 0, 1); _Golfer.ReturnToReady(); break; } } /************************************************************************************************************************/ private void Update() { switch (_CurrentState) { case State.Introduction: var euler = _Camera.eulerAngles; euler.y += _IntroductionOrbitSpeed * Time.deltaTime; _Camera.eulerAngles = euler; var lookAt = _Golfer.transform.position; lookAt.y += 1; _Camera.position = lookAt - _Camera.forward * _IntroductionOrbitRadius; if (Input.GetMouseButtonUp(0)) CurrentState = State.Ready; break; case State.Ready: // The GolfHitController handles its own input now that it's enabled. // So we just wait for it to change states. if (_Golfer.CurrentState != Events.GolfHitController.State.Ready) CurrentState = State.Action; break; case State.Action: _Text.text = $"Wait for the ball to stop\nCurrent Speed: {_Ball.velocity.magnitude:0.00}m/s"; var targetRotation = Quaternion.LookRotation(_Ball.position - _Camera.position); _Camera.rotation = Quaternion.Slerp(_Camera.rotation, targetRotation, _CameraTurnSpeedFactor * Time.deltaTime); if (_Golfer.CurrentState == Events.GolfHitController.State.Idle && _Ball.IsSleeping()) CurrentState = State.FadeOut; break; case State.FadeOut: { var color = _FadeImage.color; color.a = Mathf.MoveTowards(color.a, 1, _FadeSpeed * Time.deltaTime); _FadeImage.color = color; if (color.a == 1)// When the fade ends. CurrentState = State.FadeIn; break; } case State.FadeIn: { var color = _FadeImage.color; color.a = Mathf.MoveTowards(color.a, 0, _FadeSpeed * Time.deltaTime); _FadeImage.color = color; if (color.a == 0)// When the fade ends. CurrentState = State.Ready; break; } } } /************************************************************************************************************************/ } }
jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/01 Game Manager/GameManagerEnum.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/01 Game Manager/GameManagerEnum.cs", "repo_id": "jynew", "token_count": 3535 }
908
fileFormatVersion: 2 guid: 86c3c3c451c311b42870c5b6ac905c17 labels: - Example - FSM - FiniteStateMachine MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/02 Creatures/Creature.cs.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/02 Creatures/Creature.cs.meta", "repo_id": "jynew", "token_count": 112 }
909
fileFormatVersion: 2 guid: c2bee731d857eb04a9b3ad88caecbbd6 labels: - Example - FSM - FiniteStateMachine DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/04 Brains/Brains.unity.meta/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/04 Brains/Brains.unity.meta", "repo_id": "jynew", "token_count": 83 }
910
// Animancer // https://kybernetik.com.au/animancer // Copyright 2021 Kybernetik // #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value. using UnityEngine; namespace Animancer.Examples.StateMachines.Brains { /// <summary> /// A <see cref="CreatureState"/> which moves the creature according to their /// <see cref="CreatureBrain.MovementDirection"/>. /// </summary> /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/fsm/brains">Brains</see></example> /// https://kybernetik.com.au/animancer/api/Animancer.Examples.StateMachines.Brains/LocomotionState /// [AddComponentMenu(Strings.ExamplesMenuPrefix + "Brains - Locomotion State")] [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(StateMachines) + "." + nameof(Brains) + "/" + nameof(LocomotionState))] public sealed class LocomotionState : CreatureState { /************************************************************************************************************************/ [SerializeField] private AnimationClip _Walk; [SerializeField] private AnimationClip _Run; /************************************************************************************************************************/ private void Update() { UpdateAnimation(); UpdateTurning(); } /************************************************************************************************************************/ /// <summary> /// This method is similar to the "PlayMove" method in <see cref="Locomotion.IdleAndWalkAndRun"/>, but instead /// of checking <see cref="Input"/> to determine whether or not to run we are checking if the /// <see cref="Creature.Brain"/> says it wants to run. /// </summary> private void UpdateAnimation() { // We will play either the Walk or Run animation. // We need to know which animation we are trying to play and which is the other one. AnimationClip playAnimation, otherAnimation; if (Creature.Brain.IsRunning) { playAnimation = _Run; otherAnimation = _Walk; } else { playAnimation = _Walk; otherAnimation = _Run; } // Play the one we want. var playState = Creature.Animancer.Play(playAnimation, 0.25f); // If the brain wants to move slowly, slow down the animation. var speed = Mathf.Min(Creature.Brain.MovementDirection.magnitude, 1); playState.Speed = speed; // If the other one is still fading out, align their NormalizedTime to ensure they stay at the same // relative progress through their walk cycle. if (Creature.Animancer.States.TryGet(otherAnimation, out var otherState) && otherState.IsPlaying) { playState.NormalizedTime = otherState.NormalizedTime; otherState.Speed = speed; } } /************************************************************************************************************************/ private void UpdateTurning() { // Do not turn if we are not trying to move. var movement = Creature.Brain.MovementDirection; if (movement == Vector3.zero) return; // Determine the angle we want to turn towards. // Without going into the maths behind it, Atan2 gives us the angle of a vector in radians. // So we just feed in the x and z values because we want an angle around the y axis, // then convert the result to degrees because Transform.eulerAngles uses degrees. var targetAngle = Mathf.Atan2(movement.x, movement.z) * Mathf.Rad2Deg; // Determine how far we can turn this frame (in degrees). var turnDelta = Creature.Stats.TurnSpeed * Time.deltaTime; // Get the current rotation, move its y value towards the target, and apply it back to the Transform. var transform = Creature.Animancer.transform; var eulerAngles = transform.eulerAngles; eulerAngles.y = Mathf.MoveTowardsAngle(eulerAngles.y, targetAngle, turnDelta); transform.eulerAngles = eulerAngles; } /************************************************************************************************************************/ /// <summary> /// Constantly moves the creature according to the <see cref="CreatureBrain.MovementDirection"/>. /// </summary> /// <remarks> /// This method is kept simple for the sake of demonstrating the animation system in this example. /// In a real game you would usually not set the velocity directly, but would instead use /// <see cref="Rigidbody.AddForce"/> to avoid interfering with collisions and other forces. /// </remarks> private void FixedUpdate() { // Get the desired direction, remove any vertical component, and limit the magnitude to 1 or less. // Otherwise a brain could make the creature travel at any speed by setting a longer vector. var direction = Creature.Brain.MovementDirection; direction.y = 0; direction = Vector3.ClampMagnitude(direction, 1); var speed = Creature.Stats.GetMoveSpeed(Creature.Brain.IsRunning); Creature.Rigidbody.velocity = direction * speed; } /************************************************************************************************************************/ } }
jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/04 Brains/States/LocomotionState.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/04 Brains/States/LocomotionState.cs", "repo_id": "jynew", "token_count": 2103 }
911
// Animancer // https://kybernetik.com.au/animancer // Copyright 2021 Kybernetik // #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value. using Animancer.Examples.StateMachines.Brains; using System; using UnityEngine; namespace Animancer.Examples.StateMachines.Weapons { /// <summary>A <see cref="CreatureState"/> which managed the currently equipped <see cref="Weapon"/>.</summary> /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/fsm/weapons">Weapons</see></example> /// https://kybernetik.com.au/animancer/api/Animancer.Examples.StateMachines.Weapons/EquipState /// [AddComponentMenu(Strings.ExamplesMenuPrefix + "Weapons - Equip State")] [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(StateMachines) + "." + nameof(Weapons) + "/" + nameof(EquipState))] public sealed class EquipState : CreatureState { /************************************************************************************************************************/ [SerializeField] private Transform _WeaponHolder; [SerializeField] private Weapon _Weapon; private Weapon _EquippingWeapon; private Action _OnUnequipEnd; /************************************************************************************************************************/ // Called by UI Buttons. public Weapon Weapon { get => _Weapon; set { if (enabled) return; _EquippingWeapon = value; if (!Creature.StateMachine.TrySetState(this)) _EquippingWeapon = _Weapon; } } /************************************************************************************************************************/ private void Awake() { _EquippingWeapon = _Weapon; _OnUnequipEnd = OnUnequipEnd; AttachWeapon(); } /************************************************************************************************************************/ // This state can only be entered by setting the Weapon property. public override bool CanEnterState => _Weapon != _EquippingWeapon; /************************************************************************************************************************/ /// <summary> /// Start at the beginning of the sequence by default, but if the previous attack hasn't faded out yet then /// perform the next attack instead. /// </summary> private void OnEnable() { if (_Weapon.UnequipAnimation.IsValid) { var state = Creature.Animancer.Play(_Weapon.UnequipAnimation); state.Events.OnEnd = _OnUnequipEnd; } else { OnUnequipEnd(); } } /************************************************************************************************************************/ private void OnUnequipEnd() { DetachWeapon(); _Weapon = _EquippingWeapon; AttachWeapon(); if (_Weapon.EquipAnimation.IsValid) { var state = Creature.Animancer.Play(_Weapon.EquipAnimation); state.Events.OnEnd = Creature.ForceEnterIdleState; } else { Creature.StateMachine.ForceSetState(Creature.Idle); } } /************************************************************************************************************************/ private void AttachWeapon() { if (_Weapon == null) return; if (_WeaponHolder != null) { var transform = _Weapon.transform; transform.parent = _WeaponHolder; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; transform.localScale = Vector3.one; } _Weapon.gameObject.SetActive(true); } private void DetachWeapon() { if (_Weapon == null) return; // It might be more appropriate to reparent inactive weapons to the inventory system if you have one. // Or you could even attach them to specific bones on the character and leave them active. _Weapon.transform.parent = transform; _Weapon.gameObject.SetActive(false); } /************************************************************************************************************************/ private void FixedUpdate() { Creature.Rigidbody.velocity = Vector3.zero; } /************************************************************************************************************************/ public override bool CanExitState => false; /************************************************************************************************************************/ } }
jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/06 Weapons/EquipState.cs/0
{ "file_path": "jynew/jyx2/Assets/3rd/Animancer/Examples/06 State Machines/06 Weapons/EquipState.cs", "repo_id": "jynew", "token_count": 1950 }
912