111
This commit is contained in:
8
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/CustomRT.meta
vendored
Normal file
8
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/CustomRT.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8798b91ad37b8db43a0ff8a9afc5b4cd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
Shader /*ase_name*/"Hidden/Templates/CustomRTInit"/*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { }
|
||||
/*ase_all_modules*/
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Custom RT Init"
|
||||
CGPROGRAM
|
||||
#include "UnityCustomRenderTexture.cginc"
|
||||
|
||||
#pragma vertex ASEInitCustomRenderTextureVertexShader
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
/*ase_pragma*/
|
||||
|
||||
struct ase_appdata_init_customrendertexture
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
/*ase_vdata:p=p;uv0=tc0*/
|
||||
};
|
||||
|
||||
// User facing vertex to fragment structure for initialization materials
|
||||
struct ase_v2f_init_customrendertexture
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float3 direction : TEXCOORD1;
|
||||
/*ase_interp(2,):sp=sp.xyzw;uv0=tc0;uv1=tc1*/
|
||||
};
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
ase_v2f_init_customrendertexture ASEInitCustomRenderTextureVertexShader (ase_appdata_init_customrendertexture v /*ase_vert_input*/)
|
||||
{
|
||||
ase_v2f_init_customrendertexture o;
|
||||
/*ase_vert_code:v=ase_appdata_init_customrendertexture;o=ase_v2f_init_customrendertexture*/
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = float3(v.texcoord.xy, CustomRenderTexture3DTexcoordW);
|
||||
o.direction = CustomRenderTextureComputeCubeDirection(v.texcoord.xy);
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag(ase_v2f_init_customrendertexture IN /*ase_frag_input*/) : COLOR
|
||||
{
|
||||
float4 finalColor;
|
||||
/*ase_frag_code:IN=ase_v2f_init_customrendertexture*/
|
||||
finalColor = /*ase_frag_out:Frag Color;Float4*/float4(1,1,1,1)/*end*/;
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ce779933eb99f049b78d6163735e06f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,159 @@
|
||||
Shader /*ase_name*/"Hidden/Templates/CustomRTUpdate"/*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { }
|
||||
/*ase_all_modules*/
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Custom RT Update"
|
||||
CGPROGRAM
|
||||
#include "UnityCustomRenderTexture.cginc"
|
||||
#pragma vertex ASECustomRenderTextureVertexShader
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
/*ase_pragma*/
|
||||
|
||||
struct ase_appdata_customrendertexture
|
||||
{
|
||||
uint vertexID : SV_VertexID;
|
||||
/*ase_vdata:*/
|
||||
};
|
||||
|
||||
struct ase_v2f_customrendertexture
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float3 localTexcoord : TEXCOORD0; // Texcoord local to the update zone (== globalTexcoord if no partial update zone is specified)
|
||||
float3 globalTexcoord : TEXCOORD1; // Texcoord relative to the complete custom texture
|
||||
uint primitiveID : TEXCOORD2; // Index of the update zone (correspond to the index in the updateZones of the Custom Texture)
|
||||
float3 direction : TEXCOORD3; // For cube textures, direction of the pixel being rendered in the cubemap
|
||||
/*ase_interp(4,):sp=sp.xyzw;uv0=tc0;uv1=tc1;uv2=tc2;uv3=tc3*/
|
||||
};
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
ase_v2f_customrendertexture ASECustomRenderTextureVertexShader(ase_appdata_customrendertexture IN /*ase_vert_input*/ )
|
||||
{
|
||||
ase_v2f_customrendertexture OUT;
|
||||
/*ase_vert_code:IN=ase_appdata_customrendertexture;OUT=ase_v2f_customrendertexture*/
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
const float2 vertexPositions[6] =
|
||||
{
|
||||
{ -1.0f, 1.0f },
|
||||
{ -1.0f, -1.0f },
|
||||
{ 1.0f, -1.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ -1.0f, 1.0f },
|
||||
{ 1.0f, -1.0f }
|
||||
};
|
||||
|
||||
const float2 texCoords[6] =
|
||||
{
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 1.0f, 0.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f }
|
||||
};
|
||||
#else
|
||||
const float2 vertexPositions[6] =
|
||||
{
|
||||
{ 1.0f, 1.0f },
|
||||
{ -1.0f, -1.0f },
|
||||
{ -1.0f, 1.0f },
|
||||
{ -1.0f, -1.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 1.0f, -1.0f }
|
||||
};
|
||||
|
||||
const float2 texCoords[6] =
|
||||
{
|
||||
{ 1.0f, 1.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 1.0f, 0.0f }
|
||||
};
|
||||
#endif
|
||||
|
||||
uint primitiveID = IN.vertexID / 6;
|
||||
uint vertexID = IN.vertexID % 6;
|
||||
float3 updateZoneCenter = CustomRenderTextureCenters[primitiveID].xyz;
|
||||
float3 updateZoneSize = CustomRenderTextureSizesAndRotations[primitiveID].xyz;
|
||||
float rotation = CustomRenderTextureSizesAndRotations[primitiveID].w * UNITY_PI / 180.0f;
|
||||
|
||||
#if !UNITY_UV_STARTS_AT_TOP
|
||||
rotation = -rotation;
|
||||
#endif
|
||||
|
||||
// Normalize rect if needed
|
||||
if (CustomRenderTextureUpdateSpace > 0.0) // Pixel space
|
||||
{
|
||||
// Normalize xy because we need it in clip space.
|
||||
updateZoneCenter.xy /= _CustomRenderTextureInfo.xy;
|
||||
updateZoneSize.xy /= _CustomRenderTextureInfo.xy;
|
||||
}
|
||||
else // normalized space
|
||||
{
|
||||
// Un-normalize depth because we need actual slice index for culling
|
||||
updateZoneCenter.z *= _CustomRenderTextureInfo.z;
|
||||
updateZoneSize.z *= _CustomRenderTextureInfo.z;
|
||||
}
|
||||
|
||||
// Compute rotation
|
||||
|
||||
// Compute quad vertex position
|
||||
float2 clipSpaceCenter = updateZoneCenter.xy * 2.0 - 1.0;
|
||||
float2 pos = vertexPositions[vertexID] * updateZoneSize.xy;
|
||||
pos = CustomRenderTextureRotate2D(pos, rotation);
|
||||
pos.x += clipSpaceCenter.x;
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
pos.y += clipSpaceCenter.y;
|
||||
#else
|
||||
pos.y -= clipSpaceCenter.y;
|
||||
#endif
|
||||
|
||||
// For 3D texture, cull quads outside of the update zone
|
||||
// This is neeeded in additional to the preliminary minSlice/maxSlice done on the CPU because update zones can be disjointed.
|
||||
// ie: slices [1..5] and [10..15] for two differents zones so we need to cull out slices 0 and [6..9]
|
||||
if (CustomRenderTextureIs3D > 0.0)
|
||||
{
|
||||
int minSlice = (int)(updateZoneCenter.z - updateZoneSize.z * 0.5);
|
||||
int maxSlice = minSlice + (int)updateZoneSize.z;
|
||||
if (_CustomRenderTexture3DSlice < minSlice || _CustomRenderTexture3DSlice >= maxSlice)
|
||||
{
|
||||
pos.xy = float2(1000.0, 1000.0); // Vertex outside of ncs
|
||||
}
|
||||
}
|
||||
|
||||
OUT.vertex = float4(pos, 0.0, 1.0);
|
||||
OUT.primitiveID = asuint(CustomRenderTexturePrimitiveIDs[primitiveID]);
|
||||
OUT.localTexcoord = float3(texCoords[vertexID], CustomRenderTexture3DTexcoordW);
|
||||
OUT.globalTexcoord = float3(pos.xy * 0.5 + 0.5, CustomRenderTexture3DTexcoordW);
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
OUT.globalTexcoord.y = 1.0 - OUT.globalTexcoord.y;
|
||||
#endif
|
||||
OUT.direction = CustomRenderTextureComputeCubeDirection(OUT.globalTexcoord.xy);
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
float4 frag(ase_v2f_customrendertexture IN /*ase_frag_input*/) : COLOR
|
||||
{
|
||||
float4 finalColor;
|
||||
/*ase_frag_code:IN=ase_v2f_customrendertexture*/
|
||||
finalColor = /*ase_frag_out:Frag Color;Float4*/float4(1,1,1,1)/*end*/;
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32120270d1b3a8746af2aca8bc749736
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Legacy.meta
vendored
Normal file
9
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Legacy.meta
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e848a1cd56b4c4489af03626db2de58
|
||||
folderAsset: yes
|
||||
timeCreated: 1527085590
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
Shader /*ase_name*/ "Hidden/Templates/Legacy/DefaultUnlit" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||||
//only defining to not throw compilation error over Unity 5.5
|
||||
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||||
#endif
|
||||
|
||||
#pragma target 3.0
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;uv0=tc0.xy;uv1=tc1.xy*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(1,):sp=sp.xyzw;uv0=tc0.xy;uv1=tc0.zw*/
|
||||
};
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
uniform fixed4 _Color;
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
o.texcoord.xy = v.texcoord.xy;
|
||||
o.texcoord.zw = v.texcoord1.xy;
|
||||
|
||||
// ase common template code
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3*/ float3(0,0,0) /*end*/;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
fixed4 myColorVar;
|
||||
// ase common template code
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
myColorVar = /*ase_frag_out:Frag Color;Float4*/fixed4(1,0,0,1)/*end*/;
|
||||
return myColorVar;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e114a916ca3e4b4bb51972669d463bf
|
||||
timeCreated: 1496328687
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2991
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Legacy/Lit.shader
vendored
Normal file
2991
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Legacy/Lit.shader
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed95fe726fd7b4644bb42f4d1ddd2bcd
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,297 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/Multi Pass Unlit" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
Cull Off
|
||||
CGINCLUDE
|
||||
#pragma target 3.5
|
||||
ENDCG
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_main_pass*/
|
||||
Name "ForwardBase"
|
||||
Tags { "LightMode"="ForwardBase" }
|
||||
|
||||
/*ase_all_modules*/
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_fwdbase
|
||||
#ifndef UNITY_PASS_FORWARDBASE
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
#endif
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
/*ase_globals*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;n=n*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(1,):sp=sp.xyzw*/
|
||||
};
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_INITIALIZE_OUTPUT(v2f,o);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3;_Vertex*/ float3(0,0,0) /*end*/;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
#if ASE_SHADOWS
|
||||
#if UNITY_VERSION >= 560
|
||||
UNITY_TRANSFER_SHADOW( o, v.texcoord );
|
||||
#else
|
||||
TRANSFER_SHADOW( o );
|
||||
#endif
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag (v2f i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
float3 outColor;
|
||||
float outAlpha;
|
||||
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
outColor = /*ase_frag_out:Color;Float3;_Color*/float3(1,1,1)/*end*/;
|
||||
outAlpha = /*ase_frag_out:Alpha;Float;_Alpha*/1/*end*/;
|
||||
clip(outAlpha);
|
||||
return float4(outColor,outAlpha);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "ForwardAdd"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
ZWrite Off
|
||||
Blend One One
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#ifndef UNITY_PASS_FORWARDADD
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
#endif
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
/*ase_globals*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;n=n*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(1,):sp=sp.xyzw*/
|
||||
};
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_INITIALIZE_OUTPUT(v2f,o);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3;_Vertex*/ float3(0,0,0) /*end*/;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
#if ASE_SHADOWS
|
||||
#if UNITY_VERSION >= 560
|
||||
UNITY_TRANSFER_SHADOW( o, v.texcoord );
|
||||
#else
|
||||
TRANSFER_SHADOW( o );
|
||||
#endif
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag (v2f i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
float3 outColor;
|
||||
float outAlpha;
|
||||
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
outColor = /*ase_frag_out:Color;Float3;_Color*/float3(1,1,1)/*end*/;
|
||||
outAlpha = /*ase_frag_out:Alpha;Float;_Alpha*/1/*end*/;
|
||||
clip(outAlpha);
|
||||
return float4(outColor,outAlpha);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Deferred"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
/*ase_all_modules*/
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_prepassfinal
|
||||
#ifndef UNITY_PASS_DEFERRED
|
||||
#define UNITY_PASS_DEFERRED
|
||||
#endif
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
/*ase_globals*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;n=n*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(1,):sp=sp.xyzw*/
|
||||
};
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_INITIALIZE_OUTPUT(v2f,o);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3;_Vertex*/ float3(0,0,0) /*end*/;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
#if ASE_SHADOWS
|
||||
#if UNITY_VERSION >= 560
|
||||
UNITY_TRANSFER_SHADOW( o, v.texcoord );
|
||||
#else
|
||||
TRANSFER_SHADOW( o );
|
||||
#endif
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
void frag (v2f i /*ase_frag_input*/, out half4 outGBuffer0 : SV_Target0, out half4 outGBuffer1 : SV_Target1, out half4 outGBuffer2 : SV_Target2, out half4 outGBuffer3 : SV_Target3)
|
||||
{
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
outGBuffer0 = /*ase_frag_out:GBuffer0;Float4*/0/*end*/;
|
||||
outGBuffer1 = /*ase_frag_out:GBuffer1;Float4*/0/*end*/;
|
||||
outGBuffer2 = /*ase_frag_out:GBuffer2;Float4*/0/*end*/;
|
||||
outGBuffer3 = /*ase_frag_out:GBuffer3;Float4*/0/*end*/;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass:SyncP*/
|
||||
Name "ShadowCaster"
|
||||
Tags { "LightMode"="ShadowCaster" }
|
||||
ZWrite On
|
||||
ZTest LEqual
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_shadowcaster
|
||||
#ifndef UNITY_PASS_SHADOWCASTER
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
#endif
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
/*ase_globals*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;n=n*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
V2F_SHADOW_CASTER;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(1,):sp=sp.xyzw*/
|
||||
};
|
||||
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_INITIALIZE_OUTPUT(v2f,o);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3;_Vertex*/ float3(0,0,0) /*end*/;
|
||||
TRANSFER_SHADOW_CASTER_NORMALOFFSET(o)
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag (v2f i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
float3 outColor;
|
||||
float outAlpha;
|
||||
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
outColor = /*ase_frag_out:Color;Float3;_Color*/float3(1,1,1)/*end*/;
|
||||
outAlpha = /*ase_frag_out:Alpha;Float;_Alpha*/1/*end*/;
|
||||
clip(outAlpha);
|
||||
SHADOW_CASTER_FRAGMENT(i)
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
/*ase_pass_end*/
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1de45c0d41f68c41b2cc20c8b9c05ef
|
||||
timeCreated: 1496328687
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,89 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/PostProcessStack" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 3.5
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
|
||||
struct ASEAttributesDefault
|
||||
{
|
||||
float3 vertex : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
/*ase_vdata:p=p;uv0=tc0*/
|
||||
};
|
||||
|
||||
struct ASEVaryingsDefault
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float2 texcoordStereo : TEXCOORD1;
|
||||
#if STEREO_INSTANCING_ENABLED
|
||||
uint stereoTargetEyeIndex : SV_RenderTargetArrayIndex;
|
||||
#endif
|
||||
/*ase_interp(2,):sp=sp.xyzw;uv0=tc0.xy;uv1=tc1;uv2=tc2*/
|
||||
};
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
uniform half4 _MainTex_TexelSize;
|
||||
uniform half4 _MainTex_ST;
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
float2 TransformTriangleVertexToUV (float2 vertex)
|
||||
{
|
||||
float2 uv = (vertex + 1.0) * 0.5;
|
||||
return uv;
|
||||
}
|
||||
|
||||
ASEVaryingsDefault Vert( ASEAttributesDefault v /*ase_vert_input*/ )
|
||||
{
|
||||
ASEVaryingsDefault o;
|
||||
o.vertex = float4(v.vertex.xy, 0.0, 1.0);
|
||||
o.texcoord = TransformTriangleVertexToUV (v.vertex.xy);
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
o.texcoord = o.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0);
|
||||
#endif
|
||||
o.texcoordStereo = TransformStereoScreenSpaceTex (o.texcoord, 1.0);
|
||||
|
||||
v.texcoord = o.texcoordStereo;
|
||||
/*ase_local_var:spn*/float4 ase_ppsScreenPosVertexNorm = float4(o.texcoordStereo,0,1);
|
||||
|
||||
/*ase_vert_code:v=ASEAttributesDefault;o=ASEVaryingsDefault*/
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 Frag (ASEVaryingsDefault i /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
/*ase_local_var:spn*/float4 ase_ppsScreenPosFragNorm = float4(i.texcoordStereo,0,1);
|
||||
|
||||
/*ase_frag_code:i=ASEVaryingsDefault*/
|
||||
|
||||
float4 color = /*ase_frag_out:Frag Color;Float4*/tex2D(_MainTex, i.texcoord )/*end*/;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32139be9c1eb75640a847f011acf3bcf
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,123 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/Particles Alpha Blended" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
|
||||
_MainTex ("Particle Texture", 2D) = "white" {}
|
||||
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
|
||||
Category
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" }
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask RGB
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
/*ase_pass*/
|
||||
Pass {
|
||||
|
||||
CGPROGRAM
|
||||
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||||
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||||
#endif
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
#pragma multi_compile_instancing
|
||||
#pragma multi_compile_particles
|
||||
#pragma multi_compile_fog
|
||||
/*ase_pragma*/
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;uv0=tc0;c=c*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
UNITY_FOG_COORDS(1)
|
||||
#ifdef SOFTPARTICLES_ON
|
||||
float4 projPos : TEXCOORD2;
|
||||
#endif
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(3,):sp=sp.xyzw;uv0=tc0;c=c*/
|
||||
};
|
||||
|
||||
|
||||
#if UNITY_VERSION >= 560
|
||||
UNITY_DECLARE_DEPTH_TEXTURE( _CameraDepthTexture );
|
||||
#else
|
||||
uniform sampler2D_float _CameraDepthTexture;
|
||||
#endif
|
||||
|
||||
//Don't delete this comment
|
||||
// uniform sampler2D_float _CameraDepthTexture;
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
uniform fixed4 _TintColor;
|
||||
uniform float4 _MainTex_ST;
|
||||
uniform float _InvFade;
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert ( appdata_t v /*ase_vert_input*/ )
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
/*ase_vert_code:v=appdata_t;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Offset;Float3*/ float3( 0, 0, 0 ) /*end*/;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
#ifdef SOFTPARTICLES_ON
|
||||
o.projPos = ComputeScreenPos (o.vertex);
|
||||
COMPUTE_EYEDEPTH(o.projPos.z);
|
||||
#endif
|
||||
o.color = v.color;
|
||||
o.texcoord = v.texcoord;
|
||||
UNITY_TRANSFER_FOG(o,o.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag ( v2f i /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( i );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( i );
|
||||
|
||||
#ifdef SOFTPARTICLES_ON
|
||||
float sceneZ = LinearEyeDepth (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)));
|
||||
float partZ = i.projPos.z;
|
||||
float fade = saturate (_InvFade * (sceneZ-partZ));
|
||||
i.color.a *= fade;
|
||||
#endif
|
||||
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
fixed4 col = /*ase_frag_out:Color;Float4*/2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord.xy*_MainTex_ST.xy + _MainTex_ST.zw )/*end*/;
|
||||
UNITY_APPLY_FOG(i.fogCoord, col);
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b6a9f8b4f707c74ca64c0be8e590de0
|
||||
timeCreated: 1496654572
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,94 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/PostProcess" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ( "Screen", 2D ) = "black" {}
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags{ }
|
||||
|
||||
ZTest Always
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
|
||||
#pragma vertex vert_img_custom
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata_img_custom
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half2 texcoord : TEXCOORD0;
|
||||
/*ase_vdata:p=p;uv0=tc0*/
|
||||
};
|
||||
|
||||
struct v2f_img_custom
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
half2 uv : TEXCOORD0;
|
||||
half2 stereoUV : TEXCOORD2;
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
half4 uv2 : TEXCOORD1;
|
||||
half4 stereoUV2 : TEXCOORD3;
|
||||
#endif
|
||||
/*ase_interp(4,):sp=sp.xyzw;uv0=tc0.xy;uv1=tc1;uv2=tc2;uv3=tc3*/
|
||||
};
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
uniform half4 _MainTex_TexelSize;
|
||||
uniform half4 _MainTex_ST;
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
v2f_img_custom vert_img_custom ( appdata_img_custom v /*ase_vert_input*/ )
|
||||
{
|
||||
v2f_img_custom o;
|
||||
/*ase_vert_code:v=appdata_img_custom;o=v2f_img_custom*/
|
||||
o.pos = UnityObjectToClipPos( v.vertex );
|
||||
o.uv = float4( v.texcoord.xy, 1, 1 );
|
||||
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
o.uv2 = float4( v.texcoord.xy, 1, 1 );
|
||||
o.stereoUV2 = UnityStereoScreenSpaceUVAdjust ( o.uv2, _MainTex_ST );
|
||||
|
||||
if ( _MainTex_TexelSize.y < 0.0 )
|
||||
o.uv.y = 1.0 - o.uv.y;
|
||||
#endif
|
||||
o.stereoUV = UnityStereoScreenSpaceUVAdjust ( o.uv, _MainTex_ST );
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag ( v2f_img_custom i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
#ifdef UNITY_UV_STARTS_AT_TOP
|
||||
half2 uv = i.uv2;
|
||||
half2 stereoUV = i.stereoUV2;
|
||||
#else
|
||||
half2 uv = i.uv;
|
||||
half2 stereoUV = i.stereoUV;
|
||||
#endif
|
||||
|
||||
half4 finalColor;
|
||||
|
||||
// ase common template code
|
||||
/*ase_frag_code:i=v2f_img_custom*/
|
||||
|
||||
finalColor = /*ase_frag_out:Frag Color;Float4*/half4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c71b220b631b6344493ea3cf87110c93
|
||||
timeCreated: 1499337997
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,114 @@
|
||||
Shader /*ase_name*/"Hidden/Built-In/Sprites Default"/*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
|
||||
[PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {}
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||||
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||||
#endif
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
#pragma multi_compile _ PIXELSNAP_ON
|
||||
#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;uv0=tc0.xy;c=c*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(1,):sp=sp.xyzw;uv0=tc0.xy;c=c*/
|
||||
};
|
||||
|
||||
uniform fixed4 _Color;
|
||||
uniform float _EnableExternalAlpha;
|
||||
uniform sampler2D _MainTex;
|
||||
uniform sampler2D _AlphaTex;
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert( appdata_t IN /*ase_vert_input*/ )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
|
||||
/*ase_vert_code:IN=appdata_t;OUT=v2f*/
|
||||
|
||||
IN.vertex.xyz += /*ase_vert_out:Offset;Float3*/ float3(0,0,0) /*end*/;
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
OUT.texcoord = IN.texcoord;
|
||||
OUT.color = IN.color * _Color;
|
||||
#ifdef PIXELSNAP_ON
|
||||
OUT.vertex = UnityPixelSnap (OUT.vertex);
|
||||
#endif
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 SampleSpriteTexture (float2 uv)
|
||||
{
|
||||
fixed4 color = tex2D (_MainTex, uv);
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
// get the color from an external texture (usecase: Alpha support for ETC1 on android)
|
||||
fixed4 alpha = tex2D (_AlphaTex, uv);
|
||||
color.a = lerp (color.a, alpha.r, _EnableExternalAlpha);
|
||||
#endif //ETC1_EXTERNAL_ALPHA
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
/*ase_frag_code:IN=v2f*/
|
||||
fixed4 c = /*ase_frag_out:Color;Float4*/SampleSpriteTexture (IN.texcoord) * IN.color/*end*/;
|
||||
c.rgb *= c.a;
|
||||
return c;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f8ba0101102bb14ebf021ddadce9b49
|
||||
timeCreated: 1500572363
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,133 @@
|
||||
Shader /*ase_name*/"Hidden/Templates/Legacy/UIDefault"/*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||||
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||||
#endif
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;uv0=tc0.xy;c=c*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
half2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(2,):sp=sp.xyzw;uv0=tc0.xy;c=c;uv1=tc1.xyzw*/
|
||||
};
|
||||
|
||||
uniform fixed4 _Color;
|
||||
uniform fixed4 _TextureSampleAdd;
|
||||
uniform float4 _ClipRect;
|
||||
uniform sampler2D _MainTex;
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert( appdata_t IN /*ase_vert_input*/ )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
|
||||
OUT.worldPosition = IN.vertex;
|
||||
/*ase_vert_code:IN=appdata_t;OUT=v2f*/
|
||||
|
||||
OUT.worldPosition.xyz += /*ase_vert_out:Offset;Float3*/ float3( 0, 0, 0 ) /*end*/;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
OUT.color = IN.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
/*ase_frag_code:IN=v2f*/
|
||||
half4 color = /*ase_frag_out:Color;Float4*/(tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color/*end*/;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5056123faa0c79b47ab6ad7e8bf059a4
|
||||
timeCreated: 1496313583
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
117
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Legacy/Unlit.shader
vendored
Normal file
117
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Legacy/Unlit.shader
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/Unlit" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
/*ase_subshader_options:Name=Additional Options
|
||||
Option:Vertex Position,InvertActionOnDeselection:Absolute,Relative:Relative
|
||||
Absolute:SetDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Absolute:SetPortName:1,Vertex Position
|
||||
Relative:SetPortName:1,Vertex Offset
|
||||
*/
|
||||
|
||||
Tags { "RenderType"="Opaque" }
|
||||
|
||||
LOD 0
|
||||
|
||||
/*ase_stencil*/
|
||||
|
||||
/*ase_all_modules*/
|
||||
|
||||
CGINCLUDE
|
||||
#pragma target 3.5
|
||||
|
||||
float4 ComputeClipSpacePosition( float2 screenPosNorm, float deviceDepth )
|
||||
{
|
||||
float4 positionCS = float4( screenPosNorm * 2.0 - 1.0, deviceDepth, 1.0 );
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
positionCS.y = -positionCS.y;
|
||||
#endif
|
||||
return positionCS;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Unlit"
|
||||
|
||||
CGPROGRAM
|
||||
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||||
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||||
#endif
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_instancing
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
/*ase_vdata:p=p*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp.xyzw*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID( v );
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
UNITY_TRANSFER_INSTANCE_ID( v, o );
|
||||
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
float3 vertexValue = float3( 0, 0, 0 );
|
||||
#if ASE_ABSOLUTE_VERTEX_POS
|
||||
vertexValue = v.vertex.xyz;
|
||||
#endif
|
||||
vertexValue = /*ase_vert_out:Vertex Offset;Float3*/vertexValue/*end*/;
|
||||
#if ASE_ABSOLUTE_VERTEX_POS
|
||||
v.vertex.xyz = vertexValue;
|
||||
#else
|
||||
v.vertex.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
o.pos = UnityObjectToClipPos( v.vertex );
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( v2f IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
half4 finalColor;
|
||||
|
||||
/*ase_local_var:spn*/float4 ScreenPosNorm = float4( IN.pos.xy * ( _ScreenParams.zw - 1.0 ), IN.pos.zw );
|
||||
/*ase_local_var:sp*/float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, IN.pos.z ) * IN.pos.w;
|
||||
/*ase_local_var:spu*/float4 ScreenPos = ComputeScreenPos( ClipPos );
|
||||
|
||||
/*ase_frag_code:IN=v2f*/
|
||||
|
||||
finalColor = /*ase_frag_out:Frag Color;Float4*/half4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0770190933193b94aaa3065e307002fa
|
||||
timeCreated: 1496328687
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,127 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/UnlitLightmap" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
/*ase_all_modules*/
|
||||
CGINCLUDE
|
||||
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||||
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||||
#endif
|
||||
ENDCG
|
||||
Pass
|
||||
{
|
||||
/*ase_main_pass*/
|
||||
Tags{ "LightMode" = "VertexLMRGBM" "RenderType" = "Opaque" }
|
||||
Name "Unlit LM"
|
||||
CGPROGRAM
|
||||
#pragma target 3.5
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(0,):sp=sp.xyzw*/
|
||||
};
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3;_Vertex*/ float3(0,0,0) /*end*/;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( i );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( i );
|
||||
fixed4 finalColor;
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
finalColor = /*ase_frag_out:Frag Color;Float4;_Color*/fixed4(1,1,1,1)/*end*/;
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Tags{ "LightMode" = "VertexLM" "RenderType" = "Opaque" }
|
||||
Name "Unlit LM Mobile"
|
||||
CGPROGRAM
|
||||
#pragma target 3.5
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(0,):sp=sp.xyzw*/
|
||||
};
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert ( appdata v /*ase_vert_input*/)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Local Vertex;Float3;_Vertex*/ float3(0,0,0) /*end*/;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( i );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( i );
|
||||
fixed4 finalColor;
|
||||
/*ase_frag_code:i=v2f*/
|
||||
|
||||
finalColor = /*ase_frag_out:Frag Color;Float4;_Color*/fixed4(1,1,1,1)/*end*/;
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 899e609c083c74c4ca567477c39edef0
|
||||
timeCreated: 1528987785
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,179 @@
|
||||
Shader /*ase_name*/ "Hidden/Built-In/Wireframe" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_WireframeSmoothing ( "Wireframe Smoothing", Range( 0, 10 ) ) = 1
|
||||
_WireframeThickness ( "Wireframe Thickness", Range( 0, 10 ) ) = 1
|
||||
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
/*ase_subshader_options:Name=Additional Options
|
||||
Option:Vertex Position,InvertActionOnDeselection:Absolute,Relative:Relative
|
||||
Absolute:SetDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Absolute:SetPortName:_VertexOffset,Vertex Position
|
||||
Relative:SetPortName:_VertexOffset,Vertex Offset
|
||||
Option:Wireframe Mode:Opaque,Alpha Blend,Alpha Custom:Opaque
|
||||
Opaque:RemoveDefine:ASE_WIREFRAME_ALPHA
|
||||
Opaque:ShowPort:_SurfaceColor
|
||||
Opaque:SetPropertyOnPass:Unlit:BlendRGB,One,Zero
|
||||
Opaque:SetPropertyOnSubShader:RenderType,Opaque
|
||||
Opaque:SetPropertyOnSubShader:RenderQueue,Geometry
|
||||
Opaque:SetPropertyOnSubShader:ZWrite,On
|
||||
Alpha Blend:SetDefine:ASE_WIREFRAME_ALPHA
|
||||
Alpha Blend:HidePort:_SurfaceColor
|
||||
Alpha Blend:SetPropertyOnPass:Unlit:BlendRGB,SrcAlpha,OneMinusSrcAlpha
|
||||
Alpha Blend:SetPropertyOnSubShader:RenderType,Transparent
|
||||
Alpha Blend:SetPropertyOnSubShader:RenderQueue,Transparent
|
||||
Alpha Blend:SetPropertyOnSubShader:ZWrite,Off
|
||||
Alpha Custom:SetDefine:ASE_WIREFRAME_ALPHA
|
||||
Alpha Custom:HidePort:_SurfaceColor
|
||||
*/
|
||||
|
||||
Tags { "RenderType"="Opaque" }
|
||||
|
||||
LOD 0
|
||||
|
||||
/*ase_stencil*/
|
||||
|
||||
/*ase_all_modules*/
|
||||
|
||||
CGINCLUDE
|
||||
#pragma target 3.5
|
||||
|
||||
float4 ComputeClipSpacePosition( float2 screenPosNorm, float deviceDepth )
|
||||
{
|
||||
float4 positionCS = float4( screenPosNorm * 2.0 - 1.0, deviceDepth, 1.0 );
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
positionCS.y = -positionCS.y;
|
||||
#endif
|
||||
return positionCS;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_main_pass*/
|
||||
Name "Unlit"
|
||||
|
||||
Blend One Zero
|
||||
|
||||
CGPROGRAM
|
||||
#pragma require geometry
|
||||
|
||||
#pragma vertex vert_setup
|
||||
#pragma geometry geom
|
||||
#pragma fragment frag
|
||||
|
||||
#pragma multi_compile_instancing
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
/*ase_vdata:p=p*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float3 baryCoords : TEXCOORD0;
|
||||
/*ase_interp(1,):sp=sp.xyzw*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
appdata vert_setup( appdata v )
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
v2f vert_apply( appdata v, float3 baryCoords /*ase_vert_input*/ )
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID( v );
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
UNITY_TRANSFER_INSTANCE_ID( v, o );
|
||||
|
||||
/*ase_vert_code:v=appdata;o=v2f*/
|
||||
|
||||
float3 vertexValue = float3( 0, 0, 0 );
|
||||
#if ASE_ABSOLUTE_VERTEX_POS
|
||||
vertexValue = v.vertex.xyz;
|
||||
#endif
|
||||
|
||||
vertexValue = /*ase_vert_out:Vertex Offset;Float3;2;-1;_VertexOffset*/vertexValue/*end*/;
|
||||
|
||||
#if ASE_ABSOLUTE_VERTEX_POS
|
||||
v.vertex.xyz = vertexValue;
|
||||
#else
|
||||
v.vertex.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
o.pos = UnityObjectToClipPos( v.vertex );
|
||||
o.baryCoords = baryCoords;
|
||||
return o;
|
||||
}
|
||||
|
||||
[maxvertexcount(15)]
|
||||
void geom( triangle appdata input[3], uint pid : SV_PrimitiveID, inout TriangleStream<v2f> outStream )
|
||||
{
|
||||
outStream.Append( vert_apply( input[ 0 ], float3( 1, 0, 0 ) ) );
|
||||
outStream.Append( vert_apply( input[ 1 ], float3( 0, 1, 0 ) ) );
|
||||
outStream.Append( vert_apply( input[ 2 ], float3( 0, 0, 1 ) ) );
|
||||
}
|
||||
|
||||
float _WireframeSmoothing;
|
||||
float _WireframeThickness;
|
||||
|
||||
half ComputeWireframe( float3 baryCoords )
|
||||
{
|
||||
float3 deltas = fwidth( baryCoords );
|
||||
float3 smoothing = deltas * _WireframeSmoothing;
|
||||
float3 thickness = deltas * _WireframeThickness;
|
||||
baryCoords = smoothstep( thickness, thickness + smoothing, baryCoords );
|
||||
float minBary = min( baryCoords.x, min( baryCoords.y, baryCoords.z ) );
|
||||
return 1 - minBary;
|
||||
}
|
||||
|
||||
half4 frag( v2f IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
/*ase_local_var:spn*/float4 ScreenPosNorm = float4( IN.pos.xy * ( _ScreenParams.zw - 1.0 ), IN.pos.zw );
|
||||
/*ase_local_var:sp*/float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, IN.pos.z ) * IN.pos.w;
|
||||
/*ase_local_var:spu*/float4 ScreenPos = ComputeScreenPos( ClipPos );
|
||||
|
||||
/*ase_frag_code:IN=v2f*/
|
||||
|
||||
half3 wireColor = /*ase_frag_out:Wire Color;Float3;0;-1;_WireColor*/half3( 0, 0, 0 )/*end*/;
|
||||
half3 surfaceColor = /*ase_frag_out:Surface Color;Float3;1;-1;_SurfaceColor*/half3( 1, 1, 1 )/*end*/;
|
||||
|
||||
half wire = ComputeWireframe( IN.baryCoords );
|
||||
|
||||
half4 finalColor;
|
||||
#if defined( ASE_WIREFRAME_ALPHA )
|
||||
finalColor.rgb = wireColor;
|
||||
finalColor.a = wire;
|
||||
#else
|
||||
finalColor.rgb = lerp( surfaceColor.rgb, wireColor.rgb, wire );
|
||||
finalColor.a = 1;
|
||||
#endif
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45bf09b07249a46489d5200e9ba4d9f1
|
||||
timeCreated: 1496328687
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc9e432e1a0a4764f80870c080173cb7
|
||||
folderAsset: yes
|
||||
timeCreated: 1520621311
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
Both High Definition and Lightweight rendering pipelines are in development and in a preview state, so Amplify Shader Editor may have some nodes that are not fully updated for them.
|
||||
At the moment there are, for each SRP, two separate packages inside Amplify Shader Editor. They contemplate two major SRP versions that exist at the moment.
|
||||
For Unity 2018.2 and below, users can only install v3.x.x for both HD and LW rendering pipelines and as such they will need to unpack the unity packages containing the 3xx (Legacy) tag.
|
||||
For Unity 2018.3, users can only install v4.x.x for both HD and LW rendering pipelines and as such they will need to unpack the unity packages containing the 4xx (Legacy) tag.
|
||||
For Unity 2019.1 and above, users can only install v5.x.x for both HD and LW rendering pipelines and as such they will need to unpack the unity packages NOT containing the (Legacy) tag.
|
||||
|
||||
Unity 2018.2.x, HD and LW v3.x.x:
|
||||
* HDSRPTemplates 3xx (Legacy).unitypackage
|
||||
* HD PBR
|
||||
* HD Unlit
|
||||
|
||||
* LWSRPTemplates 3xx (Legacy).unitypackage
|
||||
* Lightweight PBR
|
||||
* Lightweight Unlit
|
||||
|
||||
Unity 2018.3.x, HD and LW v4.x.x:
|
||||
* HDSRPTemplates 4xx (Legacy).unitypackage
|
||||
* HD Lit
|
||||
* HD PBR
|
||||
* HD Unlit
|
||||
|
||||
* LWSRPTemplates 4xx (Legacy).unitypackage
|
||||
* Lightweight PBR
|
||||
* Lightweight Unlit
|
||||
|
||||
Unity 2019.1.x, HD and LW v5.x.x:
|
||||
* HDSRPTemplates.unitypackage
|
||||
* HD Lit
|
||||
* HD PBR
|
||||
* HD Unlit
|
||||
|
||||
* LWSRPTemplates.unitypackage
|
||||
* Lightweight PBR
|
||||
* Lightweight Unlit
|
||||
|
||||
Upon unpacking, the templates they may not be instantly available at the ( Create > Amplify Shader > ... ) menu over you project view, but a user can create p.e. a new Amplify Surface Shader, go to its Shader Type menu over the left Node Properties window and select its newly installed template.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2700348f89ce70c45a61d215e6999fee
|
||||
timeCreated: 1541774040
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/UI.meta
vendored
Normal file
8
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/UI.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74496d3592f11304594460822c98f98c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
151
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/UI/UI-Default.shader
vendored
Normal file
151
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/UI/UI-Default.shader
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
Shader /*ase_name*/"Hidden/Templates/UI-Default"/*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
/*ase_props*/
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
/*ase_vdata:p=p;uv0=tc0.xy;c=c*/
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
/*ase_interp(3,):sp=sp.xyzw;uv0=tc0.xy;c=c;uv1=tc1.xyzw*/
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
v2f vert(appdata_t v /*ase_vert_input*/)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
/*ase_vert_code:v=appdata_t;OUT=v2f*/
|
||||
|
||||
v.vertex.xyz += /*ase_vert_out:Offset;Float3*/ float3( 0, 0, 0 ) /*end*/;
|
||||
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(1, 1) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (v.vertex.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.mask = float4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN /*ase_frag_input*/) : SV_Target
|
||||
{
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
/*ase_frag_code:IN=v2f*/
|
||||
|
||||
half4 color = /*ase_frag_out:Color;Float4*/IN.color * (tex2D(_MainTex, TRANSFORM_TEX(IN.texcoord.xy, _MainTex)) + _TextureSampleAdd)/*end*/;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color.a *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
color.rgb *= color.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f27f87cd3eee9f14ca6152666d176284
|
||||
timeCreated: 1496313583
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP.meta
vendored
Normal file
8
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c1f24a24f5590b48b257f4c9a1d073f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
761
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/2DCustomLit.shader
vendored
Normal file
761
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/2DCustomLit.shader
vendored
Normal file
@@ -0,0 +1,761 @@
|
||||
Shader /*ase_name*/ "Hidden/Universal/2D Custom Lit" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
/*ase_subshader_options:Name=Additional Options
|
||||
Option:Vertex Position:Absolute,Relative:Relative
|
||||
Absolute:SetDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Absolute:SetPortName:Sprite Lit:4,Vertex Position
|
||||
Relative:RemoveDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Relative:SetPortName:Sprite Lit:4,Vertex Offset
|
||||
Option:Debug Display:false,true:false
|
||||
true:SetDefine:pragma multi_compile _ DEBUG_DISPLAY
|
||||
false,disable:RemoveDefine:pragma multi_compile _ DEBUG_DISPLAY
|
||||
*/
|
||||
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalPipeline"
|
||||
"RenderType"="Transparent"
|
||||
"UniversalMaterialType" = "Lit"
|
||||
"Queue"="Transparent"
|
||||
"ShaderGraphShader"="true"
|
||||
"ShaderGraphTargetId"=""
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0,0
|
||||
ColorMask RGBA
|
||||
/*ase_stencil*/
|
||||
|
||||
HLSLINCLUDE
|
||||
#pragma target 2.0
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d9 // ensure rendering platforms toggle list is visible
|
||||
|
||||
ENDHLSL
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "Sprite Lit"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Universal2D"
|
||||
}
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||||
#define ATTRIBUTES_NEED_COLOR
|
||||
#define VARYINGS_NEED_POSITION_WS
|
||||
#define VARYINGS_NEED_TEXCOORD0
|
||||
#define VARYINGS_NEED_COLOR
|
||||
#define VARYINGS_NEED_SCREENPOSITION
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITELIT
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float3 positionWS : TEXCOORD1;
|
||||
float4 color : TEXCOORD2;
|
||||
float4 screenPosition : TEXCOORD3;
|
||||
/*ase_interp(4,):sp=sp;uv0=tc0;wp=tc1;c=tc2;spn=tc3*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct SurfaceDescription
|
||||
{
|
||||
float3 BaseColor;
|
||||
float Alpha;
|
||||
};
|
||||
|
||||
half4 _RendererColor;
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o;
|
||||
ZERO_INITIALIZE(VertexOutput, o);
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;2;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;3;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;4;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS.xyz = vertexInput.positionWS;
|
||||
o.texCoord0.xyzw = v.uv0;
|
||||
o.color.xyzw = v.color;
|
||||
o.screenPosition.xyzw = vertexInput.positionNDC;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
||||
surfaceDescription.BaseColor = /*ase_frag_out:Color;Float3;0;-1;_Color*/IsGammaSpace() ? float3(0.5, 0.5, 0.5) : SRGBToLinear(float3(0.5, 0.5, 0.5))/*end*/;
|
||||
surfaceDescription.Alpha = /*ase_frag_out:Alpha;Float;1;-1;_Alpha*/1/*end*/;
|
||||
|
||||
half4 color = half4(surfaceDescription.BaseColor, surfaceDescription.Alpha);
|
||||
|
||||
#if defined(DEBUG_DISPLAY)
|
||||
SurfaceData2D surfaceData;
|
||||
InitializeSurfaceData(color.rgb, color.a, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(IN.positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||
half4 debugColor = 0;
|
||||
|
||||
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
|
||||
|
||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||
{
|
||||
return debugColor;
|
||||
}
|
||||
#endif
|
||||
|
||||
color *= IN.color * _RendererColor;
|
||||
return color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "Sprite Normal"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "NormalsRendering"
|
||||
}
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define VARYINGS_NEED_NORMAL_WS
|
||||
#define VARYINGS_NEED_TANGENT_WS
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITENORMAL
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float3 normalWS : TEXCOORD0;
|
||||
float4 tangentWS : TEXCOORD1;
|
||||
/*ase_interp(2,):sp=sp;wn=tc0;wt=tc1*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct SurfaceDescription
|
||||
{
|
||||
float3 NormalTS;
|
||||
float Alpha;
|
||||
};
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o;
|
||||
ZERO_INITIALIZE(VertexOutput, o);
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;2;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;3;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;4;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
float4 tangentWS = float4(TransformObjectToWorldDir(v.tangent.xyz), v.tangent.w);
|
||||
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
o.normalWS.xyz = -GetViewForwardDir();
|
||||
o.tangentWS.xyzw = tangentWS;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
||||
surfaceDescription.NormalTS = /*ase_frag_out:Normal;Float3;0;-1;_Normal*/float3(0.0f, 0.0f, 1.0f)/*end*/;
|
||||
surfaceDescription.Alpha = /*ase_frag_out:Alpha;Float;1;-1;_Alpha*/1/*end*/;
|
||||
|
||||
half crossSign = (IN.tangentWS.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale();
|
||||
half3 bitangent = crossSign * cross(IN.normalWS.xyz, IN.tangentWS.xyz);
|
||||
half4 color = half4(1.0,1.0,1.0, surfaceDescription.Alpha);
|
||||
|
||||
return NormalsRenderingShared(color, surfaceDescription.NormalTS, IN.tangentWS.xyz, bitangent, IN.normalWS);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "SceneSelectionPass"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "SceneSelectionPass"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Blend Off
|
||||
ZTest LEqual
|
||||
ZWrite On
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||||
#define SCENESELECTIONPASS 1
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
|
||||
/*ase_srp_cond_begin:>=140007*/
|
||||
#if ASE_SRP_VERSION >=140007
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||||
#endif
|
||||
/*ase_srp_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
int _ObjectId;
|
||||
int _PassValue;
|
||||
|
||||
struct SurfaceDescription
|
||||
{
|
||||
float Alpha;
|
||||
};
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert(VertexInput v /*ase_vert_input*/)
|
||||
{
|
||||
VertexOutput o;
|
||||
ZERO_INITIALIZE(VertexOutput, o);
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;1;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput IN/*ase_frag_input*/) : SV_TARGET
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
||||
surfaceDescription.Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/;
|
||||
|
||||
#ifdef _ALPHATEST_ON
|
||||
clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
|
||||
#endif
|
||||
|
||||
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "ScenePickingPass"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Picking"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Blend Off
|
||||
ZTest LEqual
|
||||
ZWrite On
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||||
#define SCENEPICKINGPASS 1
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
|
||||
/*ase_srp_cond_begin:>=140007*/
|
||||
#if ASE_SRP_VERSION >=140007
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||||
#endif
|
||||
/*ase_srp_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
float4 _SelectionID;
|
||||
|
||||
struct SurfaceDescription
|
||||
{
|
||||
float Alpha;
|
||||
};
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert(VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o;
|
||||
ZERO_INITIALIZE(VertexOutput, o);
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;1;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput IN /*ase_frag_input*/) : SV_TARGET
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
||||
surfaceDescription.Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/;
|
||||
|
||||
#ifdef _ALPHATEST_ON
|
||||
clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
|
||||
#endif
|
||||
|
||||
half4 outColor = unity_SelectionID;
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_main_pass*/
|
||||
Name "Sprite Forward"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||||
#define ATTRIBUTES_NEED_COLOR
|
||||
#define VARYINGS_NEED_POSITION_WS
|
||||
#define VARYINGS_NEED_TEXCOORD0
|
||||
#define VARYINGS_NEED_COLOR
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITEFORWARD
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float3 positionWS : TEXCOORD1;
|
||||
float4 color : TEXCOORD2;
|
||||
/*ase_interp(3,):sp=sp;uv0=tc0;wp=tc1;c=tc2*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct SurfaceDescription
|
||||
{
|
||||
float3 BaseColor;
|
||||
float Alpha;
|
||||
float3 NormalTS;
|
||||
};
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o;
|
||||
ZERO_INITIALIZE(VertexOutput, o);
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3( 0, 0, 0 );
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;3;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;4;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;5;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
o.positionWS.xyz = positionWS;
|
||||
o.texCoord0.xyzw = v.uv0;
|
||||
o.color.xyzw = v.color;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
||||
surfaceDescription.BaseColor = /*ase_frag_out:Color;Float3;0;-1;_Color*/IsGammaSpace() ? float3(0.5, 0.5, 0.5) : SRGBToLinear(float3(0.5, 0.5, 0.5))/*end*/;
|
||||
surfaceDescription.NormalTS = /*ase_frag_out:Normal;Float3;1;-1;_Normal*/float3(0.0f, 0.0f, 1.0f)/*end*/;
|
||||
surfaceDescription.Alpha = /*ase_frag_out:Alpha;Float;2;-1;_Alpha*/1/*end*/;
|
||||
|
||||
|
||||
half4 color = half4(surfaceDescription.BaseColor, surfaceDescription.Alpha);
|
||||
|
||||
#if defined(DEBUG_DISPLAY)
|
||||
SurfaceData2D surfaceData;
|
||||
InitializeSurfaceData(color.rgb, color.a, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(IN.positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||
half4 debugColor = 0;
|
||||
|
||||
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
|
||||
|
||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||
{
|
||||
return debugColor;
|
||||
}
|
||||
#endif
|
||||
|
||||
color *= IN.color;
|
||||
return color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
/*ase_pass_end*/
|
||||
}
|
||||
CustomEditor "UnityEditor.ShaderGraph.GenericShaderGraphMaterialGUI"
|
||||
FallBack "Hidden/Shader Graph/FallbackError"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ece0159bad6633944bf6b818f4dd296c
|
||||
timeCreated: 1639679966
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3963
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/Decal.shader
vendored
Normal file
3963
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/Decal.shader
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2a467ab6d5391a4ea692226d82ffefd
|
||||
timeCreated: 1635876295
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
4092
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/Lit.shader
vendored
Normal file
4092
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/Lit.shader
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a393e9c23941d6e4d9313e383c286c6a
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- unity_Lightmaps: {instanceID: 0}
|
||||
- unity_LightmapsInd: {instanceID: 0}
|
||||
- unity_ShadowMasks: {instanceID: 0}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal.meta
vendored
Normal file
9
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal.meta
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f076986f9dffb4f45a0b08af469b6a69
|
||||
folderAsset: yes
|
||||
timeCreated: 1568133090
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
756
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal/2DLit.shader
vendored
Normal file
756
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal/2DLit.shader
vendored
Normal file
@@ -0,0 +1,756 @@
|
||||
Shader /*ase_name*/ "Hidden/Universal/2D Lit" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
/*ase_subshader_options:Name=Additional Options
|
||||
Option:Vertex Position:Absolute,Relative:Relative
|
||||
Absolute:SetDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Absolute:SetPortName:Sprite Lit:4,Vertex Position
|
||||
Relative:RemoveDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Relative:SetPortName:Sprite Lit:4,Vertex Offset
|
||||
Option:Debug Display:false,true:false
|
||||
true:SetDefine:pragma multi_compile _ DEBUG_DISPLAY
|
||||
false,disable:RemoveDefine:pragma multi_compile _ DEBUG_DISPLAY
|
||||
Option:External Alpha:false,true:false
|
||||
true:SetDefine:pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||
false,disable:RemoveDefine:pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||
*/
|
||||
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "UniversalPipeline"
|
||||
"RenderType" = "Transparent"
|
||||
"Queue" = "Transparent+0"
|
||||
"UniversalMaterialType" = "Lit"
|
||||
"ShaderGraphShader"="true"
|
||||
"ShaderGraphTargetId"=""
|
||||
}
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLINCLUDE
|
||||
#pragma target 2.0
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d9 // ensure rendering platforms toggle list is visible
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Sprite Lit"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Universal2D"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0,0
|
||||
ColorMask RGBA
|
||||
/*ase_stencil*/
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_0
|
||||
#pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_1
|
||||
#pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_2
|
||||
#pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_3
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||||
#define ATTRIBUTES_NEED_COLOR
|
||||
#define VARYINGS_NEED_POSITION_WS
|
||||
#define VARYINGS_NEED_TEXCOORD0
|
||||
#define VARYINGS_NEED_COLOR
|
||||
#define VARYINGS_NEED_SCREENPOSITION
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITELIT
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_0
|
||||
SHAPE_LIGHT(0)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_1
|
||||
SHAPE_LIGHT(1)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_2
|
||||
SHAPE_LIGHT(2)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_3
|
||||
SHAPE_LIGHT(3)
|
||||
#endif
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float4 screenPosition : TEXCOORD2;
|
||||
float3 positionWS : TEXCOORD3;
|
||||
/*ase_interp(4,):sp=sp;uv0=tc0;*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D(_AlphaTex); SAMPLER(sampler_AlphaTex);
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;4;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;5;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;6;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
o.screenPosition = vertexInput.positionNDC;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
/*ase_local_var:wp*/float3 positionWS = IN.positionWS.xyz;
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;1;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
float4 Mask = /*ase_frag_out:Mask;Float4;2;-1;_Mask*/float4(1,1,1,1)/*end*/;
|
||||
float3 Normal = /*ase_frag_out:Normal;Float3;3;-1;_Normal*/float3( 0, 0, 1 )/*end*/;
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
float4 alpha = SAMPLE_TEXTURE2D(_AlphaTex, sampler_AlphaTex, IN.texCoord0.xy);
|
||||
Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture);
|
||||
#endif
|
||||
|
||||
SurfaceData2D surfaceData;
|
||||
InitializeSurfaceData(Color.rgb, Color.a, Mask, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(IN.texCoord0.xy, half2(IN.screenPosition.xy / IN.screenPosition.w), inputData);
|
||||
SETUP_DEBUG_DATA_2D(inputData, positionWS);
|
||||
return CombinedShapeLightShared(surfaceData, inputData);
|
||||
|
||||
Color *= IN.color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass:SyncP*/
|
||||
Name "Sprite Normal"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "NormalsRendering"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0,0
|
||||
ColorMask RGBA
|
||||
/*ase_stencil*/
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define VARYINGS_NEED_NORMAL_WS
|
||||
#define VARYINGS_NEED_TANGENT_WS
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITENORMAL
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float3 normalWS : TEXCOORD2;
|
||||
float4 tangentWS : TEXCOORD3;
|
||||
float3 bitangentWS : TEXCOORD4;
|
||||
/*ase_interp(5,):sp=sp;uv0=tc0;c=tc1;wn=tc2;wt=tc3;wbt=tc4*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;3;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;4;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;5;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
|
||||
float3 normalWS = TransformObjectToWorldNormal(v.normal);
|
||||
o.normalWS = -GetViewForwardDir();
|
||||
float4 tangentWS = float4( TransformObjectToWorldDir(v.tangent.xyz), v.tangent.w);
|
||||
o.tangentWS = normalize(tangentWS);
|
||||
half crossSign = (tangentWS.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale();
|
||||
o.bitangentWS = crossSign * cross(normalWS, tangentWS.xyz) * tangentWS.w;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;1;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
float3 Normal = /*ase_frag_out:Normal;Float3;2;-1;_Normal*/float3( 0, 0, 1 )/*end*/;
|
||||
|
||||
Color *= IN.color;
|
||||
|
||||
return NormalsRenderingShared(Color, Normal, IN.tangentWS.xyz, IN.bitangentWS, IN.normalWS);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass:SyncP*/
|
||||
Name "Sprite Forward"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0,0
|
||||
ColorMask RGBA
|
||||
/*ase_stencil*/
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||||
#define ATTRIBUTES_NEED_COLOR
|
||||
#define VARYINGS_NEED_POSITION_WS
|
||||
#define VARYINGS_NEED_TEXCOORD0
|
||||
#define VARYINGS_NEED_COLOR
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITEFORWARD
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float3 positionWS : TEXCOORD2;
|
||||
/*ase_interp(3,):sp=sp;uv0=tc0;c=tc1*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex );
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3( 0, 0, 0 );
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;3;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;4;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;5;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_local_var:wp*/float3 positionWS = IN.positionWS.xyz;
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;1;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
#if defined(DEBUG_DISPLAY)
|
||||
SurfaceData2D surfaceData;
|
||||
InitializeSurfaceData(Color.rgb, Color.a, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||
half4 debugColor = 0;
|
||||
|
||||
SETUP_DEBUG_DATA_2D(inputData, positionWS);
|
||||
|
||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||
{
|
||||
return debugColor;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
float4 alpha = SAMPLE_TEXTURE2D( _AlphaTex, sampler_AlphaTex, IN.texCoord0.xy );
|
||||
Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture );
|
||||
#endif
|
||||
|
||||
Color *= IN.color;
|
||||
return Color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "SceneSelectionPass"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "SceneSelectionPass"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||||
#define SCENESELECTIONPASS 1
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
|
||||
/*ase_srp_cond_begin:>=140007*/
|
||||
#if ASE_SRP_VERSION >=140007
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||||
#endif
|
||||
/*ase_srp_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
int _ObjectId;
|
||||
int _PassValue;
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert(VertexInput v /*ase_vert_input*/)
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;1;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput IN/*ase_frag_input*/) : SV_TARGET
|
||||
{
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;0;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "ScenePickingPass"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Picking"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||||
#define SCENEPICKINGPASS 1
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
|
||||
/*ase_srp_cond_begin:>=140007*/
|
||||
#if ASE_SRP_VERSION >=140007
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||||
#endif
|
||||
/*ase_srp_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
float4 _SelectionID;
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert(VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;1;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput IN /*ase_frag_input*/) : SV_TARGET
|
||||
{
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;0;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
half4 outColor = unity_SelectionID;
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
/*ase_pass_end*/
|
||||
}
|
||||
CustomEditor "UnityEditor.ShaderGraph.GenericShaderGraphMaterialGUI"
|
||||
FallBack "Hidden/Shader Graph/FallbackError"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 199187dac283dbe4a8cb1ea611d70c58
|
||||
timeCreated: 1568647145
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,598 @@
|
||||
Shader /*ase_name*/ "Hidden/Universal/2D Unlit" /*end*/
|
||||
{
|
||||
Properties
|
||||
{
|
||||
/*ase_props*/
|
||||
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
/*ase_subshader_options:Name=Additional Options
|
||||
Option:Vertex Position:Absolute,Relative:Relative
|
||||
Absolute:SetDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Absolute:SetPortName:Sprite Unlit:3,Vertex Position
|
||||
Relative:RemoveDefine:ASE_ABSOLUTE_VERTEX_POS 1
|
||||
Relative:SetPortName:Sprite Unlit:3,Vertex Offset
|
||||
Option:Debug Display:false,true:false
|
||||
true:SetDefine:pragma multi_compile _ DEBUG_DISPLAY
|
||||
false,disable:RemoveDefine:pragma multi_compile _ DEBUG_DISPLAY
|
||||
Option:External Alpha:false,true:false
|
||||
true:SetDefine:pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||
false,disable:RemoveDefine:pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||
*/
|
||||
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "UniversalPipeline"
|
||||
"RenderType" = "Transparent"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLINCLUDE
|
||||
#pragma target 2.0
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d9 // ensure rendering platforms toggle list is visible
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
Name "Sprite Unlit"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Universal2D"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0,0
|
||||
ColorMask RGBA
|
||||
/*ase_stencil*/
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||||
#define ATTRIBUTES_NEED_COLOR
|
||||
#define VARYINGS_NEED_POSITION_WS
|
||||
#define VARYINGS_NEED_TEXCOORD0
|
||||
#define VARYINGS_NEED_COLOR
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITEUNLIT
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float3 positionWS : TEXCOORD2;
|
||||
/*ase_interp(3,):sp=sp;uv0=tc0;c=tc1*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D(_AlphaTex); SAMPLER(sampler_AlphaTex);
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
float4 _RendererColor;
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;3;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;4;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;5;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;1;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
float4 alpha = SAMPLE_TEXTURE2D(_AlphaTex, sampler_AlphaTex, IN.texCoord0.xy);
|
||||
Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture);
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_DISPLAY)
|
||||
SurfaceData2D surfaceData;
|
||||
InitializeSurfaceData(Color.rgb, Color.a, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(IN.positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||
half4 debugColor = 0;
|
||||
|
||||
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
|
||||
|
||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||
{
|
||||
return debugColor;
|
||||
}
|
||||
#endif
|
||||
|
||||
Color *= IN.color * _RendererColor;
|
||||
return Color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass:SyncP*/
|
||||
Name "Sprite Unlit Forward"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0,0
|
||||
ColorMask RGBA
|
||||
/*ase_stencil*/
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||||
#define ATTRIBUTES_NEED_COLOR
|
||||
#define VARYINGS_NEED_POSITION_WS
|
||||
#define VARYINGS_NEED_TEXCOORD0
|
||||
#define VARYINGS_NEED_COLOR
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_SPRITEFORWARD
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
/*ase_vdata:p=p;n=n;t=t;c=c;uv0=tc0*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float3 positionWS : TEXCOORD2;
|
||||
/*ase_interp(3,):sp=sp;uv0=tc0;c=tc1*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex );
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
float4 _RendererColor;
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert( VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3( 0, 0, 0 );
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;3;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = /*ase_vert_out:Vertex Normal;Float3;4;-1;_VNormal*/v.normal/*end*/;
|
||||
v.tangent.xyz = /*ase_vert_out:Vertex Tangent;Float3;5;-1;_VTangent*/v.tangent.xyz/*end*/;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN /*ase_frag_input*/ ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;1;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
float4 alpha = SAMPLE_TEXTURE2D( _AlphaTex, sampler_AlphaTex, IN.texCoord0.xy );
|
||||
Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture );
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(DEBUG_DISPLAY)
|
||||
SurfaceData2D surfaceData;
|
||||
InitializeSurfaceData(Color.rgb, Color.a, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(IN.positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||
half4 debugColor = 0;
|
||||
|
||||
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
|
||||
|
||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||
{
|
||||
return debugColor;
|
||||
}
|
||||
#endif
|
||||
|
||||
Color *= IN.color * _RendererColor;
|
||||
return Color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "SceneSelectionPass"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "SceneSelectionPass"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||||
#define SCENESELECTIONPASS 1
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
|
||||
/*ase_srp_cond_begin:>=140007*/
|
||||
#if ASE_SRP_VERSION >=140007
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||||
#endif
|
||||
/*ase_srp_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
int _ObjectId;
|
||||
int _PassValue;
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert(VertexInput v /*ase_vert_input*/)
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;1;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput IN/*ase_frag_input*/) : SV_TARGET
|
||||
{
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;0;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
|
||||
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
/*ase_pass*/
|
||||
Pass
|
||||
{
|
||||
/*ase_hide_pass*/
|
||||
Name "ScenePickingPass"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Picking"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#define ATTRIBUTES_NEED_NORMAL
|
||||
#define ATTRIBUTES_NEED_TANGENT
|
||||
#define FEATURES_GRAPH_VERTEX
|
||||
|
||||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||||
#define SCENEPICKINGPASS 1
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
/*ase_unity_cond_begin:>=20220316*/
|
||||
#if ASE_SRP_VERSION >=140009
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
#endif
|
||||
/*ase_unity_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
|
||||
/*ase_srp_cond_begin:>=140007*/
|
||||
#if ASE_SRP_VERSION >=140007
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||||
#endif
|
||||
/*ase_srp_cond_end*/
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
/*ase_pragma*/
|
||||
|
||||
/*ase_globals*/
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
/*ase_vdata:p=p;n=n;t=t*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
/*ase_interp(0,):sp=sp*/
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
float4 _SelectionID;
|
||||
|
||||
/*ase_funcs*/
|
||||
|
||||
VertexOutput vert(VertexInput v /*ase_vert_input*/ )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
/*ase_vert_code:v=VertexInput;o=VertexOutput*/
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;1;-1;_Vertex*/defaultVertexValue/*end*/;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
float3 positionWS = TransformObjectToWorld(v.positionOS);
|
||||
o.positionCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput IN /*ase_frag_input*/) : SV_TARGET
|
||||
{
|
||||
/*ase_frag_code:IN=VertexOutput*/
|
||||
float4 Color = /*ase_frag_out:Color;Float4;0;-1;_Color*/float4( 1, 1, 1, 1 )/*end*/;
|
||||
half4 outColor = unity_SelectionID;
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
/*ase_pass_end*/
|
||||
}
|
||||
CustomEditor "UnityEditor.ShaderGraph.GenericShaderGraphMaterialGUI"
|
||||
FallBack "Hidden/Shader Graph/FallbackError"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf964e524c8e69742b1d21fbe2ebcc4a
|
||||
timeCreated: 1568647145
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2647
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal/PBR.shader
vendored
Normal file
2647
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal/PBR.shader
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94348b07e5e8bab40bd6c8a1e3df54cd
|
||||
timeCreated: 1520620337
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2768
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal/Unlit.shader
vendored
Normal file
2768
Assets/ThirdParty/Tools/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal/Unlit.shader
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2992e84f91cbeb14eab234972e07ea9d
|
||||
timeCreated: 1568647145
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user