text
stringlengths 7
35.3M
| id
stringlengths 11
185
| metadata
dict | __index_level_0__
int64 0
2.14k
|
---|---|---|---|
fileFormatVersion: 2
guid: 97a1a637638a39f4895ec29f3c40fb6d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Materials/Table_4.mat.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Materials/Table_4.mat.meta",
"repo_id": "jynew",
"token_count": 76
}
| 800 |
fileFormatVersion: 2
guid: 6810f9e6bad8d784c90f25e4f281e26d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Materials/Tank_4.mat.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Materials/Tank_4.mat.meta",
"repo_id": "jynew",
"token_count": 76
}
| 801 |
fileFormatVersion: 2
guid: 903f10493e27e804c925230e10577f68
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Materials/Wood_1.mat.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Materials/Wood_1.mat.meta",
"repo_id": "jynew",
"token_count": 72
}
| 802 |
fileFormatVersion: 2
guid: 78204e090ad637c47bedfd8ec3f9b322
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Box_1.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Box_1.prefab.meta",
"repo_id": "jynew",
"token_count": 64
}
| 803 |
fileFormatVersion: 2
guid: fdd90ab2445ed534888c9683df44ea24
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Chair_2.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Chair_2.prefab.meta",
"repo_id": "jynew",
"token_count": 63
}
| 804 |
fileFormatVersion: 2
guid: fe0cc63cddb362f41b685595ca79c2f9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Hat_1.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Hat_1.prefab.meta",
"repo_id": "jynew",
"token_count": 66
}
| 805 |
fileFormatVersion: 2
guid: c6154dd6071c51d44becfd689bf3f3f3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Sark_4.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Sark_4.prefab.meta",
"repo_id": "jynew",
"token_count": 65
}
| 806 |
fileFormatVersion: 2
guid: 545771f77222b9444a46cb9540fa8f9c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Table_10.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Table_10.prefab.meta",
"repo_id": "jynew",
"token_count": 65
}
| 807 |
fileFormatVersion: 2
guid: 8c9bedd5d02b8264097fb4c1ce5147b2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Table_8.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Table_8.prefab.meta",
"repo_id": "jynew",
"token_count": 68
}
| 808 |
fileFormatVersion: 2
guid: f86f83a3eca30794c9705ac19f9fd176
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Tree_Shanshu_1.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Common/mode_01/Prefab/Tree_Shanshu_1.prefab.meta",
"repo_id": "jynew",
"token_count": 64
}
| 809 |
fileFormatVersion: 2
guid: f2bf188e47aa21f4db06a38445028e01
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Model/Materials.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Model/Materials.meta",
"repo_id": "jynew",
"token_count": 69
}
| 810 |
fileFormatVersion: 2
guid: 831cfb39953624b718c31102025d857a
folderAsset: yes
timeCreated: 1462519607
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Demos/DemoSources.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Demos/DemoSources.meta",
"repo_id": "jynew",
"token_count": 74
}
| 811 |
fileFormatVersion: 2
guid: 3a4356d50eb724ab1a0b2fcd872e67f7
folderAsset: yes
timeCreated: 1472709933
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Demos/DemoSources/Scripts.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Demos/DemoSources/Scripts.meta",
"repo_id": "jynew",
"token_count": 79
}
| 812 |
fileFormatVersion: 2
guid: bc3967e80936b41ec8da3da56407b442
timeCreated: 1462519607
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Documentation/QuickStartGuide.pdf.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Documentation/QuickStartGuide.pdf.meta",
"repo_id": "jynew",
"token_count": 68
}
| 813 |
fileFormatVersion: 2
guid: 4b7baac2cee904aa1aa265372916eb69
folderAsset: yes
timeCreated: 1493887971
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Resources/Materials.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Resources/Materials.meta",
"repo_id": "jynew",
"token_count": 75
}
| 814 |
fileFormatVersion: 2
guid: 187d6b6c578eb41029a2bf2d15920773
timeCreated: 1488661131
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Resources/Shaders/BeautifyAdvancedParams.cginc.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Resources/Shaders/BeautifyAdvancedParams.cginc.meta",
"repo_id": "jynew",
"token_count": 77
}
| 815 |
fileFormatVersion: 2
guid: 5cee962c89521df4ab1871105758fbb2
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Resources/Shaders/BeautifyMobile_GPUI.shader.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Beautify/Resources/Shaders/BeautifyMobile_GPUI.shader.meta",
"repo_id": "jynew",
"token_count": 86
}
| 816 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/3D_BlackHole" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_Distortion ("_Distortion", Range(0.0, 1.00)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,0.)
_ColorRGB ("_ColorRGB", Color) = (1,1,1,1)
}
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
#include "UnityCG.cginc"
uniform sampler2D _MainTex;
uniform float _Visualize;
uniform float _TimeX;
uniform float _Distortion;
uniform float4 _ScreenResolution;
uniform float4 _ColorRGB;
uniform float _Near;
uniform float _Far;
uniform float _FarCamera;
uniform sampler2D _CameraDepthTexture;
uniform float _FixDistance;
uniform float _DistortionLevel;
uniform float _DistortionSize;
uniform float _LightIntensity;
uniform float2 _MainTex_TexelSize;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
float4 projPos : TEXCOORD1;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
OUT.projPos = ComputeScreenPos(OUT.vertex);
return OUT;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst.xy;
float depth = LinearEyeDepth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)).r);
depth/=_FixDistance*10;
float ss=smoothstep(_Near, saturate(_Near+_Far), depth);
depth = ss * (1 - ss);
if (_Visualize == 1) return depth;
float4 result=float4(1-depth,1-depth,1-depth,1);
float4 txt = tex2D(_MainTex,uv);
uv = uvst.xy-float2(0.5,0.5);
float n = 0;
n = depth;
n -= sqrt(dot(uv*2, uv*2))*1-depth * 4;
n = smoothstep(_DistortionSize, _DistortionSize+1, n);
float v = n*_DistortionLevel*depth;
float4 txt2 = tex2D(_MainTex, uvst.xy+float2(v,v));
txt = txt2-n*_DistortionLevel;
return txt;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_3D_BlackHole.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_3D_BlackHole.shader",
"repo_id": "jynew",
"token_count": 930
}
| 817 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/3D_Snow" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,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 Texture2;
uniform float _Visualize;
uniform sampler2D _CameraDepthTexture;
uniform float _TimeX;
uniform float _Value;
uniform float _Value2;
uniform float _Value4;
uniform float _Value5;
uniform float _Value7;
uniform float _Value8;
uniform float Drop_Near;
uniform float Drop_Far;
uniform float Drop_With_Obj;
uniform float _FixDistance;
uniform float4 _ScreenResolution;
uniform float2 _MainTex_TexelSize;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
float4 projPos : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
OUT.projPos = ComputeScreenPos(OUT.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0)
IN.texcoord.y = 1 - IN.texcoord.y;
#endif
OUT.texcoord2 = IN.texcoord;
return OUT;
}
float rdepth(v2f i,float step)
{
float depth = LinearEyeDepth(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)).r);
depth /= _FixDistance * 10;
depth = saturate(depth);
depth = smoothstep(Drop_Near+ step, Drop_Near+ step +0.01, depth);
return depth;
}
float snow(float2 uv, float dp, float depth,float speed)
{
float s = 1;
uv *= dp*_Value5;
uv.x += 0.1+sin(_Time*16)*speed*0.2;
uv.y += _TimeX*speed;
s = tex2D(Texture2, uv).r;
s = lerp(0, s*0.2, depth);
return s;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst.xy;
float2 uv2 = i.texcoord2.xy;
_TimeX *= _Value4;
float4 txt = tex2D(_MainTex, uv);
float s = 0;
float depth = rdepth(i,0.5);
s= snow(uv, 10, depth, 0.2);
depth = rdepth(i, 0.3); s+= snow(uv2 + float2(0.1,0), 8, depth,0.4);
depth = rdepth(i, 0.2); s+= snow(uv2 + float2(0.4, 0), 6, depth, 0.6);
depth = rdepth(i, 0.1); s+= snow(uv2 + float2(0.8, 0), 4, depth, 0.8);
depth = rdepth(i, 0); s+= snow(uv2 + float2(0.5, 0), 2, depth, 1);
depth = LinearEyeDepth(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)).r);
depth /= _FixDistance * 10;
depth = saturate(depth);
depth = smoothstep(Drop_Near, Drop_Far, depth);
if (_Visualize == 1) return depth;
txt= lerp(txt, txt+s*_Value2, depth *Drop_With_Obj);
return txt;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_3D_Snow.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_3D_Snow.shader",
"repo_id": "jynew",
"token_count": 1252
}
| 818 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/AAA_Blood_Plus" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_MainTex2 ("Base (RGB)", 2D) = "white" {}
}
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
#include "UnityCG.cginc"
uniform sampler2D _MainTex;
uniform sampler2D _MainTex2;
uniform float _TimeX;
uniform float _Speed;
uniform float _Value;
uniform float _Value2;
uniform float _Value3;
uniform float _Value4;
uniform float _Value5;
uniform float _Value6;
uniform float _Value7;
uniform float _Value8;
uniform float _Value9;
uniform float _Value10;
uniform float _Value11;
uniform float _Value12;
uniform float _Value13;
uniform float4 _ScreenResolution;
uniform float2 _MainTex_TexelSize;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
return OUT;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst.xy;
float2 uv2 = uv;
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0)
uv.y = 1-uv.y;
#endif
uv =(uvst-float2(0.5,0.5))*0.8;
float total=_Value2+_Value3+_Value4+_Value5;
uv=uv+float2(0.5,0.5);
uv/=2+total/1000;
uv+=float2(0,0);
float3 col1 = (tex2D(_MainTex2,uv).rgb);
float3 col2 = (tex2D(_MainTex2,uv+float2(0.5,0 )).rgb);
float3 col3 = (tex2D(_MainTex2,uv+float2(0.0,0.5)).rgb);
float3 col4 = (tex2D(_MainTex2,uv+float2(0.5,0.5)).rgb);
float col=0;
col = col1.r*_Value2;
col += col2.r*_Value3;
col += col3.r*_Value4;
col += col4.r*_Value5;
col += col1.g*_Value6;
col += col2.g*_Value7;
col += col3.g*_Value8;
col += col4.g*_Value9;
col += col1.b*_Value10;
col += col2.b*_Value11;
col += col3.b*_Value12;
col += col4.b*_Value13;
col*=_Value;
uv2+=float2(col,col)*0.0625;
float3 mcol = tex2D(_MainTex,uv2).rgb;
mcol=mcol+(col/16)*0.0625;
mcol.r=mcol.r+col;
return float4(mcol, 1.0);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_AAA_Blood_Plus.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_AAA_Blood_Plus.shader",
"repo_id": "jynew",
"token_count": 1084
}
| 819 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/Blur_Radial_Fast" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,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 float _TimeX;
uniform float _Value;
uniform float _Value2;
uniform float _Value3;
uniform float4 _ScreenResolution;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
return OUT;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 center = float2(_Value2,_Value3);
float2 uv = uvst.xy;
uv -= center;
float4 color = float4(0.0,0.0,0.0,0.0);
float scale;
_Value*=0.15;
scale = 1 + (float(0*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(1*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(2*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(3*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(4*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(5*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(6*_Value));
color += tex2D(_MainTex, uv * scale + center);
scale = 1 + (float(7*_Value));
color += tex2D(_MainTex, uv * scale + center);
color /= float(8);
return color;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Blur_Radial_Fast.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Blur_Radial_Fast.shader",
"repo_id": "jynew",
"token_count": 817
}
| 820 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/Distortion_ShockWaveManual"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,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 float _TimeX;
uniform float _Value;
uniform float _Value2;
uniform float _Value3;
uniform float _Value4;
uniform float4 _ScreenResolution;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
return OUT;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst.xy;
float Dist = distance(uv, float2(_Value, _Value2));
float Diff = (Dist - _Value3);
float v = (1.0 - pow(abs(Diff * 10.0), 0.8));
float vt = saturate(v * 0.02 * _Value4);
uv.x = uv.x - vt;
uv.y = uv.y - vt;
float4 Color = tex2D(_MainTex, uv);
Color.rgb += float3(vt, vt, vt);
return Color;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Distortion_ShockWaveManual.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Distortion_ShockWaveManual.shader",
"repo_id": "jynew",
"token_count": 656
}
| 821 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/Drawing_Manga_FlashWhite" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,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 float _TimeX;
uniform float _Value;
uniform float _Value2;
uniform float _Value3;
uniform float _Value4;
uniform float _Intensity;
uniform float4 _ScreenResolution;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
return OUT;
}
float noise( float2 val )
{
return frac(sin(dot(val.xy ,float2(12.9898,78.233))) * 43758.5453);
}
float getFrameTime()
{
float time = _TimeX;
return floor(time * _Value2) / _Value2;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst;
float2 vec = uvst - float2(_Value3,_Value4);
float PI = 3.141592653589793*_Value;
float l = length(vec) / length(float2(1.0,1.0) - float2(0.5,0.5));
float r = (atan2(vec.y, vec.x) + PI) / (2.0 * PI);
float t = getFrameTime();
t = max(t, 0.1);
float r2 = floor(r * 700.0) / 700.0 * t;
float ran = noise( float2(r2, r2) ) * 0.7 + 0.3;
float c = l > ran ? abs(l - ran) : 0.0;
float4 v=tex2D(_MainTex,uvst);
v=lerp(v,v+c, _Intensity);
return float4( v );
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Drawing_Manga_FlashWhite.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Drawing_Manga_FlashWhite.shader",
"repo_id": "jynew",
"token_count": 825
}
| 822 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/FX_EarthQuake" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,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 float _TimeX;
uniform float _Value;
uniform float _Value2;
uniform float _Value3;
uniform float4 _ScreenResolution;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
return OUT;
}
float nrand(float2 n)
{
return frac(sin(dot(n.xy, float2(12.9898, 78.233)))* 43758.5453);
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst.xy;
float t = float(int(_TimeX * _Value));
float2 suv = float2(0,0);
suv.x = uv.x + _Value2 * nrand(t);
suv.y = uv.y + _Value3 * nrand(t + 23.0);
suv.x -=_Value2/2;
suv.y -=_Value3/2;
float3 col = tex2D(_MainTex,suv).rgb;
return float4(col,1.0);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_FX_EarthQuake.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_FX_EarthQuake.shader",
"repo_id": "jynew",
"token_count": 677
}
| 823 |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
////////////////////////////////////////////
// CameraFilterPack - by VETASOFT 2018 /////
////////////////////////////////////////////
Shader "CameraFilterPack/Vision_Aura" {
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_TimeX ("Time", Range(0.0, 1.0)) = 1.0
_ScreenResolution ("_ScreenResolution", Vector) = (0.,0.,0.,0.)
_Value2 ("_ColorRGB", Color) = (1,1,1,1)
_Value5 ("Speed", Range(0.0, 1.0)) = 1.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 float _TimeX;
uniform float _Value;
uniform float4 _Value2;
uniform float _Value3;
uniform float _Value4;
uniform float _Value5;
uniform float4 _ScreenResolution;
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float2 texcoord : TEXCOORD0;
float4 vertex : SV_POSITION;
float4 color : COLOR;
};
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color;
return OUT;
}
float voronoi(in float2 uv)
{
float2 lp = abs(uv)*10.;
float2 sp = frac(lp)-.5;
lp = floor(lp);
float d = 1.;
for (float x = -1; x < 2; x++) {
for (float y = -1; y < 2; y++) {
float2 mp = float2(float(x),float(y));
float2 p = lp+mp;
d = min(d,length(sp+(cos(p.x+_TimeX)+cos(p.y+_TimeX))*.3-mp));
}
}
return d;
}
half4 _MainTex_ST;
float4 frag(v2f i) : COLOR
{
float2 uvst = UnityStereoScreenSpaceUVAdjust(i.texcoord, _MainTex_ST);
float2 uv = uvst.xy - float2(_Value3,_Value4);
float time=_TimeX*_Value5;
float ang = atan2(uv.y,uv.x);
float dst = length(uv)*_Value;
float cfade = clamp(dst*40.-3.+cos(ang*1.+cos(ang*6.)*1.+time*2.)*.68,0.,1.);
float a = 0.;
for (int q= 3; q < 6; q++)
{
float fi = float(q);
float2 luv = uv+cos((ang-dst)*fi+time+uv+fi)*.2;
a += voronoi(luv)*(.7+(cos(luv.x*14.234)+cos(luv.y*16.234))*.4);
}
float3 color = _Value2.rgb;
float4 v=tex2D(_MainTex,uvst.xy);
color=color*a*cfade*_Value2.a;
color+=v.rgb;
return float4(color,1.);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Vision_Aura.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Resources/CameraFilterPack_Vision_Aura.shader",
"repo_id": "jynew",
"token_count": 995
}
| 824 |
fileFormatVersion: 2
guid: a4f9adc5a8a7c41488b0ebb649a3461c
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Blizzard.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Blizzard.cs.meta",
"repo_id": "jynew",
"token_count": 74
}
| 825 |
fileFormatVersion: 2
guid: cad205fe945d2fb4c9538acd2cd4ee4a
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Distortion_ShockWave.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Distortion_ShockWave.cs.meta",
"repo_id": "jynew",
"token_count": 71
}
| 826 |
fileFormatVersion: 2
guid: ab766e3f7d1bc8a4691d24b834182ddb
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
|
jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Edge_Sigmoid.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/Camera Filter Pack/Scripts/CameraFilterPack_Edge_Sigmoid.cs.meta",
"repo_id": "jynew",
"token_count": 73
}
| 827 |
%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: 8e6292b2c06870d4495f009f912b9600, type: 3}
m_Name: DiGong
m_EditorClassIdentifier:
settings:
- {fileID: 114474243622946214}
- {fileID: 114165335454853186}
- {fileID: 114571247598723586}
--- !u!114 &114165335454853186
MonoBehaviour:
m_ObjectHideFlags: 3
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: 40b924e2dad56384a8df2a1e111bb675, type: 3}
m_Name: Vignette
m_EditorClassIdentifier:
active: 0
enabled:
overrideState: 1
value: 1
mode:
overrideState: 0
value: 0
color:
overrideState: 1
value: {r: 0.6415094, g: 0, b: 0, a: 1}
center:
overrideState: 0
value: {x: 0.5, y: 0.5}
intensity:
overrideState: 1
value: 0.651
smoothness:
overrideState: 0
value: 0.2
roundness:
overrideState: 0
value: 1
rounded:
overrideState: 0
value: 0
mask:
overrideState: 0
value: {fileID: 0}
defaultState: 1
opacity:
overrideState: 0
value: 1
--- !u!114 &114474243622946214
MonoBehaviour:
m_ObjectHideFlags: 3
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: adb84e30e02715445aeb9959894e3b4d, type: 3}
m_Name: ColorGrading
m_EditorClassIdentifier:
active: 0
enabled:
overrideState: 1
value: 1
gradingMode:
overrideState: 0
value: 1
externalLut:
overrideState: 0
value: {fileID: 0}
defaultState: 1
tonemapper:
overrideState: 0
value: 0
toneCurveToeStrength:
overrideState: 0
value: 0
toneCurveToeLength:
overrideState: 0
value: 0.5
toneCurveShoulderStrength:
overrideState: 0
value: 0
toneCurveShoulderLength:
overrideState: 0
value: 0.5
toneCurveShoulderAngle:
overrideState: 0
value: 0
toneCurveGamma:
overrideState: 0
value: 1
ldrLut:
overrideState: 0
value: {fileID: 0}
defaultState: 4
ldrLutContribution:
overrideState: 0
value: 1
temperature:
overrideState: 0
value: 0
tint:
overrideState: 0
value: 0
colorFilter:
overrideState: 0
value: {r: 1, g: 0.23113209, b: 0.2823899, a: 1}
hueShift:
overrideState: 0
value: 0
saturation:
overrideState: 0
value: 0
brightness:
overrideState: 0
value: 0
postExposure:
overrideState: 1
value: 0.5
contrast:
overrideState: 0
value: 0
mixerRedOutRedIn:
overrideState: 0
value: 100
mixerRedOutGreenIn:
overrideState: 0
value: 0
mixerRedOutBlueIn:
overrideState: 0
value: 0
mixerGreenOutRedIn:
overrideState: 0
value: 0
mixerGreenOutGreenIn:
overrideState: 0
value: 100
mixerGreenOutBlueIn:
overrideState: 0
value: 0
mixerBlueOutRedIn:
overrideState: 0
value: 0
mixerBlueOutGreenIn:
overrideState: 0
value: 0
mixerBlueOutBlueIn:
overrideState: 0
value: 100
lift:
overrideState: 0
value: {x: 1, y: 1, z: 1, w: 0}
gamma:
overrideState: 0
value: {x: 1, y: 1, z: 1, w: 0}
gain:
overrideState: 0
value: {x: 1, y: 1, z: 1, w: 0}
masterCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 0
m_ZeroValue: 0
m_Range: 1
cachedData:
- 0
- 0.0078125
- 0.015625
- 0.0234375
- 0.03125
- 0.0390625
- 0.046875
- 0.0546875
- 0.0625
- 0.0703125
- 0.078125
- 0.0859375
- 0.09375
- 0.1015625
- 0.109375
- 0.1171875
- 0.125
- 0.1328125
- 0.140625
- 0.1484375
- 0.15625
- 0.1640625
- 0.171875
- 0.1796875
- 0.1875
- 0.1953125
- 0.203125
- 0.2109375
- 0.21875
- 0.2265625
- 0.234375
- 0.2421875
- 0.25
- 0.2578125
- 0.265625
- 0.2734375
- 0.28125
- 0.2890625
- 0.296875
- 0.3046875
- 0.3125
- 0.3203125
- 0.328125
- 0.3359375
- 0.34375
- 0.3515625
- 0.359375
- 0.3671875
- 0.375
- 0.3828125
- 0.390625
- 0.3984375
- 0.40625
- 0.4140625
- 0.421875
- 0.4296875
- 0.4375
- 0.4453125
- 0.453125
- 0.4609375
- 0.46875
- 0.4765625
- 0.484375
- 0.4921875
- 0.5
- 0.5078125
- 0.515625
- 0.5234375
- 0.53125
- 0.5390625
- 0.546875
- 0.5546875
- 0.5625
- 0.5703125
- 0.578125
- 0.5859375
- 0.59375
- 0.6015625
- 0.609375
- 0.6171875
- 0.625
- 0.6328125
- 0.640625
- 0.6484375
- 0.65625
- 0.6640625
- 0.671875
- 0.6796875
- 0.6875
- 0.6953125
- 0.703125
- 0.7109375
- 0.71875
- 0.7265625
- 0.734375
- 0.7421875
- 0.75
- 0.7578125
- 0.765625
- 0.7734375
- 0.78125
- 0.7890625
- 0.796875
- 0.8046875
- 0.8125
- 0.8203125
- 0.828125
- 0.8359375
- 0.84375
- 0.8515625
- 0.859375
- 0.8671875
- 0.875
- 0.8828125
- 0.890625
- 0.8984375
- 0.90625
- 0.9140625
- 0.921875
- 0.9296875
- 0.9375
- 0.9453125
- 0.953125
- 0.9609375
- 0.96875
- 0.9765625
- 0.984375
- 0.9921875
redCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 0
m_ZeroValue: 0
m_Range: 1
cachedData:
- 0
- 0.0078125
- 0.015625
- 0.0234375
- 0.03125
- 0.0390625
- 0.046875
- 0.0546875
- 0.0625
- 0.0703125
- 0.078125
- 0.0859375
- 0.09375
- 0.1015625
- 0.109375
- 0.1171875
- 0.125
- 0.1328125
- 0.140625
- 0.1484375
- 0.15625
- 0.1640625
- 0.171875
- 0.1796875
- 0.1875
- 0.1953125
- 0.203125
- 0.2109375
- 0.21875
- 0.2265625
- 0.234375
- 0.2421875
- 0.25
- 0.2578125
- 0.265625
- 0.2734375
- 0.28125
- 0.2890625
- 0.296875
- 0.3046875
- 0.3125
- 0.3203125
- 0.328125
- 0.3359375
- 0.34375
- 0.3515625
- 0.359375
- 0.3671875
- 0.375
- 0.3828125
- 0.390625
- 0.3984375
- 0.40625
- 0.4140625
- 0.421875
- 0.4296875
- 0.4375
- 0.4453125
- 0.453125
- 0.4609375
- 0.46875
- 0.4765625
- 0.484375
- 0.4921875
- 0.5
- 0.5078125
- 0.515625
- 0.5234375
- 0.53125
- 0.5390625
- 0.546875
- 0.5546875
- 0.5625
- 0.5703125
- 0.578125
- 0.5859375
- 0.59375
- 0.6015625
- 0.609375
- 0.6171875
- 0.625
- 0.6328125
- 0.640625
- 0.6484375
- 0.65625
- 0.6640625
- 0.671875
- 0.6796875
- 0.6875
- 0.6953125
- 0.703125
- 0.7109375
- 0.71875
- 0.7265625
- 0.734375
- 0.7421875
- 0.75
- 0.7578125
- 0.765625
- 0.7734375
- 0.78125
- 0.7890625
- 0.796875
- 0.8046875
- 0.8125
- 0.8203125
- 0.828125
- 0.8359375
- 0.84375
- 0.8515625
- 0.859375
- 0.8671875
- 0.875
- 0.8828125
- 0.890625
- 0.8984375
- 0.90625
- 0.9140625
- 0.921875
- 0.9296875
- 0.9375
- 0.9453125
- 0.953125
- 0.9609375
- 0.96875
- 0.9765625
- 0.984375
- 0.9921875
greenCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 0
m_ZeroValue: 0
m_Range: 1
cachedData:
- 0
- 0.0078125
- 0.015625
- 0.0234375
- 0.03125
- 0.0390625
- 0.046875
- 0.0546875
- 0.0625
- 0.0703125
- 0.078125
- 0.0859375
- 0.09375
- 0.1015625
- 0.109375
- 0.1171875
- 0.125
- 0.1328125
- 0.140625
- 0.1484375
- 0.15625
- 0.1640625
- 0.171875
- 0.1796875
- 0.1875
- 0.1953125
- 0.203125
- 0.2109375
- 0.21875
- 0.2265625
- 0.234375
- 0.2421875
- 0.25
- 0.2578125
- 0.265625
- 0.2734375
- 0.28125
- 0.2890625
- 0.296875
- 0.3046875
- 0.3125
- 0.3203125
- 0.328125
- 0.3359375
- 0.34375
- 0.3515625
- 0.359375
- 0.3671875
- 0.375
- 0.3828125
- 0.390625
- 0.3984375
- 0.40625
- 0.4140625
- 0.421875
- 0.4296875
- 0.4375
- 0.4453125
- 0.453125
- 0.4609375
- 0.46875
- 0.4765625
- 0.484375
- 0.4921875
- 0.5
- 0.5078125
- 0.515625
- 0.5234375
- 0.53125
- 0.5390625
- 0.546875
- 0.5546875
- 0.5625
- 0.5703125
- 0.578125
- 0.5859375
- 0.59375
- 0.6015625
- 0.609375
- 0.6171875
- 0.625
- 0.6328125
- 0.640625
- 0.6484375
- 0.65625
- 0.6640625
- 0.671875
- 0.6796875
- 0.6875
- 0.6953125
- 0.703125
- 0.7109375
- 0.71875
- 0.7265625
- 0.734375
- 0.7421875
- 0.75
- 0.7578125
- 0.765625
- 0.7734375
- 0.78125
- 0.7890625
- 0.796875
- 0.8046875
- 0.8125
- 0.8203125
- 0.828125
- 0.8359375
- 0.84375
- 0.8515625
- 0.859375
- 0.8671875
- 0.875
- 0.8828125
- 0.890625
- 0.8984375
- 0.90625
- 0.9140625
- 0.921875
- 0.9296875
- 0.9375
- 0.9453125
- 0.953125
- 0.9609375
- 0.96875
- 0.9765625
- 0.984375
- 0.9921875
blueCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 0
m_ZeroValue: 0
m_Range: 1
cachedData:
- 0
- 0.0078125
- 0.015625
- 0.0234375
- 0.03125
- 0.0390625
- 0.046875
- 0.0546875
- 0.0625
- 0.0703125
- 0.078125
- 0.0859375
- 0.09375
- 0.1015625
- 0.109375
- 0.1171875
- 0.125
- 0.1328125
- 0.140625
- 0.1484375
- 0.15625
- 0.1640625
- 0.171875
- 0.1796875
- 0.1875
- 0.1953125
- 0.203125
- 0.2109375
- 0.21875
- 0.2265625
- 0.234375
- 0.2421875
- 0.25
- 0.2578125
- 0.265625
- 0.2734375
- 0.28125
- 0.2890625
- 0.296875
- 0.3046875
- 0.3125
- 0.3203125
- 0.328125
- 0.3359375
- 0.34375
- 0.3515625
- 0.359375
- 0.3671875
- 0.375
- 0.3828125
- 0.390625
- 0.3984375
- 0.40625
- 0.4140625
- 0.421875
- 0.4296875
- 0.4375
- 0.4453125
- 0.453125
- 0.4609375
- 0.46875
- 0.4765625
- 0.484375
- 0.4921875
- 0.5
- 0.5078125
- 0.515625
- 0.5234375
- 0.53125
- 0.5390625
- 0.546875
- 0.5546875
- 0.5625
- 0.5703125
- 0.578125
- 0.5859375
- 0.59375
- 0.6015625
- 0.609375
- 0.6171875
- 0.625
- 0.6328125
- 0.640625
- 0.6484375
- 0.65625
- 0.6640625
- 0.671875
- 0.6796875
- 0.6875
- 0.6953125
- 0.703125
- 0.7109375
- 0.71875
- 0.7265625
- 0.734375
- 0.7421875
- 0.75
- 0.7578125
- 0.765625
- 0.7734375
- 0.78125
- 0.7890625
- 0.796875
- 0.8046875
- 0.8125
- 0.8203125
- 0.828125
- 0.8359375
- 0.84375
- 0.8515625
- 0.859375
- 0.8671875
- 0.875
- 0.8828125
- 0.890625
- 0.8984375
- 0.90625
- 0.9140625
- 0.921875
- 0.9296875
- 0.9375
- 0.9453125
- 0.953125
- 0.9609375
- 0.96875
- 0.9765625
- 0.984375
- 0.9921875
hueVsHueCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 1
m_ZeroValue: 0.5
m_Range: 1
cachedData:
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
hueVsSatCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 1
m_ZeroValue: 0.5
m_Range: 1
cachedData:
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
satVsSatCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 0
m_ZeroValue: 0.5
m_Range: 1
cachedData:
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
lumVsSatCurve:
overrideState: 0
value:
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_Loop: 0
m_ZeroValue: 0.5
m_Range: 1
cachedData:
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
--- !u!114 &114571247598723586
MonoBehaviour:
m_ObjectHideFlags: 3
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: 48a79b01ea5641d4aa6daa2e23605641, type: 3}
m_Name: Bloom
m_EditorClassIdentifier:
active: 1
enabled:
overrideState: 1
value: 1
intensity:
overrideState: 1
value: 1
threshold:
overrideState: 1
value: 0.5
softKnee:
overrideState: 0
value: 0.5
clamp:
overrideState: 0
value: 65472
diffusion:
overrideState: 0
value: 7
anamorphicRatio:
overrideState: 0
value: 0
color:
overrideState: 0
value: {r: 1, g: 1, b: 1, a: 1}
fastMode:
overrideState: 0
value: 0
dirtTexture:
overrideState: 0
value: {fileID: 0}
defaultState: 1
dirtIntensity:
overrideState: 0
value: 0
|
jynew/jyx2/Assets/3DScene/Post_Processing/ScenePostProcess/DiGong.asset/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Post_Processing/ScenePostProcess/DiGong.asset",
"repo_id": "jynew",
"token_count": 15297
}
| 828 |
fileFormatVersion: 2
guid: 2cc55af97da9a6b46a92c663f1679f2d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Prefabs/Statue.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Prefabs/Statue.prefab.meta",
"repo_id": "jynew",
"token_count": 67
}
| 829 |
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "Custom/Grass"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.5
_MainColor("Main Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_GlobalWind("Global Wind", Range( 0 , 1)) = 0.5
_Turbulence("Turbulence", Float) = 1
_SpeedTurbulence("Speed Turbulence", Float) = 1
_WindMain("Wind Main", Float) = 2
_PulseFrequency("Pulse Frequency", Float) = 3
_ToonEffect("Toon Effect",range(0,1)) = 0.5
_Steps("Steps of toon",range(0,9)) = 3
_OffsetScale("Offset Scale", Vector) = (0.1,0,0,0)
}
SubShader
{
Tags{ "Queue" ="AlphaTest" "RenderType"="TransparentCutout" "IgnoreProjector"="True" "IsEmissive" = "true" }
LOD 500
Cull off
CGPROGRAM
#include "UnityShaderVariables.cginc"
#include "UnityPBSLighting.cginc"
#pragma target 3.0
#pragma surface surf Cartoon vertex:vertexDataFunc alphatest:_Cutoff addshadow noshadow
struct Input
{
float2 texcoord;
float3 worldPos;
float4 vertexColor : COLOR;
};
UNITY_INSTANCING_BUFFER_START(Props)
UNITY_INSTANCING_BUFFER_END(Props)
uniform float _SpeedTurbulence;
uniform float _Turbulence;
uniform float _GlobalWind;
uniform float _WindMain;
uniform float _PulseFrequency;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float4 _MainColor;
uniform float4 _OffsetScale;
float _Steps;
float _ToonEffect;
float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
float snoise( float3 v )
{
const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
float3 i = floor( v + dot( v, C.yyy ) );
float3 x0 = v - i + dot( i, C.xxx );
float3 g = step( x0.yzx, x0.xyz );
float3 l = 1.0 - g;
float3 i1 = min( g.xyz, l.zxy );
float3 i2 = max( g.xyz, l.zxy );
float3 x1 = x0 - i1 + C.xxx;
float3 x2 = x0 - i2 + C.yyy;
float3 x3 = x0 - 0.5;
i = mod3D289( i);
float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
float4 x_ = floor( j / 7.0 );
float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 h = 1.0 - abs( x ) - abs( y );
float4 b0 = float4( x.xy, y.xy );
float4 b1 = float4( x.zw, y.zw );
float4 s0 = floor( b0 ) * 2.0 + 1.0;
float4 s1 = floor( b1 ) * 2.0 + 1.0;
float4 sh = -step( h, 0.0 );
float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
float3 g0 = float3( a0.xy, h.x );
float3 g1 = float3( a0.zw, h.y );
float3 g2 = float3( a1.xy, h.z );
float3 g3 = float3( a1.zw, h.w );
float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
g0 *= norm.x;
g1 *= norm.y;
g2 *= norm.z;
g3 *= norm.w;
float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
m = m* m;
m = m* m;
float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
return 42.0 * dot( m, px);
}
void vertexDataFunc(inout appdata_full v, out Input o )
{
UNITY_INITIALIZE_OUTPUT( Input, o );
float3 ase_vertexNormal = v.normal.xyz;
float simplePerlin3D16 = snoise( ase_vertexNormal );
float3 ase_objectScale = float3( length( unity_ObjectToWorld[ 0 ].xyz ), length( unity_ObjectToWorld[ 1 ].xyz ), length( unity_ObjectToWorld[ 2 ].xyz ) );
float3 ase_worldPos = mul( unity_ObjectToWorld, v.vertex );
float temp_output_323_0 = ( ase_worldPos.x * 0.2 );
float4 transform57 = mul(unity_WorldToObject,float4( ( _GlobalWind * v.color.r * ase_objectScale * _OffsetScale.xyz * _WindMain * (0.1 + (( cos( ( ( _PulseFrequency * (_Time.y + v.normal.y) ) + temp_output_323_0 ) ) - sin( ( _Time.z + v.normal.z + temp_output_323_0 ) ) ) - -1.0) * (1.0 - 0.1) / (1.0 - -1.0)) ) , 0.0 ));
float4 Wind390 = ( float4( ( 0.01 * sin( ( _Time.y * ( 20.0 * simplePerlin3D16 ) * _SpeedTurbulence * v.color.b ) ) * ( _Turbulence * ase_vertexNormal * v.color.g ) * _GlobalWind ) , 0.0 ) + transform57 );
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
v.vertex.xyz += Wind390.xyz;
}
inline float4 LightingCartoon(SurfaceOutputStandard 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 i , inout SurfaceOutputStandard o )
{
float4 c = tex2D( _MainTex, i.texcoord) * _MainColor;
o.Emission = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "Transparent/Cutout/VertexLit"
}
|
jynew/jyx2/Assets/3DScene/Shader/Grass.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Shader/Grass.shader",
"repo_id": "jynew",
"token_count": 2719
}
| 830 |
// Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax.
Shader "GPUInstancer/Custom/SceneSuf" {
Properties {
_MainTex("MainTex", 2D) = "white"{}
_Color("Main Color",color) = (1,1,1,1)
_Outline("Thick of Outline",range(0,0.5)) = 0.03//挤出描边的粗细
_Factor("Factor",range(0,1)) = 0.5//挤出多远
_OutColor("OutColor",color) = (0,0,0,0)
_ToonEffect("Toon Effect",range(0,1)) = 0.5
_Steps("Steps of toon",range(0,9)) = 3
_IllumBool("IllumBool",range(0,1)) = 0
_Illum("Illumin (A)", 2D) = "white" { }
}
SubShader {
Tags{ "Queue" = "Geometry" "RenderType" = "Opaque"}
pass {//处理光照前的pass渲染
Tags{ "LightMode" = "Always" }
Cull Front
ZWrite On
CGPROGRAM
#include "UnityCG.cginc"
#include "./../../3rd/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc"
#pragma instancing_options procedural:setupGPUI
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float _Outline;
float _Factor;
fixed4 _OutColor;
struct v2f {
float4 pos:SV_POSITION;
UNITY_FOG_COORDS(0)
};
v2f vert(appdata_full v) {
v2f o;
float3 dir = normalize(v.vertex.xyz);
float3 dir2 = v.normal;
float D = dot(dir,dir2);
dir = dir * sign(D);
dir = dir * _Factor + dir2 * (1 - _Factor);
v.vertex.xyz += dir * _Outline;
o.pos = UnityObjectToClipPos(v.vertex);
UNITY_TRANSFER_FOG(o, o.pos);
return o;
}
float4 frag(v2f i) :COLOR
{
float4 c = _OutColor;
UNITY_APPLY_FOG(i.fogCoord, c);
return c;
}
ENDCG
}
CGPROGRAM
#include "UnityCG.cginc"
#include "./../../3rd/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc"
#pragma instancing_options procedural:setupGPUI
#pragma multi_compile_instancing
#include "UnityPBSLighting.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
struct Input
{
float2 uv_MainTex;
float2 uv_Illum;
float3 normal:TEXCOORD1;
};
fixed4 _Color;
float _Steps;
float _ToonEffect;
sampler2D _MainTex;
sampler2D _Illum;
fixed _IllumBool;
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
UNITY_INSTANCING_BUFFER_START(Props)
// put more per-instance properties here
UNITY_INSTANCING_BUFFER_END(Props)
inline float4 LightingCartoon(SurfaceOutputStandard s, fixed3 lightDir, fixed3 viewDir, fixed atten)
{
//暂时光的方向反了,使用了-normalize(lightDir)
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 SurfaceOutputStandard o)
{
// Albedo comes from a texture tinted by color
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
if (_IllumBool > 0.5)
{
o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a;
}
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
|
jynew/jyx2/Assets/3DScene/Shader/SceneSuf_GPUI.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Shader/SceneSuf_GPUI.shader",
"repo_id": "jynew",
"token_count": 1809
}
| 831 |
fileFormatVersion: 2
guid: c19933e46795e414a8f687988201c8e6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/SkyBox.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/SkyBox.meta",
"repo_id": "jynew",
"token_count": 69
}
| 832 |
fileFormatVersion: 2
guid: 1845cf935a8c13c40933067c4188f783
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/SkyBox/Sky_01.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/SkyBox/Sky_01.meta",
"repo_id": "jynew",
"token_count": 69
}
| 833 |
fileFormatVersion: 2
guid: c0f6f5fb0eae32248b8b705a5828d54e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets.meta",
"repo_id": "jynew",
"token_count": 72
}
| 834 |
fileFormatVersion: 2
guid: 93933bea31f32ff409c2cf9b72a0642f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Grass_2.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Grass_2.meta",
"repo_id": "jynew",
"token_count": 70
}
| 835 |
fileFormatVersion: 2
guid: fbaa3ef5dc51571458de4059693a3088
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Mud_1.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Mud_1.meta",
"repo_id": "jynew",
"token_count": 68
}
| 836 |
fileFormatVersion: 2
guid: 01471a9964505194fbabdd5f4122c273
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Tile_1.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Stylized Ground Textures/Assets/Textures/SGT_Tile_1.meta",
"repo_id": "jynew",
"token_count": 66
}
| 837 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: YWML
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: a9ed0e231bf395740a07ac1af188c079, 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: 740befccb59ce47409f51bbbbdf2c058, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Cutoff: 0.5
- _Depth: 12.9
- _Depthdarkness: 0
- _ENABLE_GRADIENT: 0
- _ENABLE_SHADOWS: 0
- _ENABLE_VC: 1
- _EdgeFade: 0.5
- _FoamDistortion: 0.45
- _FoamOpacity: 0
- _FoamSize: 0.068
- _FoamSpeed: 0.436
- _FoamTiling: 0.32000005
- _Fresnelexponent: 2.6
- _Glossiness: 1
- _HighlightPanning: 0
- _LIGHTING: 1
- _MACRO_WAVES: 0
- _MacroBlendDistance: 1000
- _Metallicness: 0
- _NORMAL_MAP: 1
- _NormalStrength: 0.604
- _NormalTiling: 0.49999988
- _Pixelate: 0
- _RT_REFRACTION: 0
- _ReflectionFresnel: 2
- _ReflectionRefraction: 0.006
- _ReflectionStrength: 0
- _RefractionAmount: 0.057
- _RimDistance: 0.899
- _RimDistortion: 0.139
- _RimSize: 0
- _Rimfalloff: 0.7
- _Rimtiling: 0.46000004
- _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.4
- _USE_VC_INTERSECTION: 1
- _Unlit: 1
- _UseIntersectionFoam: 1
- _UseIntersectionHighlight: 0
- _WaveFoam: 0
- _WaveHeight: 0
- _WaveSize: 0.8099997
- _Wavesspeed: 6.27
- _Wavesstrength: 0.031
- _Wavetint: -0.02
- _Worldspacetiling: 0
- __dirty: 1
m_Colors:
- _FresnelColor: {r: 0.5, g: 0.8551724, b: 1, a: 0.084}
- _RimColor: {r: 0.30066368, g: 0.3695494, b: 0.37720335, a: 0.09019608}
- _WaterColor: {r: 0.38667905, g: 0.33892706, b: 0.28268296, a: 0.19607843}
- _WaterShallowColor: {r: 0.20794389, g: 0.24489611, b: 0.26400614, a: 0.39215687}
- _WaveDirection: {r: 0.15, g: 0, b: 0.2, a: 0}
|
jynew/jyx2/Assets/3DScene/StylizedWater/Materials/YWML.mat/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Materials/YWML.mat",
"repo_id": "jynew",
"token_count": 1880
}
| 838 |
// Stylized Water Shader by Staggart Creations http://u3d.as/A2R
// Online documentation can be found at http://staggart.xyz
Shader "Hidden/SWS/NormalMapRenderer"
{
Properties
{
_MainTex("Texture", 2D) = "black" {}
_Offset("Offset", Float) = 0.005
_Strength("Strength", Float) = 6
}
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float _Offset;
float _Strength;
float4 NormalFromHeight(sampler2D heightmap, float2 uv) {
float xLeft = tex2D(heightmap, uv - float2(_Offset, 0.0)) * _Strength;
float xRight = tex2D(heightmap, uv + float2(_Offset, 0.0)) * _Strength;
float yUp = tex2D(heightmap, uv - float2(0.0, _Offset)) * _Strength;
float yDown = tex2D(heightmap, uv + float2(0.0, _Offset)) * _Strength;
float xDelta = ((xLeft - xRight) + 1.0) * 0.5f;
float yDelta = ((yUp - yDown) + 1.0) * 0.5f;
#if UNITY_VERSION >= 201810
#if !UNITY_COLORSPACE_GAMMA
xLeft = GammaToLinearSpace(xLeft);
xRight = GammaToLinearSpace(xRight);
yUp = GammaToLinearSpace(yUp);
yDown = GammaToLinearSpace(yDown);
xDelta = GammaToLinearSpace(xDelta);
yDelta = GammaToLinearSpace(yDelta);
#endif
#endif
float4 normals = float4(xDelta, yDelta, 1.0, yDelta);
return normals;
}
fixed4 frag(v2f_img IN) : SV_Target
{
return NormalFromHeight(_MainTex, IN.uv);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/Editor/SWS_NormalMapRenderer.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/Editor/SWS_NormalMapRenderer.shader",
"repo_id": "jynew",
"token_count": 682
}
| 839 |
fileFormatVersion: 2
guid: 1cc7260e5c788434f8949885bb0e0241
timeCreated: 1523029192
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences:
- styles: {fileID: 11400000, guid: 009e88b2e34bbc2429a19d841ab12ec8, type: 2}
- reflectionCubemap: {instanceID: 0}
- customIntersection: {instanceID: 0}
- customNormal: {instanceID: 0}
- normals: {instanceID: 0}
- shadermap: {instanceID: 0}
- substance: {instanceID: 0}
- intersectionTex: {instanceID: 0}
- waveTex: {instanceID: 0}
- waveHeightmapTex: {instanceID: 0}
- material: {instanceID: 0}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/StylizedWater.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/StylizedWater.cs.meta",
"repo_id": "jynew",
"token_count": 263
}
| 840 |
fileFormatVersion: 2
guid: a8b878977ce6a9442a7ec72550708ca1
timeCreated: 1518954937
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 1024
textureSettings:
filterMode: 1
aniso: 0
mipBias: -1
wrapMode: 0
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 5
buildTargetSettings:
- buildTarget: Standalone
maxTextureSize: 1024
textureFormat: 3
compressionQuality: 50
allowsAlphaSplitting: 0
- buildTarget: iPhone
maxTextureSize: 1024
textureFormat: 3
compressionQuality: 50
allowsAlphaSplitting: 0
- buildTarget: Android
maxTextureSize: 1024
textureFormat: 3
compressionQuality: 50
allowsAlphaSplitting: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/Textures/Normals/SWS_Waves_Circular.png.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Scripts/Textures/Normals/SWS_Waves_Circular.png.meta",
"repo_id": "jynew",
"token_count": 646
}
| 841 |
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "StylizedWater/Desktop"
{
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.1
_FresnelColor("Fresnel Color", Color) = (1,1,1,0.484)
_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
_Fresnelexponent("Fresnel exponent", Float) = 4
_ReflectionStrength("Reflection Strength", Range( 0 , 1)) = 0
_ReflectionFresnel("Reflection Fresnel", Range( 2 , 10)) = 5
_RefractionAmount("Refraction Amount", Range( 0 , 0.2)) = 0.05
_ReflectionRefraction("ReflectionRefraction", Range( 0 , 0.2)) = 0.05
_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)) = 6
_Rimfalloff("Rim falloff", Range( 0.1 , 50)) = 10
_Rimtiling("Rim tiling", Float) = 0.5
_FoamOpacity("FoamOpacity", Range( -1 , 1)) = 0.05
_FoamDistortion("FoamDistortion", Range( 0 , 3)) = 0.45
[IntRange]_UseIntersectionFoam("UseIntersectionFoam", Range( 0 , 1)) = 0
_FoamSpeed("FoamSpeed", Range( 0 , 1)) = 0.1
_FoamSize("FoamSize", Float) = 0
_FoamTiling("FoamTiling", Float) = 0.05
_Depth("Depth", Range( 0 , 100)) = 15
_Wavesspeed("Waves speed", Range( 0 , 10)) = 0.75
_WaveHeight("Wave Height", Range( 0 , 1)) = 0.05
_WaveFoam("Wave Foam", Range( 0 , 10)) = 0
[NoScaleOffset][Normal]_Normals("Normals", 2D) = "bump" {}
_WaveSize("Wave Size", Range( 0 , 10)) = 0.1
[NoScaleOffset]_Shadermap("Shadermap", 2D) = "black" {}
_WaveDirection("WaveDirection", Vector) = (1,0,0,0)
_RimDistortion("RimDistortion", Range( 0 , 0.2)) = 0.1
[NoScaleOffset]_GradientTex("GradientTex", 2D) = "gray" {}
_MacroBlendDistance("MacroBlendDistance", Range( 250 , 3000)) = 2000
[Toggle]_MACRO_WAVES("MACRO_WAVES", Int) = 0
[Toggle]_USE_VC_INTERSECTION("USE_VC_INTERSECTION", Float) = 0
[Toggle]_SECONDARY_WAVES("SECONDARY_WAVES", Int) = 0
_ENABLE_VC("ENABLE_VC", Float) = 0
[Toggle][HideInInspector]_RT_REFRACTION("RT_REFRACTION", Float) = 0
[HideInInspector]_RefractionTex("RefractionTex", 2D) = "white" {}
[Toggle]_ENABLE_SHADOWS("ENABLE_SHADOWS", Float) = 0
[Toggle]_LIGHTING("LIGHTING", Int) = 1
[Toggle]_Unlit("Unlit", Float) = 0
_ENABLE_GRADIENT("_ENABLE_GRADIENT", Range( 0 , 1)) = 0
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "ForceNoShadowCasting" = "True" "IsEmissive" = "true" }
LOD 200
Cull Back
GrabPass{ "_GrabTexture" }
CGPROGRAM
#include "UnityPBSLighting.cginc"
#include "UnityStandardUtils.cginc"
#include "UnityShaderVariables.cginc"
#include "UnityCG.cginc"
#pragma target 3.5
#pragma shader_feature _SECONDARY_WAVES_ON
#pragma shader_feature _MACRO_WAVES_ON
#pragma shader_feature _LIGHTING_ON
#pragma surface surf StandardCustomLighting alpha:fade keepalpha nodirlightmap vertex:vertexDataFunc
struct Input
{
float3 worldNormal;
INTERNAL_DATA
float2 texcoord_0;
float2 data897;
float2 data898;
float4 screenPos;
float4 vertexColor : COLOR;
float2 data899;
float3 worldPos;
float3 worldRefl;
float2 texcoord_1;
};
struct SurfaceOutputCustomLightingCustom
{
fixed3 Albedo;
fixed3 Normal;
half3 Emission;
half Metallic;
half Smoothness;
half Occlusion;
fixed Alpha;
Input SurfInput;
UnityGIInput GIData;
};
uniform float _RT_REFRACTION;
uniform sampler2D _GrabTexture;
uniform float _RefractionAmount;
uniform sampler2D _Normals;
uniform float _NormalTiling;
uniform float _Worldspacetiling;
uniform float _Wavesspeed;
uniform float4 _WaveDirection;
uniform sampler2D _RefractionTex;
uniform float4 _WaterShallowColor;
uniform float4 _WaterColor;
uniform sampler2D_float _CameraDepthTexture;
uniform float _Depth;
uniform sampler2D _GradientTex;
uniform float _ENABLE_GRADIENT;
uniform float _Transparency;
uniform float4 _RimColor;
uniform float _USE_VC_INTERSECTION;
uniform float _ENABLE_VC;
uniform sampler2D _SWS_RENDERTEX;
uniform float4 _SWS_RENDERTEX_POS;
uniform float _Rimfalloff;
uniform sampler2D _Shadermap;
uniform float _Rimtiling;
uniform float _WaveSize;
uniform float _RimDistortion;
uniform float _RimSize;
uniform sampler2D _ReflectionTex;
uniform float _ReflectionRefraction;
uniform float _ReflectionStrength;
uniform float _ReflectionFresnel;
uniform float _Wavetint;
uniform float _FoamOpacity;
uniform float _FoamSize;
uniform float _FoamDistortion;
uniform float _FoamTiling;
uniform float _FoamSpeed;
uniform float _UseIntersectionFoam;
uniform float4 _FresnelColor;
uniform float _Fresnelexponent;
uniform float _WaveFoam;
uniform float _ENABLE_SHADOWS;
uniform sampler2D _ShadowMask;
uniform float _MacroBlendDistance;
uniform float _NormalStrength;
uniform float _Glossiness;
uniform float _Unlit;
uniform float _EdgeFade;
uniform float _WaveHeight;
float2 SPSRUVAdjust922( float4 input )
{
#if UNITY_SINGLE_PASS_STEREO
float4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex];
float2 uv = ((input.xy / input.w) - scaleOffset.zw) / scaleOffset.xy;
#else
float2 uv = input.xy;
#endif
return uv;
}
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.data897 = ( (ase_worldPos).xz * float2( 0.1,0.1 ) );
float2 appendResult500 = (float2(_WaveDirection.x , _WaveDirection.z));
o.data898 = ( ( ( _Wavesspeed * 0.1 ) * _Time.y ) * appendResult500 );
float2 appendResult756 = (float2(_SWS_RENDERTEX_POS.z , _SWS_RENDERTEX_POS.w));
o.data899 = ( ( ( 1.0 - appendResult756 ) / _SWS_RENDERTEX_POS.x ) + ( ( _SWS_RENDERTEX_POS.x / ( _SWS_RENDERTEX_POS.x * _SWS_RENDERTEX_POS.x ) ) * (ase_worldPos).xz ) );
float3 ase_vertexNormal = v.normal.xyz;
o.texcoord_1.xy = v.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
float2 temp_output_13_0 = ( -20.0 * o.texcoord_1 );
float2 Tiling21 = lerp(temp_output_13_0,( (ase_worldPos).xz * float2( 0.1,0.1 ) ),_Worldspacetiling);
float2 temp_output_88_0 = ( ( Tiling21 * _WaveSize ) * 0.1 );
float2 WaveSpeed40 = ( ( ( _Wavesspeed * 0.1 ) * _Time.y ) * appendResult500 );
float2 temp_output_92_0 = ( WaveSpeed40 * 0.5 );
float2 HeightmapUV581 = ( temp_output_88_0 + temp_output_92_0 );
float4 tex2DNode94 = tex2Dlod( _Shadermap, float4( HeightmapUV581, 0.0 , 0.0 ) );
#ifdef _SECONDARY_WAVES_ON
float staticSwitch721 = ( tex2DNode94.g + tex2Dlod( _Shadermap, float4( ( ( temp_output_88_0 * float2( 2,2 ) ) + ( temp_output_92_0 * float2( -0.5,-0.5 ) ) ), 0.0 , 0.0 ) ).g );
#else
float staticSwitch721 = tex2DNode94.g;
#endif
float temp_output_95_0 = ( _WaveHeight * staticSwitch721 );
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 s856 = (SurfaceOutputStandard ) 0;
float2 temp_output_13_0 = ( -20.0 * i.texcoord_0 );
float2 Tiling21 = lerp(temp_output_13_0,i.data897,_Worldspacetiling);
float2 temp_output_732_0 = ( _NormalTiling * Tiling21 );
float2 WaveSpeed40 = i.data898;
float3 temp_output_51_0 = BlendNormals( UnpackNormal( tex2D( _Normals, ( temp_output_732_0 + -WaveSpeed40 ) ) ) , UnpackNormal( tex2D( _Normals, ( ( temp_output_732_0 * 0.5 ) + WaveSpeed40 ) ) ) );
float3 NormalsBlended362 = temp_output_51_0;
float4 ase_screenPos = float4( i.screenPos.xyz , i.screenPos.w + 0.00000000001 );
float4 ase_screenPos266 = ase_screenPos;
#if UNITY_UV_STARTS_AT_TOP
float scale266 = -1.0;
#else
float scale266 = 1.0;
#endif
float halfPosW266 = ase_screenPos266.w * 0.5;
ase_screenPos266.y = ( ase_screenPos266.y - halfPosW266 ) * _ProjectionParams.x* scale266 + halfPosW266;
#ifdef UNITY_SINGLE_PASS_STEREO
ase_screenPos266.xy = TransformStereoScreenSpaceTex(ase_screenPos266.xy, ase_screenPos266.w);
#endif
ase_screenPos266.xyzw /= ase_screenPos266.w;
float4 input922 = ase_screenPos266;
float2 localSPSRUVAdjust922922 = SPSRUVAdjust922( input922 );
float3 temp_output_359_0 = ( ( _RefractionAmount * NormalsBlended362 ) + float3( localSPSRUVAdjust922922 , 0.0 ) );
float4 screenColor372 = tex2D( _GrabTexture, temp_output_359_0.xy );
float4 RefractionResult126 = lerp(screenColor372,tex2D( _RefractionTex, temp_output_359_0.xy ),_RT_REFRACTION);
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 screenDepth641 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture,UNITY_PROJ_COORD(ase_screenPos))));
float distanceDepth641 = abs( ( screenDepth641 - LinearEyeDepth( ase_screenPosNorm.z ) ) / ( lerp( 1.0 , ( 1.0 / _ProjectionParams.z ) , unity_OrthoParams.w) ) );
float DepthTexture494 = distanceDepth641;
float Depth479 = saturate( ( DepthTexture494 / _Depth ) );
float4 lerpResult478 = lerp( _WaterShallowColor , _WaterColor , Depth479);
float2 appendResult661 = (float2(Depth479 , 1.0));
float4 tex2DNode659 = tex2D( _GradientTex, appendResult661 );
float4 lerpResult942 = lerp( lerpResult478 , tex2DNode659 , _ENABLE_GRADIENT);
float4 VertexColors810 = lerp(float4( 0.0,0,0,0 ),i.vertexColor,_ENABLE_VC);
float2 RT_UV763 = i.data899;
float4 tex2DNode747 = tex2D( _SWS_RENDERTEX, RT_UV763 );
float RT_Intersection748 = ( 1.0 - tex2DNode747.r );
float IntersectionSource776 = ( lerp(DepthTexture494,( 1.0 - (VertexColors810).r ),_USE_VC_INTERSECTION) + RT_Intersection748 );
float2 temp_output_24_0 = ( Tiling21 * _Rimtiling );
float2 temp_output_88_0 = ( ( Tiling21 * _WaveSize ) * 0.1 );
float2 temp_output_92_0 = ( WaveSpeed40 * 0.5 );
float2 HeightmapUV581 = ( temp_output_88_0 + temp_output_92_0 );
float4 tex2DNode94 = tex2D( _Shadermap, HeightmapUV581 );
#ifdef _SECONDARY_WAVES_ON
float staticSwitch721 = ( tex2DNode94.g + tex2D( _Shadermap, ( ( temp_output_88_0 * float2( 2,2 ) ) + ( temp_output_92_0 * float2( -0.5,-0.5 ) ) ) ).g );
#else
float staticSwitch721 = tex2DNode94.g;
#endif
float Heightmap99 = staticSwitch721;
float temp_output_30_0 = ( tex2D( _Shadermap, ( ( 0.5 * temp_output_24_0 ) + ( Heightmap99 * _RimDistortion ) ) ).b * tex2D( _Shadermap, ( temp_output_24_0 + WaveSpeed40 ) ).b );
float Intersection42 = saturate( ( _RimColor.a * ( 1.0 - ( ( ( IntersectionSource776 / _Rimfalloff ) * temp_output_30_0 ) + ( IntersectionSource776 / _RimSize ) ) ) ) );
float lerpResult943 = lerp( _WaterShallowColor.a , tex2DNode659.a , _ENABLE_GRADIENT);
float temp_output_149_0 = ( ( _Transparency + Intersection42 ) - ( ( 1.0 - Depth479 ) * ( 1.0 - lerpResult943 ) ) );
float Opacity121 = saturate( temp_output_149_0 );
float4 lerpResult374 = lerp( RefractionResult126 , lerpResult942 , Opacity121);
float4 Reflection265 = tex2D( _ReflectionTex, ( float3( localSPSRUVAdjust922922 , 0.0 ) + ( ( NormalsBlended362 + Heightmap99 ) * _ReflectionRefraction ) ).xy );
float3 worldViewDir = normalize( UnityWorldSpaceViewDir( i.worldPos ) );
float3 ase_worldNormal = WorldNormalVector( i, float3( 0, 0, 1 ) );
float fresnelFinalVal508 = (0.0 + _ReflectionFresnel*pow( 1.0 - dot( ase_worldNormal, worldViewDir ) , 5.0));
float4 lerpResult297 = lerp( lerpResult374 , Reflection265 , saturate( ( ( Opacity121 * _ReflectionStrength ) * fresnelFinalVal508 ) ));
float4 WaterColor350 = lerpResult297;
float4 temp_cast_6 = (( Heightmap99 * _Wavetint )).xxxx;
float4 RimColor102 = _RimColor;
float4 lerpResult61 = lerp( saturate( ( WaterColor350 - temp_cast_6 ) ) , ( RimColor102 * 3.0 ) , Intersection42);
float SteepnessMask820 = saturate( ( 1.0 - pow( ase_worldNormal.y , 2.0 ) ) );
float temp_output_609_0 = ( Heightmap99 * _FoamDistortion );
float2 temp_output_634_0 = ( WaveSpeed40 * _FoamSpeed );
float4 tex2DNode67 = tex2D( _Shadermap, ( ( _FoamTiling * ( -temp_output_609_0 + Tiling21 ) ) + temp_output_634_0 ) );
float lerpResult601 = lerp( step( _FoamSize , ( tex2D( _Shadermap, ( ( ( temp_output_609_0 + ( Tiling21 * 0.5 ) ) * _FoamTiling ) + temp_output_634_0 ) ).r - tex2DNode67.r ) ) , ( 1.0 - tex2DNode67.b ) , _UseIntersectionFoam);
float Foam73 = ( ( SteepnessMask820 + _FoamOpacity ) * lerpResult601 );
float4 FresnelColor206 = _FresnelColor;
float3 ase_vertexNormal = mul( unity_WorldToObject, float4( ase_worldNormal, 0 ) );
float fresnelFinalVal199 = (0.0 + 1.0*pow( 1.0 - dot( ase_vertexNormal, worldViewDir ) , ( _Fresnelexponent * 100.0 )));
float clampResult505 = clamp( ( _FresnelColor.a * fresnelFinalVal199 ) , 0.0 , 1.0 );
float Fresnel205 = clampResult505;
float4 lerpResult207 = lerp( ( lerpResult61 + Foam73 ) , FresnelColor206 , Fresnel205);
float4 temp_cast_7 = (2.0).xxxx;
float FoamTex244 = lerpResult601;
float WaveFoam221 = saturate( ( ( pow( staticSwitch721 , 2.0 ) * _WaveFoam ) * FoamTex244 ) );
float4 lerpResult223 = lerp( lerpResult207 , temp_cast_7 , WaveFoam221);
float4 temp_cast_8 = (1.0).xxxx;
float4 tex2DNode833 = tex2D( _ShadowMask, localSPSRUVAdjust922922 );
float4 Shadows834 = lerp(temp_cast_8,saturate( ( unity_AmbientSky / ( 1.0 - tex2DNode833.r ) ) ),_ENABLE_SHADOWS);
float4 FinalColor114 = ( lerpResult223 * Shadows834 );
s856.Albedo = FinalColor114.rgb;
#ifdef _MACRO_WAVES_ON
float2 staticSwitch946 = ( WaveSpeed40 + ( temp_output_732_0 * 0.1 ) );
#else
float2 staticSwitch946 = float2( 0.0,0 );
#endif
#ifdef _MACRO_WAVES_ON
float3 staticSwitch947 = UnpackNormal( tex2D( _Normals, staticSwitch946 ) );
#else
float3 staticSwitch947 = float3( 0.0,0,0 );
#endif
float3 ase_vertex3Pos = mul( unity_WorldToObject, float4( i.worldPos , 1 ) );
#ifdef _MACRO_WAVES_ON
float staticSwitch948 = saturate( ( distance( ase_vertex3Pos , _WorldSpaceCameraPos ) / _MacroBlendDistance ) );
#else
float staticSwitch948 = 0.0;
#endif
float3 lerpResult674 = lerp( temp_output_51_0 , staticSwitch947 , staticSwitch948);
#ifdef _MACRO_WAVES_ON
float3 staticSwitch680 = lerpResult674;
#else
float3 staticSwitch680 = temp_output_51_0;
#endif
float3 lerpResult621 = lerp( float3(0,0,1) , staticSwitch680 , saturate( ( Intersection42 + _NormalStrength ) ));
float3 NormalMap52 = lerpResult621;
s856.Normal = WorldNormalVector( i, NormalMap52);
s856.Emission = float3( 0,0,0 );
s856.Metallic = 0.0;
float GlossinessParam877 = _Glossiness;
s856.Smoothness = GlossinessParam877;
s856.Occlusion = 1.0;
gi.light.ndotl = LambertTerm( s856.Normal, gi.light.dir );
data.light = gi.light;
UnityGI gi856 = gi;
#ifdef UNITY_PASS_FORWARDBASE
Unity_GlossyEnvironmentData g856;
g856.roughness = 1 - s856.Smoothness;
g856.reflUVW = reflect( -data.worldViewDir, s856.Normal );
gi856 = UnityGlobalIllumination( data, s856.Occlusion, s856.Normal, g856 );
#endif
float3 surfResult856 = LightingStandard ( s856, viewDir, gi856 ).rgb;
surfResult856 += s856.Emission;
float ShadowMask944 = tex2DNode833.r;
float3 ase_worldPos = i.worldPos;
float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) );
float dotResult866 = dot( ase_worldlightDir , WorldReflectionVector( i , NormalMap52 ) );
#ifdef _LIGHTING_ON
float4 staticSwitch952 = float4( 0,0,0,0 );
#else
float4 staticSwitch952 = saturate( ( ( ShadowMask944 * pow( max( 0.0 , dotResult866 ) , ( GlossinessParam877 * 128.0 ) ) ) + lerp(( float4( _LightColor0.rgb , 0.0 ) * FinalColor114 ),FinalColor114,_Unlit) ) );
#endif
float4 CustomLighting875 = staticSwitch952;
#ifdef _LIGHTING_ON
float4 staticSwitch857 = float4( surfResult856 , 0.0 );
#else
float4 staticSwitch857 = CustomLighting875;
#endif
float RT_Opacity750 = tex2DNode747.g;
float OpacityFinal814 = ( saturate( ( DepthTexture494 / _EdgeFade ) ) - saturate( ( RT_Opacity750 + (VertexColors810).g ) ) );
c.rgb = staticSwitch857.rgb;
c.a = OpacityFinal814;
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
}
Fallback "Diffuse"
}
/*ASEBEGIN
Version=13108
1927;29;1906;1004;2070.458;1825.849;1;True;False
Node;AmplifyShaderEditor.CommentaryNode;347;-5950.493,-2108.693;Float;False;2893.871;675.1485;Comment;13;823;824;821;822;21;15;733;13;12;17;14;16;897;UV;1,1,1,1;0;0
Node;AmplifyShaderEditor.WorldPosInputsNode;16;-5353.82,-1648.283;Float;False;0;4;FLOAT3;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;348;-4958.323,-1301.456;Float;False;1727.092;700.4691;Comment;10;40;898;337;39;500;36;38;320;37;35;Speed/direction;1,1,1,1;0;0
Node;AmplifyShaderEditor.SwizzleNode;17;-5127.874,-1664.578;Float;False;FLOAT2;0;2;2;2;1;0;FLOAT3;0,0,0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;37;-4815.42,-1135.754;Float;False;Constant;_Float1;Float 1;9;0;0.1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;35;-4908.323,-1251.456;Float;False;Property;_Wavesspeed;Waves speed;26;0;0.75;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.Vector4Node;320;-4703.182,-801.9926;Float;False;Property;_WaveDirection;WaveDirection;31;0;1,0,0,0;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;733;-4921.054,-1638.703;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.1,0.1;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;36;-4585.321,-1204.654;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;14;-5806.416,-2045.537;Float;False;Constant;_Float0;Float 0;4;0;-20;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.TextureCoordinatesNode;12;-5862.804,-1946.938;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.TimeNode;38;-4729.622,-1014.753;Float;False;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.VertexToFragmentNode;897;-4692.078,-1614.752;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.DynamicAppendNode;500;-4443.116,-826.1659;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;39;-4307.822,-1115.654;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-5558.314,-1999.2;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;13;581;344;92;88;90;91;89;301;87;302;715;718;719;Heightmap UV;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode;752;-5574.891,-3090.527;Float;False;1948.029;578.093;Comment;12;763;762;760;761;757;758;759;755;756;754;746;899;World aligned UV;1,1,1,1;0;0
Node;AmplifyShaderEditor.ToggleSwitchNode;15;-4400.157,-1813.406;Float;False;Property;_Worldspacetiling;Worldspace tiling;13;0;1;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;337;-4101.386,-979.6928;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.Vector4Node;746;-5538.337,-2950.295;Float;False;Global;_SWS_RENDERTEX_POS;_SWS_RENDERTEX_POS;46;0;0,0,0,0;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;21;-3624.342,-1811.061;Float;False;Tiling;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.VertexToFragmentNode;898;-3859.578,-971.7191;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;302;-3991.018,3053.557;Float;False;Property;_WaveSize;Wave Size;30;0;0.1;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;87;-3884.539,2936.475;Float;False;21;0;1;FLOAT2
Node;AmplifyShaderEditor.WorldPosInputsNode;754;-5194.019,-2688.495;Float;False;0;4;FLOAT3;FLOAT;FLOAT;FLOAT
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;755;-5121.796,-2811.783;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.DynamicAppendNode;756;-5195.09,-3039.527;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.RangedFloatNode;89;-3644.793,3182.194;Float;False;Constant;_Float4;Float 4;16;0;0.1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;40;-3615.499,-977.6727;Float;False;WaveSpeed;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.GetLocalVarNode;90;-3904.954,3313.793;Float;False;40;0;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;91;-3883.682,3427.666;Float;False;Constant;_Float5;Float 5;16;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;758;-4885.567,-2871.485;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SwizzleNode;757;-4959.206,-2695.197;Float;False;FLOAT2;0;2;2;2;1;0;FLOAT3;0,0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;88;-3402.034,3139.868;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.OneMinusNode;759;-5011.091,-3040.527;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;92;-3660.082,3356.918;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;761;-4655.504,-2875.597;Float;False;2;2;0;FLOAT;0,0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;718;-3120.789,3268.327;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;2,2;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleDivideOpNode;760;-4652.091,-3014.527;Float;False;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleAddOpNode;344;-3130.565,3078.142;Float;False;2;2;0;FLOAT2;0.0,0;False;1;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;719;-3123.191,3390.834;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;-0.5,-0.5;False;1;FLOAT2
Node;AmplifyShaderEditor.VertexColorNode;783;1667.248,-889.3034;Float;False;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;762;-4410.328,-2884.337;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.CommentaryNode;407;-2542.945,2823.105;Float;False;2354.97;922.4412;Comment;19;218;100;98;97;95;221;96;230;229;231;219;232;220;99;94;713;714;717;721;Heightmap;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;715;-2881.477,3371.601;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RegisterLocalVarNode;581;-2944.359,3047.844;Float;False;HeightmapUV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.CommentaryNode;817;-2552.624,4419.88;Float;False;1572.862;386.188;Comment;8;812;813;707;495;712;778;776;751;Intersection source;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode;818;-2565.035,3966.893;Float;False;1114.328;314.4121;Comment;5;803;765;750;747;748;Mask rendering;1,1,1,1;0;0
Node;AmplifyShaderEditor.VertexToFragmentNode;899;-4199.797,-2876.103;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SamplerNode;94;-2422.784,3136.45;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.ToggleSwitchNode;807;1911.821,-895.8907;Float;False;Property;_ENABLE_VC;ENABLE_VC;41;0;0;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SamplerNode;714;-2305.788,3376.499;Float;True;Property;_TextureSample8;Texture Sample 8;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;803;-2515.035,4073.706;Float;False;763;0;1;FLOAT2
Node;AmplifyShaderEditor.RegisterLocalVarNode;810;2173.655,-894.1899;Float;False;VertexColors;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RegisterLocalVarNode;763;-3880.106,-2885.667;Float;False;RT_UV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.CommentaryNode;382;-2973.885,-2047.095;Float;False;3000.035;1049.284;Comment;29;923;834;843;844;833;925;265;126;260;802;806;801;805;372;804;359;920;361;922;919;266;360;269;494;641;933;936;938;944;Reflection/Refraction/Depth;1,1,1,1;0;0
Node;AmplifyShaderEditor.GetLocalVarNode;812;-2502.624,4633.996;Float;False;810;0;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;630;-4266.805,41.43127;Float;False;1022.648;667.8272;Comment;12;22;23;24;618;620;355;354;619;41;356;353;470;Intersection UV;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;717;-1981.195,3326.772;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SwizzleNode;813;-2233.624,4610.996;Float;False;FLOAT;0;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT
Node;AmplifyShaderEditor.SWS_Depth;641;-1751.344,-1115.689;Float;False;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;23;-4216.805,330.9447;Float;False;Property;_Rimtiling;Rim tiling;18;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;721;-1719.215,3187.987;Float;False;Property;_SECONDARY_WAVES;SECONDARY_WAVES;40;0;0;False;True;;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SamplerNode;747;-2270.168,4056.465;Float;True;Global;_SWS_RENDERTEX;_SWS_RENDERTEX;44;0;None;True;0;False;black;Auto;False;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.GetLocalVarNode;22;-4207.007,203.3786;Float;False;21;0;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;24;-3943.725,233.2731;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;355;-3941.017,91.43127;Float;False;Constant;_Float13;Float 13;34;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;495;-2073.518,4469.88;Float;False;494;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;618;-3977.549,352.8728;Float;False;99;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;494;-1545.133,-1122.691;Float;False;DepthTexture;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;765;-1899.167,4027.458;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;99;-1212.979,3177.846;Float;False;Heightmap;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;707;-1993.067,4605.6;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;620;-3989.774,451.9105;Float;False;Property;_RimDistortion;RimDistortion;35;0;0.1;0;0.2;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;748;-1699.322,4018.804;Float;False;RT_Intersection;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;619;-3626.712,328.1283;Float;False;2;2;0;FLOAT;0,0,0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;751;-1719.943,4635.045;Float;False;748;0;1;FLOAT
Node;AmplifyShaderEditor.ToggleSwitchNode;712;-1784.806,4512.73;Float;False;Property;_USE_VC_INTERSECTION;USE_VC_INTERSECTION;39;1;[Toggle];0;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;41;-4079.057,594.128;Float;False;40;0;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;354;-3679.224,184.7984;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleAddOpNode;778;-1434.931,4608.366;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;356;-3456.752,561.9866;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleAddOpNode;353;-3398.156,378.2869;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.CommentaryNode;349;-3035.07,-106.9404;Float;False;2778.636;874.3949;Comment;19;42;631;10;102;426;425;420;497;496;3;5;444;222;233;30;29;28;777;780;Intersection;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode;504;-2189.979,-4525.891;Float;False;1178.949;207.293;Comment;5;104;479;649;648;647;Depth;1,1,1,1;0;0
Node;AmplifyShaderEditor.RangedFloatNode;5;-2292.946,183.4473;Float;False;Property;_Rimfalloff;Rim falloff;17;0;10;0.1;50;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;647;-2089.065,-4485.832;Float;False;494;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;776;-1256.763,4604.605;Float;False;IntersectionSource;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
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.GetLocalVarNode;777;-2310.294,16.25119;Float;False;776;0;1;FLOAT
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.RangedFloatNode;104;-2144.979,-4406.599;Float;False;Property;_Depth;Depth;25;0;15;0;100;0;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;381;-4389.646,1945.714;Float;False;1221.636;748.4935;Comment;13;340;341;677;676;681;339;342;47;732;343;18;46;832;Normals UV;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleDivideOpNode;496;-1856.272,39.4246;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;3;-2295.592,294.0709;Float;False;Property;_RimSize;Rim Size;16;0;6;0;20;0;1;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.SimpleDivideOpNode;648;-1689.066,-4454.832;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;497;-1857.762,221.6412;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;503;-3239.922,-3046.988;Float;False;3588.744;924.0803;Comment;22;350;627;297;298;478;374;509;456;271;377;60;508;106;482;659;661;477;367;660;941;942;943;Color;1,1,1,1;0;0
Node;AmplifyShaderEditor.SaturateNode;649;-1473.327,-4452.367;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;18;-4368.489,2026.414;Float;False;Property;_NormalTiling;NormalTiling;14;0;0.9;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;46;-4306.979,2150.852;Float;False;21;0;1;FLOAT2
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;420;-1527.948,109.6954;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;732;-3922.19,2041.779;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;343;-4257.239,2383.196;Float;False;Constant;_SecondaryNormalsSize;SecondaryNormalsSize;34;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;47;-4330.297,2263.91;Float;False;40;0;1;FLOAT2
Node;AmplifyShaderEditor.SimpleAddOpNode;425;-1318.259,161.3658;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;660;-3192.004,-2977.427;Float;False;479;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;479;-1254.026,-4463.973;Float;False;Depth;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;342;-3580.232,2251.906;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.NegateNode;340;-3663.783,2084.463;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.DynamicAppendNode;661;-2960.057,-2973.305;Float;False;FLOAT2;4;0;FLOAT;1.0;False;1;FLOAT;1.0;False;2;FLOAT;0.0;False;3;FLOAT;0.0;False;1;FLOAT2
Node;AmplifyShaderEditor.OneMinusNode;426;-1111.437,166.1116;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.ColorNode;10;-1157.329,-21.75855;Float;False;Property;_RimColor;Rim Color;4;0;1,1,1,0.5019608;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;444;-876.683,167.2579;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;339;-3307.027,2281.321;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SamplerNode;659;-2774.629,-3002.995;Float;True;Property;_GradientTex;GradientTex;36;1;[NoScaleOffset];None;True;0;False;gray;LockedToTexture2D;False;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.CommentaryNode;380;-2240.391,-3553.398;Float;False;1788.234;432.6779;Comment;12;781;117;119;134;149;658;121;487;151;488;480;782;Opacity GrabPass;1,1,1,1;0;0
Node;AmplifyShaderEditor.ColorNode;477;-3101.106,-2794.325;Float;False;Property;_WaterShallowColor;WaterShallowColor;1;0;0.4191176,0.7596349,1,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;941;-2700.838,-2789.149;Float;False;Property;_ENABLE_GRADIENT;_ENABLE_GRADIENT;49;0;0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;341;-3362.5,1990.097;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.CommentaryNode;502;-2863.676,1967.415;Float;False;3250.56;699.405;Comment;25;52;621;651;680;622;674;652;678;384;675;128;672;673;669;670;671;362;51;50;45;791;792;891;947;948;Normals;1,1,1,1;0;0
Node;AmplifyShaderEditor.SamplerNode;45;-2810.88,2017.415;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.GetLocalVarNode;480;-2178.689,-3308.668;Float;False;479;0;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;631;-703.0016,166.9194;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SamplerNode;50;-2813.676,2244.313;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.LerpOp;943;-2267.938,-2942.05;Float;False;3;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;488;-1955.619,-3200.629;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;117;-2113.75,-3510.547;Float;False;Property;_Transparency;Transparency;6;0;0.75;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;119;-2051.003,-3422.559;Float;False;42;0;1;FLOAT
Node;AmplifyShaderEditor.BlendNormalsNode;51;-2369.275,2129.514;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.OneMinusNode;151;-1962.452,-3305.911;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;638;-4830.572,1006.549;Float;False;1534.521;694.0706;Comment;17;608;606;609;628;607;604;63;632;603;633;602;65;634;64;636;637;741;Foam UV;1,1,1,1;0;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;42;-522.1453,162.7649;Float;False;Intersection;-1;True;1;0;FLOAT;0,0,0,0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;608;-4780.572,1239.085;Float;False;Property;_FoamDistortion;FoamDistortion;20;0;0.45;0;3;0;1;FLOAT
Node;AmplifyShaderEditor.GrabScreenPosition;266;-2879.02,-1695.303;Float;False;0;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;362;-2096.469,2013.334;Float;False;NormalsBlended;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.GetLocalVarNode;606;-4700.512,1126.151;Float;False;99;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;269;-2921.865,-1814;Float;False;362;0;1;FLOAT3
Node;AmplifyShaderEditor.RangedFloatNode;360;-2923.885,-1925.101;Float;False;Property;_RefractionAmount;Refraction Amount;11;0;0.05;0;0.2;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;134;-1624.047,-3481.813;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;487;-1719.653,-3303.475;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;919;-2540.748,-1489.76;Float;False;99;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;361;-2576.684,-1908.101;Float;False;2;2;0;FLOAT;0,0,0;False;1;FLOAT3;0;False;1;FLOAT3
Node;AmplifyShaderEditor.RangedFloatNode;741;-4735.203,1329.265;Float;False;Constant;_FoamSecondarySize;FoamSecondarySize;45;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.CustomExpressionNode;922;-2470.993,-1699.768;Float;False;#if UNITY_SINGLE_PASS_STEREO$ float4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex]@$$ float2 uv = ((input.xy / input.w) - scaleOffset.zw) / scaleOffset.xy@$ #else$ float2 uv = input.xy@$ #endif$ return uv@;2;False;1;True;input;FLOAT4;0,0,0,0;In;SPSR UV Adjust;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.GetLocalVarNode;628;-4650.485,1442.544;Float;False;21;0;1;FLOAT2
Node;AmplifyShaderEditor.SimpleSubtractOpNode;149;-1366.83,-3490.881;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;609;-4444.399,1177.658;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;804;-2409.437,-1360.131;Float;False;Property;_ReflectionRefraction;ReflectionRefraction;12;0;0.05;0;0.2;0;1;FLOAT
Node;AmplifyShaderEditor.NegateNode;607;-4194.862,1355.061;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;359;-2241.468,-1853.418;Float;False;2;2;0;FLOAT3;0.0,0,0;False;1;FLOAT2;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;604;-4387.599,1324.534;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleAddOpNode;920;-2266.888,-1507.773;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SaturateNode;658;-881.8892,-3501.806;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;377;-1992.655,-2681.265;Float;False;121;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;121;-683.9272,-3509.705;Float;False;Opacity;-1;True;1;0;FLOAT;0,0,0,0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;805;-2053.756,-1508.431;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.RangedFloatNode;63;-4125.244,1056.548;Float;False;Property;_FoamTiling;FoamTiling;24;0;0.05;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.ColorNode;60;-3099.254,-2605.115;Float;False;Property;_WaterColor;Water Color;0;0;0.1176471,0.6348885,1,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;106;-2334.419,-2352.103;Float;False;Property;_ReflectionFresnel;Reflection Fresnel;10;0;5;2;10;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;603;-3996.973,1362.176;Float;False;2;2;0;FLOAT;0,0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.ScreenColorNode;372;-1644.772,-2003.788;Float;False;Global;_GrabScreen0;Grab Screen 0;34;0;Object;-1;False;1;0;FLOAT2;0,0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;271;-2085.137,-2574.038;Float;False;Property;_ReflectionStrength;Reflection Strength;9;0;0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;482;-3050.427,-2424.127;Float;False;479;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;632;-4051.7,1492.656;Float;False;40;0;1;FLOAT2
Node;AmplifyShaderEditor.SamplerNode;801;-1669.79,-1831.149;Float;True;Property;_RefractionTex;RefractionTex;43;1;[HideInInspector];None;True;0;False;white;Auto;False;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.SimpleAddOpNode;602;-3997.72,1187.874;Float;False;2;2;0;FLOAT;0,0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;633;-4125.348,1585.619;Float;False;Property;_FoamSpeed;FoamSpeed;22;0;0.1;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;456;-1716.349,-2592.764;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-3736.56,1180.38;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.WorldNormalVector;819;-5276.413,-3636.259;Float;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;65;-3727.954,1332.462;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT2;0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleAddOpNode;806;-1855.197,-1589.138;Float;False;2;2;0;FLOAT2;0.0,0,0;False;1;FLOAT3;0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.FresnelNode;508;-1879.431,-2446.224;Float;False;4;0;FLOAT3;0,0,0;False;1;FLOAT;0.0;False;2;FLOAT;1.0;False;3;FLOAT;5.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;634;-3729.019,1507.536;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.LerpOp;478;-2592.207,-2654.925;Float;False;3;0;COLOR;0.0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;829;-5239.073,-3464.398;Float;False;Constant;_Float3;Float 3;49;0;2;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;681;-4323.667,2497.885;Float;False;Constant;_MacroWaveSize;MacroWaveSize;42;0;0.1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.ToggleSwitchNode;802;-1308.101,-1931.115;Float;False;Property;_RT_REFRACTION;RT_REFRACTION;42;2;[Toggle];[HideInInspector];0;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.PowerNode;831;-5020.073,-3565.398;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;509;-1497.831,-2521.865;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;126;-1006.137,-1932.838;Float;False;RefractionResult;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.LerpOp;942;-2271.739,-2820.25;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;311;-3042.07,1036.015;Float;False;2233.037;669.3943;Comment;13;73;624;71;244;599;601;76;70;69;68;66;67;825;Foam;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;637;-3450.053,1332.899;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SamplerNode;260;-1670.981,-1589.917;Float;True;Global;_ReflectionTex;_ReflectionTex;34;1;[HideInInspector];None;True;0;False;gray;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.SimpleAddOpNode;636;-3452.454,1185.642;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.PosVertexDataNode;670;-2162.46,2348.121;Float;False;0;0;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;676;-3598.523,2521.657;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.WorldSpaceCameraPos;671;-2231.053,2500.014;Float;False;0;1;FLOAT3
Node;AmplifyShaderEditor.GetLocalVarNode;367;-1682.404,-2904.49;Float;False;126;0;1;COLOR
Node;AmplifyShaderEditor.RegisterLocalVarNode;265;-963.0614,-1585.729;Float;False;Reflection;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;352;-2531.756,5039.974;Float;False;3479.381;469.422;Comment;22;114;223;207;315;224;210;208;625;61;79;475;62;722;103;141;476;111;351;112;110;842;841;Master lerp;1,1,1,1;0;0
Node;AmplifyShaderEditor.LerpOp;374;-1335.035,-2832.994;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;298;-1347.575,-2650.913;Float;False;265;0;1;COLOR
Node;AmplifyShaderEditor.OneMinusNode;827;-4819.575,-3566.155;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;627;-1311.818,-2522.715;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;378;-2979.134,-875.097;Float;False;1619.181;563.468;Comment;4;202;211;212;213;Fresnel;1,1,1,1;0;0
Node;AmplifyShaderEditor.RangedFloatNode;673;-1836.488,2508.738;Float;False;Property;_MacroBlendDistance;MacroBlendDistance;37;0;2000;250;3000;0;1;FLOAT
Node;AmplifyShaderEditor.DistanceOpNode;669;-1910.046,2375.321;Float;False;2;0;FLOAT3;0.0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;677;-3376.585,2469;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SamplerNode;67;-2821.693,1355.126;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.SamplerNode;66;-2841.266,1104.049;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.RangedFloatNode;213;-2886.606,-426.6295;Float;False;Constant;_Float10;Float 10;26;0;100;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;69;-2383.988,1116.832;Float;False;Property;_FoamSize;FoamSize;23;0;0;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;830;-4626.073,-3566.398;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;201;-2929.134,-523.7986;Float;False;Property;_Fresnelexponent;Fresnel exponent;8;0;4;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;112;-2481.756,5347.619;Float;False;Property;_Wavetint;Wave tint;2;0;0.1;-1;1;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;110;-2456.803,5196.354;Float;False;99;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleSubtractOpNode;68;-2383.77,1225.353;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;672;-1483.297,2379.5;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;946;-3055.149,2470.876;Float;False;Property;_MACRO_WAVES;MACRO_WAVES;38;0;0;False;True;;2;0;FLOAT2;0,0,0;False;1;FLOAT2;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.LerpOp;297;-1013.564,-2686.066;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RegisterLocalVarNode;820;-4434.319,-3570.157;Float;False;SteepnessMask;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;232;-1633.112,3423.268;Float;False;Constant;_Float7;Float 7;25;0;2;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.StepOpNode;70;-2006.685,1197.789;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.NormalVertexDataNode;200;-2688.977,-736.9108;Float;False;0;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;350;-746.1934,-2687.191;Float;False;WaterColor;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;111;-2091.691,5185.111;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;212;-2647.807,-476.2287;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;76;-2383.339,1409.216;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;71;-1681.594,1188.393;Float;False;Property;_FoamOpacity;FoamOpacity;19;0;0.05;-1;1;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;825;-1663.882,1083.932;Float;False;820;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;211;-2657.407,-573.8296;Float;False;Constant;_Float8;Float 8;26;0;1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;678;-1278.932,2380.731;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;599;-2139.582,1534.473;Float;False;Property;_UseIntersectionFoam;UseIntersectionFoam;21;1;[IntRange];0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;351;-2143.975,5086.383;Float;False;350;0;1;COLOR
Node;AmplifyShaderEditor.SamplerNode;675;-2813.917,2453.232;Float;True;Property;_TextureSample7;Texture Sample 7;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.SimpleSubtractOpNode;141;-1850.961,5102.022;Float;False;2;0;COLOR;0,0,0,0;False;1;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;103;-1807.622,5228.012;Float;False;102;0;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;220;-1596.643,3539.543;Float;False;Property;_WaveFoam;Wave Foam;29;0;0;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.ColorNode;202;-2418.637,-825.0979;Float;False;Property;_FresnelColor;Fresnel Color;3;0;1,1,1,0.484;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;476;-1806.812,5326.244;Float;False;Constant;_Float2;Float 2;34;0;3;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.SamplerNode;833;-1687.357,-1340.624;Float;True;Global;_ShadowMask;_ShadowMask;45;0;Resources/unity_builtin_extra;True;0;False;white;Auto;False;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.FresnelNode;199;-2407.307,-602.4576;Float;False;4;0;FLOAT3;0,0,0;False;1;FLOAT;0.0;False;2;FLOAT;1.0;False;3;FLOAT;5.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;102;-518.9355,-25.5923;Float;False;RimColor;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleAddOpNode;826;-1349.882,1151.932;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.LerpOp;601;-1784.093,1380.708;Float;False;3;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.WireNode;792;-2084.894,2102.18;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.StaticSwitch;947;-1312.879,2137.847;Float;False;Property;_MACRO_WAVES;MACRO_WAVES;39;0;0;False;True;;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.GetLocalVarNode;384;-744.227,2399.359;Float;False;42;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;128;-819.0051,2501.15;Float;False;Property;_NormalStrength;NormalStrength;5;0;0.25;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;948;-1105.128,2337.141;Float;False;Property;_MACRO_WAVES;MACRO_WAVES;39;0;0;False;True;;2;0;FLOAT;0,0,0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.PowerNode;231;-1402.878,3359.59;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;229;-1190.064,3502.76;Float;False;244;0;1;FLOAT
Node;AmplifyShaderEditor.FogAndAmbientColorsNode;925;-1387.237,-1391.446;Float;False;unity_AmbientSky;0;1;COLOR
Node;AmplifyShaderEditor.LerpOp;674;-1034.972,2077.068;Float;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;203;-2100.862,-643.3526;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;936;-1310.405,-1304.77;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;219;-1115.082,3359.178;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;722;-1571.591,5112.883;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RegisterLocalVarNode;244;-1479.289,1467.761;Float;False;FoamTex;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;62;-1594.642,5377.148;Float;False;42;0;1;FLOAT
Node;AmplifyShaderEditor.WireNode;791;-2088.421,2211.539;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleAddOpNode;652;-449.4679,2421.979;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;475;-1559.811,5237.244;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;624;-1281.735,1281.288;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;73;-1108.678,1277.91;Float;False;Foam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;230;-886.2871,3371.016;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.ClampOpNode;505;-1829.128,-639.2252;Float;False;3;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;1.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;938;-1030.405,-1297.77;Float;False;2;0;COLOR;0,0,0,0;False;1;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;79;-1236.098,5380.757;Float;False;73;0;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;651;-280.3378,2421.475;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.Vector3Node;622;-603.4515,2007.069;Float;False;Constant;_BlankNormal;BlankNormal;36;0;0,0,1;0;4;FLOAT3;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;680;-626.8708,2158.984;Float;False;Property;_MACRO_WAVES;MACRO_WAVES;39;0;0;False;True;;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.LerpOp;61;-1191.52,5105.064;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;1,1,1,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;208;-804.9016,5371.389;Float;False;205;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;625;-918.1976,5108.235;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SaturateNode;933;-738.4048,-1293.77;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;210;-817.1887,5245.889;Float;False;206;0;1;COLOR
Node;AmplifyShaderEditor.SaturateNode;713;-697.5031,3375.669;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;206;-2087.412,-792.5879;Float;False;FresnelColor;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RegisterLocalVarNode;205;-1574.954,-663.1936;Float;False;Fresnel;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;844;-802.162,-1403.361;Float;False;Constant;_BlankShadows;BlankShadows;49;0;1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.LerpOp;621;-70.79081,2101.524;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.CommentaryNode;861;-2503.368,5748.755;Float;False;3267.734;909.3911;Comment;18;875;887;874;873;879;880;872;870;867;869;868;865;866;863;864;862;921;952;Lighting;1,1,1,1;0;0
Node;AmplifyShaderEditor.GetLocalVarNode;224;-448.8575,5365.995;Float;False;221;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;221;-473.3958,3362.905;Float;False;WaveFoam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;315;-409.6305,5263.034;Float;False;Constant;_Float9;Float 9;32;0;2;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.ToggleSwitchNode;843;-553.434,-1339.504;Float;False;Property;_ENABLE_SHADOWS;ENABLE_SHADOWS;46;1;[Toggle];0;2;0;COLOR;0,0,0,0;False;1;COLOR;0;False;1;COLOR
Node;AmplifyShaderEditor.LerpOp;207;-490.7755,5114.316;Float;False;3;0;COLOR;0.0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;862;-2435.75,5905.482;Float;False;52;0;1;FLOAT3
Node;AmplifyShaderEditor.RegisterLocalVarNode;52;137.1828,2096.77;Float;False;NormalMap;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.LerpOp;223;-145.1122,5116.174;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;842;-35.57666,5290.496;Float;False;834;0;1;COLOR
Node;AmplifyShaderEditor.RegisterLocalVarNode;834;-252.7414,-1343.617;Float;False;Shadows;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;56;1092.356,-154.0119;Float;False;Property;_Glossiness;Glossiness;7;0;0.85;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;864;-2453.368,5798.755;Float;False;1;0;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.WorldReflectionVector;863;-2193.821,5906.891;Float;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;877;1369.905,-155.3848;Float;False;GlossinessParam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.DotProductOpNode;866;-1573.428,5843.252;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;841;222.4233,5122.496;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;865;-1678.094,6087.037;Float;False;877;0;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;114;489.9147,5105.069;Float;False;FinalColor;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;870;-1980.181,6331.003;Float;False;114;0;1;COLOR
Node;AmplifyShaderEditor.LightColorNode;867;-1953.793,6202.445;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.SimpleMaxOp;869;-1382.67,5848.037;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;868;-1425.728,6088.199;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;128.0;False;1;FLOAT
Node;AmplifyShaderEditor.PowerNode;872;-1232.307,6066.441;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;512.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;880;-1093.456,5970.647;Float;False;944;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;873;-1733.606,6249.321;Float;False;2;2;0;FLOAT3;0.0,0,0,0;False;1;COLOR;0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;816;-2210.829,-4204.977;Float;False;1497.175;524.8193;Comment;11;811;809;2;767;489;786;498;787;626;770;814;Opacity;1,1,1,1;0;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;944;-1286.223,-1201.092;Float;False;ShadowMask;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.ToggleSwitchNode;921;-1149.333,6267.963;Float;False;Property;_Unlit;Unlit;48;1;[Toggle];0;2;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;879;-922.6326,6130.012;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;811;-2160.829,-3795.161;Float;False;810;0;1;COLOR
Node;AmplifyShaderEditor.SimpleAddOpNode;874;-757.9039,6208.751;Float;False;2;2;0;FLOAT;0,0,0,0;False;1;COLOR;0;False;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;489;-1989.721,-4130.501;Float;False;494;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;767;-2114.376,-3920.345;Float;False;750;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;2;-2020.329,-4023.831;Float;False;Property;_EdgeFade;EdgeFade;15;0;0.2448298;0.01;3;0;1;FLOAT
Node;AmplifyShaderEditor.SwizzleNode;809;-1883.183,-3803.824;Float;False;FLOAT;1;1;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;750;-1912.674,4160.687;Float;False;RT_Opacity;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;498;-1683.42,-4134.152;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;786;-1687.255,-3930.708;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;96;-1574.322,2975.444;Float;False;Property;_WaveHeight;Wave Height;27;0;0.05;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;887;-562.8474,6200.75;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.StaticSwitch;952;-294.4478,6152.723;Float;False;Property;_LIGHTING;LIGHTING;47;0;0;True;True;;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.NormalVertexDataNode;97;-1092.285,2871.405;Float;False;0;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;53;1591.158,-314.7101;Float;False;52;0;1;FLOAT3
Node;AmplifyShaderEditor.GetLocalVarNode;878;1592.167,-406.292;Float;False;114;0;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;95;-1180.72,3037.886;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;626;-1478.909,-4131.034;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SaturateNode;787;-1497.255,-3946.708;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;115;1888.085,-186.3855;Float;False;875;0;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;98;-699.1765,2922.915;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CustomStandardSurface;856;1892.538,-390.7581;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;875;-30.66221,6174.183;Float;False;CustomLighting;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleSubtractOpNode;770;-1235.21,-4114.162;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;823;-5053.871,-1897.331;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;656;1676.08,466.8108;Float;False;Constant;_Float14;Float 14;37;0;250;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.LerpOp;822;-4772.95,-1951.336;Float;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.0,0;False;2;FLOAT;0.0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RegisterLocalVarNode;891;-444.5986,2545.656;Float;False;NormalStrengthParam;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.DistanceBasedTessNode;655;1930.161,288.6733;Float;False;3;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;1;FLOAT4
Node;AmplifyShaderEditor.RegisterLocalVarNode;218;-714.403,3079.512;Float;False;WaveHeight;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;814;-956.6533,-4154.977;Float;False;OpacityFinal;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;780;-2453.334,86.1601;Float;False;494;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;821;-5093.564,-1771.436;Float;False;820;0;1;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;857;2256.308,-338.7852;Float;False;Property;_LIGHTING;LIGHTING;48;0;0;True;True;;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CustomExpressionNode;923;-2317.433,-1229.282;Float;False; float4 color = 0@$ float2 blurSize = 0.1@$ float2 ouv = uv.xy@$ float k = 1.0 / 9@$ for(int y=0@ y<3@ y++) {$ for(int x=0@ x<3@ x++) {$ float2 offset = float2(x-1, y-1)@$ uv.xy = ouv + blurSize * offset@$ float4 c = tex2D(s, uv)@ $ color += c * k@$ }$ }$ return color@;1;False;2;True;s;SAMPLER2D;0.0;In;True;uv;FLOAT2;0,0;In;Blur;2;0;SAMPLER2D;0.0;False;1;FLOAT2;0,0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;657;1680.501,383.0405;Float;False;Constant;_Float15;Float 15;37;0;50;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;233;-2187.434,629.9498;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.Vector2Node;824;-5391.543,-1828.451;Float;False;Constant;_Vector0;Vector 0;49;0;1,0.5;0;3;FLOAT2;FLOAT;FLOAT
Node;AmplifyShaderEditor.SamplerNode;27;1721.375,-662.4299;Float;True;Property;_Shadermap;Shadermap;33;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.SimpleMultiplyOpNode;832;-3392.785,2112.124;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;1;FLOAT2
Node;AmplifyShaderEditor.GetLocalVarNode;815;2076.935,5.32964;Float;False;814;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;234;1563.903,275.5;Float;False;Property;_Tessellation;Tessellation;28;0;0.1;0.1;100;0;1;FLOAT
Node;AmplifyShaderEditor.GetLocalVarNode;846;1387.167,-67.87299;Float;False;944;0;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;845;1670.167,-88.873;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0;False;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;470;-3783.626,599.2585;Float;False;1;0;FLOAT2;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.SimpleSubtractOpNode;782;-1084.952,-3407.833;Float;False;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;222;-1745.364,628.5925;Float;False;IntersectionTex;-1;True;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SamplerNode;43;2134.368,-660.9867;Float;True;Property;_Normals;Normals;32;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.GetLocalVarNode;855;2265.909,-411.5951;Float;False;834;0;1;COLOR
Node;AmplifyShaderEditor.GetLocalVarNode;101;2098.581,120.8756;Float;False;100;0;1;FLOAT3
Node;AmplifyShaderEditor.VertexColorNode;781;-1417.933,-3328.931;Float;False;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RegisterLocalVarNode;100;-458.0862,2923.397;Float;False;Displacement;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;2625.578,-276.458;Float;False;True;3;Float;;200;0;CustomLighting;StylizedWater/Desktop;False;False;False;False;False;False;False;False;True;False;False;False;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;True;True;True;True;True;True;True;True;True;True;False;0;255;255;0;0;0;0;False;1;4;10;25;True;0.5;True;2;SrcAlpha;OneMinusSrcAlpha;2;SrcAlpha;OneMinusSrcAlpha;Add;Min;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;False;Relative;200;;-1;-1;-1;-1;0;0;0;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;733;0;17;0
WireConnection;36;0;35;0
WireConnection;36;1;37;0
WireConnection;897;0;733;0
WireConnection;500;0;320;1
WireConnection;500;1;320;3
WireConnection;39;0;36;0
WireConnection;39;1;38;2
WireConnection;13;0;14;0
WireConnection;13;1;12;0
WireConnection;15;0;13;0
WireConnection;15;1;897;0
WireConnection;337;0;39;0
WireConnection;337;1;500;0
WireConnection;21;0;15;0
WireConnection;898;0;337;0
WireConnection;301;0;87;0
WireConnection;301;1;302;0
WireConnection;755;0;746;1
WireConnection;755;1;746;1
WireConnection;756;0;746;3
WireConnection;756;1;746;4
WireConnection;40;0;898;0
WireConnection;758;0;746;1
WireConnection;758;1;755;0
WireConnection;757;0;754;0
WireConnection;88;0;301;0
WireConnection;88;1;89;0
WireConnection;759;0;756;0
WireConnection;92;0;90;0
WireConnection;92;1;91;0
WireConnection;761;0;758;0
WireConnection;761;1;757;0
WireConnection;718;0;88;0
WireConnection;760;0;759;0
WireConnection;760;1;746;1
WireConnection;344;0;88;0
WireConnection;344;1;92;0
WireConnection;719;0;92;0
WireConnection;762;0;760;0
WireConnection;762;1;761;0
WireConnection;715;0;718;0
WireConnection;715;1;719;0
WireConnection;581;0;344;0
WireConnection;899;0;762;0
WireConnection;94;1;581;0
WireConnection;807;1;783;0
WireConnection;714;1;715;0
WireConnection;810;0;807;0
WireConnection;763;0;899;0
WireConnection;717;0;94;2
WireConnection;717;1;714;2
WireConnection;813;0;812;0
WireConnection;721;0;717;0
WireConnection;721;1;94;2
WireConnection;747;1;803;0
WireConnection;24;0;22;0
WireConnection;24;1;23;0
WireConnection;494;0;641;0
WireConnection;765;0;747;1
WireConnection;99;0;721;0
WireConnection;707;0;813;0
WireConnection;748;0;765;0
WireConnection;619;0;618;0
WireConnection;619;1;620;0
WireConnection;712;0;495;0
WireConnection;712;1;707;0
WireConnection;354;0;355;0
WireConnection;354;1;24;0
WireConnection;778;0;712;0
WireConnection;778;1;751;0
WireConnection;356;0;24;0
WireConnection;356;1;41;0
WireConnection;353;0;354;0
WireConnection;353;1;619;0
WireConnection;776;0;778;0
WireConnection;29;1;356;0
WireConnection;28;1;353;0
WireConnection;496;0;777;0
WireConnection;496;1;5;0
WireConnection;30;0;28;3
WireConnection;30;1;29;3
WireConnection;648;0;647;0
WireConnection;648;1;104;0
WireConnection;497;0;777;0
WireConnection;497;1;3;0
WireConnection;649;0;648;0
WireConnection;420;0;496;0
WireConnection;420;1;30;0
WireConnection;732;0;18;0
WireConnection;732;1;46;0
WireConnection;425;0;420;0
WireConnection;425;1;497;0
WireConnection;479;0;649;0
WireConnection;342;0;732;0
WireConnection;342;1;343;0
WireConnection;340;0;47;0
WireConnection;661;0;660;0
WireConnection;426;0;425;0
WireConnection;444;0;10;4
WireConnection;444;1;426;0
WireConnection;339;0;342;0
WireConnection;339;1;47;0
WireConnection;659;1;661;0
WireConnection;341;0;732;0
WireConnection;341;1;340;0
WireConnection;45;1;341;0
WireConnection;631;0;444;0
WireConnection;50;1;339;0
WireConnection;943;0;477;4
WireConnection;943;1;659;4
WireConnection;943;2;941;0
WireConnection;488;0;943;0
WireConnection;51;0;45;0
WireConnection;51;1;50;0
WireConnection;151;0;480;0
WireConnection;42;0;631;0
WireConnection;362;0;51;0
WireConnection;134;0;117;0
WireConnection;134;1;119;0
WireConnection;487;0;151;0
WireConnection;487;1;488;0
WireConnection;361;0;360;0
WireConnection;361;1;269;0
WireConnection;922;0;266;0
WireConnection;149;0;134;0
WireConnection;149;1;487;0
WireConnection;609;0;606;0
WireConnection;609;1;608;0
WireConnection;607;0;609;0
WireConnection;359;0;361;0
WireConnection;359;1;922;0
WireConnection;604;0;628;0
WireConnection;604;1;741;0
WireConnection;920;0;269;0
WireConnection;920;1;919;0
WireConnection;658;0;149;0
WireConnection;121;0;658;0
WireConnection;805;0;920;0
WireConnection;805;1;804;0
WireConnection;603;0;607;0
WireConnection;603;1;628;0
WireConnection;372;0;359;0
WireConnection;801;1;359;0
WireConnection;602;0;609;0
WireConnection;602;1;604;0
WireConnection;456;0;377;0
WireConnection;456;1;271;0
WireConnection;64;0;602;0
WireConnection;64;1;63;0
WireConnection;65;0;63;0
WireConnection;65;1;603;0
WireConnection;806;0;922;0
WireConnection;806;1;805;0
WireConnection;508;2;106;0
WireConnection;634;0;632;0
WireConnection;634;1;633;0
WireConnection;478;0;477;0
WireConnection;478;1;60;0
WireConnection;478;2;482;0
WireConnection;802;0;372;0
WireConnection;802;1;801;0
WireConnection;831;0;819;2
WireConnection;831;1;829;0
WireConnection;509;0;456;0
WireConnection;509;1;508;0
WireConnection;126;0;802;0
WireConnection;942;0;478;0
WireConnection;942;1;659;0
WireConnection;942;2;941;0
WireConnection;637;0;65;0
WireConnection;637;1;634;0
WireConnection;260;1;806;0
WireConnection;636;0;64;0
WireConnection;636;1;634;0
WireConnection;676;0;732;0
WireConnection;676;1;681;0
WireConnection;265;0;260;0
WireConnection;374;0;367;0
WireConnection;374;1;942;0
WireConnection;374;2;377;0
WireConnection;827;0;831;0
WireConnection;627;0;509;0
WireConnection;669;0;670;0
WireConnection;669;1;671;0
WireConnection;677;0;47;0
WireConnection;677;1;676;0
WireConnection;67;1;637;0
WireConnection;66;1;636;0
WireConnection;830;0;827;0
WireConnection;68;0;66;1
WireConnection;68;1;67;1
WireConnection;672;0;669;0
WireConnection;672;1;673;0
WireConnection;946;0;677;0
WireConnection;297;0;374;0
WireConnection;297;1;298;0
WireConnection;297;2;627;0
WireConnection;820;0;830;0
WireConnection;70;0;69;0
WireConnection;70;1;68;0
WireConnection;350;0;297;0
WireConnection;111;0;110;0
WireConnection;111;1;112;0
WireConnection;212;0;201;0
WireConnection;212;1;213;0
WireConnection;76;0;67;3
WireConnection;678;0;672;0
WireConnection;675;1;946;0
WireConnection;141;0;351;0
WireConnection;141;1;111;0
WireConnection;833;1;922;0
WireConnection;199;0;200;0
WireConnection;199;2;211;0
WireConnection;199;3;212;0
WireConnection;102;0;10;0
WireConnection;826;0;825;0
WireConnection;826;1;71;0
WireConnection;601;0;70;0
WireConnection;601;1;76;0
WireConnection;601;2;599;0
WireConnection;792;0;51;0
WireConnection;947;0;675;0
WireConnection;948;0;678;0
WireConnection;231;0;721;0
WireConnection;231;1;232;0
WireConnection;674;0;792;0
WireConnection;674;1;947;0
WireConnection;674;2;948;0
WireConnection;203;0;202;4
WireConnection;203;1;199;0
WireConnection;936;0;833;1
WireConnection;219;0;231;0
WireConnection;219;1;220;0
WireConnection;722;0;141;0
WireConnection;244;0;601;0
WireConnection;791;0;51;0
WireConnection;652;0;384;0
WireConnection;652;1;128;0
WireConnection;475;0;103;0
WireConnection;475;1;476;0
WireConnection;624;0;826;0
WireConnection;624;1;601;0
WireConnection;73;0;624;0
WireConnection;230;0;219;0
WireConnection;230;1;229;0
WireConnection;505;0;203;0
WireConnection;938;0;925;0
WireConnection;938;1;936;0
WireConnection;651;0;652;0
WireConnection;680;0;674;0
WireConnection;680;1;791;0
WireConnection;61;0;722;0
WireConnection;61;1;475;0
WireConnection;61;2;62;0
WireConnection;625;0;61;0
WireConnection;625;1;79;0
WireConnection;933;0;938;0
WireConnection;713;0;230;0
WireConnection;206;0;202;0
WireConnection;205;0;505;0
WireConnection;621;0;622;0
WireConnection;621;1;680;0
WireConnection;621;2;651;0
WireConnection;221;0;713;0
WireConnection;843;0;844;0
WireConnection;843;1;933;0
WireConnection;207;0;625;0
WireConnection;207;1;210;0
WireConnection;207;2;208;0
WireConnection;52;0;621;0
WireConnection;223;0;207;0
WireConnection;223;1;315;0
WireConnection;223;2;224;0
WireConnection;834;0;843;0
WireConnection;863;0;862;0
WireConnection;877;0;56;0
WireConnection;866;0;864;0
WireConnection;866;1;863;0
WireConnection;841;0;223;0
WireConnection;841;1;842;0
WireConnection;114;0;841;0
WireConnection;869;1;866;0
WireConnection;868;0;865;0
WireConnection;872;0;869;0
WireConnection;872;1;868;0
WireConnection;873;0;867;1
WireConnection;873;1;870;0
WireConnection;944;0;833;1
WireConnection;921;0;873;0
WireConnection;921;1;870;0
WireConnection;879;0;880;0
WireConnection;879;1;872;0
WireConnection;874;0;879;0
WireConnection;874;1;921;0
WireConnection;809;0;811;0
WireConnection;750;0;747;2
WireConnection;498;0;489;0
WireConnection;498;1;2;0
WireConnection;786;0;767;0
WireConnection;786;1;809;0
WireConnection;887;0;874;0
WireConnection;952;1;887;0
WireConnection;95;0;96;0
WireConnection;95;1;721;0
WireConnection;626;0;498;0
WireConnection;787;0;786;0
WireConnection;98;0;97;0
WireConnection;98;1;95;0
WireConnection;856;0;878;0
WireConnection;856;1;53;0
WireConnection;856;4;877;0
WireConnection;875;0;952;0
WireConnection;770;0;626;0
WireConnection;770;1;787;0
WireConnection;823;0;13;0
WireConnection;823;1;824;0
WireConnection;822;0;13;0
WireConnection;822;1;823;0
WireConnection;822;2;821;0
WireConnection;891;0;128;0
WireConnection;655;0;234;0
WireConnection;655;1;657;0
WireConnection;655;2;656;0
WireConnection;218;0;95;0
WireConnection;814;0;770;0
WireConnection;857;0;856;0
WireConnection;857;1;115;0
WireConnection;233;0;30;0
WireConnection;832;0;47;0
WireConnection;845;0;877;0
WireConnection;845;1;846;0
WireConnection;470;0;41;0
WireConnection;782;0;149;0
WireConnection;782;1;781;2
WireConnection;222;0;233;0
WireConnection;100;0;98;0
WireConnection;0;2;857;0
WireConnection;0;9;815;0
WireConnection;0;11;101;0
ASEEND*/
//CHKSM=723E6D12A10FC1A80822331677CED7179378FB77
|
jynew/jyx2/Assets/3DScene/StylizedWater/Shaders/StylizedWater_Desktop.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/Shaders/StylizedWater_Desktop.shader",
"repo_id": "jynew",
"token_count": 37016
}
| 842 |
fileFormatVersion: 2
guid: 03c979ff97dac1b45a3204c93000525e
timeCreated: 1520592108
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Materials/SWS_DemoRocks_Small.mat.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Materials/SWS_DemoRocks_Small.mat.meta",
"repo_id": "jynew",
"token_count": 71
}
| 843 |
fileFormatVersion: 2
guid: 09861861615e3cf4591e194a0251cd11
timeCreated: 1526026532
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Prefabs/SWS_DemoRock_Small_A.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/DemoAssets/Prefabs/SWS_DemoRock_Small_A.prefab.meta",
"repo_id": "jynew",
"token_count": 69
}
| 844 |
fileFormatVersion: 2
guid: 19a07967c6ac1294abc059ea2ccb8a24
timeCreated: 1520588488
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/IslandDemo/SWS_IslandDemo_Terrain.asset.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/StylizedWater/_Demo/IslandDemo/SWS_IslandDemo_Terrain.asset.meta",
"repo_id": "jynew",
"token_count": 71
}
| 845 |
fileFormatVersion: 2
guid: 8c8768a573862ae4da421dcd14cb1db9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/TileWorldCreator/07_Shandong.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/07_Shandong.prefab.meta",
"repo_id": "jynew",
"token_count": 65
}
| 846 |
fileFormatVersion: 2
guid: 0677313352eeae94eb391920bfef8bb4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/TileWorldCreator/65_Shandong.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/65_Shandong.prefab.meta",
"repo_id": "jynew",
"token_count": 62
}
| 847 |
fileFormatVersion: 2
guid: f1fe6f6043919d84bb32f96d9c79c329
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets.meta",
"repo_id": "jynew",
"token_count": 70
}
| 848 |
fileFormatVersion: 2
guid: 372a17199edf92845a149db7bc441dec
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_02/xxx1.prefab.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_02/xxx1.prefab.meta",
"repo_id": "jynew",
"token_count": 62
}
| 849 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3972044101668710745
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3972044101668418937}
- component: {fileID: 3972044101667648857}
- component: {fileID: 3972044101666518937}
- component: {fileID: 3972044101678226073}
m_Layer: 0
m_Name: xxx4
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3972044101668418937
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3972044101668710745}
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 &3972044101667648857
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3972044101668710745}
m_Mesh: {fileID: 4300000, guid: 2bef9ecdf01243444a186f5b45588434, type: 3}
--- !u!23 &3972044101666518937
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3972044101668710745}
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: 2bd5bb261ba069544b92375ab5a313e2, type: 2}
- {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 &3972044101678226073
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3972044101668710745}
m_Enabled: 1
m_Avatar: {fileID: 9000000, guid: 2bef9ecdf01243444a186f5b45588434, 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/xxx4.prefab/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/Prefab/Color_03/xxx4.prefab",
"repo_id": "jynew",
"token_count": 1350
}
| 850 |
fileFormatVersion: 2
guid: e00dc5320b5672f49bc5d6e18ed6f016
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/_materials/xxy1.mat.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/_materials/xxy1.mat.meta",
"repo_id": "jynew",
"token_count": 59
}
| 851 |
fileFormatVersion: 2
guid: f14980f8b6b0f5744bcf660eb0e8bfe5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/_mesh/layer0.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/TileWorldCreator/_Art/_Presets/CliffIsland/_mesh/layer0.meta",
"repo_id": "jynew",
"token_count": 72
}
| 852 |
fileFormatVersion: 2
guid: 5e0b55796770c7942b6f7936e72087b5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3DScene/Volumetric Light/Source.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3DScene/Volumetric Light/Source.meta",
"repo_id": "jynew",
"token_count": 71
}
| 853 |
fileFormatVersion: 2
guid: 287255c13bafc914aa74c5f44cb7b1cc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins.meta",
"repo_id": "jynew",
"token_count": 70
}
| 854 |
using UnityEditor;
namespace AmplifyShaderEditor
{
[System.Serializable]
public class OptionsWindow
{
private AmplifyShaderEditorWindow m_parentWindow = null;
private bool m_coloredPorts = true;
private bool m_multiLinePorts = true;
private const string MultiLineId = "MultiLinePortsDefault";
private const string ColorPortId = "ColoredPortsDefault";
public OptionsWindow( AmplifyShaderEditorWindow parentWindow )
{
m_parentWindow = parentWindow;
//Load ();
}
public void Init()
{
Load();
}
public void Destroy()
{
Save();
}
public void Save()
{
EditorPrefs.SetBool( ColorPortId, ColoredPorts );
EditorPrefs.SetBool( MultiLineId, m_multiLinePorts );
}
public void Load()
{
ColoredPorts = EditorPrefs.GetBool( ColorPortId, true );
m_multiLinePorts = EditorPrefs.GetBool( MultiLineId, true );
}
public bool ColoredPorts
{
get { return m_coloredPorts; }
set
{
if ( m_coloredPorts != value )
EditorPrefs.SetBool( ColorPortId, value );
m_coloredPorts = value;
}
}
public bool MultiLinePorts
{
get { return m_multiLinePorts; }
set
{
if ( m_multiLinePorts != value )
EditorPrefs.SetBool( MultiLineId, value );
m_multiLinePorts = value;
}
}
public AmplifyShaderEditorWindow ParentWindow { get { return m_parentWindow; } set { m_parentWindow = value; } }
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/EditorOptions.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/EditorOptions.cs",
"repo_id": "jynew",
"token_count": 547
}
| 855 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
using UnityEngine;
using System.Collections.Generic;
using UnityEditor;
namespace AmplifyShaderEditor
{
public class ClipboardData
{
public string Data = string.Empty;
public string Connections = string.Empty;
public int OldNodeId = -1;
public int NewNodeId = -1;
public ClipboardData( string data, string connections, int oldNodeId )
{
Data = data;
Connections = connections;
OldNodeId = oldNodeId;
}
public override string ToString()
{
return Data + IOUtils.CLIPBOARD_DATA_SEPARATOR + Connections + IOUtils.CLIPBOARD_DATA_SEPARATOR + OldNodeId + IOUtils.CLIPBOARD_DATA_SEPARATOR + NewNodeId;
}
}
public class Clipboard
{
private const string ClipboardId = "AMPLIFY_CLIPBOARD_ID";
private readonly string[] ClipboardTagId = { "#CLIP_ITEM#" };
private List<ClipboardData> m_clipboardStrData;
private Dictionary<int, ClipboardData> m_clipboardAuxData;
private Dictionary<string, ClipboardData> m_multiPassMasterNodeData;
public Clipboard()
{
m_clipboardStrData = new List<ClipboardData>();
m_clipboardAuxData = new Dictionary<int, ClipboardData>();
m_multiPassMasterNodeData = new Dictionary<string, ClipboardData>();
}
public void AddMultiPassNodesToClipboard( List<TemplateMultiPassMasterNode> masterNodes )
{
m_multiPassMasterNodeData.Clear();
int templatesAmount = masterNodes.Count;
for( int i = 0; i < templatesAmount; i++ )
{
string data = string.Empty;
string connection = string.Empty;
masterNodes[ i ].FullWriteToString( ref data, ref connection );
ClipboardData clipboardData = new ClipboardData( data , connection, masterNodes[i].UniqueId );
m_multiPassMasterNodeData.Add( masterNodes[ i ].OriginalPassName , clipboardData );
}
}
public void GetMultiPassNodesFromClipboard( List<TemplateMultiPassMasterNode> masterNodes )
{
int templatesAmount = masterNodes.Count;
for( int i = 0; i < templatesAmount; i++ )
{
if( m_multiPassMasterNodeData.ContainsKey( masterNodes[ i ].OriginalPassName ) )
{
ClipboardData nodeData = m_multiPassMasterNodeData[ masterNodes[ i ].OriginalPassName ];
string[] nodeParams = nodeData.Data.Split( IOUtils.FIELD_SEPARATOR );
masterNodes[ i ].FullReadFromString( ref nodeParams );
}
}
}
public void AddToClipboard( List<ParentNode> selectedNodes , Vector3 initialPosition, ParentGraph graph )
{
//m_clipboardStrData.Clear();
//m_clipboardAuxData.Clear();
string clipboardData = IOUtils.Vector3ToString( initialPosition ) + ClipboardTagId[ 0 ];
int masterNodeId = UIUtils.CurrentWindow.CurrentGraph.CurrentMasterNodeId;
int count = selectedNodes.Count;
for ( int i = 0; i < count; i++ )
{
if ( UIUtils.CurrentWindow.IsShaderFunctionWindow || !graph.IsMasterNode( selectedNodes[ i ] ))
{
string nodeData = string.Empty;
string connections = string.Empty;
selectedNodes[ i ].ClipboardFullWriteToString( ref nodeData, ref connections );
clipboardData += nodeData;
if ( !string.IsNullOrEmpty( connections ) )
{
connections = connections.Substring( 0, connections.Length - 1 );
clipboardData += "\n" + connections;
}
if ( i < count - 1 )
clipboardData += ClipboardTagId[ 0 ];
//ClipboardData data = new ClipboardData( nodeData, connections, selectedNodes[ i ].UniqueId );
//m_clipboardStrData.Add( data );
//m_clipboardAuxData.Add( selectedNodes[ i ].UniqueId, data );
}
}
if ( !string.IsNullOrEmpty( clipboardData ) )
{
EditorPrefs.SetString( ClipboardId, clipboardData );
}
//for ( int i = 0; i < selectedNodes.Count; i++ )
//{
// if ( selectedNodes[ i ].UniqueId != masterNodeId )
// {
// WireNode wireNode = selectedNodes[ i ] as WireNode;
// if ( wireNode != null )
// {
// if ( !IsNodeChainValid( selectedNodes[ i ], true ) || !IsNodeChainValid( selectedNodes[ i ], false ) )
// {
// UnityEngine.Debug.Log( "found invalid wire port" );
// }
// }
// }
//}
}
public Vector3 GetDataFromEditorPrefs()
{
Vector3 initialPos = Vector3.zero;
m_clipboardStrData.Clear();
m_clipboardAuxData.Clear();
string clipboardData = EditorPrefs.GetString( ClipboardId, string.Empty );
if ( !string.IsNullOrEmpty( clipboardData ) )
{
string[] clipboardDataArray = clipboardData.Split( ClipboardTagId, StringSplitOptions.None );
initialPos = IOUtils.StringToVector3( clipboardDataArray[0] );
for ( int i = 1; i < clipboardDataArray.Length; i++ )
{
if ( !string.IsNullOrEmpty( clipboardDataArray[ i ] ) )
{
int wiresIndex = clipboardDataArray[ i ].IndexOf( IOUtils.LINE_TERMINATOR );
string nodeData = string.Empty;
string connections = string.Empty;
if ( wiresIndex < 0 )
{
nodeData = clipboardDataArray[ i ];
}
else
{
nodeData = clipboardDataArray[ i ].Substring( 0, wiresIndex );
connections = clipboardDataArray[ i ].Substring( wiresIndex + 1 );
}
string[] nodeDataArr = nodeData.Split( IOUtils.FIELD_SEPARATOR );
if ( nodeDataArr.Length > 2 )
{
int nodeId = Convert.ToInt32( nodeDataArr[ 2 ] );
ClipboardData data = new ClipboardData( nodeData, connections, nodeId );
m_clipboardStrData.Add( data );
m_clipboardAuxData.Add( nodeId, data );
}
}
}
}
return initialPos;
}
public bool IsNodeChainValid( ParentNode currentNode, bool forward )
{
WireNode wireNode = currentNode as WireNode;
if ( wireNode == null )
{
return m_clipboardAuxData.ContainsKey( currentNode.UniqueId );
}
if ( forward )
{
if ( wireNode.InputPorts[ 0 ].ExternalReferences.Count > 0 )
{
int nodeId = wireNode.InputPorts[ 0 ].ExternalReferences[ 0 ].NodeId;
if ( m_clipboardAuxData.ContainsKey( nodeId ) )
{
return IsNodeChainValid( UIUtils.GetNode( nodeId ), forward );
}
}
}
else
{
int nodeId = wireNode.OutputPorts[ 0 ].ExternalReferences[ 0 ].NodeId;
if ( m_clipboardAuxData.ContainsKey( nodeId ) )
{
return IsNodeChainValid( UIUtils.GetNode( nodeId ), forward );
}
}
return false;
}
public void GenerateFullString()
{
string data = string.Empty;
for ( int i = 0; i < m_clipboardStrData.Count; i++ )
{
data += m_clipboardStrData[ i ].ToString();
if ( i < m_clipboardStrData.Count - 1 )
{
data += IOUtils.LINE_TERMINATOR;
}
}
}
public void ClearClipboard()
{
m_clipboardStrData.Clear();
m_clipboardAuxData.Clear();
m_multiPassMasterNodeData.Clear();
}
public ClipboardData GetClipboardData( int oldNodeId )
{
if ( m_clipboardAuxData.ContainsKey( oldNodeId ) )
return m_clipboardAuxData[ oldNodeId ];
return null;
}
public int GeNewNodeId( int oldNodeId )
{
if ( m_clipboardAuxData.ContainsKey( oldNodeId ) )
return m_clipboardAuxData[ oldNodeId ].NewNodeId;
return -1;
}
public List<ClipboardData> CurrentClipboardStrData
{
get { return m_clipboardStrData; }
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/Clipboard.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/Clipboard.cs",
"repo_id": "jynew",
"token_count": 2881
}
| 856 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
namespace AmplifyShaderEditor
{
public class ShortcutKeyData
{
public bool IsPressed;
public System.Type NodeType;
public string Name;
public ShortcutKeyData( System.Type type, string name )
{
NodeType = type;
Name = name;
IsPressed = false;
}
}
public class GraphContextMenu
{
private List<ContextMenuItem> m_items;
private List<ContextMenuItem> m_itemFunctions;
private Dictionary<System.Type, NodeAttributes> m_itemsDict;
private Dictionary<System.Type, NodeAttributes> m_deprecatedItemsDict;
private Dictionary<System.Type, System.Type> m_castTypes;
private Dictionary<KeyCode, ShortcutKeyData> m_shortcutTypes;
private KeyCode m_lastKeyPressed;
private ParentGraph m_currentGraph;
private bool m_correctlyLoaded = false;
public GraphContextMenu( ParentGraph currentGraph )
{
m_currentGraph = currentGraph;
m_correctlyLoaded = RefreshNodes( currentGraph );
}
private Type[] GetTypesInNamespace( Assembly assembly, string nameSpace )
{
return assembly.GetTypes().Where( t => String.Equals( t.Namespace, nameSpace, StringComparison.Ordinal ) ).ToArray();
}
public bool RefreshNodes( ParentGraph currentGraph )
{
if( m_items != null )
{
m_items.Clear();
m_items = null;
}
if( m_itemFunctions != null )
{
m_itemFunctions.Clear();
m_itemFunctions = null;
}
m_items = new List<ContextMenuItem>();
m_itemFunctions = new List<ContextMenuItem>();
if( m_itemsDict != null )
m_itemsDict.Clear();
m_itemsDict = new Dictionary<System.Type, NodeAttributes>();
if( m_deprecatedItemsDict != null )
m_deprecatedItemsDict.Clear();
m_deprecatedItemsDict = new Dictionary<System.Type, NodeAttributes>();
if( m_castTypes != null )
m_castTypes.Clear();
m_castTypes = new Dictionary<System.Type, System.Type>();
if( m_shortcutTypes != null )
m_shortcutTypes.Clear();
m_shortcutTypes = new Dictionary<KeyCode, ShortcutKeyData>();
m_lastKeyPressed = KeyCode.None;
// Fetch all available nodes by their attributes
try
{
//IEnumerable<System.Type> availableTypes = AppDomain.CurrentDomain.GetAssemblies().ToList().SelectMany( type => type.GetTypes() );
Type[] availableTypes = GetTypesInNamespace( Assembly.GetExecutingAssembly(), "AmplifyShaderEditor" );
foreach( System.Type type in availableTypes )
{
foreach( NodeAttributes attribute in Attribute.GetCustomAttributes( type ).OfType<NodeAttributes>() )
{
if( attribute.Available && !attribute.Deprecated )
{
//if ( !UIUtils.CurrentWindow.IsShaderFunctionWindow && attribute.AvailableInFunctionsOnly )
// continue;
if( !UIUtils.HasColorCategory( attribute.Category ) )
{
if( !String.IsNullOrEmpty( attribute.CustomCategoryColor ) )
{
try
{
Color color = new Color();
ColorUtility.TryParseHtmlString( attribute.CustomCategoryColor, out color );
UIUtils.AddColorCategory( attribute.Category, color );
}
catch( Exception e )
{
Debug.LogException( e );
UIUtils.AddColorCategory( attribute.Category, Constants.DefaultCategoryColor );
}
}
//else
//{
// UIUtils.AddColorCategory( attribute.Category, Constants.DefaultCategoryColor );
//}
}
if( attribute.CastType != null && attribute.CastType.Length > 0 && type != null )
{
for( int i = 0; i < attribute.CastType.Length; i++ )
{
m_castTypes.Add( attribute.CastType[ i ], type );
}
}
if( attribute.ShortcutKey != KeyCode.None && type != null )
m_shortcutTypes.Add( attribute.ShortcutKey, new ShortcutKeyData( type, attribute.Name ) );
ContextMenuItem newItem = new ContextMenuItem( attribute, type, attribute.Name, attribute.Category, attribute.Description, null, attribute.ShortcutKey );
if( UIUtils.GetNodeAvailabilityInBitArray( attribute.NodeAvailabilityFlags, NodeAvailability.SurfaceShader ) )
m_items.Add( newItem );
else if( UIUtils.GetNodeAvailabilityInBitArray( attribute.NodeAvailabilityFlags, currentGraph.ParentWindow.CurrentNodeAvailability ) )
m_items.Add( newItem );
else if( UIUtils.GetNodeAvailabilityInBitArray( attribute.NodeAvailabilityFlags, currentGraph.CurrentCanvasMode ) )
m_items.Add( newItem );
m_itemsDict.Add( type, attribute );
m_itemFunctions.Add( newItem );
}
else
{
m_deprecatedItemsDict.Add( type, attribute );
}
}
}
}
catch( ReflectionTypeLoadException exception )
{
Debug.LogException( exception );
return false;
}
string[] guids = AssetDatabase.FindAssets( "t:AmplifyShaderFunction" );
List<AmplifyShaderFunction> allFunctions = new List<AmplifyShaderFunction>();
for( int i = 0; i < guids.Length; i++ )
{
allFunctions.Add( AssetDatabase.LoadAssetAtPath<AmplifyShaderFunction>( AssetDatabase.GUIDToAssetPath( guids[ i ] ) ) );
}
int functionCount = allFunctions.Count;
if( functionCount > 0 )
{
m_castTypes.Add( typeof( AmplifyShaderFunction ), typeof( FunctionNode ) );
}
for( int i = 0; i < functionCount; i++ )
{
NodeAttributes attribute = new NodeAttributes( allFunctions[ i ].FunctionName, allFunctions[ i ].CustomNodeCategory, allFunctions[ i ].Description, KeyCode.None, true, 0, int.MaxValue, typeof( AmplifyShaderFunction ) );
System.Type type = typeof( FunctionNode );
ContextMenuItem newItem = new ContextMenuItem( attribute, type, attribute.Name, attribute.Category, attribute.Description, allFunctions[ i ], attribute.ShortcutKey );
m_items.Add( newItem );
m_itemFunctions.Add( newItem );
}
//Sort out the final list by name
m_items.Sort( ( x, y ) => x.Category.CompareTo( y.Category ) );
m_itemFunctions.Sort( ( x, y ) => x.Category.CompareTo( y.Category ) );
return true;
}
public void Destroy()
{
for( int i = 0; i < m_items.Count; i++ )
{
m_items[ i ].Destroy();
}
for( int i = 0; i < m_itemFunctions.Count; i++ )
{
if( m_itemFunctions[ i ] != null )
m_itemFunctions[ i ].Destroy();
}
m_items.Clear();
m_items = null;
m_itemFunctions.Clear();
m_itemFunctions = null;
m_itemsDict.Clear();
m_itemsDict = null;
m_deprecatedItemsDict.Clear();
m_deprecatedItemsDict = null;
m_castTypes.Clear();
m_castTypes = null;
m_shortcutTypes.Clear();
m_shortcutTypes = null;
}
public NodeAttributes GetNodeAttributesForType( System.Type type )
{
if( type == null )
{
Debug.LogError( "Invalid type detected" );
return null;
}
if( m_itemsDict.ContainsKey( type ) )
return m_itemsDict[ type ];
return null;
}
public NodeAttributes GetDeprecatedNodeAttributesForType( System.Type type )
{
if( m_deprecatedItemsDict.ContainsKey( type ) )
return m_deprecatedItemsDict[ type ];
return null;
}
public void UpdateKeyPress( KeyCode key )
{
if( key == KeyCode.None )
return;
m_lastKeyPressed = key;
if( m_shortcutTypes.ContainsKey( key ) )
{
m_shortcutTypes[ key ].IsPressed = true;
}
}
public void UpdateKeyReleased( KeyCode key )
{
if( key == KeyCode.None )
return;
if( m_shortcutTypes.ContainsKey( key ) )
{
m_shortcutTypes[ key ].IsPressed = false;
}
}
public ParentNode CreateNodeFromCastType( System.Type type )
{
if( m_castTypes.ContainsKey( type ) )
{
ParentNode newNode = (ParentNode)ScriptableObject.CreateInstance( m_castTypes[ type ] );
return newNode;
}
return null;
}
public ParentNode CreateNodeFromShortcutKey()
{
if( m_lastKeyPressed == KeyCode.None )
return null;
if( m_shortcutTypes.ContainsKey( m_lastKeyPressed ) && m_shortcutTypes[ m_lastKeyPressed ].IsPressed )
{
ParentNode newNode = (ParentNode)ScriptableObject.CreateInstance( m_shortcutTypes[ m_lastKeyPressed ].NodeType );
return newNode;
}
return null;
}
public bool CheckShortcutKey()
{
if( m_lastKeyPressed == KeyCode.None )
return false;
if( m_shortcutTypes.ContainsKey( m_lastKeyPressed ) && m_shortcutTypes[ m_lastKeyPressed ].IsPressed )
{
return true;
}
return false;
}
public List<ContextMenuItem> MenuItems
{
get
{
if( m_currentGraph.ParentWindow.IsShaderFunctionWindow )
return m_itemFunctions;
else
return m_items;
}
}
public List<ContextMenuItem> ItemFunctions { get { return m_itemFunctions; } }
public KeyCode LastKeyPressed
{
get { return m_lastKeyPressed; }
}
public Dictionary<KeyCode, ShortcutKeyData> NodeShortcuts { get { return m_shortcutTypes; } }
public bool CorrectlyLoaded { get { return m_correctlyLoaded; } }
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/GraphContextMenu.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/GraphContextMenu.cs",
"repo_id": "jynew",
"token_count": 3581
}
| 857 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using UnityEngine;
using UnityEditor;
using System;
using System.Collections.Generic;
namespace AmplifyShaderEditor
{
public enum ToolButtonType
{
Update = 0,
Live,
OpenSourceCode,
CleanUnusedNodes,
//SelectShader,
New,
Open,
Save,
Library,
Options,
Help,
MasterNode,
FocusOnMasterNode,
FocusOnSelection,
ShowInfoWindow,
ShowTipsWindow,
ShowConsole
}
public enum ToolbarType
{
File,
Help
}
public class ToolbarMenuTab
{
private Rect m_tabArea;
private GenericMenu m_tabMenu;
public ToolbarMenuTab( float x, float y, float width, float height )
{
m_tabMenu = new GenericMenu();
m_tabArea = new Rect( x, y, width, height );
}
public void ShowMenu()
{
m_tabMenu.DropDown( m_tabArea );
}
public void AddItem( string itemName, GenericMenu.MenuFunction callback )
{
m_tabMenu.AddItem( new GUIContent( itemName ), false, callback );
}
}
[Serializable]
public sealed class ToolsWindow : MenuParent
{
private static readonly Color RightIconsColorOff = new Color( 1f, 1f, 1f, 0.8f );
private static readonly Color LeftIconsColorOff = new Color( 1f, 1f, 1f, 0.5f );
private static readonly Color RightIconsColorOn = new Color( 1f, 1f, 1f, 1.0f );
private static readonly Color LeftIconsColorOn = new Color( 1f, 1f, 1f, 0.8f );
private const float TabY = 9;
private const float TabX = 5;
private const string ShaderFileTitleStr = "Current Shader";
private const string FileToolbarStr = "File";
private const string HelpToolbarStr = "Help";
private const string LiveShaderStr = "Live Shader";
private const string LoadOnSelectionStr = "Load on selection";
private const string CurrentObjectStr = "Current Object: ";
public ToolsMenuButton.ToolButtonPressed ToolButtonPressedEvt;
//private GUIStyle m_toolbarButtonStyle;
private GUIStyle m_toggleStyle;
private GUIStyle m_borderStyle;
private ToolsMenuButton m_updateButton;
private ToolsMenuButton m_liveButton;
private ToolsMenuButton m_openSourceCodeButton;
private ToolsMenuButton m_focusOnSelectionButton;
private ToolsMenuButton m_focusOnMasterNodeButton;
private ToolsMenuButton m_showInfoWindowButton;
private ToolsMenuButton m_showTipsWindowButton;
private ToolsMenuButton m_cleanUnusedNodesButton;
private ToolsMenuButton m_showConsoleWindowButton;
//Used for collision detection to invalidate inputs on graph area
private Rect m_areaLeft = new Rect( 0, 0, 140, 40 );
private Rect m_areaRight = new Rect( 0, 0, 75, 40 );
private Rect m_boxRect;
private Rect m_borderRect;
public const double InactivityRefreshTime = 0.25;
private int m_currentSelected = 0;
//Search Bar
private const string SearchBarId = "ASE_SEARCH_BAR";
private bool m_searchBarVisible = false;
private bool m_selectSearchBarTextfield = false;
private bool m_refreshSearchResultList = false;
private Rect m_searchBarSize;
private string m_searchBarValue = string.Empty;
private List<ParentNode> m_searchResultNodes = new List<ParentNode>();
// width and height are between [0,1] and represent a percentage of the total screen area
public ToolsWindow( AmplifyShaderEditorWindow parentWindow ) : base( parentWindow, 0, 0, 0, 64, "Tools", MenuAnchor.TOP_LEFT, MenuAutoSize.NONE )
{
m_updateButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.Update, 0, 0, -1, -1, IOUtils.UpdateOutdatedGUID, string.Empty, "Create and apply shader to material.", 5 );
m_updateButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_updateButton.AddState( IOUtils.UpdateOFFGUID );
m_updateButton.AddState( IOUtils.UpdateUpToDatedGUID );
m_liveButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.Live, 0, 0, -1, -1, IOUtils.LiveOffGUID, string.Empty, "Automatically saves shader when canvas is changed.", 50 );
m_liveButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_liveButton.AddState( IOUtils.LiveOnGUID );
m_liveButton.AddState( IOUtils.LivePendingGUID );
//ToolsMenuButton cleanUnusedNodesButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.CleanUnusedNodes, 0, 0, -1, -1, IOUtils.CleanupOFFGUID, string.Empty, "Remove all nodes not connected to the master node.", 77 );
//cleanUnusedNodesButton.ToolButtonPressedEvt += OnButtonPressedEvent;
//cleanUnusedNodesButton.AddState( IOUtils.CleanUpOnGUID );
//m_list[ ( int ) ToolButtonType.CleanUnusedNodes ] = cleanUnusedNodesButton;
m_openSourceCodeButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.OpenSourceCode, 0, 0, -1, -1, IOUtils.OpenSourceCodeOFFGUID, string.Empty, "Open shader file in your default shader editor.", 80, false );
m_openSourceCodeButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_openSourceCodeButton.AddState( IOUtils.OpenSourceCodeONGUID );
m_cleanUnusedNodesButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.CleanUnusedNodes, 0, 0, -1, -1, IOUtils.CleanupOFFGUID, string.Empty, "Remove all nodes not connected to the master node.", 77 );
m_cleanUnusedNodesButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_cleanUnusedNodesButton.AddState( IOUtils.CleanUpOnGUID );
m_showConsoleWindowButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.ShowConsole, 0, 0, -1, -1, IOUtils.ShowConsoleWindowGUID, string.Empty, "Show internal console", 74 );
m_showConsoleWindowButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_showConsoleWindowButton.AddState( IOUtils.ShowConsoleWindowGUID );
m_focusOnMasterNodeButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.FocusOnMasterNode, 0, 0, -1, -1, IOUtils.FocusNodeGUID, string.Empty, "Focus on active master node.", -1, false );
m_focusOnMasterNodeButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_focusOnSelectionButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.FocusOnSelection, 0, 0, -1, -1, IOUtils.FitViewGUID, string.Empty, "Focus on selection or fit to screen if none selected." );
m_focusOnSelectionButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_showInfoWindowButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.ShowInfoWindow, 0, 0, -1, -1, IOUtils.ShowInfoWindowGUID, string.Empty, "Open Helper Window." );
m_showInfoWindowButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_showTipsWindowButton = new ToolsMenuButton( m_parentWindow, ToolButtonType.ShowTipsWindow, 0, 0, -1, -1, IOUtils.ShowTipsWindowGUID, string.Empty, "Open Quick Tips!" );
m_showTipsWindowButton.ToolButtonPressedEvt += OnButtonPressedEvent;
m_searchBarSize = new Rect( 0, TabY + 4, 110, 60 );
}
void OnShowPortLegend()
{
ParentWindow.ShowPortInfo();
}
override public void Destroy()
{
base.Destroy();
//for ( int i = 0; i < m_list.Length; i++ )
//{
// m_list[ i ].Destroy();
//}
//m_list = null;
m_searchResultNodes.Clear();
m_searchResultNodes = null;
m_updateButton.Destroy();
m_updateButton = null;
m_liveButton.Destroy();
m_liveButton = null;
m_openSourceCodeButton.Destroy();
m_openSourceCodeButton = null;
m_focusOnMasterNodeButton.Destroy();
m_focusOnMasterNodeButton = null;
m_focusOnSelectionButton.Destroy();
m_focusOnSelectionButton = null;
m_showInfoWindowButton.Destroy();
m_showInfoWindowButton = null;
m_showTipsWindowButton.Destroy();
m_showTipsWindowButton = null;
m_cleanUnusedNodesButton.Destroy();
m_cleanUnusedNodesButton = null;
m_showConsoleWindowButton.Destroy();
m_showConsoleWindowButton = null;
}
void OnButtonPressedEvent( ToolButtonType type )
{
if ( ToolButtonPressedEvt != null )
ToolButtonPressedEvt( type );
}
public override void Draw( Rect parentPosition, Vector2 mousePosition, int mouseButtonId, bool hasKeyboadFocus )
{
base.Draw( parentPosition, mousePosition, mouseButtonId, hasKeyboadFocus );
Color bufferedColor = GUI.color;
m_areaLeft.x = m_transformedArea.x + TabX;
m_areaRight.x = m_transformedArea.x + m_transformedArea.width - 75 - TabX;
//if ( m_toolbarButtonStyle == null )
//{
// m_toolbarButtonStyle = new GUIStyle( UIUtils.Button );
// m_toolbarButtonStyle.fixedWidth = 100;
//}
if ( m_toggleStyle == null )
{
m_toggleStyle = UIUtils.Toggle;
}
//for ( int i = 0; i < m_list.Length; i++ )
//{
// GUI.color = m_list[ i ].IsInside( mousePosition ) ? LeftIconsColorOn : LeftIconsColorOff;
// m_list[ i ].Draw( TabX + m_transformedArea.x + m_list[ i ].ButtonSpacing, TabY );
//}
GUI.color = m_updateButton.IsInside( mousePosition ) ? LeftIconsColorOn : LeftIconsColorOff;
m_updateButton.Draw( TabX + m_transformedArea.x + m_updateButton.ButtonSpacing, TabY );
GUI.color = m_liveButton.IsInside( mousePosition ) ? LeftIconsColorOn : LeftIconsColorOff;
m_liveButton.Draw( TabX + m_transformedArea.x + m_liveButton.ButtonSpacing, TabY );
GUI.color = m_openSourceCodeButton.IsInside( mousePosition ) ? LeftIconsColorOn : LeftIconsColorOff;
m_openSourceCodeButton.Draw( TabX + m_transformedArea.x + m_openSourceCodeButton.ButtonSpacing, TabY );
if ( m_searchBarVisible )
{
m_searchBarSize.x = m_transformedArea.x + m_transformedArea.width - 270 - TabX;
string currentFocus = GUI.GetNameOfFocusedControl();
if ( Event.current.type == EventType.KeyDown )
{
KeyCode keyCode = Event.current.keyCode;
if ( Event.current.shift )
{
if ( keyCode == KeyCode.F3 ||
( ( keyCode == KeyCode.KeypadEnter || keyCode == KeyCode.Return ) &&
( currentFocus.Equals( SearchBarId ) || string.IsNullOrEmpty( currentFocus ) ) ) )
SelectPrevious();
}
else
{
if ( keyCode == KeyCode.F3 ||
( ( keyCode == KeyCode.KeypadEnter || keyCode == KeyCode.Return ) &&
( currentFocus.Equals( SearchBarId ) || string.IsNullOrEmpty( currentFocus ) ) ) )
SelectNext();
}
}
if( currentFocus.Equals( SearchBarId ) || ( m_parentWindow.CameraDrawInfo.CurrentEventType == EventType.MouseDown && m_searchBarSize.Contains( m_parentWindow.CameraDrawInfo.MousePosition ) ) || m_selectSearchBarTextfield )
{
EditorGUI.BeginChangeCheck();
{
GUI.SetNextControlName( SearchBarId );
m_searchBarValue = EditorGUI.TextField( m_searchBarSize, m_searchBarValue, UIUtils.ToolbarSearchTextfield );
}
if ( EditorGUI.EndChangeCheck() )
{
m_refreshSearchResultList = true;
}
} else
{
GUI.Label( m_searchBarSize, m_searchBarValue, UIUtils.ToolbarSearchTextfield );
}
m_searchBarSize.x += m_searchBarSize.width;
if ( m_parentWindow.CameraDrawInfo.CurrentEventType == EventType.MouseDown && m_searchBarSize.Contains( m_parentWindow.CameraDrawInfo.MousePosition ) )
{
if ( string.IsNullOrEmpty( m_searchBarValue ) )
{
m_searchBarVisible = false;
m_refreshSearchResultList = false;
}
else
{
m_searchBarValue = string.Empty;
m_searchResultNodes.Clear();
m_currentSelected = -1;
}
}
GUI.Label( m_searchBarSize, string.Empty, UIUtils.ToolbarSearchCancelButton );
if ( Event.current.isKey && Event.current.keyCode == KeyCode.Escape )
{
m_searchBarVisible = false;
m_refreshSearchResultList = false;
GUI.FocusControl( null );
m_selectSearchBarTextfield = false;
}
if ( m_refreshSearchResultList && ( m_parentWindow.CurrentInactiveTime > InactivityRefreshTime ) )
{
RefreshList();
}
}
if ( m_selectSearchBarTextfield )
{
m_selectSearchBarTextfield = false;
EditorGUI.FocusTextInControl( SearchBarId );
//GUI.FocusControl( SearchBarId );
}
//if ( Event.current.control && Event.current.isKey && Event.current.keyCode == KeyCode.F && Event.current.type == EventType.KeyDown )
if( m_parentWindow.CurrentCommandName.Equals("Find") )
{
if ( !m_searchBarVisible )
{
m_searchBarVisible = true;
m_refreshSearchResultList = false;
}
m_selectSearchBarTextfield = true;
}
GUI.color = m_focusOnSelectionButton.IsInside( mousePosition ) ? RightIconsColorOn : RightIconsColorOff;
m_focusOnSelectionButton.Draw( m_transformedArea.x + m_transformedArea.width - 30 - TabX, TabY );
GUI.color = m_focusOnMasterNodeButton.IsInside( mousePosition ) ? RightIconsColorOn : RightIconsColorOff;
m_focusOnMasterNodeButton.Draw( m_transformedArea.x + m_transformedArea.width - 65 - TabX, TabY );
GUI.color = m_showInfoWindowButton.IsInside( mousePosition ) ? RightIconsColorOn : RightIconsColorOff;
m_showInfoWindowButton.Draw( m_transformedArea.x + m_transformedArea.width - 110 - TabX, TabY );
//GUI.color = m_showTipsWindowButton.IsInside( mousePosition ) ? RightIconsColorOn : RightIconsColorOff;
//m_showTipsWindowButton.Draw( m_transformedArea.x + m_transformedArea.width - 140 - TabX, TabY );
GUI.color = m_cleanUnusedNodesButton.IsInside( mousePosition ) ? RightIconsColorOn : RightIconsColorOff;
m_cleanUnusedNodesButton.Draw( m_transformedArea.x + m_transformedArea.width - 140 - TabX, TabY );
GUI.color = bufferedColor;
//GUI.color = m_showConsoleWindowButton.IsInside( mousePosition ) ? RightIconsColorOn : RightIconsColorOff;
//m_showConsoleWindowButton.Draw( m_transformedArea.x + m_transformedArea.width - 170 - TabX, TabY );
//GUI.color = bufferedColor;
}
public void OnNodeRemovedFromGraph( ParentNode node )
{
m_searchResultNodes.Remove( node );
}
int m_previousNodeCount = 0;
void RefreshList()
{
m_refreshSearchResultList = false;
m_currentSelected = -1;
m_searchResultNodes.Clear();
if ( !string.IsNullOrEmpty( m_searchBarValue ) )
{
List<ParentNode> nodes = m_parentWindow.CurrentGraph.AllNodes;
int count = nodes.Count;
m_previousNodeCount = count;
for ( int i = 0; i < count; i++ )
{
if ( nodes[ i ].TitleContent.text.IndexOf( m_searchBarValue, StringComparison.CurrentCultureIgnoreCase ) >= 0 )
{
m_searchResultNodes.Add( nodes[ i ] );
}
}
}
}
void SelectNext()
{
if ( m_refreshSearchResultList || m_parentWindow.CurrentGraph.AllNodes.Count != m_previousNodeCount )
{
RefreshList();
}
if ( m_searchResultNodes.Count > 0 )
{
m_currentSelected = ( m_currentSelected + 1 ) % m_searchResultNodes.Count;
m_parentWindow.FocusOnNode( m_searchResultNodes[ m_currentSelected ], 1, true ,true);
}
}
void SelectPrevious()
{
if ( m_refreshSearchResultList || m_parentWindow.CurrentGraph.AllNodes.Count != m_previousNodeCount )
{
RefreshList();
}
if ( m_searchResultNodes.Count > 0 )
{
m_currentSelected = ( m_currentSelected > 1 ) ? ( m_currentSelected - 1 ) : ( m_searchResultNodes.Count - 1 );
m_parentWindow.FocusOnNode( m_searchResultNodes[ m_currentSelected ], 1, true );
}
}
public void SetStateOnButton( ToolButtonType button, int state, string tooltip )
{
switch ( button )
{
case ToolButtonType.New:
case ToolButtonType.Open:
case ToolButtonType.Save:
case ToolButtonType.Library:
case ToolButtonType.Options:
case ToolButtonType.Help:
case ToolButtonType.MasterNode: break;
case ToolButtonType.OpenSourceCode:
{
m_openSourceCodeButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.Update:
{
m_updateButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.Live:
{
m_liveButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.CleanUnusedNodes:
//case eToolButtonType.SelectShader:
{
m_cleanUnusedNodesButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.FocusOnMasterNode:
{
m_focusOnMasterNodeButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.FocusOnSelection:
{
m_focusOnSelectionButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.ShowInfoWindow:
{
m_showInfoWindowButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.ShowTipsWindow:
{
m_showTipsWindowButton.SetStateOnButton( state, tooltip );
}
break;
case ToolButtonType.ShowConsole:
{
m_showConsoleWindowButton.SetStateOnButton( state, tooltip );
}
break;
}
}
public void SetStateOnButton( ToolButtonType button, int state )
{
switch ( button )
{
case ToolButtonType.New:
case ToolButtonType.Open:
case ToolButtonType.Save:
case ToolButtonType.Library:
case ToolButtonType.Options:
case ToolButtonType.Help:
case ToolButtonType.MasterNode: break;
case ToolButtonType.OpenSourceCode:
{
m_openSourceCodeButton.SetStateOnButton( state );
}
break;
case ToolButtonType.Update:
{
m_updateButton.SetStateOnButton( state );
}
break;
case ToolButtonType.Live:
{
m_liveButton.SetStateOnButton( state );
}
break;
case ToolButtonType.CleanUnusedNodes:
//case eToolButtonType.SelectShader:
{
m_cleanUnusedNodesButton.SetStateOnButton( state );
}
break;
case ToolButtonType.FocusOnMasterNode:
{
m_focusOnMasterNodeButton.SetStateOnButton( state );
}
break;
case ToolButtonType.FocusOnSelection:
{
m_focusOnSelectionButton.SetStateOnButton( state );
}
break;
case ToolButtonType.ShowInfoWindow:
{
m_showInfoWindowButton.SetStateOnButton( state );
}
break;
case ToolButtonType.ShowTipsWindow:
{
m_showTipsWindowButton.SetStateOnButton( state );
}break;
case ToolButtonType.ShowConsole:
{
m_showConsoleWindowButton.SetStateOnButton( state );
}
break;
}
}
public void DrawShaderTitle( MenuParent nodeParametersWindow, MenuParent paletteWindow, float availableCanvasWidth, float graphAreaHeight, string shaderName )
{
float leftAdjust = nodeParametersWindow.IsMaximized ? nodeParametersWindow.RealWidth : 0;
float rightAdjust = paletteWindow.IsMaximized ? 0 : paletteWindow.RealWidth;
m_boxRect = new Rect( leftAdjust + rightAdjust, 0, availableCanvasWidth, 35 );
m_boxRect.x += paletteWindow.IsMaximized ? 0 : -paletteWindow.RealWidth;
m_boxRect.width += nodeParametersWindow.IsMaximized ? 0 : nodeParametersWindow.RealWidth;
m_boxRect.width += paletteWindow.IsMaximized ? 0 : paletteWindow.RealWidth;
m_borderRect = new Rect( m_boxRect );
m_borderRect.height = graphAreaHeight;
if ( m_borderStyle == null )
{
m_borderStyle = ( ParentWindow.CurrentGraph.CurrentMasterNode == null ) ? UIUtils.GetCustomStyle( CustomStyle.ShaderFunctionBorder ) : UIUtils.GetCustomStyle( CustomStyle.ShaderBorder );
}
GUI.Label( m_borderRect, shaderName, m_borderStyle );
GUI.Label( m_boxRect, shaderName, UIUtils.GetCustomStyle( CustomStyle.MainCanvasTitle ) );
}
public override bool IsInside( Vector2 position )
{
if ( !m_isActive )
return false;
return m_boxRect.Contains( position ) || m_areaLeft.Contains( position ) || m_areaRight.Contains( position );
}
public GUIStyle BorderStyle
{
get { return m_borderStyle; }
set { m_borderStyle = value; }
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsWindow.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsWindow.cs",
"repo_id": "jynew",
"token_count": 7362
}
| 858 |
fileFormatVersion: 2
guid: 833b18e1479dbd24c80c5b990e16e2bb
timeCreated: 1499769855
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GlobalArrayNode.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GlobalArrayNode.cs.meta",
"repo_id": "jynew",
"token_count": 102
}
| 859 |
fileFormatVersion: 2
guid: c05dde3330017da48b3d0245c3c4106c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen.meta",
"repo_id": "jynew",
"token_count": 70
}
| 860 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Time Parameters", "Time", "Time since level load" )]
public sealed class TimeNode : ConstVecShaderVariable
{
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
ChangeOutputName( 1, "t/20" );
ChangeOutputName( 2, "t" );
ChangeOutputName( 3, "t*2" );
ChangeOutputName( 4, "t*3" );
m_value = "_Time";
m_previewShaderGUID = "73abc10c8d1399444827a7eeb9c24c2a";
}
public override void RefreshExternalReferences()
{
base.RefreshExternalReferences();
if( !m_outputPorts[ 0 ].IsConnected )
{
m_outputPorts[ 0 ].Visible = false;
m_sizeIsDirty = true;
}
}
//public override void AfterPreviewRefresh()
//{
// base.AfterPreviewRefresh();
// MarkForPreviewUpdate();
//}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs",
"repo_id": "jynew",
"token_count": 374
}
| 861 |
fileFormatVersion: 2
guid: d9e2a5077cc29de439d5c845eac35a04
timeCreated: 1481126959
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/WorldToObjectMatrix.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Transform/WorldToObjectMatrix.cs.meta",
"repo_id": "jynew",
"token_count": 103
}
| 862 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "World Transform Params", "Object Transform", "World Transform Params contains information about the transform, W is usually 1.0, or -1.0 for odd-negative scale transforms" )]
public sealed class WorldTransformParams : ConstVecShaderVariable
{
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
ChangeOutputName( 1, "X" );
ChangeOutputName( 2, "Y" );
ChangeOutputName( 3, "Z" );
ChangeOutputName( 4, "W" );
m_value = "unity_WorldTransformParams";
m_previewShaderGUID = "5a2642605f085da458d6e03ade47b87a";
}
public override void RefreshExternalReferences()
{
base.RefreshExternalReferences();
if( !m_outputPorts[ 0 ].IsConnected )
{
m_outputPorts[ 0 ].Visible = false;
m_sizeIsDirty = true;
}
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Various/WorldTransformParams.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Various/WorldTransformParams.cs",
"repo_id": "jynew",
"token_count": 356
}
| 863 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
using System.Collections.Generic;
using UnityEngine;
namespace AmplifyShaderEditor
{
[Serializable]
public class CustomNodeOutputData
{
public string expression;
public string name;
public List<CustomNodeInputData> inputData;
public CustomNodeOutputData( string newName, string newExpression )
{
name = newName;
expression = newExpression;
inputData = new List<CustomNodeInputData>();
}
public void Destroy()
{
inputData.Clear();
inputData = null;
}
public override string ToString()
{
string result = "name: " + name + " outputExpression: " + expression + '\n';
for ( int i = 0; i < inputData.Count; i++ )
{
result += inputData[ i ].ToString() + '\n';
}
return result;
}
}
[Serializable]
public class CustomNodeInputData
{
public int index;
public int length;
public string name;
public CustomNodeInputData( int newIndex, int newLength, string newName )
{
index = newIndex;
length = newLength;
name = newName;
}
public override string ToString()
{
return "index: " + index + " length: " + length + " name: " + name;
}
}
[Serializable]
public class CustomNode : ParentNode
{
[SerializeField]
private List<string> m_includes;
[SerializeField]
private List<CustomNodeOutputData> m_outputData;
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
m_outputData = new List<CustomNodeOutputData>();
}
public void AddIncludes( string newInclude )
{
m_includes.Add( newInclude );
}
protected void AddOutputsFromString( string outputName, string output )
{
AddOutputPort( WirePortDataType.OBJECT, outputName );
CustomNodeOutputData currOutputData = new CustomNodeOutputData( outputName, output );
// Get existing input nodes so we can test for duplicates
Dictionary<string, InputPort> existingPorts = InputPortsDict;
// Create dictionary to prevent duplicates when dealing with expresssions with multiple occurences of an input
Dictionary<string, string> inputDuplicatePrevention = new Dictionary<string, string>();
// Get all inputs on the expression and save their info
int[] indexes = output.AllIndexesOf( Constants.CNIP );
for ( int i = 0; i < indexes.Length; i++ )
{
string name = output.Substring( indexes[ i ], Constants.CNIP.Length + 1 );
currOutputData.inputData.Add( new CustomNodeInputData( indexes[ i ], Constants.CNIP.Length + 1, name ) );
if ( !inputDuplicatePrevention.ContainsKey( name ) && !existingPorts.ContainsKey( name ) )
{
inputDuplicatePrevention.Add( name, name );
AddInputPort( WirePortDataType.OBJECT, false, name );
}
}
inputDuplicatePrevention.Clear();
inputDuplicatePrevention = null;
existingPorts.Clear();
existingPorts = null;
m_outputData.Add( currOutputData );
}
public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
{
base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar );
if ( outputId < m_outputData.Count )
{
Dictionary<string, InputPort> inputs = InputPortsDict;
string value = m_outputData[ outputId ].expression;
for ( int i = 0; i < m_outputData[ outputId ].inputData.Count; i++ )
{
if ( inputs.ContainsKey( m_outputData[ outputId ].inputData[ i ].name ) )
{
InputPort inputPort = inputs[ m_outputData[ outputId ].inputData[ i ].name ];
if ( inputPort != null )
{
string inputValue = inputPort.GenerateShaderForOutput( ref dataCollector, WirePortDataType.OBJECT, ignoreLocalvar );
value = value.Replace( m_outputData[ outputId ].inputData[ i ].name, inputValue );
}
else
{
UIUtils.ShowMessage( m_outputData[ outputId ].inputData[ i ].name + " invalid on the inputs list", MessageSeverity.Error );
return string.Empty;
}
}
else
{
UIUtils.ShowMessage( m_outputData[ outputId ].inputData[ i ].name + " Not found on the inputs list", MessageSeverity.Error );
return string.Empty;
}
}
return value;
}
return string.Empty;
}
public void DumpOutputData()
{
for ( int i = 0; i < m_outputData.Count; i++ )
{
Debug.Log( m_outputData[ i ] );
}
}
public override void Destroy()
{
base.Destroy();
if ( m_outputData != null )
{
for ( int i = 0; i < m_outputData.Count; i++ )
{
m_outputData[ i ].Destroy();
}
m_outputData.Clear();
m_outputData = null;
}
if ( m_includes != null )
{
m_includes.Clear();
m_includes = null;
}
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/CustomNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/CustomNode.cs",
"repo_id": "jynew",
"token_count": 1801
}
| 864 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
//https://www.shadertoy.com/view/ldX3D4
using UnityEngine;
using UnityEditor;
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Posterize", "Image Effects", "Converts a continuous gradation of tones to multiple regions of fewer tones" )]
public sealed class PosterizeNode : ParentNode
{
private const string PosterizationPowerStr = "Power";
[SerializeField]
private int m_posterizationPower = 1;
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
AddInputPort( WirePortDataType.COLOR, false, "RGBA", -1, MasterNodePortCategory.Fragment, 1 );
AddInputPort( WirePortDataType.INT, false, "Power", -1, MasterNodePortCategory.Fragment, 0 );
m_inputPorts[ 1 ].AutoDrawInternalData = true;
AddOutputPort( WirePortDataType.COLOR, Constants.EmptyPortValue );
m_textLabelWidth = 60;
m_autoWrapProperties = true;
m_previewShaderGUID = "ecb3048ef0eec1645bad1d72a98d8279";
}
public override void DrawProperties()
{
base.DrawProperties();
if( !m_inputPorts[ 1 ].IsConnected )
{
EditorGUILayout.BeginVertical();
{
EditorGUI.BeginChangeCheck();
m_posterizationPower = EditorGUILayoutIntSlider( PosterizationPowerStr, m_posterizationPower, 1, 256 );
if( EditorGUI.EndChangeCheck() )
{
GetInputPortByUniqueId( 0 ).IntInternalData = m_posterizationPower;
}
}
EditorGUILayout.EndVertical();
}
else
{
EditorGUILayout.Space();
}
}
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 posterizationPower = "1";
if( m_inputPorts[ 1 ].IsConnected )
{
posterizationPower = m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector );
}
else
{
posterizationPower = m_posterizationPower.ToString();
}
string colorTarget = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
string divVar = "div" + OutputId;
dataCollector.AddLocalVariable( UniqueId, "float " + divVar + "=256.0/float(" + posterizationPower + ");" );
string result = "( floor( " + colorTarget + " * " + divVar + " ) / " + divVar + " )";
RegisterLocalVariable( 0, result, ref dataCollector, "posterize" + OutputId );
return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory );
}
public override void RefreshExternalReferences()
{
base.RefreshExternalReferences();
m_inputPorts[ 0 ].ChangeType( WirePortDataType.COLOR, false );
m_inputPorts[ 1 ].ChangeType( WirePortDataType.INT, false );
}
public override void WriteToString( ref string nodeInfo, ref string connectionsInfo )
{
base.WriteToString( ref nodeInfo, ref connectionsInfo );
IOUtils.AddFieldValueToString( ref nodeInfo, m_posterizationPower );
}
public override void ReadFromString( ref string[] nodeParams )
{
base.ReadFromString( ref nodeParams );
m_posterizationPower = Convert.ToInt32( GetCurrentParam( ref nodeParams ) );
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/ImageEffects/PosterizeNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/ImageEffects/PosterizeNode.cs",
"repo_id": "jynew",
"token_count": 1183
}
| 865 |
fileFormatVersion: 2
guid: d6d04219b3c5c5a4282aa9a763b9ad3c
timeCreated: 1481126959
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/LogicalOperators/TFHCCompareEqual.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/LogicalOperators/TFHCCompareEqual.cs.meta",
"repo_id": "jynew",
"token_count": 105
}
| 866 |
fileFormatVersion: 2
guid: 67238b98f61049c45b496af625863edf
timeCreated: 1481646118
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/LogicalOperators/TFHCStub.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/LogicalOperators/TFHCStub.cs.meta",
"repo_id": "jynew",
"token_count": 98
}
| 867 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
using UnityEngine;
using UnityEditor;
namespace AmplifyShaderEditor
{
[Serializable]
class ColorMaskHelper
{
private GUIContent ColorMaskContent = new GUIContent( "Color Mask", "Sets color channel writing mask, turning all off makes the object completely invisible\nDefault: RGBA" );
private readonly char[] m_colorMaskChar = { 'R', 'G', 'B', 'A' };
private GUIStyle m_leftToggleColorMask;
private GUIStyle m_middleToggleColorMask;
private GUIStyle m_rightToggleColorMask;
[SerializeField]
private bool[] m_colorMask = { true, true, true, true };
[SerializeField]
private InlineProperty m_inlineMask = new InlineProperty();
public void Draw( UndoParentNode owner )
{
m_inlineMask.CustomDrawer( ref owner, DrawColorMaskControls, ColorMaskContent.text );
}
private void DrawColorMaskControls( UndoParentNode owner )
{
if( m_leftToggleColorMask == null || m_leftToggleColorMask.normal.background == null )
{
m_leftToggleColorMask = GUI.skin.GetStyle( "miniButtonLeft" );
}
if( m_middleToggleColorMask == null || m_middleToggleColorMask.normal.background == null )
{
m_middleToggleColorMask = GUI.skin.GetStyle( "miniButtonMid" );
}
if( m_rightToggleColorMask == null || m_rightToggleColorMask.normal.background == null )
{
m_rightToggleColorMask = GUI.skin.GetStyle( "miniButtonRight" );
}
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField( ColorMaskContent, GUILayout.Width( 90 ) );
m_colorMask[ 0 ] = owner.GUILayoutToggle( m_colorMask[ 0 ], "R", m_leftToggleColorMask );
m_colorMask[ 1 ] = owner.GUILayoutToggle( m_colorMask[ 1 ], "G", m_middleToggleColorMask );
m_colorMask[ 2 ] = owner.GUILayoutToggle( m_colorMask[ 2 ], "B", m_middleToggleColorMask );
m_colorMask[ 3 ] = owner.GUILayoutToggle( m_colorMask[ 3 ], "A", m_rightToggleColorMask );
EditorGUILayout.EndHorizontal();
}
public void BuildColorMask( ref string ShaderBody, bool customBlendAvailable )
{
int count = 0;
string colorMask = string.Empty;
for( int i = 0; i < m_colorMask.Length; i++ )
{
if( m_colorMask[ i ] )
{
count++;
colorMask += m_colorMaskChar[ i ];
}
}
if( ( count != m_colorMask.Length && customBlendAvailable ) || m_inlineMask.Active )
{
MasterNode.AddRenderState( ref ShaderBody, "ColorMask", m_inlineMask.GetValueOrProperty( ( ( count == 0 ) ? "0" : colorMask ) ) );
}
}
public void ReadFromString( ref uint index, ref string[] nodeParams )
{
for( int i = 0; i < m_colorMask.Length; i++ )
{
m_colorMask[ i ] = Convert.ToBoolean( nodeParams[ index++ ] );
}
if( UIUtils.CurrentShaderVersion() > 14501 )
m_inlineMask.ReadFromString( ref index, ref nodeParams );
}
public void WriteToString( ref string nodeInfo )
{
for( int i = 0; i < m_colorMask.Length; i++ )
{
IOUtils.AddFieldValueToString( ref nodeInfo, m_colorMask[ i ] );
}
m_inlineMask.WriteToString( ref nodeInfo );
}
public void Destroy()
{
m_leftToggleColorMask = null;
m_middleToggleColorMask = null;
m_rightToggleColorMask = null;
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/ColorMaskHelper.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/ColorMaskHelper.cs",
"repo_id": "jynew",
"token_count": 1245
}
| 868 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using UnityEngine;
using UnityEditor;
using System;
using System.Collections.Generic;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Function Switch", "Functions", "Function Switch allows switching options at compile time for shader function", NodeAvailabilityFlags = (int)NodeAvailability.ShaderFunction )]
public sealed class FunctionSwitch : ParentNode
{
private const string InputPortNameStr = "In ";
private const string ToggleFalseStr = "False";
private const string ToggleTrueStr = "True";
private const string CurrSelectedStr = "Current";
private const string MaxAmountStr = "Amount";
private const int MaxAllowedAmount = 9;
private const int MinComboSize = 50;
private const int MaxComboSize = 105;
[SerializeField]
private string m_optionLabel = "Option";
[SerializeField]
private string[] AvailableInputsLabels = { "In 0", "In 1" };
[SerializeField]
private int[] AvailableInputsValues = { 0, 1 };
[SerializeField]
private int m_previousSelectedInput = 0;
[SerializeField]
private int m_currentSelectedInput = 0;
[SerializeField]
private int m_maxAmountInputs = 2;
[SerializeField]
private bool m_toggleMode = false;
[SerializeField]
private string[] m_optionNames = { "In 0", "In 1", "In 2", "In 3", "In 4", "In 5", "In 6", "In 7", "In 8" };
[SerializeField]
private int m_orderIndex = -1;
[SerializeField]
private TexReferenceType m_referenceType = TexReferenceType.Object;
[SerializeField]
private FunctionSwitch m_functionSwitchReference = null;
[SerializeField]
private int m_referenceUniqueId = -1;
[SerializeField]
private bool m_validReference = false;
private bool m_asDrawn = false;
private GUIContent m_checkContent;
private GUIContent m_popContent;
private const double MaxTimestamp = 1;
private bool m_nameModified = false;
private double m_lastTimeNameModified = 0;
private Rect m_varRect;
private Rect m_imgRect;
private bool m_editing;
private int m_cachedPropertyId = -1;
[SerializeField]
private int m_refMaxInputs = -1;
[SerializeField]
private string m_refOptionLabel = string.Empty;
[SerializeField]
private int m_refSelectedInput = -1;
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
for( int i = 0; i < MaxAllowedAmount; i++ )
{
AddInputPort( WirePortDataType.FLOAT, false, InputPortNameStr + i );
m_inputPorts[ i ].Visible = ( i < 2 );
}
AddOutputPort( WirePortDataType.FLOAT, " " );
m_checkContent = new GUIContent();
m_checkContent.image = UIUtils.CheckmarkIcon;
m_popContent = new GUIContent();
m_popContent.image = UIUtils.PopupIcon;
m_textLabelWidth = 100;
m_autoWrapProperties = true;
m_insideSize.Set( 80, 25 );
m_previewShaderGUID = "a58e46feaa5e3d14383bfeac24d008bc";
}
public void SetCurrentSelectedInput( int newValue, int prevValue )
{
m_previousSelectedInput = prevValue;
if( m_validReference )
m_currentSelectedInput = Mathf.Clamp( newValue, 0, m_refMaxInputs - 1 );
else
m_currentSelectedInput = Mathf.Clamp( newValue, 0, m_maxAmountInputs - 1 );
m_outputPorts[ 0 ].ChangeType( m_inputPorts[ m_currentSelectedInput ].DataType, false );
ChangeSignalPropagation();
}
public int GetCurrentSelectedInput()
{
return m_currentSelectedInput;
}
public override void SetPreviewInputs()
{
base.SetPreviewInputs();
if( m_cachedPropertyId == -1 )
m_cachedPropertyId = Shader.PropertyToID( "_Current" );
PreviewMaterial.SetInt( m_cachedPropertyId, m_currentSelectedInput );
}
protected override void OnUniqueIDAssigned()
{
base.OnUniqueIDAssigned();
if( m_referenceType == TexReferenceType.Object )
{
UIUtils.RegisterFunctionSwitchNode( this );
}
else
{
UIUtils.RegisterFunctionSwitchNode( this );
UIUtils.RegisterFunctionSwitchCopyNode( this );
}
}
public override void Destroy()
{
base.Destroy();
m_functionSwitchReference = null;
m_referenceUniqueId = -1;
if( m_referenceType == TexReferenceType.Object )
{
UIUtils.UnregisterFunctionSwitchNode( this );
}
else
{
UIUtils.UnregisterFunctionSwitchNode( this );
UIUtils.UnregisterFunctionSwitchCopyNode( this );
}
}
public override void OnConnectedOutputNodeChanges( int portId, int otherNodeId, int otherPortId, string name, WirePortDataType type )
{
base.OnConnectedOutputNodeChanges( portId, otherNodeId, otherPortId, name, type );
m_inputPorts[ portId ].MatchPortToConnection();
if( portId == m_currentSelectedInput )
m_outputPorts[ 0 ].ChangeType( m_inputPorts[ portId ].DataType, false );
}
public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true )
{
InputPort port = GetInputPortByUniqueId( portId );
int arrayPos = m_inputPorts.IndexOf( port );
if( activateNode && m_connStatus == NodeConnectionStatus.Connected && arrayPos == m_currentSelectedInput )
{
port.GetOutputNode().ActivateNode( m_activeNode, m_activePort, m_activeType );
}
OnNodeChange();
SetSaveIsDirty();
m_inputPorts[ portId ].MatchPortToConnection();
if( arrayPos == m_currentSelectedInput )
m_outputPorts[ 0 ].ChangeType( m_inputPorts[ portId ].DataType, false );
}
public override void ActivateNode( int signalGenNodeId, int signalGenPortId, Type signalGenNodeType )
{
if( m_selfPowered )
return;
ConnStatus = m_restrictions.GetRestiction( signalGenNodeType, signalGenPortId ) ? NodeConnectionStatus.Error : NodeConnectionStatus.Connected;
m_activeConnections += 1;
m_activeType = signalGenNodeType;
m_activeNode = signalGenNodeId;
m_activePort = signalGenPortId;
if( m_activeConnections == 1 )
if( m_inputPorts[ m_currentSelectedInput ].IsConnected )
m_inputPorts[ m_currentSelectedInput ].GetOutputNode().ActivateNode( signalGenNodeId, signalGenPortId, signalGenNodeType );
SetSaveIsDirty();
}
public override void DeactivateInputPortNode( int deactivatedPort, bool forceComplete )
{
InputPort port = GetInputPortByUniqueId( deactivatedPort );
if( deactivatedPort == m_currentSelectedInput )
port.GetOutputNode().DeactivateNode( deactivatedPort, false );
}
public override void DeactivateNode( int deactivatedPort, bool forceComplete )
{
if( m_selfPowered )
return;
SetSaveIsDirty();
m_activeConnections -= 1;
if( ( forceComplete || m_activeConnections <= 0 ) )
{
m_activeConnections = 0;
ConnStatus = NodeConnectionStatus.Not_Connected;
for( int i = 0; i < m_inputPorts.Count; i++ )
{
if( m_inputPorts[ i ].IsConnected && i == m_currentSelectedInput )
{
ParentNode node = m_inputPorts[ i ].GetOutputNode();
if( node != null )
node.DeactivateNode( deactivatedPort == -1 ? m_inputPorts[ i ].PortId : deactivatedPort, false );
}
}
}
}
public void ChangeSignalPropagation()
{
if( m_previousSelectedInput != m_currentSelectedInput && ConnStatus == NodeConnectionStatus.Connected )
{
if( m_inputPorts[ m_previousSelectedInput ].IsConnected )
m_inputPorts[ m_previousSelectedInput ].GetOutputNode().DeactivateNode( m_inputPorts[ m_previousSelectedInput ].PortId, false );
if( m_inputPorts[ m_currentSelectedInput ].IsConnected )
m_inputPorts[ m_currentSelectedInput ].GetOutputNode().ActivateNode( UniqueId, m_inputPorts[ m_currentSelectedInput ].PortId, m_activeType );
}
}
public bool DrawOption( ParentNode owner, bool forceDraw = false )
{
if( !IsConnected && !forceDraw )
{
//EditorGUILayout.LabelField( "Not Connected" );
return false;
}
if( m_asDrawn ) //used to prevent the same property to be drawn more than once
return false;
if( m_validReference )
{
return m_functionSwitchReference.DrawOption( owner, true );
}
int prev = m_currentSelectedInput;
m_asDrawn = true;
if( m_toggleMode )
{
m_currentSelectedInput = owner.EditorGUILayoutToggle( m_optionLabel, ( m_currentSelectedInput != 0 ? true : false ) ) ? 1 : 0;
if( m_currentSelectedInput != prev )
{
SetCurrentSelectedInput( m_currentSelectedInput, prev );
return true;
}
else
{
return false;
}
}
else
{
m_currentSelectedInput = owner.EditorGUILayoutIntPopup( m_optionLabel, m_currentSelectedInput, AvailableInputsLabels, AvailableInputsValues );
if( m_currentSelectedInput != prev )
{
SetCurrentSelectedInput( m_currentSelectedInput, prev );
return true;
}
else
{
return false;
}
}
}
public void CheckReference()
{
if( m_referenceType != TexReferenceType.Instance )
{
m_validReference = false;
return;
}
if( m_functionSwitchReference == null )
{
m_validReference = false;
ResetToSelf();
return;
}
if( m_referenceUniqueId != m_functionSwitchReference.UniqueId )
{
UpdateFromSelected();
}
if( m_refSelectedInput != m_functionSwitchReference.GetCurrentSelectedInput() || m_refMaxInputs != m_functionSwitchReference.MaxAmountInputs || m_refOptionLabel != m_functionSwitchReference.OptionLabel )
{
UpdateFromSelected();
}
m_validReference = true;
}
void ResetToSelf()
{
m_functionSwitchReference = null;
m_validReference = false;
m_referenceUniqueId = -1;
m_refMaxInputs = -1;
m_refOptionLabel = string.Empty;
m_refSelectedInput = -1;
for( int i = 0; i < MaxAllowedAmount; i++ )
{
m_inputPorts[ i ].Visible = ( i < m_maxAmountInputs );
m_inputPorts[ i ].Name = m_optionNames[ i ];
}
if( m_currentSelectedInput >= m_maxAmountInputs )
{
m_currentSelectedInput = m_maxAmountInputs - 1;
}
UpdateLabels();
m_sizeIsDirty = true;
}
void UpdateFromSelected()
{
if( m_referenceUniqueId < 0 )
return;
m_functionSwitchReference = UIUtils.GetNode( m_referenceUniqueId ) as FunctionSwitch;
if( m_functionSwitchReference != null )
{
m_validReference = true;
for( int i = 0; i < MaxAllowedAmount; i++ )
{
m_inputPorts[ i ].Visible = ( i < m_functionSwitchReference.MaxAmountInputs );
m_inputPorts[ i ].Name = m_functionSwitchReference.InputPorts[ i ].Name;
}
UpdateLabels();
m_refMaxInputs = m_functionSwitchReference.m_maxAmountInputs;
m_refOptionLabel = m_functionSwitchReference.OptionLabel;
m_refSelectedInput = m_functionSwitchReference.GetCurrentSelectedInput();
SetCurrentSelectedInput( m_functionSwitchReference.GetCurrentSelectedInput(), m_currentSelectedInput );
}
m_sizeIsDirty = true;
m_isDirty = true;
}
public override void DrawProperties()
{
base.DrawProperties();
EditorGUI.BeginChangeCheck();
m_referenceType = (TexReferenceType)EditorGUILayoutPopup( Constants.ReferenceTypeStr, (int)m_referenceType, Constants.ReferenceArrayLabels );
if( EditorGUI.EndChangeCheck() )
{
if( m_referenceType == TexReferenceType.Object )
{
UIUtils.UnregisterFunctionSwitchCopyNode( this );
//UIUtils.RegisterFunctionSwitchNode( this );
ResetToSelf();
}
else
{
//UIUtils.UnregisterFunctionSwitchNode( this );
UIUtils.RegisterFunctionSwitchCopyNode( this );
}
}
if( m_referenceType == TexReferenceType.Instance )
{
EditorGUI.BeginChangeCheck();
string[] arr = new string[ UIUtils.FunctionSwitchList().Count ];
int[] ids = new int[ UIUtils.FunctionSwitchList().Count ];
for( int i = 0; i < arr.Length; i++ )
{
arr[ i ] = i + " - " + UIUtils.FunctionSwitchList()[ i ].OptionLabel;
ids[ i ] = UIUtils.FunctionSwitchList()[ i ].UniqueId;
}
m_referenceUniqueId = EditorGUILayout.IntPopup( Constants.AvailableReferenceStr, m_referenceUniqueId, arr, ids );
if( EditorGUI.EndChangeCheck() )
{
UpdateFromSelected();
}
return;
}
EditorGUI.BeginChangeCheck();
m_optionLabel = EditorGUILayoutTextField( "Option Label", m_optionLabel );
if( EditorGUI.EndChangeCheck() )
{
m_optionLabel = UIUtils.RemoveInvalidEnumCharacters( m_optionLabel );
if( string.IsNullOrEmpty( m_optionLabel ) )
{
m_optionLabel = "Option";
}
UIUtils.UpdateFunctionSwitchData( UniqueId, m_optionLabel );
}
EditorGUI.BeginChangeCheck();
m_toggleMode = EditorGUILayoutToggle( "Toggle Mode", m_toggleMode );
if( EditorGUI.EndChangeCheck() )
{
if( m_toggleMode )
{
m_inputPorts[ 0 ].Name = ToggleFalseStr;
m_inputPorts[ 1 ].Name = ToggleTrueStr;
for( int i = 0; i < MaxAllowedAmount; i++ )
{
m_inputPorts[ i ].Visible = ( i < 2 );
}
if( m_currentSelectedInput >= 2 )
{
m_currentSelectedInput = 1;
}
UpdateLabels();
m_sizeIsDirty = true;
}
else
{
m_inputPorts[ 0 ].Name = m_optionNames[ 0 ];
m_inputPorts[ 1 ].Name = m_optionNames[ 1 ];
for( int i = 0; i < MaxAllowedAmount; i++ )
{
m_inputPorts[ i ].Visible = ( i < m_maxAmountInputs );
}
if( m_currentSelectedInput >= m_maxAmountInputs )
{
m_currentSelectedInput = m_maxAmountInputs - 1;
}
UpdateLabels();
m_sizeIsDirty = true;
}
}
if( !m_toggleMode )
{
EditorGUI.BeginChangeCheck();
m_maxAmountInputs = EditorGUILayoutIntSlider( MaxAmountStr, m_maxAmountInputs, 2, MaxAllowedAmount );
if( EditorGUI.EndChangeCheck() )
{
for( int i = 0; i < MaxAllowedAmount; i++ )
{
m_inputPorts[ i ].Visible = ( i < m_maxAmountInputs );
}
if( m_currentSelectedInput >= m_maxAmountInputs )
{
m_currentSelectedInput = m_maxAmountInputs - 1;
}
UpdateLabels();
m_sizeIsDirty = true;
}
EditorGUI.indentLevel++;
for( int i = 0; i < m_maxAmountInputs; i++ )
{
EditorGUI.BeginChangeCheck();
m_inputPorts[ i ].Name = EditorGUILayoutTextField( "Item " + i, m_inputPorts[ i ].Name );
if( EditorGUI.EndChangeCheck() )
{
m_nameModified = true;
m_lastTimeNameModified = EditorApplication.timeSinceStartup;
m_inputPorts[ i ].Name = UIUtils.RemoveInvalidEnumCharacters( m_inputPorts[ i ].Name );
m_optionNames[ i ] = m_inputPorts[ i ].Name;
if( string.IsNullOrEmpty( m_inputPorts[ i ].Name ) )
{
m_inputPorts[ i ].Name = InputPortNameStr + i;
}
m_sizeIsDirty = true;
}
}
EditorGUI.indentLevel--;
if( m_nameModified )
{
UpdateLabels();
}
}
if( m_toggleMode )
{
EditorGUI.BeginChangeCheck();
int prevVal = m_currentSelectedInput;
m_currentSelectedInput = EditorGUILayoutToggle( CurrSelectedStr, ( m_currentSelectedInput != 0 ? true : false ) ) ? 1 : 0;
if( EditorGUI.EndChangeCheck() )
SetCurrentSelectedInput( m_currentSelectedInput, prevVal );
}
else
{
EditorGUI.BeginChangeCheck();
int prevVal = m_currentSelectedInput;
m_currentSelectedInput = EditorGUILayoutIntPopup( CurrSelectedStr, m_currentSelectedInput, AvailableInputsLabels, AvailableInputsValues );
if( EditorGUI.EndChangeCheck() )
{
SetCurrentSelectedInput( m_currentSelectedInput, prevVal );
}
}
}
public override void RefreshExternalReferences()
{
base.RefreshExternalReferences();
if( UIUtils.CurrentShaderVersion() > 14205 )
{
if( m_referenceType == TexReferenceType.Instance )
{
m_functionSwitchReference = UIUtils.GetNode( m_referenceUniqueId ) as FunctionSwitch;
UpdateFromSelected();
}
}
SetCurrentSelectedInput( m_currentSelectedInput, m_previousSelectedInput );
}
public void UpdateLabels()
{
int maxinputs = m_maxAmountInputs;
if( m_validReference )
maxinputs = m_functionSwitchReference.MaxAmountInputs;
AvailableInputsLabels = new string[ maxinputs ];
AvailableInputsValues = new int[ maxinputs ];
for( int i = 0; i < maxinputs; i++ )
{
AvailableInputsLabels[ i ] = m_optionNames[ i ];
AvailableInputsValues[ i ] = i;
}
}
public override void OnNodeLogicUpdate( DrawInfo drawInfo )
{
base.OnNodeLogicUpdate( drawInfo );
CheckReference();
}
public override void OnNodeLayout( DrawInfo drawInfo )
{
float finalSize = 0;
if( !m_toggleMode )
{
GUIContent dropdown = new GUIContent( m_inputPorts[ m_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 );
bool toggleMode = m_toggleMode;
if( m_validReference )
{
toggleMode = m_functionSwitchReference.m_toggleMode;
}
if( toggleMode )
{
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 )
{
if( m_validReference )
{
base.DrawGUIControls( drawInfo );
}
else
{
base.DrawGUIControls( drawInfo );
if( drawInfo.CurrentEventType != EventType.MouseDown )
return;
if( m_varRect.Contains( drawInfo.MousePosition ) )
{
m_editing = true;
}
else if( m_editing )
{
m_editing = false;
}
}
}
public override void Draw( DrawInfo drawInfo )
{
base.Draw( drawInfo );
if( m_nameModified )
{
if( ( EditorApplication.timeSinceStartup - m_lastTimeNameModified ) > MaxTimestamp )
{
m_nameModified = false;
}
}
if( m_validReference )
{
SetAdditonalTitleTextOnCallback( m_functionSwitchReference.OptionLabel, ( instance, newSubTitle ) => instance.AdditonalTitleContent.text = string.Format( Constants.SubTitleVarNameFormatStr, newSubTitle ) );
}
else
{
SetAdditonalTitleTextOnCallback( m_optionLabel, ( instance, newSubTitle ) => instance.AdditonalTitleContent.text = string.Format( Constants.SubTitleValueFormatStr, newSubTitle ) );
if( m_editing )
{
if( m_toggleMode )
{
if( GUI.Button( m_varRect, GUIContent.none, UIUtils.GraphButton ) )
{
int prevVal = m_currentSelectedInput;
m_currentSelectedInput = m_currentSelectedInput == 1 ? 0 : 1;
if( m_currentSelectedInput != prevVal )
SetCurrentSelectedInput( m_currentSelectedInput, prevVal );
m_editing = false;
}
if( m_currentSelectedInput == 1 )
{
GUI.Label( m_varRect, m_checkContent, UIUtils.GraphButtonIcon );
}
}
else
{
EditorGUI.BeginChangeCheck();
int prevVal = m_currentSelectedInput;
m_currentSelectedInput = EditorGUIIntPopup( m_varRect, m_currentSelectedInput, AvailableInputsLabels, AvailableInputsValues, UIUtils.GraphDropDown );
if( EditorGUI.EndChangeCheck() )
{
SetCurrentSelectedInput( m_currentSelectedInput, prevVal );
m_editing = false;
}
}
}
}
}
public override void OnNodeRepaint( DrawInfo drawInfo )
{
base.OnNodeRepaint( drawInfo );
if( !m_isVisible )
return;
if( ContainerGraph.LodLevel <= ParentGraph.NodeLOD.LOD2 )
{
if( m_validReference )
{
bool cacheState = GUI.enabled;
GUI.enabled = false;
if( m_functionSwitchReference.m_toggleMode )
{
GUI.Label( m_varRect, GUIContent.none, UIUtils.GraphButton );
if( m_functionSwitchReference.GetCurrentSelectedInput() == 1 )
{
GUI.Label( m_varRect, m_checkContent, UIUtils.GraphButtonIcon );
}
}
else
{
GUI.Label( m_varRect, m_functionSwitchReference.AvailableInputsLabels[ m_currentSelectedInput ], UIUtils.GraphDropDown );
}
GUI.enabled = cacheState;
}
else
{
if( !m_editing )
{
if( m_toggleMode )
{
GUI.Label( m_varRect, GUIContent.none, UIUtils.GraphButton );
if( m_currentSelectedInput == 1 )
{
GUI.Label( m_varRect, m_checkContent, UIUtils.GraphButtonIcon );
}
}
else
{
GUI.Label( m_varRect, AvailableInputsLabels[ m_currentSelectedInput ], UIUtils.GraphDropDown );
GUI.Label( m_imgRect, m_popContent, UIUtils.GraphButtonIcon );
}
}
}
}
}
public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
{
return m_inputPorts[ m_currentSelectedInput ].GeneratePortInstructions( ref dataCollector );
}
public override void ReadFromString( ref string[] nodeParams )
{
base.ReadFromString( ref nodeParams );
m_optionLabel = GetCurrentParam( ref nodeParams );
m_toggleMode = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) );
m_currentSelectedInput = Convert.ToInt32( GetCurrentParam( ref nodeParams ) );
m_previousSelectedInput = m_currentSelectedInput;
m_maxAmountInputs = Convert.ToInt32( GetCurrentParam( ref nodeParams ) );
m_orderIndex = Convert.ToInt32( GetCurrentParam( ref nodeParams ) );
for( int i = 0; i < MaxAllowedAmount; i++ )
{
m_inputPorts[ i ].Visible = ( i < m_maxAmountInputs );
}
if( m_currentSelectedInput >= m_maxAmountInputs )
{
m_currentSelectedInput = m_maxAmountInputs - 1;
}
for( int i = 0; i < m_maxAmountInputs; i++ )
{
m_optionNames[ i ] = GetCurrentParam( ref nodeParams );
m_inputPorts[ i ].Name = m_optionNames[ i ];
}
if( m_toggleMode )
{
m_inputPorts[ 0 ].Name = ToggleFalseStr;
m_inputPorts[ 1 ].Name = ToggleTrueStr;
}
UpdateLabels();
m_sizeIsDirty = true;
UIUtils.UpdateFunctionSwitchData( UniqueId, m_optionLabel );
UIUtils.UpdateFunctionSwitchCopyData( UniqueId, m_optionLabel );
if( UIUtils.CurrentShaderVersion() > 14205 )
{
m_referenceType = (TexReferenceType)Enum.Parse( typeof( TexReferenceType ), GetCurrentParam( ref nodeParams ) );
m_referenceUniqueId = Convert.ToInt32( GetCurrentParam( ref nodeParams ) );
if( m_referenceType == TexReferenceType.Instance )
{
//UIUtils.UnregisterFunctionSwitchNode( this );
UIUtils.RegisterFunctionSwitchNode( this );
UIUtils.RegisterFunctionSwitchCopyNode( this );
}
else
{
//UIUtils.UnregisterFunctionSwitchCopyNode( this );
UIUtils.RegisterFunctionSwitchNode( this );
}
}
}
public override void WriteToString( ref string nodeInfo, ref string connectionsInfo )
{
base.WriteToString( ref nodeInfo, ref connectionsInfo );
IOUtils.AddFieldValueToString( ref nodeInfo, m_optionLabel );
IOUtils.AddFieldValueToString( ref nodeInfo, m_toggleMode );
IOUtils.AddFieldValueToString( ref nodeInfo, m_currentSelectedInput );
IOUtils.AddFieldValueToString( ref nodeInfo, m_maxAmountInputs );
IOUtils.AddFieldValueToString( ref nodeInfo, m_orderIndex );
for( int i = 0; i < m_maxAmountInputs; i++ )
{
IOUtils.AddFieldValueToString( ref nodeInfo, m_optionNames[ i ] );
}
IOUtils.AddFieldValueToString( ref nodeInfo, m_referenceType );
IOUtils.AddFieldValueToString( ref nodeInfo, ( m_functionSwitchReference != null ? m_functionSwitchReference.UniqueId : -1 ) );
}
public int OrderIndex
{
get { return m_orderIndex; }
set { m_orderIndex = value; }
}
public string OptionLabel
{
get { return m_optionLabel; }
set { m_optionLabel = value; }
}
public bool AsDrawn { get { return m_asDrawn; } set { m_asDrawn = value; } }
public override string DataToArray { get { return m_optionLabel; } }
public int MaxAmountInputs
{
get { return m_maxAmountInputs; }
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/FunctionSwitch.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/FunctionSwitch.cs",
"repo_id": "jynew",
"token_count": 9879
}
| 869 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
using UnityEditor;
using UnityEngine;
namespace AmplifyShaderEditor
{
[Serializable]
public class RenderingPlatformOpHelper
{
private const string RenderingPlatformsStr = " Rendering Platforms";
private readonly string[] RenderingPlatformsLabels = { " Direct3D 9",
" Direct3D 11/12",
" OpenGL 3.x/4.x",
" OpenGL ES 2.0",
" OpenGL ES 3.x",
" iOS/Mac Metal",
" Direct3D 11 9.x",
" Xbox 360",
" Xbox One",
" PlayStation 4",
" PlayStation Vita",
" Nintendo 3DS",
" Nintendo Wii U" };
[SerializeField]
private bool[] m_renderingPlatformValues;
public RenderingPlatformOpHelper()
{
m_renderingPlatformValues = new bool[ RenderingPlatformsLabels.Length ];
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
m_renderingPlatformValues[ i ] = true;
}
}
public void Draw( ParentNode owner )
{
bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedRenderingPlatforms;
NodeUtils.DrawPropertyGroup( ref value, RenderingPlatformsStr, () =>
{
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
m_renderingPlatformValues[ i ] = owner.EditorGUILayoutToggleLeft( RenderingPlatformsLabels[ i ], m_renderingPlatformValues[ i ] );
}
} );
owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedRenderingPlatforms = value;
}
public void SetRenderingPlatforms( ref string ShaderBody )
{
int checkedPlatforms = 0;
int uncheckedPlatforms = 0;
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
if ( m_renderingPlatformValues[ i ] )
{
checkedPlatforms += 1;
}
else
{
uncheckedPlatforms += 1;
}
}
if ( checkedPlatforms > 0 && checkedPlatforms < m_renderingPlatformValues.Length )
{
string result = string.Empty;
if ( checkedPlatforms < uncheckedPlatforms )
{
result = "only_renderers ";
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
if ( m_renderingPlatformValues[ i ] )
{
result += ( RenderPlatforms ) i + " ";
}
}
}
else
{
result = "exclude_renderers ";
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
if ( !m_renderingPlatformValues[ i ] )
{
result += ( RenderPlatforms ) i + " ";
}
}
}
MasterNode.AddShaderPragma( ref ShaderBody, result );
}
}
public void ReadFromString( ref uint index, ref string[] nodeParams )
{
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
m_renderingPlatformValues[ i ] = Convert.ToBoolean( nodeParams[ index++ ] );
}
}
public void WriteToString( ref string nodeInfo )
{
for ( int i = 0; i < m_renderingPlatformValues.Length; i++ )
{
IOUtils.AddFieldValueToString( ref nodeInfo, m_renderingPlatformValues[ i ] );
}
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/RenderingPlatformsOpHelper.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/RenderingPlatformsOpHelper.cs",
"repo_id": "jynew",
"token_count": 1401
}
| 870 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
namespace AmplifyShaderEditor
{
[System.Serializable]
public class ParentTransfNode : ParentNode
{
protected string m_matrixName;
protected string m_matrixHDName;
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
AddInputPort( WirePortDataType.FLOAT4, false, string.Empty );
AddOutputVectorPorts( WirePortDataType.FLOAT4, "XYZW" );
m_useInternalPortData = true;
m_inputPorts[ 0 ].Vector4InternalData = new UnityEngine.Vector4( 0, 0, 0, 1 );
}
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 value = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
string matrixName = string.Empty;
if( dataCollector.IsTemplate && dataCollector.TemplateDataCollectorInstance.CurrentSRPType == TemplateSRPType.HD && !string.IsNullOrEmpty( m_matrixHDName ) )
{
matrixName = m_matrixHDName;
}
else
{
matrixName = m_matrixName;
}
RegisterLocalVariable( 0, string.Format( "mul({0},{1})", matrixName, value ),ref dataCollector,"transform"+ OutputId );
return GetOutputVectorItem( 0, outputId, m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory ) );
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Misc/Transformation/ParentTransfNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Misc/Transformation/ParentTransfNode.cs",
"repo_id": "jynew",
"token_count": 544
}
| 871 |
using System;
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
namespace AmplifyShaderEditor
{
[Serializable] public class UsageListSamplerNodes : NodeUsageRegister<SamplerNode> { }
[Serializable] public class UsageListFloatIntNodes : NodeUsageRegister<PropertyNode> { }
[Serializable] public class UsageListTexturePropertyNodes : NodeUsageRegister<TexturePropertyNode> { }
[Serializable] public class UsageListTextureArrayNodes : NodeUsageRegister<TextureArrayNode> { }
[Serializable] public class UsageListPropertyNodes : NodeUsageRegister<PropertyNode> { }
[Serializable] public class UsageListScreenColorNodes : NodeUsageRegister<ScreenColorNode> { }
[Serializable] public class UsageListRegisterLocalVarNodes : NodeUsageRegister<RegisterLocalVarNode> { }
[Serializable] public class UsageListFunctionInputNodes : NodeUsageRegister<FunctionInput> { }
[Serializable] public class UsageListFunctionNodes : NodeUsageRegister<FunctionNode> { }
[Serializable] public class UsageListFunctionOutputNodes : NodeUsageRegister<FunctionOutput> { }
[Serializable] public class UsageListFunctionSwitchNodes : NodeUsageRegister<FunctionSwitch> { }
[Serializable] public class UsageListFunctionSwitchCopyNodes : NodeUsageRegister<FunctionSwitch> { }
[Serializable] public class UsageListTemplateMultiPassMasterNodes : NodeUsageRegister<TemplateMultiPassMasterNode> { }
[Serializable] public class UsageListCustomExpressionsOnFunctionMode : NodeUsageRegister<CustomExpressionNode> { }
[Serializable] public class UsageListGlobalArrayNodes : NodeUsageRegister<GlobalArrayNode> { }
[Serializable]
public class NodeUsageRegister<T> where T : ParentNode
{
// Sampler Nodes registry
[SerializeField]
private List<T> m_nodes;
[SerializeField]
private string[] m_nodesArr;
[SerializeField]
private int[] m_nodeIDs;
[SerializeField]
ParentGraph m_containerGraph;
public NodeUsageRegister()
{
m_nodesArr = new string[ 0 ];
m_nodeIDs = new int[ 0 ];
m_nodes = new List<T>();
}
public void Destroy()
{
m_nodes.Clear();
m_nodes = null;
m_nodesArr = null;
m_nodeIDs = null;
}
public void Clear()
{
m_nodes.Clear();
}
public int AddNode( T node )
{
if( node == null )
return -1;
if( !m_nodes.Contains( node ) )
{
if( m_containerGraph != null )
{
Undo.RegisterCompleteObjectUndo( m_containerGraph.ParentWindow, Constants.UndoRegisterNodeId );
Undo.RegisterCompleteObjectUndo( m_containerGraph, Constants.UndoRegisterNodeId );
}
m_nodes.Add( node );
UpdateNodeArr();
return m_nodes.Count - 1;
}
else if( node.UniqueId > -1 )
{
UpdateNodeArr();
}
return -1;
}
public bool HasNode( int uniqueId )
{
return m_nodes.FindIndex( x => x.UniqueId == uniqueId ) > -1 ? true : false;
//int count = m_nodes.Count;
//for( int i = 0; i < count; i++ )
//{
// if( m_nodes[ i ].UniqueId == uniqueId )
// return true;
//}
//return false;
}
public void RemoveNode( T node )
{
if( node == null )
return;
if( m_nodes.Contains( node ) )
{
if( m_containerGraph != null )
{
Undo.RegisterCompleteObjectUndo( m_containerGraph.ParentWindow, Constants.UndoUnregisterNodeId );
Undo.RegisterCompleteObjectUndo( m_containerGraph, Constants.UndoUnregisterNodeId );
}
m_nodes.Remove( node );
UpdateNodeArr();
}
}
public void UpdateNodeArr()
{
int nodeCount = m_nodes.Count;
if( nodeCount != m_nodesArr.Length )
{
m_nodesArr = new string[ nodeCount ];
m_nodeIDs = new int[ nodeCount ];
}
for( int i = 0; i < nodeCount; i++ )
{
m_nodesArr[ i ] = m_nodes[ i ].DataToArray;
m_nodeIDs[ i ] = m_nodes[ i ].UniqueId;
}
}
public T GetNode( int idx )
{
if( idx > -1 && idx < m_nodes.Count )
{
return m_nodes[ idx ];
}
return null;
}
public T GetNodeByUniqueId( int uniqueId )
{
return m_nodes.Find( x => x.UniqueId == uniqueId );
}
public T GetNodeByDataToArray( string data )
{
return m_nodes.Find( x => x.DataToArray.Equals( data ));
}
public int GetNodeRegisterIdx( int uniqueId )
{
return m_nodes.FindIndex( x => x.UniqueId == uniqueId );
//int count = m_nodes.Count;
//for( int i = 0; i < count; i++ )
//{
// if( m_nodes[ i ].UniqueId == uniqueId )
// {
// return i;
// }
//}
//return -1;
}
public void UpdateDataOnNode( int uniqueId, string data )
{
int index = m_nodes.FindIndex( x => x.UniqueId == uniqueId );
if( index > -1 )
{
m_nodesArr[ index ] = data;
m_nodeIDs[ index ] = uniqueId;
}
//int count = m_nodes.Count;
//for( int i = 0; i < count; i++ )
//{
// if( m_nodes[ i ].UniqueId == uniqueId )
// {
// m_nodesArr[ i ] = data;
// m_nodeIDs[ i ] = uniqueId;
// }
//}
}
public void Dump()
{
string data = string.Empty;
for( int i = 0; i < m_nodesArr.Length; i++ )
{
data += m_nodesArr[ i ] + " " + m_nodeIDs[ i ] + '\n';
}
Debug.Log( data );
}
public string[] NodesArr { get { return m_nodesArr; } }
public int[] NodeIds { get { return m_nodeIDs; } }
public List<T> NodesList { get { return m_nodes; } }
public int Count { get { return m_nodes.Count; } }
public ParentGraph ContainerGraph { get { return m_containerGraph; } set { m_containerGraph = value; } }
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUsageRegister.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUsageRegister.cs",
"repo_id": "jynew",
"token_count": 2154
}
| 872 |
fileFormatVersion: 2
guid: 176154e86c6c3544fab0d67e098c645d
timeCreated: 1481126953
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/FloorOpNode.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/FloorOpNode.cs.meta",
"repo_id": "jynew",
"token_count": 101
}
| 873 |
fileFormatVersion: 2
guid: 1ed2c12cea61a8c4fa67eebdc10d2a2a
timeCreated: 1481126954
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/LogOpNode.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/LogOpNode.cs.meta",
"repo_id": "jynew",
"token_count": 105
}
| 874 |
fileFormatVersion: 2
guid: be2a11b08ee8cbb458dbcc4c1a61ad1b
timeCreated: 1481126959
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/SinOpNode.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/SinOpNode.cs.meta",
"repo_id": "jynew",
"token_count": 103
}
| 875 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using UnityEngine;
using UnityEditor;
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Add", "Math Operators", "Addition of two or more values ( A + B + .. )", null, KeyCode.A )]
public sealed class SimpleAddOpNode : DynamicTypeNode
{
private int m_cachedPropertyId = -1;
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_extensibleInputPorts = true;
m_previewShaderGUID = "9eb150cbc752cbc458a0a37984b9934a";
}
public override void SetPreviewInputs()
{
base.SetPreviewInputs();
if ( m_cachedPropertyId == -1 )
m_cachedPropertyId = Shader.PropertyToID( "_Count" );
PreviewMaterial.SetInt( m_cachedPropertyId, m_inputPorts.Count);
}
public override string BuildResults( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
{
base.BuildResults( 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/SimpleAddOpNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/SimpleNodes/SimpleAddOpNode.cs",
"repo_id": "jynew",
"token_count": 619
}
| 876 |
fileFormatVersion: 2
guid: 73fb18e7d547d514695cb0b83a29f80e
timeCreated: 1481126956
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/SurfaceShaderInputs/UVCoordsParentNode.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/SurfaceShaderInputs/UVCoordsParentNode.cs.meta",
"repo_id": "jynew",
"token_count": 102
}
| 877 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
//
// Custom Node HeightMap Texture Masking
// Donated by Rea
using UnityEngine;
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "HeightMap Texture Blend", "Textures", "Advanced Texture Blending by using heightMap and splatMask, usefull for texture layering ", null, KeyCode.None, true, false, null, null, "Rea" )]
public sealed class HeightMapBlendNode : ParentNode
{
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
AddInputPort( WirePortDataType.FLOAT, false, "HeightMap" );
AddInputPort( WirePortDataType.FLOAT, false, "SplatMask" );
AddInputPort( WirePortDataType.FLOAT, false, "BlendStrength" );
AddOutputVectorPorts( WirePortDataType.FLOAT, Constants.EmptyPortValue );
m_textLabelWidth = 120;
m_useInternalPortData = true;
m_inputPorts[ 2 ].FloatInternalData = 1;
}
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 HeightMap = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
string SplatMask = m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector);
string Blend = m_inputPorts[ 2 ].GeneratePortInstructions( ref dataCollector );
string HeightMask = "saturate(pow(((" + HeightMap + "*" + SplatMask + ")*4)+(" + SplatMask + "*2)," + Blend + "))";
string varName = "HeightMask" + OutputId;
RegisterLocalVariable( 0, HeightMask, ref dataCollector , varName );
return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory );
}
/*
A = (heightMap * SplatMask)*4
B = SplatMask*2
C = pow(A+B,Blend)
saturate(C)
saturate(pow(((heightMap * SplatMask)*4)+(SplatMask*2),Blend));
*/
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/HeightMapBlendNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/HeightMapBlendNode.cs",
"repo_id": "jynew",
"token_count": 733
}
| 878 |
using UnityEngine;
using UnityEditor;
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Texture Transform", "Textures", "Gives access to texture tiling and offset as set on the material inspector" )]
public sealed class TextureTransformNode : ParentNode
{
private readonly string[] Dummy = { string.Empty };
[SerializeField]
private int m_referenceSamplerId = -1;
[SerializeField]
private int m_referenceNodeId = -1;
[SerializeField]
private TexturePropertyNode m_inputReferenceNode = null;
private TexturePropertyNode m_referenceNode = null;
private UpperLeftWidgetHelper m_upperLeftWidget = new UpperLeftWidgetHelper();
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
AddInputPort( WirePortDataType.SAMPLER2D, false, "Tex" );
m_inputPorts[ 0 ].CreatePortRestrictions( WirePortDataType.SAMPLER1D, WirePortDataType.SAMPLER2D, WirePortDataType.SAMPLER3D, WirePortDataType.SAMPLERCUBE, WirePortDataType.OBJECT );
AddOutputPort( WirePortDataType.FLOAT2, "Tiling" );
AddOutputPort( WirePortDataType.FLOAT2, "Offset" );
m_textLabelWidth = 80;
m_autoWrapProperties = true;
m_hasLeftDropdown = true;
}
public override void AfterCommonInit()
{
base.AfterCommonInit();
if( PaddingTitleLeft == 0 )
{
PaddingTitleLeft = Constants.PropertyPickerWidth + Constants.IconsLeftRightMargin;
if( PaddingTitleRight == 0 )
PaddingTitleRight = Constants.PropertyPickerWidth + Constants.IconsLeftRightMargin;
}
}
public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true )
{
base.OnInputPortConnected( portId, otherNodeId, otherPortId, activateNode );
m_inputReferenceNode = m_inputPorts[ 0 ].GetOutputNode() as TexturePropertyNode;
}
public override void OnInputPortDisconnected( int portId )
{
base.OnInputPortDisconnected( portId );
m_inputReferenceNode = null;
}
void UpdateTitle()
{
if( m_inputReferenceNode != null )
{
m_additionalContent.text = string.Format( Constants.PropertyValueLabel, m_inputReferenceNode.PropertyInspectorName );
}
else if( m_referenceSamplerId > -1 && m_referenceNode != null )
{
m_additionalContent.text = string.Format( Constants.PropertyValueLabel, m_referenceNode.PropertyInspectorName );
}
else
{
m_additionalContent.text = string.Empty;
}
m_sizeIsDirty = true;
}
public override void DrawProperties()
{
base.DrawProperties();
EditorGUI.BeginChangeCheck();
string[] arr = UIUtils.TexturePropertyNodeArr();
bool guiEnabledBuffer = GUI.enabled;
if( arr != null && arr.Length > 0 )
{
GUI.enabled = true && ( !m_inputPorts[ 0 ].IsConnected );
m_referenceSamplerId = EditorGUILayoutPopup( Constants.AvailableReferenceStr, m_referenceSamplerId, arr );
}
else
{
m_referenceSamplerId = -1;
GUI.enabled = false;
m_referenceSamplerId = EditorGUILayoutPopup( Constants.AvailableReferenceStr, m_referenceSamplerId, Dummy );
}
GUI.enabled = guiEnabledBuffer;
if( EditorGUI.EndChangeCheck() )
{
m_referenceNode = UIUtils.GetTexturePropertyNode( m_referenceSamplerId );
m_referenceNodeId = m_referenceNode.UniqueId;
UpdateTitle();
}
}
public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
{
base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar );
m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
string texTransform = string.Empty;
if( m_inputPorts[ 0 ].IsConnected )
{
texTransform = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ) + "_ST";
}
else if( m_referenceNode != null )
{
m_referenceNode.BaseGenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar );
texTransform = m_referenceNode.PropertyName + "_ST";
}
else
{
texTransform = "_ST";
UIUtils.ShowMessage( "Please specify a texture sample on the Texture Transform Size node", MessageSeverity.Warning );
}
dataCollector.AddToUniforms( UniqueId, "uniform float4 " + texTransform + ";" );
switch( outputId )
{
case 0: return ( texTransform + ".xy" );
case 1: return ( texTransform + ".zw" );
}
return string.Empty;
}
public override void Draw( DrawInfo drawInfo )
{
base.Draw( drawInfo );
EditorGUI.BeginChangeCheck();
{
string[] arr = UIUtils.TexturePropertyNodeArr();
bool guiEnabledBuffer = GUI.enabled;
if( arr != null && arr.Length > 0 )
{
GUI.enabled = true && ( !m_inputPorts[ 0 ].IsConnected );
m_referenceSamplerId = m_upperLeftWidget.DrawWidget( this, m_referenceSamplerId, arr );
}
else
{
m_referenceSamplerId = -1;
GUI.enabled = false;
m_referenceSamplerId = m_upperLeftWidget.DrawWidget( this, m_referenceSamplerId, Dummy );
}
GUI.enabled = guiEnabledBuffer;
}
if( EditorGUI.EndChangeCheck() )
{
m_referenceNode = UIUtils.GetTexturePropertyNode( m_referenceSamplerId );
m_referenceNodeId = m_referenceNode.UniqueId;
UpdateTitle();
}
if( m_referenceNode == null && m_referenceNodeId > -1 )
{
m_referenceNodeId = -1;
m_referenceSamplerId = -1;
UpdateTitle();
}
}
public override void RefreshExternalReferences()
{
base.RefreshExternalReferences();
m_referenceNode = UIUtils.GetNode( m_referenceNodeId ) as TexturePropertyNode;
m_referenceSamplerId = UIUtils.GetTexturePropertyNodeRegisterId( m_referenceNodeId );
UpdateTitle();
}
public override void ReadFromString( ref string[] nodeParams )
{
base.ReadFromString( ref nodeParams );
m_referenceNodeId = Convert.ToInt32( GetCurrentParam( ref nodeParams ) );
}
public override void WriteToString( ref string nodeInfo, ref string connectionsInfo )
{
base.WriteToString( ref nodeInfo, ref connectionsInfo );
IOUtils.AddFieldValueToString( ref nodeInfo, m_referenceNodeId );
}
public override void Destroy()
{
base.Destroy();
m_referenceNode = null;
m_inputReferenceNode = null;
m_upperLeftWidget = null;
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/TextureTransformNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Textures/TextureTransformNode.cs",
"repo_id": "jynew",
"token_count": 3654
}
| 879 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
namespace AmplifyShaderEditor
{
[System.Serializable]
[NodeAttributes( "Edge Length Tessellation", "Miscellaneous", "Tessellation level computed based on triangle edge length on the screen" )]
public sealed class EdgeLengthTessNode : TessellationParentNode
{
private const string FunctionBody = "UnityEdgeLengthBasedTess (v0.vertex, v1.vertex, v2.vertex, {0})";
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
AddInputPort( WirePortDataType.FLOAT, false, "Edge Length" );
AddOutputPort( WirePortDataType.FLOAT4, Constants.EmptyPortValue );
}
protected override string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector )
{
return string.Format( FunctionBody, m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ) );
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs",
"repo_id": "jynew",
"token_count": 294
}
| 880 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
//
// Custom Node Vertex To Fragment
// Donated by Jason Booth - http://u3d.as/DND
using UnityEngine;
namespace AmplifyShaderEditor
{
[System.Serializable]
[NodeAttributes( "Vertex To Fragment", "Miscellaneous", "Pass vertex data to the pixel shader", null, KeyCode.None, true, false, null, null, "Jason Booth - http://u3d.as/DND" )]
public sealed class VertexToFragmentNode : SingleInputOp
{
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
m_inputPorts[ 0 ].AddPortForbiddenTypes( WirePortDataType.FLOAT3x3,
WirePortDataType.FLOAT4x4,
WirePortDataType.SAMPLER1D,
WirePortDataType.SAMPLER2D,
WirePortDataType.SAMPLER3D,
WirePortDataType.SAMPLERCUBE );
m_inputPorts[ 0 ].Name = "(VS) In";
m_outputPorts[ 0 ].Name = "Out";
m_useInternalPortData = false;
m_previewShaderGUID = "74e4d859fbdb2c0468de3612145f4929";
}
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 varName = GenerateInputInVertex( ref dataCollector, 0, "vertexToFrag" + OutputId,true );
m_outputPorts[ 0 ].SetLocalValue( varName, dataCollector.PortCategory );
return varName;
////TEMPLATES
//if( dataCollector.IsTemplate )
//{
// if( !dataCollector.IsFragmentCategory )
// return m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
// string varName = "vertexToFrag" + OutputId;
// if( dataCollector.TemplateDataCollectorInstance.HasCustomInterpolatedData( varName ) )
// return varName;
// MasterNodePortCategory category = dataCollector.PortCategory;
// dataCollector.PortCategory = MasterNodePortCategory.Vertex;
// bool dirtyVertexVarsBefore = dataCollector.DirtyVertexVariables;
// ContainerGraph.ResetNodesLocalVariablesIfNot( this, MasterNodePortCategory.Vertex );
// string data = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
// dataCollector.PortCategory = category;
// if( !dirtyVertexVarsBefore && dataCollector.DirtyVertexVariables )
// {
// dataCollector.AddVertexInstruction( dataCollector.VertexLocalVariables, UniqueId, false );
// dataCollector.ClearVertexLocalVariables();
// ContainerGraph.ResetNodesLocalVariablesIfNot( this, MasterNodePortCategory.Vertex );
// }
// ContainerGraph.ResetNodesLocalVariablesIfNot( this, MasterNodePortCategory.Fragment );
// dataCollector.TemplateDataCollectorInstance.RegisterCustomInterpolatedData( varName, m_inputPorts[ 0 ].DataType, m_currentPrecisionType, data );
// //return varName;
// m_outputPorts[ 0 ].SetLocalValue( varName );
// return m_outputPorts[ 0 ].LocalValue;
//}
////SURFACE
//{
// if( !dataCollector.IsFragmentCategory )
// {
// return m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
// }
// if( dataCollector.TesselationActive )
// {
// UIUtils.ShowMessage( "Unable to use Vertex to Frag when Tessellation is active" );
// return m_outputPorts[ 0 ].ErrorValue;
// }
// string interpName = "data" + OutputId;
// dataCollector.AddToInput( UniqueId, interpName, m_inputPorts[ 0 ].DataType, m_currentPrecisionType );
// MasterNodePortCategory portCategory = dataCollector.PortCategory;
// dataCollector.PortCategory = MasterNodePortCategory.Vertex;
// bool dirtyVertexVarsBefore = dataCollector.DirtyVertexVariables;
// ContainerGraph.ResetNodesLocalVariablesIfNot( this, MasterNodePortCategory.Vertex );
// string vertexVarValue = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector );
// dataCollector.AddLocalVariable( UniqueId, Constants.VertexShaderOutputStr + "." + interpName, vertexVarValue + ";" );
// dataCollector.PortCategory = portCategory;
// if( !dirtyVertexVarsBefore && dataCollector.DirtyVertexVariables )
// {
// dataCollector.AddVertexInstruction( dataCollector.VertexLocalVariables, UniqueId, false );
// dataCollector.ClearVertexLocalVariables();
// ContainerGraph.ResetNodesLocalVariablesIfNot( this, MasterNodePortCategory.Vertex );
// }
// ContainerGraph.ResetNodesLocalVariablesIfNot( this, MasterNodePortCategory.Fragment );
// //return Constants.InputVarStr + "." + interpName;
// m_outputPorts[ 0 ].SetLocalValue( Constants.InputVarStr + "." + interpName );
// return m_outputPorts[ 0 ].LocalValue;
//}
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/VertexToFragmentNode.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/VertexToFragmentNode.cs",
"repo_id": "jynew",
"token_count": 1751
}
| 881 |
fileFormatVersion: 2
guid: 5fc48fb872ce5e74aa913f987a025ea4
timeCreated: 1495113330
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateCodeSnippetBase.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateCodeSnippetBase.cs.meta",
"repo_id": "jynew",
"token_count": 101
}
| 882 |
fileFormatVersion: 2
guid: 081c72eb35d61c84e9a5c34522c3ff33
timeCreated: 1534775306
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateOptionsUI.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateOptionsUI.cs.meta",
"repo_id": "jynew",
"token_count": 102
}
| 883 |
fileFormatVersion: 2
guid: 905b4a4de4a974a489d7a8aac14e4fcb
timeCreated: 1516719540
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateTagsModule.cs.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateTagsModule.cs.meta",
"repo_id": "jynew",
"token_count": 105
}
| 884 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
using System.Reflection;
using System.Globalization;
using UnityEngine;
using AmplifyShaderEditor;
namespace UnityEditor
{
[CustomEditor( typeof( Shader ) )]
internal class CustomShaderInspector : Editor
{
internal class Styles
{
public static Texture2D errorIcon = EditorGUIUtilityEx.LoadIcon( "console.erroricon.sml" );
public static Texture2D warningIcon = EditorGUIUtilityEx.LoadIcon( "console.warnicon.sml" );
public static GUIContent showSurface = EditorGUIUtilityEx.TextContent( "Show generated code|Show generated code of a surface shader" );
public static GUIContent showFF = EditorGUIUtilityEx.TextContent( "Show generated code|Show generated code of a fixed function shader" );
public static GUIContent showCurrent = new GUIContent( "Compile and show code | ▾" );
public static GUIStyle messageStyle = "CN StatusInfo";
public static GUIStyle evenBackground = "CN EntryBackEven";
public static GUIContent no = EditorGUIUtilityEx.TextContent( "no" );
public static GUIContent builtinShader = EditorGUIUtilityEx.TextContent( "Built-in shader" );
}
private const float kSpace = 5f;
private static readonly string[] kPropertyTypes = new string[]
{
"Color: ",
"Vector: ",
"Float: ",
"Range: ",
"Texture: "
};
private static readonly string[] kTextureTypes = new string[]
{
"No Texture?: ",
"1D?: ",
"2D: ",
"3D: ",
"Cube: ",
"2DArray: ",
"Any texture: "
};
private static readonly int kErrorViewHash = "ShaderErrorView".GetHashCode();
private Vector2 m_ScrollPosition = Vector2.zero;
private PreviewRenderUtility m_previewRenderUtility;
private Material m_material;
private Mesh m_previewMesh;
private Vector2 m_mouseDelta;
private Transform m_cameraTransform;
private static int m_sliderHashCode = -1;
private const float MaxDeltaY = 90;
private const int DefaultMouseSpeed = 1;
private const int ShiftMouseSpeed = 3;
private const float DeltaMultiplier = 135f;
private void ValidateData()
{
if ( m_previewRenderUtility == null )
{
m_previewRenderUtility = new PreviewRenderUtility();
#if UNITY_2017_1_OR_NEWER
m_cameraTransform = m_previewRenderUtility.camera.transform;
#else
m_cameraTransform = m_previewRenderUtility.m_Camera.transform;
#endif
m_cameraTransform.position = new Vector3( 0, 0, -4 );
m_cameraTransform.rotation = Quaternion.identity;
}
if ( m_material == null )
{
m_material = new Material( target as Shader );
m_material.hideFlags = HideFlags.DontSave;
}
if ( m_previewMesh == null )
{
m_previewMesh = Resources.GetBuiltinResource<Mesh>( "Sphere.fbx" );
}
if ( m_sliderHashCode < 0 )
{
"Slider".GetHashCode();
}
}
public override bool HasPreviewGUI()
{
ValidateData();
return true;
}
public static Vector2 CheckMouseMovement( Vector2 scrollPosition, Rect position )
{
int controlID = GUIUtility.GetControlID( m_sliderHashCode, FocusType.Passive );
Event current = Event.current;
switch ( current.GetTypeForControl( controlID ) )
{
case EventType.MouseDown:
{
if ( position.Contains( current.mousePosition ) && position.width > 50f )
{
GUIUtility.hotControl = controlID;
current.Use();
EditorGUIUtility.SetWantsMouseJumping( 1 );
}
}
break;
case EventType.MouseUp:
{
if ( GUIUtility.hotControl == controlID )
{
GUIUtility.hotControl = 0;
}
EditorGUIUtility.SetWantsMouseJumping( 0 );
}
break;
case EventType.MouseDrag:
{
if ( GUIUtility.hotControl == controlID )
{
scrollPosition -= DeltaMultiplier * current.delta * ( float ) ( ( current.shift ) ? ShiftMouseSpeed : DefaultMouseSpeed ) / Mathf.Min( position.width, position.height );
scrollPosition.y = Mathf.Clamp( scrollPosition.y, -MaxDeltaY, MaxDeltaY );
current.Use();
}
}
break;
}
return scrollPosition;
}
public override void OnPreviewGUI( Rect r, GUIStyle background )
{
m_mouseDelta = CheckMouseMovement( m_mouseDelta, r );
if ( Event.current.type == EventType.Repaint )
{
m_previewRenderUtility.BeginPreview( r, background );
Texture resultRender = m_previewRenderUtility.EndPreview();
m_previewRenderUtility.DrawMesh( m_previewMesh, Matrix4x4.identity, m_material, 0 );
m_cameraTransform.rotation = Quaternion.Euler( new Vector3( -m_mouseDelta.y, -m_mouseDelta.x, 0 ) );
m_cameraTransform.position = m_cameraTransform.forward * -8f;
#if UNITY_2017_1_OR_NEWER
m_previewRenderUtility.camera.Render();
#else
m_previewRenderUtility.m_Camera.Render();
#endif
GUI.DrawTexture( r, resultRender, ScaleMode.StretchToFill, false );
}
}
void OnDestroy()
{
CleanUp();
}
public void OnDisable()
{
CleanUp();
}
void CleanUp()
{
if( m_previewRenderUtility != null )
{
m_previewRenderUtility.Cleanup();
m_previewRenderUtility = null;
}
if( m_previewMesh != null )
{
Resources.UnloadAsset( m_previewMesh );
m_previewMesh = null;
}
if( m_previewRenderUtility != null )
{
m_previewRenderUtility.Cleanup();
m_previewRenderUtility = null;
}
m_material = null;
}
public virtual void OnEnable()
{
Shader s = this.target as Shader;
ShaderUtilEx.FetchCachedErrors( s );
}
private static string GetPropertyType( Shader s, int index )
{
UnityEditor.ShaderUtil.ShaderPropertyType propertyType = UnityEditor.ShaderUtil.GetPropertyType( s, index );
if ( propertyType == UnityEditor.ShaderUtil.ShaderPropertyType.TexEnv )
{
return CustomShaderInspector.kTextureTypes[ ( int ) UnityEditor.ShaderUtil.GetTexDim( s, index ) ];
}
return CustomShaderInspector.kPropertyTypes[ ( int ) propertyType ];
}
public override void OnInspectorGUI()
{
Shader shader = this.target as Shader;
if ( shader == null )
{
return;
}
GUI.enabled = true;
GUILayout.Space( 3 );
GUILayout.BeginHorizontal();
{
if ( GUILayout.Button( "Open in Shader Editor" ) )
{
AmplifyShaderEditorWindow.ConvertShaderToASE( shader );
}
if ( GUILayout.Button( "Open in Text Editor" ) )
{
if( UIUtils.IsUnityNativeShader( shader ) )
{
Debug.LogWarningFormat( "Action not allowed. Attempting to load the native {0} shader into Text Editor", shader.name );
}
else
{
AssetDatabase.OpenAsset( shader, 1 );
}
}
}
GUILayout.EndHorizontal();
GUILayout.Space( 5 );
EditorGUI.indentLevel = 0;
this.ShowShaderCodeArea( shader );
if ( shader.isSupported )
{
EditorGUILayout.LabelField( "Cast shadows", ( !ShaderUtilEx.HasShadowCasterPass( shader ) ) ? "no" : "yes", new GUILayoutOption[ 0 ] );
EditorGUILayout.LabelField( "Render queue", ShaderUtilEx.GetRenderQueue( shader ).ToString( System.Globalization.CultureInfo.InvariantCulture ), new GUILayoutOption[ 0 ] );
EditorGUILayout.LabelField( "LOD", ShaderUtilEx.GetLOD( shader ).ToString( System.Globalization.CultureInfo.InvariantCulture ), new GUILayoutOption[ 0 ] );
EditorGUILayout.LabelField( "Ignore projector", ( !ShaderUtilEx.DoesIgnoreProjector( shader ) ) ? "no" : "yes", new GUILayoutOption[ 0 ] );
string label;
switch ( ShaderEx.GetDisableBatching( shader ) )
{
case DisableBatchingType.False:
label = "no";
break;
case DisableBatchingType.True:
label = "yes";
break;
case DisableBatchingType.WhenLODFading:
label = "when LOD fading is on";
break;
default:
label = "unknown";
break;
}
EditorGUILayout.LabelField( "Disable batching", label, new GUILayoutOption[ 0 ] );
CustomShaderInspector.ShowShaderProperties( shader );
}
}
private void ShowShaderCodeArea( Shader s )
{
CustomShaderInspector.ShowSurfaceShaderButton( s );
CustomShaderInspector.ShowFixedFunctionShaderButton( s );
this.ShowCompiledCodeButton( s );
this.ShowShaderErrors( s );
}
private static void ShowShaderProperties( Shader s )
{
GUILayout.Space( 5f );
GUILayout.Label( "Properties:", EditorStyles.boldLabel, new GUILayoutOption[ 0 ] );
int propertyCount = UnityEditor.ShaderUtil.GetPropertyCount( s );
for ( int i = 0; i < propertyCount; i++ )
{
string propertyName = UnityEditor.ShaderUtil.GetPropertyName( s, i );
string label = CustomShaderInspector.GetPropertyType( s, i ) + UnityEditor.ShaderUtil.GetPropertyDescription( s, i );
EditorGUILayout.LabelField( propertyName, label, new GUILayoutOption[ 0 ] );
}
}
internal static void ShaderErrorListUI( UnityEngine.Object shader, ShaderError[] errors, ref Vector2 scrollPosition )
{
int num = errors.Length;
GUILayout.Space( 5f );
GUILayout.Label( string.Format( "Errors ({0}):", num ), EditorStyles.boldLabel, new GUILayoutOption[ 0 ] );
int controlID = GUIUtility.GetControlID( CustomShaderInspector.kErrorViewHash, FocusType.Passive );
float minHeight = Mathf.Min( ( float ) num * 20f + 40f, 150f );
scrollPosition = GUILayout.BeginScrollView( scrollPosition, GUISkinEx.GetCurrentSkin().box, new GUILayoutOption[]
{
GUILayout.MinHeight(minHeight)
} );
EditorGUIUtility.SetIconSize( new Vector2( 16f, 16f ) );
float height = CustomShaderInspector.Styles.messageStyle.CalcHeight( EditorGUIUtilityEx.TempContent( CustomShaderInspector.Styles.errorIcon ), 100f );
Event current = Event.current;
for ( int i = 0; i < num; i++ )
{
Rect controlRect = EditorGUILayout.GetControlRect( false, height, new GUILayoutOption[ 0 ] );
string message = errors[ i ].message;
string platform = errors[ i ].platform;
bool flag = errors[ i ].warning != 0;
string lastPathNameComponent = FileUtilEx.GetLastPathNameComponent( errors[ i ].file );
int line = errors[ i ].line;
if ( current.type == EventType.MouseDown && current.button == 0 && controlRect.Contains( current.mousePosition ) )
{
GUIUtility.keyboardControl = controlID;
if ( current.clickCount == 2 )
{
string file = errors[ i ].file;
UnityEngine.Object @object = ( !string.IsNullOrEmpty( file ) ) ? AssetDatabase.LoadMainAssetAtPath( file ) : null;
AssetDatabase.OpenAsset( @object ?? shader, line );
GUIUtility.ExitGUI();
}
current.Use();
}
if ( current.type == EventType.ContextClick && controlRect.Contains( current.mousePosition ) )
{
current.Use();
GenericMenu genericMenu = new GenericMenu();
int errorIndex = i;
genericMenu.AddItem( new GUIContent( "Copy error text" ), false, delegate
{
string text = errors[ errorIndex ].message;
if ( !string.IsNullOrEmpty( errors[ errorIndex ].messageDetails ) )
{
text += '\n';
text += errors[ errorIndex ].messageDetails;
}
EditorGUIUtility.systemCopyBuffer = text;
} );
genericMenu.ShowAsContext();
}
if ( current.type == EventType.Repaint && ( i & 1 ) == 0 )
{
GUIStyle evenBackground = CustomShaderInspector.Styles.evenBackground;
evenBackground.Draw( controlRect, false, false, false, false );
}
Rect rect = controlRect;
rect.xMin = rect.xMax;
if ( line > 0 )
{
GUIContent content;
if ( string.IsNullOrEmpty( lastPathNameComponent ) )
{
content = EditorGUIUtilityEx.TempContent( line.ToString( System.Globalization.CultureInfo.InvariantCulture ) );
}
else
{
content = EditorGUIUtilityEx.TempContent( lastPathNameComponent + ":" + line.ToString( System.Globalization.CultureInfo.InvariantCulture ) );
}
Vector2 vector = EditorStyles.miniLabel.CalcSize( content );
rect.xMin -= vector.x;
GUI.Label( rect, content, EditorStyles.miniLabel );
rect.xMin -= 2f;
if ( rect.width < 30f )
{
rect.xMin = rect.xMax - 30f;
}
}
Rect position = rect;
position.width = 0f;
if ( platform.Length > 0 )
{
GUIContent content2 = EditorGUIUtilityEx.TempContent( platform );
Vector2 vector2 = EditorStyles.miniLabel.CalcSize( content2 );
position.xMin -= vector2.x;
Color contentColor = GUI.contentColor;
GUI.contentColor = new Color( 1f, 1f, 1f, 0.5f );
GUI.Label( position, content2, EditorStyles.miniLabel );
GUI.contentColor = contentColor;
position.xMin -= 2f;
}
Rect position2 = controlRect;
position2.xMax = position.xMin;
GUI.Label( position2, EditorGUIUtilityEx.TempContent( message, ( !flag ) ? CustomShaderInspector.Styles.errorIcon : CustomShaderInspector.Styles.warningIcon ), CustomShaderInspector.Styles.messageStyle );
}
EditorGUIUtility.SetIconSize( Vector2.zero );
GUILayout.EndScrollView();
}
private void ShowShaderErrors( Shader s )
{
int shaderErrorCount = ShaderUtilEx.GetShaderErrorCount( s );
if ( shaderErrorCount < 1 )
{
return;
}
CustomShaderInspector.ShaderErrorListUI( s, ShaderUtilEx.GetShaderErrors( s ), ref this.m_ScrollPosition );
}
private void ShowCompiledCodeButton( Shader s )
{
EditorGUILayout.BeginHorizontal( new GUILayoutOption[ 0 ] );
EditorGUILayout.PrefixLabel( "Compiled code", EditorStyles.miniButton );
bool flag = ShaderUtilEx.HasShaderSnippets( s ) || ShaderUtilEx.HasSurfaceShaders( s ) || ShaderUtilEx.HasFixedFunctionShaders( s );
if ( flag )
{
GUIContent showCurrent = CustomShaderInspector.Styles.showCurrent;
Rect rect = GUILayoutUtility.GetRect( showCurrent, EditorStyles.miniButton, new GUILayoutOption[]
{
GUILayout.ExpandWidth(false)
} );
Rect position = new Rect( rect.xMax - 16f, rect.y, 16f, rect.height );
if ( EditorGUIEx.ButtonMouseDown( position, GUIContent.none, FocusType.Passive, GUIStyle.none ) )
{
Rect last = GUILayoutUtilityEx.TopLevel_GetLast();
PopupWindow.Show( last, ( PopupWindowContent ) Activator.CreateInstance( System.Type.GetType( "UnityEditor.ShaderInspectorPlatformsPopup, UnityEditor" ), new object[] { s } ) );
GUIUtility.ExitGUI();
}
if ( GUI.Button( rect, showCurrent, EditorStyles.miniButton ) )
{
ShaderUtilEx.OpenCompiledShader( s, ShaderInspectorPlatformsPopupEx.GetCurrentMode(), ShaderInspectorPlatformsPopupEx.GetCurrentPlatformMask(), ShaderInspectorPlatformsPopupEx.GetCurrentVariantStripping() == 0 );
GUIUtility.ExitGUI();
}
}
else
{
GUILayout.Button( "none (precompiled shader)", GUI.skin.label, new GUILayoutOption[ 0 ] );
}
EditorGUILayout.EndHorizontal();
}
private static void ShowSurfaceShaderButton( Shader s )
{
bool flag = ShaderUtilEx.HasSurfaceShaders( s );
EditorGUILayout.BeginHorizontal( new GUILayoutOption[ 0 ] );
EditorGUILayout.PrefixLabel( "Surface shader", EditorStyles.miniButton );
if ( flag )
{
if ( !( AssetImporter.GetAtPath( AssetDatabase.GetAssetPath( s ) ) == null ) )
{
if ( GUILayout.Button( CustomShaderInspector.Styles.showSurface, EditorStyles.miniButton, new GUILayoutOption[]
{
GUILayout.ExpandWidth(false)
} ) )
{
ShaderUtilEx.OpenParsedSurfaceShader( s );
GUIUtility.ExitGUI();
}
}
else
{
GUILayout.Button( CustomShaderInspector.Styles.builtinShader, GUI.skin.label, new GUILayoutOption[ 0 ] );
}
}
else
{
GUILayout.Button( CustomShaderInspector.Styles.no, GUI.skin.label, new GUILayoutOption[ 0 ] );
}
EditorGUILayout.EndHorizontal();
}
private static void ShowFixedFunctionShaderButton( Shader s )
{
bool flag = ShaderUtilEx.HasFixedFunctionShaders( s );
EditorGUILayout.BeginHorizontal( new GUILayoutOption[ 0 ] );
EditorGUILayout.PrefixLabel( "Fixed function", EditorStyles.miniButton );
if ( flag )
{
if ( !( AssetImporter.GetAtPath( AssetDatabase.GetAssetPath( s ) ) == null ) )
{
if ( GUILayout.Button( CustomShaderInspector.Styles.showFF, EditorStyles.miniButton, new GUILayoutOption[]
{
GUILayout.ExpandWidth(false)
} ) )
{
ShaderUtilEx.OpenGeneratedFixedFunctionShader( s );
GUIUtility.ExitGUI();
}
}
else
{
GUILayout.Button( CustomShaderInspector.Styles.builtinShader, GUI.skin.label, new GUILayoutOption[ 0 ] );
}
}
else
{
GUILayout.Button( CustomShaderInspector.Styles.no, GUI.skin.label, new GUILayoutOption[ 0 ] );
}
EditorGUILayout.EndHorizontal();
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// UNITY EDITOR EXTENSIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public enum DisableBatchingType
{
False,
True,
WhenLODFading
}
public struct ShaderError
{
public string message;
public string messageDetails;
public string platform;
public string file;
public int line;
public int warning;
}
public static class EditorGUIUtilityEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEditor.EditorGUIUtility, UnityEditor" ) : type; } }
public static Texture2D LoadIcon( string icon )
{
return ( Texture2D ) EditorGUIUtilityEx.Type.InvokeMember( "LoadIcon", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { icon } );
}
public static GUIContent TextContent( string t )
{
return ( GUIContent ) EditorGUIUtilityEx.Type.InvokeMember( "TextContent", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { t } );
}
internal static GUIContent TempContent( string t )
{
return ( GUIContent ) EditorGUIUtilityEx.Type.InvokeMember( "TempContent", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { t } );
}
internal static GUIContent TempContent( Texture i )
{
return ( GUIContent ) EditorGUIUtilityEx.Type.InvokeMember( "TempContent", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { i } );
}
internal static GUIContent TempContent( string t, Texture i )
{
return ( GUIContent ) EditorGUIUtilityEx.Type.InvokeMember( "TempContent", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { t, i } );
}
}
public static class GUILayoutUtilityEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEngine.GUILayoutUtility, UnityEngine" ) : type; } }
public static Rect TopLevel_GetLast()
{
System.Type guiLayoutGroup = System.Type.GetType( "UnityEngine.GUILayoutGroup, UnityEngine" );
var topLevel = GUILayoutUtilityEx.Type.GetProperty( "topLevel", BindingFlags.NonPublic | BindingFlags.Static ).GetValue( null, null );
return ( Rect ) guiLayoutGroup.InvokeMember( "GetLast", BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, topLevel, new object[] { } );
}
}
public static class ShaderEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEngine.Shader, UnityEngine" ) : type; } }
public static DisableBatchingType GetDisableBatching( Shader s )
{
return ( DisableBatchingType ) ShaderEx.Type.GetProperty( "disableBatching", BindingFlags.NonPublic | BindingFlags.Instance ).GetValue( s, new object[ 0 ] );
}
}
public static class ShaderUtilEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEditor.ShaderUtil, UnityEditor" ) : type; } }
public static void OpenParsedSurfaceShader( Shader s )
{
ShaderUtilEx.Type.InvokeMember( "OpenParsedSurfaceShader", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static void OpenGeneratedFixedFunctionShader( Shader s )
{
ShaderUtilEx.Type.InvokeMember( "OpenGeneratedFixedFunctionShader", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static void OpenCompiledShader( Shader shader, int mode, int customPlatformsMask, bool includeAllVariants )
{
ShaderUtilEx.Type.InvokeMember( "OpenCompiledShader", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { shader, mode, customPlatformsMask, includeAllVariants } );
}
public static void FetchCachedErrors( Shader s )
{
ShaderUtilEx.Type.InvokeMember( "FetchCachedErrors", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static int GetShaderErrorCount( Shader s )
{
return ( int ) ShaderUtilEx.Type.InvokeMember( "GetShaderErrorCount", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static int GetAvailableShaderCompilerPlatforms()
{
return (int)ShaderUtilEx.Type.InvokeMember( "GetAvailableShaderCompilerPlatforms", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { } );
}
public static ShaderError[] GetShaderErrors( Shader s )
{
System.Type shaderErrorType = System.Type.GetType( "UnityEditor.ShaderError, UnityEditor" );
var errorList = ( System.Collections.IList ) ShaderUtilEx.Type.InvokeMember( "GetShaderErrors", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
FieldInfo messageField = shaderErrorType.GetField( "message", BindingFlags.Public | BindingFlags.Instance );
FieldInfo messageDetailsField = shaderErrorType.GetField( "messageDetails", BindingFlags.Public | BindingFlags.Instance );
FieldInfo platformField = shaderErrorType.GetField( "platform", BindingFlags.Public | BindingFlags.Instance );
FieldInfo fileField = shaderErrorType.GetField( "file", BindingFlags.Public | BindingFlags.Instance );
FieldInfo lineField = shaderErrorType.GetField( "line", BindingFlags.Public | BindingFlags.Instance );
FieldInfo warningField = shaderErrorType.GetField( "warning", BindingFlags.Public | BindingFlags.Instance );
ShaderError[] errors = new ShaderError[ errorList.Count ];
for ( int i = 0; i < errorList.Count; i++ )
{
errors[ i ].message = ( string ) messageField.GetValue( errorList[ i ] );
errors[ i ].messageDetails = ( string ) messageDetailsField.GetValue( errorList[ i ] );
errors[ i ].platform = ( string ) platformField.GetValue( errorList[ i ] );
errors[ i ].file = ( string ) fileField.GetValue( errorList[ i ] );
errors[ i ].line = ( int ) lineField.GetValue( errorList[ i ] );
errors[ i ].warning = ( int ) warningField.GetValue( errorList[ i ] );
}
return errors;
}
public static bool HasShaderSnippets( Shader s )
{
return ( bool ) ShaderUtilEx.Type.InvokeMember( "HasShaderSnippets", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static bool HasSurfaceShaders( Shader s )
{
return ( bool ) ShaderUtilEx.Type.InvokeMember( "HasSurfaceShaders", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static bool HasFixedFunctionShaders( Shader s )
{
return ( bool ) ShaderUtilEx.Type.InvokeMember( "HasFixedFunctionShaders", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static bool HasShadowCasterPass( Shader s )
{
return ( bool ) ShaderUtilEx.Type.InvokeMember( "HasShadowCasterPass", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static int GetRenderQueue( Shader s )
{
return ( int ) ShaderUtilEx.Type.InvokeMember( "GetRenderQueue", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static int GetLOD( Shader s )
{
return ( int ) ShaderUtilEx.Type.InvokeMember( "GetLOD", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
public static bool DoesIgnoreProjector( Shader s )
{
return ( bool ) ShaderUtilEx.Type.InvokeMember( "DoesIgnoreProjector", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s } );
}
}
public static class FileUtilEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEditor.FileUtil, UnityEditor" ) : type; } }
public static string GetLastPathNameComponent( string path )
{
return ( string ) FileUtilEx.Type.InvokeMember( "GetLastPathNameComponent", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { path } );
}
}
public static class ShaderInspectorEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEditor.ShaderInspector, UnityEditor" ) : type; } }
}
public static class GUISkinEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEngine.GUISkin, UnityEngine" ) : type; } }
public static GUISkin GetCurrentSkin()
{
return ( GUISkin ) GUISkinEx.Type.GetField( "current", BindingFlags.NonPublic | BindingFlags.Static ).GetValue( null );
}
}
public static class EditorGUIEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEditor.EditorGUI, UnityEditor" ) : type; } }
public static bool ButtonMouseDown( Rect position, GUIContent content, FocusType focusType, GUIStyle style )
{
#if UNITY_5_6_OR_NEWER
return EditorGUI.DropdownButton( position, content, focusType, style );
#else
return ( bool ) EditorGUIEx.Type.InvokeMember( "ButtonMouseDown", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { position, content, focusType, style } );
#endif
}
public static float kObjectFieldMiniThumbnailHeight
{
get
{
return (float)EditorGUIEx.Type.InvokeMember( "kObjectFieldMiniThumbnailHeight", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.GetField, null, null, new object[] {} );
}
}
public static float kSingleLineHeight
{
get
{
return (float)EditorGUIEx.Type.InvokeMember( "kSingleLineHeight", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.GetField, null, null, new object[] { } );
}
}
}
public static class ShaderInspectorPlatformsPopupEx
{
private static System.Type type = null;
public static System.Type Type { get { return ( type == null ) ? type = System.Type.GetType( "UnityEditor.ShaderInspectorPlatformsPopup, UnityEditor" ) : type; } }
public static int GetCurrentMode()
{
return ( int ) ShaderInspectorPlatformsPopupEx.Type.GetProperty( "currentMode", BindingFlags.Public | BindingFlags.Static ).GetValue( null, null );
}
public static int GetCurrentPlatformMask()
{
return ( int ) ShaderInspectorPlatformsPopupEx.Type.GetProperty( "currentPlatformMask", BindingFlags.Public | BindingFlags.Static ).GetValue( null, null );
}
public static int GetCurrentVariantStripping()
{
return ( int ) ShaderInspectorPlatformsPopupEx.Type.GetProperty( "currentVariantStripping", BindingFlags.Public | BindingFlags.Static ).GetValue( null, null );
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/CustomShaderInspector.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/CustomShaderInspector.cs",
"repo_id": "jynew",
"token_count": 10217
}
| 885 |
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
namespace AmplifyShaderEditor
{
public enum DebugScreenShotNodeState
{
CreateNode,
FocusOnNode,
TakeScreenshot,
WaitFrame,
DeleteNode
};
public enum DebugUndoNodeState
{
CreateNode,
FocusOnNode,
WaitFrameCreate,
DeleteNode,
WaitFrameDelete,
UndoNode,
WaitFrameUndo,
PrepareForNext
};
public class NodeExporterUtils
{
//Auto-Screenshot nodes
private RenderTexture m_screenshotRT;
private Texture2D m_screenshotTex2D;
private List<ContextMenuItem> m_screenshotList = new List<ContextMenuItem>();
private DebugScreenShotNodeState m_screenShotState;
private bool m_takingShots = false;
private DebugUndoNodeState m_undoState;
private bool m_testingUndo = false;
private AmplifyShaderEditorWindow m_window;
private ParentNode m_node;
private string m_pathname;
public NodeExporterUtils( AmplifyShaderEditorWindow window )
{
m_window = window;
Undo.undoRedoPerformed += OnUndoRedoPerformed;
}
public void OnUndoRedoPerformed()
{
if( m_testingUndo && m_undoState == DebugUndoNodeState.WaitFrameUndo )
{
m_undoState = DebugUndoNodeState.PrepareForNext;
}
}
public void CalculateShaderInstructions( Shader shader )
{
//Type shaderutilType = Type.GetType( "UnityEditor.ShaderUtil, UnityEditor" );
//shaderutilType.InvokeMember( "OpenCompiledShader", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { shader, mode, customPlatformsMask, includeAllVariants } );
}
public void ActivateAutoScreenShot( string pathname )
{
m_pathname = pathname;
if( !System.IO.Directory.Exists( m_pathname ) )
{
System.IO.Directory.CreateDirectory( m_pathname );
}
m_screenshotRT = new RenderTexture( (int)m_window.position.width, (int)m_window.position.height, 0 );
m_screenshotTex2D = new Texture2D( (int)m_window.position.width, (int)m_window.position.height, TextureFormat.RGB24, false );
RenderTexture.active = m_screenshotRT;
m_window.CurrentPaletteWindow.FillList( ref m_screenshotList, true );
m_window.CurrentGraph.ClearGraph();
if( m_window.IsShaderFunctionWindow )
{
m_window.CurrentGraph.CurrentOutputNode.Vec2Position = new Vector2( 1500, 0 );
}
else
{
m_window.CurrentGraph.CurrentMasterNode.Vec2Position = new Vector2( 1500, 0 );
}
m_window.ResetCameraSettings();
m_takingShots = true;
m_screenShotState = DebugScreenShotNodeState.CreateNode;
}
public void ActivateAutoUndo()
{
m_window.CurrentPaletteWindow.FillList( ref m_screenshotList, true );
m_window.CurrentGraph.ClearGraph();
m_window.CurrentGraph.CurrentMasterNode.Vec2Position = new Vector2( 1500, 0 );
m_window.ResetCameraSettings();
m_testingUndo = true;
m_undoState = DebugUndoNodeState.CreateNode;
}
public void Update()
{
if( m_testingUndo )
{
if( Event.current.type == EventType.Repaint )
{
m_window.Focus();
switch( m_undoState )
{
case DebugUndoNodeState.CreateNode:
{
m_window.CurrentGraph.DeSelectAll();
m_node = m_window.CreateNode( m_screenshotList[ 0 ].NodeType, Vector2.zero, null, true );
m_node.RefreshExternalReferences();
m_undoState = DebugUndoNodeState.FocusOnNode;
Debug.Log( "Created " + m_node.Attributes.Name );
}
break;
case DebugUndoNodeState.FocusOnNode:
{
m_window.FocusOnPoint( m_node.TruePosition.center, 1, false );
m_undoState = DebugUndoNodeState.WaitFrameCreate;
Debug.Log( "Focused " + m_node.Attributes.Name );
}
break;
case DebugUndoNodeState.WaitFrameCreate:
{
m_undoState = DebugUndoNodeState.DeleteNode;
Debug.Log( "Waiting on Create" );
}
break;
case DebugUndoNodeState.DeleteNode:
{
Debug.Log( "Deleting " + m_node.Attributes.Name );
m_window.DeleteSelectedNodeWithRepaint();
m_undoState = DebugUndoNodeState.WaitFrameDelete;
}
break;
case DebugUndoNodeState.WaitFrameDelete:
{
m_undoState = DebugUndoNodeState.UndoNode;
Debug.Log( "Waiting on Delete" );
}
break;
case DebugUndoNodeState.UndoNode:
{
Debug.Log( "Performing Undo" );
m_undoState = DebugUndoNodeState.WaitFrameUndo;
Undo.PerformUndo();
}
break;
case DebugUndoNodeState.WaitFrameUndo: { } break;
case DebugUndoNodeState.PrepareForNext:
{
m_screenshotList.RemoveAt( 0 );
Debug.Log( "Undo Performed. Nodes Left " + m_screenshotList.Count );
m_testingUndo = m_screenshotList.Count > 0;
if( m_testingUndo )
{
m_undoState = DebugUndoNodeState.CreateNode;
Debug.Log( "Going to next node" );
}
else
{
Debug.Log( "Finished Undo Test" );
}
}
break;
}
}
}
if( m_takingShots )
{
m_window.Focus();
switch( m_screenShotState )
{
case DebugScreenShotNodeState.CreateNode:
{
m_node = m_window.CreateNode( m_screenshotList[ 0 ].NodeType, Vector2.zero, null, false );
m_node.RefreshExternalReferences();
m_screenShotState = DebugScreenShotNodeState.FocusOnNode;
}
break;
case DebugScreenShotNodeState.FocusOnNode:
{
//m_window.FocusOnNode( m_node, 1, false );
m_window.FocusOnPoint( m_node.TruePosition.center, 1, false );
m_screenShotState = DebugScreenShotNodeState.TakeScreenshot;
}
break;
case DebugScreenShotNodeState.TakeScreenshot:
{
if( m_screenshotRT != null && Event.current.type == EventType.Repaint )
{
m_screenshotTex2D.ReadPixels( new Rect( 0, 0, m_screenshotRT.width, m_screenshotRT.height ), 0, 0 );
m_screenshotTex2D.Apply();
byte[] bytes = m_screenshotTex2D.EncodeToPNG();
string pictureFilename = UIUtils.ReplaceInvalidStrings( m_screenshotList[ 0 ].Name );
pictureFilename = UIUtils.RemoveInvalidCharacters( pictureFilename );
System.IO.File.WriteAllBytes( m_pathname + pictureFilename + ".png", bytes );
m_screenShotState = DebugScreenShotNodeState.WaitFrame;
}
}
break;
case DebugScreenShotNodeState.WaitFrame: { Debug.Log( "Wait Frame" ); m_screenShotState = DebugScreenShotNodeState.DeleteNode; } break;
case DebugScreenShotNodeState.DeleteNode:
{
m_window.DestroyNode( m_node );
m_screenshotList.RemoveAt( 0 );
m_takingShots = m_screenshotList.Count > 0;
Debug.Log( "Destroy Node " + m_screenshotList.Count );
if( m_takingShots )
{
m_screenShotState = DebugScreenShotNodeState.CreateNode;
}
else
{
RenderTexture.active = null;
m_screenshotRT.Release();
UnityEngine.Object.DestroyImmediate( m_screenshotRT );
m_screenshotRT = null;
UnityEngine.Object.DestroyImmediate( m_screenshotTex2D );
m_screenshotTex2D = null;
}
}
break;
};
}
}
public void Destroy()
{
m_window = null;
if( m_screenshotRT != null )
{
m_screenshotRT.Release();
UnityEngine.Object.DestroyImmediate( m_screenshotRT );
m_screenshotRT = null;
}
if( m_screenshotTex2D != null )
{
UnityEngine.Object.DestroyImmediate( m_screenshotTex2D );
m_screenshotTex2D = null;
}
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/NodeExporterUtils.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Utils/NodeExporterUtils.cs",
"repo_id": "jynew",
"token_count": 3183
}
| 886 |
fileFormatVersion: 2
guid: 6072f991722ef6c44b167cf204724a52
folderAsset: yes
timeCreated: 1481126944
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Version.meta/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Version.meta",
"repo_id": "jynew",
"token_count": 76
}
| 887 |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <[email protected]>
using System;
using UnityEngine;
namespace AmplifyShaderEditor
{
public enum WireStatus
{
Default = 0,
Highlighted,
Selected
}
[Serializable]
public sealed class WireReference
{
private WireStatus m_status = WireStatus.Default;
[SerializeField]
private int m_nodeId = -1;
[SerializeField]
private int m_portId = -1;
[SerializeField]
private WirePortDataType m_dataType = WirePortDataType.FLOAT;
[SerializeField]
private bool m_typeLocked = false;
public WireReference()
{
m_nodeId = -1;
m_portId = -1;
m_dataType = WirePortDataType.FLOAT;
m_typeLocked = false;
m_status = WireStatus.Default;
}
public WireReference( int nodeId, int portId, WirePortDataType dataType, bool typeLocked )
{
m_portId = portId;
m_nodeId = nodeId;
m_dataType = dataType;
m_typeLocked = typeLocked;
m_status = WireStatus.Default;
}
public void Invalidate()
{
m_nodeId = -1;
m_portId = -1;
m_typeLocked = false;
m_status = WireStatus.Default;
}
public void SetReference( int nodeId, int portId, WirePortDataType dataType, bool typeLocked )
{
m_nodeId = nodeId;
m_portId = portId;
m_dataType = dataType;
m_typeLocked = typeLocked;
}
public void SetReference( WirePort port )
{
m_nodeId = port.NodeId;
m_portId = port.PortId;
m_dataType = port.DataType;
}
public bool IsValid
{
get { return ( m_nodeId != -1 && m_portId != -1 ); }
}
public int NodeId
{
get { return m_nodeId; }
}
public int PortId
{
get { return m_portId; }
set { m_portId = value; }
}
public WirePortDataType DataType
{
get { return m_dataType; }
set { m_dataType = value; }
}
public bool TypeLocked
{
get { return m_typeLocked; }
}
public WireStatus WireStatus
{
get { return m_status; }
set { m_status = value; }
}
public override string ToString()
{
string dump = "";
dump += "* Wire Reference *\n";
dump += "NodeId : " + m_nodeId + "\n";
dump += "PortId : " + m_portId + "\n";
dump += "DataType " + m_dataType + "\n"; ;
return dump;
}
public void WriteToString( ref string myString )
{
IOUtils.AddFieldToString( ref myString, "PortId", m_portId );
IOUtils.AddFieldToString( ref myString, "NodeID", m_nodeId );
IOUtils.AddFieldToString( ref myString, "DataType", m_dataType );
IOUtils.AddFieldToString( ref myString, "TypeLocked", m_typeLocked );
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Wires/WireReference.cs/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/Editor/Wires/WireReference.cs",
"repo_id": "jynew",
"token_count": 1084
}
| 888 |
Shader "Hidden/ColorNode"
{
Properties {
_InputColor ("_InputColor", Color) = (0,0,0,0)
}
SubShader
{
Pass
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
float4 _InputColor;
float4 frag( v2f_img i ) : SV_Target
{
return _InputColor;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ColorNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ColorNode.shader",
"repo_id": "jynew",
"token_count": 167
}
| 889 |
Shader "Hidden/DeltaTime"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
float _EditorDeltaTime;
float4 frag( v2f_img i ) : SV_Target
{
float4 t = _EditorDeltaTime;
t.y = 1 / _EditorDeltaTime;
t.z = _EditorDeltaTime;
t.w = 1 / _EditorDeltaTime;
return cos(t);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_DeltaTime.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_DeltaTime.shader",
"repo_id": "jynew",
"token_count": 196
}
| 890 |
Shader "Hidden/EncodeViewNormalStereoHlpNode"
{
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
{
float3 a = tex2D ( _A, i.uv ).rgb;
return float4( EncodeViewNormalStereo( a ),0,0);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeViewNormalStereoHlpNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeViewNormalStereoHlpNode.shader",
"repo_id": "jynew",
"token_count": 209
}
| 891 |
Shader "Hidden/FresnelNode"
{
Properties
{
_A ("_Normal", 2D) = "white" {}
_B ("_Bias", 2D) = "white" {}
_C ("_Scale", 2D) = "white" {}
_D ("_Power", 2D) = "white" {}
_E ("_View", 2D) = "white" {}
}
SubShader
{
Pass //not connected world
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
//sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
int _FresnelType;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-saturate(dot(xy,xy)));
float3 vertexPos = float3(xy, z);
float3 worldNormal = normalize(float3(xy, z));
float3 worldViewDir = normalize(float3(0,0,-5) - vertexPos);
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( worldNormal, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //connected world
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
int _FresnelType;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-saturate(dot(xy,xy)));
float3 vertexPos = float3(xy, z);
float3 worldNormal = tex2D( _A, i.uv );
float3 worldViewDir = normalize(float3(0,0,-5) - vertexPos);
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( worldNormal, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //connected tangent
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
int _FresnelType;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-saturate(dot(xy,xy)));
float3 vertexPos = float3(xy, z);
float3 worldNormal = normalize(float3(xy, z));
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);
float3 tangentNormal = tex2D(_A, sphereUVs).xyz;
worldNormal = fixed3( dot( tSpace0.xyz, tangentNormal ), dot( tSpace1.xyz, tangentNormal ), dot( tSpace2.xyz, tangentNormal ) );
float3 worldViewDir = normalize(float3(0,0,-5) - vertexPos);
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( worldNormal, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //not connected half vector
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
//sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
int _FresnelType;
float4 _EditorWorldLightPos;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-(dot(xy,xy)));
float3 vertexPos = normalize(float3(xy, z));
float3 worldViewDir = normalize(float3(0,0,-5) - vertexPos);
float3 lightDir = normalize( _EditorWorldLightPos.xyz );
float3 halfVector = normalize(worldViewDir+lightDir);
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( halfVector, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( halfVector, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( halfVector, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //connected both
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
sampler2D _E;
int _FresnelType;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-saturate(dot(xy,xy)));
float3 vertexPos = float3(xy, z);
float3 worldNormal = tex2D( _A, i.uv );
float3 worldViewDir = tex2D( _E, i.uv );;
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( worldNormal, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //not connected world and light
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
//sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
int _FresnelType;
float4 _EditorWorldLightPos;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-(dot(xy,xy)));
float3 vertexPos = normalize(float3(xy, z));
float3 normal = normalize(vertexPos);
float3 worldNormal = UnityObjectToWorldNormal(normal);
float3 lightDir = normalize( _EditorWorldLightPos.xyz );
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( worldNormal, lightDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( worldNormal, lightDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( worldNormal, lightDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //connected view
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
sampler2D _E;
int _FresnelType;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
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 worldViewDir = tex2D( _E, i.uv );
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( worldNormal, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( worldNormal, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
Pass //not connected half vector with connected view
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
//sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
sampler2D _E;
int _FresnelType;
float4 _EditorWorldLightPos;
float4 frag(v2f_img i) : SV_Target
{
float b = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float pw = tex2D( _D, i.uv ).r;
float2 xy = 2 * i.uv - 1;
float z = -sqrt(1-(dot(xy,xy)));
float3 vertexPos = normalize(float3(xy, z));
float3 worldViewDir = tex2D( _E, i.uv );
float3 lightDir = normalize( _EditorWorldLightPos.xyz );
float3 halfVector = normalize(worldViewDir+lightDir);
float fresnel = 0;
if(_FresnelType == 0)
fresnel = (b + s*pow(s - dot( halfVector, worldViewDir ) , pw));
else if(_FresnelType == 1)
fresnel = (b + (1-b) * pow(1 - dot( halfVector, worldViewDir ) , 5));
else if(_FresnelType == 2)
{
float f0 = pow((1-s)/(1+s),2);
fresnel = (f0 + (1-f0) * pow(1 - dot( halfVector, worldViewDir ) , 5));
}
return fresnel;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_FresnelNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_FresnelNode.shader",
"repo_id": "jynew",
"token_count": 4834
}
| 892 |
Shader "Hidden/IndirectDiffuseLight"
{
Properties
{
_Intensity ("Intensity", Float) = 1
}
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
float _Intensity;
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 worldPos = mul(unity_ObjectToWorld, float4(vertexPos,1)).xyz;
float4 back = lerp(float4(0.4117,0.3843,0.3647,1),float4(0.4117,0.5059,0.6470,1),worldPos.y * 0.5 + 0.5);
return float4(GammaToLinearSpace(back.rgb * _Intensity),1);
}
ENDCG
}
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
float _Intensity;
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 ) );
float4 back = lerp(float4(0.4117,0.3843,0.3647,1),float4(0.4117,0.5059,0.6470,1),worldNormal.y * 0.5 + 0.5);
return float4(GammaToLinearSpace(back.rgb * _Intensity),1);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_IndirectDiffuseLight.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_IndirectDiffuseLight.shader",
"repo_id": "jynew",
"token_count": 1128
}
| 893 |
Shader "Hidden/LightColorNode"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
#include "Lighting.cginc"
float4 _EditorLightColor;
float4 frag(v2f_img i) : SV_Target
{
return _EditorLightColor;
}
ENDCG
}
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
#include "Lighting.cginc"
float4 _EditorLightColor;
float4 frag(v2f_img i) : SV_Target
{
return float4(_EditorLightColor.rgb, 0);
}
ENDCG
}
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
#include "Lighting.cginc"
float4 _EditorLightColor;
float4 frag(v2f_img i) : SV_Target
{
return _EditorLightColor.a;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_LightColorNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_LightColorNode.shader",
"repo_id": "jynew",
"token_count": 418
}
| 894 |
Shader "Hidden/NormalVertexDataNode"
{
SubShader
{
Pass
{
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 normal = normalize(float3(xy, z));
return float4(normal, 1);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_NormalVertexDataNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_NormalVertexDataNode.shader",
"repo_id": "jynew",
"token_count": 194
}
| 895 |
Shader "Hidden/ParallaxMappingNode"
{
Properties
{
_A ("_UV", 2D) = "white" {}
_B ("_Height", 2D) = "white" {}
_C ("_Scale", 2D) = "white" {}
_D ("_ViewDirTan", 2D) = "white" {}
}
SubShader
{
Pass
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
sampler2D _A;
sampler2D _B;
sampler2D _C;
sampler2D _D;
float _ParallaxType;
float4 frag(v2f_img i) : SV_Target
{
float2 uv = tex2D( _A, i.uv ).rg;
float h = tex2D( _B, i.uv ).r;
float s = tex2D( _C, i.uv ).r;
float3 vt = tex2D( _D, i.uv ).xyz;
float2 parallaxed = uv;
if ( _ParallaxType == 1 ) {
parallaxed = ( ( h - 1 )*( vt.xy / vt.z ) * s ) + uv;
}
else {
parallaxed = ( ( h - 1 )*( vt.xy ) * s ) + uv;
}
return float4(parallaxed, 0 , 0);
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ParallaxMappingNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_ParallaxMappingNode.shader",
"repo_id": "jynew",
"token_count": 479
}
| 896 |
Shader "Hidden/RangedFloatNode"
{
Properties {
_InputFloat ("_InputFloat", Float) = 0
}
SubShader
{
Pass
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
float _InputFloat;
float4 frag( v2f_img i ) : SV_Target
{
return _InputFloat;
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_RangedFloatNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_RangedFloatNode.shader",
"repo_id": "jynew",
"token_count": 160
}
| 897 |
Shader "Hidden/SamplerNode"
{
Properties
{
_B ("_UVs", 2D) = "white" {}
_C ("_Level", 2D) = "white" {}
_F ("_NormalScale", 2D) = "white" {}
_CustomUVs ("_CustomUVs", Int) = 0
_Unpack ("_Unpack", Int) = 0
_LodType ("_LodType", Int) = 0
_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"
#include "UnityStandardUtils.cginc"
sampler2D _B;
sampler2D _C;
sampler2D _F;
int _CustomUVs;
int _Unpack;
int _LodType;
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 )
{
float4 h = float4(0.5,0.5,1,1);
if ( _Unpack == 1 ) {
h.rgb = UnpackScaleNormal( h.xxyy, tex2D( _F, i.uv ).r );
}
return h;
}
else
{
if( _Type == 4 )
return UNITY_SAMPLE_TEX2DARRAY( _Array, float3( i.uv, 0 ) );
else if( _Type == 3 )
{
float3 uvs = float3(i.uv,0);
if ( _CustomUVs == 1 )
uvs = tex2D( _B, i.uv ).xyz;
return texCUBE( _Cube, uvs );
}
else if( _Type == 2 )
{
return tex3D( _Sampler3D, float3(i.uv,0) );
}
else
{
float2 uvs = i.uv;
float4 c = 0;
if ( _CustomUVs == 1 )
uvs = tex2D( _B, i.uv ).xy;
if ( _LodType == 1 )
{
float lod = tex2D( _C, i.uv ).r;
c = tex2Dlod( _Sampler, float4(uvs,0,lod) );
}
else if ( _LodType == 2 )
{
float bias = tex2D( _C, i.uv ).r;
c = tex2Dbias( _Sampler, float4(uvs,0,bias) );
}
else
{
c = tex2D( _Sampler, uvs );
}
if ( _Unpack == 1 ) {
float nscale = tex2D( _F, i.uv ).r;
c.rgb = UnpackScaleNormal( c, nscale );
}
return c;
}
}
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SamplerNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SamplerNode.shader",
"repo_id": "jynew",
"token_count": 1372
}
| 898 |
Shader "Hidden/SummedBlendNode"
{
Properties
{
_A ( "_Weights", 2D) = "white" {}
_B ( "_Layer1", 2D) = "white" {}
_C ( "_Layer2", 2D ) = "white" {}
_D ( "_Layer3", 2D ) = "white" {}
_E ( "_Layer4", 2D ) = "white" {}
}
SubShader
{
CGINCLUDE
#include "UnityCG.cginc"
#pragma vertex vert_img
#pragma fragment frag
sampler2D _A;
sampler2D _B;
ENDCG
Pass
{
CGPROGRAM
float4 frag(v2f_img i) : SV_Target
{
float4 Weights = tex2D ( _A, i.uv );
float4 Layer1 = tex2D( _B, i.uv );
return Weights*Layer1;
}
ENDCG
}
Pass
{
CGPROGRAM
sampler2D _C;
float4 frag ( v2f_img i ) : SV_Target
{
float4 Weights = tex2D ( _A, i.uv );
float4 Layer1 = tex2D ( _B, i.uv );
float4 Layer2 = tex2D ( _C, i.uv );
return ( Weights.x*Layer1 + Weights.y*Layer2 );
}
ENDCG
}
Pass
{
CGPROGRAM
sampler2D _C;
sampler2D _D;
float4 frag ( v2f_img i ) : SV_Target
{
float4 Weights = tex2D( _A, i.uv );
float4 Layer1 = tex2D( _B, i.uv );
float4 Layer2 = tex2D( _C, i.uv );
float4 Layer3 = tex2D( _D, i.uv );
return ( Weights.x*Layer1 + Weights.y*Layer2 + Weights.z*Layer3 );
}
ENDCG
}
Pass
{
CGPROGRAM
sampler2D _C;
sampler2D _D;
sampler2D _E;
float4 frag ( v2f_img i ) : SV_Target
{
float4 Weights = tex2D ( _A, i.uv );
float4 Layer1 = tex2D ( _B, i.uv );
float4 Layer2 = tex2D ( _C, i.uv );
float4 Layer3 = tex2D ( _D, i.uv );
float4 Layer4 = tex2D ( _E, i.uv );
return ( Weights.x*Layer1 + Weights.y*Layer2 + Weights.z*Layer3 + Weights.w*Layer4 );
}
ENDCG
}
}
}
|
jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SummedBlendNode.shader/0
|
{
"file_path": "jynew/jyx2/Assets/3rd/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_SummedBlendNode.shader",
"repo_id": "jynew",
"token_count": 895
}
| 899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.