摄像机区域的架构改动
This commit is contained in:
0
Assets/_Game/Shaders/BaseASE/Environment/.gitkeep
Normal file
0
Assets/_Game/Shaders/BaseASE/Environment/.gitkeep
Normal file
1881
Assets/_Game/Shaders/BaseASE/Environment/Sprite_Lit.shader
Normal file
1881
Assets/_Game/Shaders/BaseASE/Environment/Sprite_Lit.shader
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45eca44e9e53d054a963fa511fe9ca80
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,921 @@
|
||||
// Made with Amplify Shader Editor v1.9.2.2
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "BaseASE/Sprite/Lit/AverageBlur"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
|
||||
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
|
||||
[HDR]_MainColor("主颜色", Color) = (0,0,0,0)
|
||||
_MainTex("主帖图", 2D) = "white" {}
|
||||
_BlurRadius("模糊半径", Range( 0 , 10)) = 0
|
||||
[HDR]_LerpColor("替换颜色", Color) = (1,1,1,0)
|
||||
|
||||
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
|
||||
|
||||
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Lit" "ShaderGraphShader"="true" }
|
||||
|
||||
Cull Off
|
||||
HLSLINCLUDE
|
||||
#pragma target 2.0
|
||||
#pragma prefer_hlslcc gles
|
||||
// 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
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Sprite Lit"
|
||||
Tags { "LightMode"="Universal2D" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0 , 0
|
||||
ColorMask RGBA
|
||||
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#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 SHADERPASS SHADERPASS_SPRITELIT
|
||||
#define SHADERPASS_SPRITELIT
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.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/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.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"
|
||||
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainColor;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
float4 _LerpColor;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float4 screenPosition : TEXCOORD2;
|
||||
float3 positionWS : TEXCOORD3;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D(_AlphaTex); SAMPLER(sampler_AlphaTex);
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
float4 AverageBlur38( sampler2D tex, float2 uv, int radius, float2 texelSize )
|
||||
{
|
||||
float r = 0;
|
||||
float g = 0;
|
||||
float b = 0;
|
||||
float a = 0;
|
||||
float count = radius*2+1;
|
||||
count = count*count;
|
||||
for(int i = -radius;i<radius+1;i++)
|
||||
{
|
||||
for(int j = -radius;j<radius+1;j++)
|
||||
{
|
||||
float2 uvTemp = uv + float2(texelSize.x*i,texelSize.y*j);
|
||||
float4 colPixel = tex2D(tex,uvTemp);
|
||||
r = r+colPixel.x;
|
||||
g = g+colPixel.y;
|
||||
b = b+colPixel.z;
|
||||
a = a+colPixel.w;
|
||||
}
|
||||
}
|
||||
r = r/count;
|
||||
g=g/count;
|
||||
b=b/count;
|
||||
a=a/count;
|
||||
return float4(r,g,b,a);
|
||||
}
|
||||
|
||||
|
||||
VertexOutput vert ( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = v.normal;
|
||||
v.tangent.xyz = v.tangent.xyz;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.screenPosition = vertexInput.positionNDC;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag ( VertexOutput IN ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
float3 positionWS = IN.positionWS.xyz;
|
||||
|
||||
sampler2D tex38 = _MainTex;
|
||||
float2 uv_MainTex = IN.texCoord0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float2 uv38 = uv_MainTex;
|
||||
int radius38 = (int)_BlurRadius;
|
||||
float2 appendResult45 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 texelSize38 = appendResult45;
|
||||
float4 localAverageBlur38 = AverageBlur38( tex38 , uv38 , radius38 , texelSize38 );
|
||||
float4 break54 = ( _MainColor * localAverageBlur38 );
|
||||
float3 appendResult55 = (float3(break54.r , break54.g , break54.b));
|
||||
float3 appendResult56 = (float3(_LerpColor.r , _LerpColor.g , _LerpColor.b));
|
||||
float3 lerpResult51 = lerp( appendResult55 , appendResult56 , _LerpColor.a);
|
||||
float4 appendResult57 = (float4(lerpResult51 , break54.a));
|
||||
|
||||
float4 Color = appendResult57;
|
||||
float4 Mask = float4(1,1,1,1);
|
||||
float3 Normal = float3( 0, 0, 1 );
|
||||
|
||||
#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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "Sprite Normal"
|
||||
Tags { "LightMode"="NormalsRendering" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0 , 0
|
||||
ColorMask RGBA
|
||||
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#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"
|
||||
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainColor;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
float4 _LerpColor;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
|
||||
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;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
float4 AverageBlur38( sampler2D tex, float2 uv, int radius, float2 texelSize )
|
||||
{
|
||||
float r = 0;
|
||||
float g = 0;
|
||||
float b = 0;
|
||||
float a = 0;
|
||||
float count = radius*2+1;
|
||||
count = count*count;
|
||||
for(int i = -radius;i<radius+1;i++)
|
||||
{
|
||||
for(int j = -radius;j<radius+1;j++)
|
||||
{
|
||||
float2 uvTemp = uv + float2(texelSize.x*i,texelSize.y*j);
|
||||
float4 colPixel = tex2D(tex,uvTemp);
|
||||
r = r+colPixel.x;
|
||||
g = g+colPixel.y;
|
||||
b = b+colPixel.z;
|
||||
a = a+colPixel.w;
|
||||
}
|
||||
}
|
||||
r = r/count;
|
||||
g=g/count;
|
||||
b=b/count;
|
||||
a=a/count;
|
||||
return float4(r,g,b,a);
|
||||
}
|
||||
|
||||
|
||||
VertexOutput vert ( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = v.normal;
|
||||
v.tangent.xyz = v.tangent.xyz;
|
||||
|
||||
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 ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
sampler2D tex38 = _MainTex;
|
||||
float2 uv_MainTex = IN.texCoord0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float2 uv38 = uv_MainTex;
|
||||
int radius38 = (int)_BlurRadius;
|
||||
float2 appendResult45 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 texelSize38 = appendResult45;
|
||||
float4 localAverageBlur38 = AverageBlur38( tex38 , uv38 , radius38 , texelSize38 );
|
||||
float4 break54 = ( _MainColor * localAverageBlur38 );
|
||||
float3 appendResult55 = (float3(break54.r , break54.g , break54.b));
|
||||
float3 appendResult56 = (float3(_LerpColor.r , _LerpColor.g , _LerpColor.b));
|
||||
float3 lerpResult51 = lerp( appendResult55 , appendResult56 , _LerpColor.a);
|
||||
float4 appendResult57 = (float4(lerpResult51 , break54.a));
|
||||
|
||||
float4 Color = appendResult57;
|
||||
float3 Normal = float3( 0, 0, 1 );
|
||||
|
||||
Color *= IN.color;
|
||||
|
||||
return NormalsRenderingShared( Color, Normal, IN.tangentWS.xyz, IN.bitangentWS, IN.normalWS);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "Sprite Forward"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0 , 0
|
||||
ColorMask RGBA
|
||||
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#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"
|
||||
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainColor;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
float4 _LerpColor;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float3 positionWS : TEXCOORD2;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex );
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
float4 AverageBlur38( sampler2D tex, float2 uv, int radius, float2 texelSize )
|
||||
{
|
||||
float r = 0;
|
||||
float g = 0;
|
||||
float b = 0;
|
||||
float a = 0;
|
||||
float count = radius*2+1;
|
||||
count = count*count;
|
||||
for(int i = -radius;i<radius+1;i++)
|
||||
{
|
||||
for(int j = -radius;j<radius+1;j++)
|
||||
{
|
||||
float2 uvTemp = uv + float2(texelSize.x*i,texelSize.y*j);
|
||||
float4 colPixel = tex2D(tex,uvTemp);
|
||||
r = r+colPixel.x;
|
||||
g = g+colPixel.y;
|
||||
b = b+colPixel.z;
|
||||
a = a+colPixel.w;
|
||||
}
|
||||
}
|
||||
r = r/count;
|
||||
g=g/count;
|
||||
b=b/count;
|
||||
a=a/count;
|
||||
return float4(r,g,b,a);
|
||||
}
|
||||
|
||||
|
||||
VertexOutput vert( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID( v );
|
||||
UNITY_TRANSFER_INSTANCE_ID( v, o );
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3( 0, 0, 0 );
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = v.normal;
|
||||
v.tangent.xyz = v.tangent.xyz;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
|
||||
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
float3 positionWS = IN.positionWS.xyz;
|
||||
|
||||
sampler2D tex38 = _MainTex;
|
||||
float2 uv_MainTex = IN.texCoord0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float2 uv38 = uv_MainTex;
|
||||
int radius38 = (int)_BlurRadius;
|
||||
float2 appendResult45 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 texelSize38 = appendResult45;
|
||||
float4 localAverageBlur38 = AverageBlur38( tex38 , uv38 , radius38 , texelSize38 );
|
||||
float4 break54 = ( _MainColor * localAverageBlur38 );
|
||||
float3 appendResult55 = (float3(break54.r , break54.g , break54.b));
|
||||
float3 appendResult56 = (float3(_LerpColor.r , _LerpColor.g , _LerpColor.b));
|
||||
float3 lerpResult51 = lerp( appendResult55 , appendResult56 , _LerpColor.a);
|
||||
float4 appendResult57 = (float4(lerpResult51 , break54.a));
|
||||
|
||||
float4 Color = appendResult57;
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "SceneSelectionPass"
|
||||
Tags { "LightMode"="SceneSelectionPass" }
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainColor;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
float4 _LerpColor;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
|
||||
int _ObjectId;
|
||||
int _PassValue;
|
||||
|
||||
float4 AverageBlur38( sampler2D tex, float2 uv, int radius, float2 texelSize )
|
||||
{
|
||||
float r = 0;
|
||||
float g = 0;
|
||||
float b = 0;
|
||||
float a = 0;
|
||||
float count = radius*2+1;
|
||||
count = count*count;
|
||||
for(int i = -radius;i<radius+1;i++)
|
||||
{
|
||||
for(int j = -radius;j<radius+1;j++)
|
||||
{
|
||||
float2 uvTemp = uv + float2(texelSize.x*i,texelSize.y*j);
|
||||
float4 colPixel = tex2D(tex,uvTemp);
|
||||
r = r+colPixel.x;
|
||||
g = g+colPixel.y;
|
||||
b = b+colPixel.z;
|
||||
a = a+colPixel.w;
|
||||
}
|
||||
}
|
||||
r = r/count;
|
||||
g=g/count;
|
||||
b=b/count;
|
||||
a=a/count;
|
||||
return float4(r,g,b,a);
|
||||
}
|
||||
|
||||
|
||||
VertexOutput vert(VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
|
||||
o.ase_texcoord.xy = v.ase_texcoord.xy;
|
||||
|
||||
//setting value to unused interpolator channels and avoid initialization warnings
|
||||
o.ase_texcoord.zw = 0;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#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 ) : SV_TARGET
|
||||
{
|
||||
sampler2D tex38 = _MainTex;
|
||||
float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float2 uv38 = uv_MainTex;
|
||||
int radius38 = (int)_BlurRadius;
|
||||
float2 appendResult45 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 texelSize38 = appendResult45;
|
||||
float4 localAverageBlur38 = AverageBlur38( tex38 , uv38 , radius38 , texelSize38 );
|
||||
float4 break54 = ( _MainColor * localAverageBlur38 );
|
||||
float3 appendResult55 = (float3(break54.r , break54.g , break54.b));
|
||||
float3 appendResult56 = (float3(_LerpColor.r , _LerpColor.g , _LerpColor.b));
|
||||
float3 lerpResult51 = lerp( appendResult55 , appendResult56 , _LerpColor.a);
|
||||
float4 appendResult57 = (float4(lerpResult51 , break54.a));
|
||||
|
||||
float4 Color = appendResult57;
|
||||
|
||||
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "ScenePickingPass"
|
||||
Tags { "LightMode"="Picking" }
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainColor;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
float4 _LerpColor;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
float4 _SelectionID;
|
||||
|
||||
float4 AverageBlur38( sampler2D tex, float2 uv, int radius, float2 texelSize )
|
||||
{
|
||||
float r = 0;
|
||||
float g = 0;
|
||||
float b = 0;
|
||||
float a = 0;
|
||||
float count = radius*2+1;
|
||||
count = count*count;
|
||||
for(int i = -radius;i<radius+1;i++)
|
||||
{
|
||||
for(int j = -radius;j<radius+1;j++)
|
||||
{
|
||||
float2 uvTemp = uv + float2(texelSize.x*i,texelSize.y*j);
|
||||
float4 colPixel = tex2D(tex,uvTemp);
|
||||
r = r+colPixel.x;
|
||||
g = g+colPixel.y;
|
||||
b = b+colPixel.z;
|
||||
a = a+colPixel.w;
|
||||
}
|
||||
}
|
||||
r = r/count;
|
||||
g=g/count;
|
||||
b=b/count;
|
||||
a=a/count;
|
||||
return float4(r,g,b,a);
|
||||
}
|
||||
|
||||
|
||||
VertexOutput vert(VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
|
||||
o.ase_texcoord.xy = v.ase_texcoord.xy;
|
||||
|
||||
//setting value to unused interpolator channels and avoid initialization warnings
|
||||
o.ase_texcoord.zw = 0;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#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 ) : SV_TARGET
|
||||
{
|
||||
sampler2D tex38 = _MainTex;
|
||||
float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float2 uv38 = uv_MainTex;
|
||||
int radius38 = (int)_BlurRadius;
|
||||
float2 appendResult45 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 texelSize38 = appendResult45;
|
||||
float4 localAverageBlur38 = AverageBlur38( tex38 , uv38 , radius38 , texelSize38 );
|
||||
float4 break54 = ( _MainColor * localAverageBlur38 );
|
||||
float3 appendResult55 = (float3(break54.r , break54.g , break54.b));
|
||||
float3 appendResult56 = (float3(_LerpColor.r , _LerpColor.g , _LerpColor.b));
|
||||
float3 lerpResult51 = lerp( appendResult55 , appendResult56 , _LerpColor.a);
|
||||
float4 appendResult57 = (float4(lerpResult51 , break54.a));
|
||||
|
||||
float4 Color = appendResult57;
|
||||
half4 outColor = _SelectionID;
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
}
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
Fallback "Hidden/InternalErrorShader"
|
||||
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19202
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;34;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Normal;0;1;Sprite Normal;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=NormalsRendering;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;35;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Forward;0;2;Sprite Forward;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;36;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;SceneSelectionPass;0;3;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;37;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;ScenePickingPass;0;4;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode;45;-1536,-896;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.TexelSizeNode;42;-1728,-896;Inherit;False;-1;1;0;SAMPLER2D;;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode;46;-1728,-1120;Inherit;False;0;44;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.TexturePropertyNode;44;-1968,-1023;Inherit;True;Property;_MainTex;主帖图;1;0;Create;False;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
|
||||
Node;AmplifyShaderEditor.RangedFloatNode;47;-1728,-992;Inherit;False;Property;_BlurRadius;模糊半径;2;0;Create;False;0;0;0;False;0;False;0;2;0;10;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;49;-1152,-1152;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.CustomExpressionNode;38;-1408,-1024;Inherit;False;float r = 0@$float g = 0@$float b = 0@$float a = 0@$float count = radius*2+1@$count = count*count@$for(int i = -radius@i<radius+1@i++)${$ for(int j = -radius@j<radius+1@j++)$ {$ float2 uvTemp = uv + float2(texelSize.x*i,texelSize.y*j)@$ float4 colPixel = tex2D(tex,uvTemp)@$ r = r+colPixel.x@$ g = g+colPixel.y@$ b = b+colPixel.z@$ a = a+colPixel.w@ $ }$}$r = r/count@$g=g/count@$b=b/count@$a=a/count@$return float4(r,g,b,a)@$;4;Create;4;True;tex;SAMPLER2D;0;In;;Inherit;False;True;uv;FLOAT2;0,0;In;;Inherit;False;True;radius;INT;0;In;;Inherit;False;True;texelSize;FLOAT2;0,0;In;;Inherit;False;AverageBlur;True;False;0;33397e96d5047fc43a9fbba09f992c70;False;4;0;SAMPLER2D;0;False;1;FLOAT2;0,0;False;2;INT;0;False;3;FLOAT2;0,0;False;1;FLOAT4;0
|
||||
Node;AmplifyShaderEditor.ColorNode;48;-1408,-1216;Inherit;False;Property;_MainColor;主颜色;0;1;[HDR];Create;False;0;0;0;False;0;False;0,0,0,0;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.BreakToComponentsNode;54;-1008,-1344;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode;55;-896,-1344;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
|
||||
Node;AmplifyShaderEditor.LerpOp;51;-736,-1200;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode;57;-576,-1200;Inherit;False;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode;56;-896,-1120;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
|
||||
Node;AmplifyShaderEditor.ColorNode;50;-1152,-1024;Inherit;False;Property;_LerpColor;替换颜色;3;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,0;0.4127358,0.5,0.4389151,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;33;-416,-1200;Float;False;True;-1;2;ASEMaterialInspector;0;16;BaseASE/Sprite/Lit/AverageBlur;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Lit;0;0;Sprite Lit;6;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;3;Vertex Position;1;0;Debug Display;0;0;External Alpha;0;0;0;5;True;True;True;True;True;False;;False;0
|
||||
WireConnection;45;0;42;1
|
||||
WireConnection;45;1;42;2
|
||||
WireConnection;42;0;44;0
|
||||
WireConnection;49;0;48;0
|
||||
WireConnection;49;1;38;0
|
||||
WireConnection;38;0;44;0
|
||||
WireConnection;38;1;46;0
|
||||
WireConnection;38;2;47;0
|
||||
WireConnection;38;3;45;0
|
||||
WireConnection;54;0;49;0
|
||||
WireConnection;55;0;54;0
|
||||
WireConnection;55;1;54;1
|
||||
WireConnection;55;2;54;2
|
||||
WireConnection;51;0;55;0
|
||||
WireConnection;51;1;56;0
|
||||
WireConnection;51;2;50;4
|
||||
WireConnection;57;0;51;0
|
||||
WireConnection;57;3;54;3
|
||||
WireConnection;56;0;50;1
|
||||
WireConnection;56;1;50;2
|
||||
WireConnection;56;2;50;3
|
||||
WireConnection;33;1;57;0
|
||||
ASEEND*/
|
||||
//CHKSM=D4664DACC27583F8FBF6211420BB1B74486B19AF
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ceaca947e9a953d4c84ab2a9cc41e881
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,815 @@
|
||||
// Made with Amplify Shader Editor v1.9.2.2
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "BaseASE/Sprite/Lit/GaussianBlur"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
|
||||
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
|
||||
_MainTex("主帖图", 2D) = "white" {}
|
||||
_BlurRadius("模糊半径", Range( 0 , 10)) = 0
|
||||
[KeywordEnum(_3x3,_5x5)] _BlurCount("模糊次数", Float) = 0
|
||||
|
||||
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||||
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
|
||||
|
||||
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Lit" }
|
||||
|
||||
Cull Off
|
||||
HLSLINCLUDE
|
||||
#pragma target 2.0
|
||||
#pragma prefer_hlslcc gles
|
||||
// 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
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Sprite Lit"
|
||||
Tags { "LightMode"="Universal2D" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0 , 0
|
||||
ColorMask RGBA
|
||||
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#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 SHADERPASS SHADERPASS_SPRITELIT
|
||||
#define SHADERPASS_SPRITELIT
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.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/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.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"
|
||||
|
||||
#include "../GaussianBlur.hlsl"
|
||||
#pragma shader_feature_local _BLURCOUNT__3X3 _BLURCOUNT__5X5
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainTex_TexelSize;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float4 screenPosition : TEXCOORD2;
|
||||
float3 positionWS : TEXCOORD3;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D(_AlphaTex); SAMPLER(sampler_AlphaTex);
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
|
||||
VertexOutput vert ( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = v.normal;
|
||||
v.tangent.xyz = v.tangent.xyz;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
||||
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.screenPosition = vertexInput.positionNDC;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag ( VertexOutput IN ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
float3 positionWS = IN.positionWS.xyz;
|
||||
|
||||
sampler2D tex59 = _MainTex;
|
||||
float2 texCoord51 = IN.texCoord0.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float2 uv52 = texCoord51;
|
||||
float2 uv59 = uv52;
|
||||
float2 appendResult56 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 uv_delat58 = ( appendResult56 * _BlurRadius );
|
||||
float2 uv_delta59 = uv_delat58;
|
||||
float4 localGaussianBlur_3x359 = GaussianBlur_3x3( tex59 , uv59 , uv_delta59 );
|
||||
sampler2D tex48 = _MainTex;
|
||||
float2 uv48 = uv52;
|
||||
float2 uv_delta48 = uv_delat58;
|
||||
float4 localGaussianBlur_5x548 = GaussianBlur_5x5( tex48 , uv48 , uv_delta48 );
|
||||
#if defined(_BLURCOUNT__3X3)
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#elif defined(_BLURCOUNT__5X5)
|
||||
float4 staticSwitch73 = localGaussianBlur_5x548;
|
||||
#else
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#endif
|
||||
|
||||
float4 Color = staticSwitch73;
|
||||
float4 Mask = float4(1,1,1,1);
|
||||
float3 Normal = float3( 0, 0, 1 );
|
||||
|
||||
#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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "Sprite Normal"
|
||||
Tags { "LightMode"="NormalsRendering" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0 , 0
|
||||
ColorMask RGBA
|
||||
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#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"
|
||||
|
||||
#include "../GaussianBlur.hlsl"
|
||||
#pragma shader_feature_local _BLURCOUNT__3X3 _BLURCOUNT__5X5
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainTex_TexelSize;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
|
||||
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;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
|
||||
VertexOutput vert ( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = v.normal;
|
||||
v.tangent.xyz = v.tangent.xyz;
|
||||
|
||||
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 ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
sampler2D tex59 = _MainTex;
|
||||
float2 texCoord51 = IN.texCoord0.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float2 uv52 = texCoord51;
|
||||
float2 uv59 = uv52;
|
||||
float2 appendResult56 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 uv_delat58 = ( appendResult56 * _BlurRadius );
|
||||
float2 uv_delta59 = uv_delat58;
|
||||
float4 localGaussianBlur_3x359 = GaussianBlur_3x3( tex59 , uv59 , uv_delta59 );
|
||||
sampler2D tex48 = _MainTex;
|
||||
float2 uv48 = uv52;
|
||||
float2 uv_delta48 = uv_delat58;
|
||||
float4 localGaussianBlur_5x548 = GaussianBlur_5x5( tex48 , uv48 , uv_delta48 );
|
||||
#if defined(_BLURCOUNT__3X3)
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#elif defined(_BLURCOUNT__5X5)
|
||||
float4 staticSwitch73 = localGaussianBlur_5x548;
|
||||
#else
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#endif
|
||||
|
||||
float4 Color = staticSwitch73;
|
||||
float3 Normal = float3( 0, 0, 1 );
|
||||
|
||||
Color *= IN.color;
|
||||
|
||||
return NormalsRenderingShared( Color, Normal, IN.tangentWS.xyz, IN.bitangentWS, IN.normalWS);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "Sprite Forward"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
|
||||
ZTest LEqual
|
||||
ZWrite Off
|
||||
Offset 0 , 0
|
||||
ColorMask RGBA
|
||||
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
|
||||
#define _SURFACE_TYPE_TRANSPARENT 1
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#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"
|
||||
|
||||
#include "../GaussianBlur.hlsl"
|
||||
#pragma shader_feature_local _BLURCOUNT__3X3 _BLURCOUNT__5X5
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainTex_TexelSize;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 uv0 : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 texCoord0 : TEXCOORD0;
|
||||
float4 color : TEXCOORD1;
|
||||
float3 positionWS : TEXCOORD2;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if ETC1_EXTERNAL_ALPHA
|
||||
TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex );
|
||||
float _EnableAlphaTexture;
|
||||
#endif
|
||||
|
||||
|
||||
VertexOutput vert( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID( v );
|
||||
UNITY_TRANSFER_INSTANCE_ID( v, o );
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
|
||||
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3( 0, 0, 0 );
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
v.positionOS.xyz = vertexValue;
|
||||
#else
|
||||
v.positionOS.xyz += vertexValue;
|
||||
#endif
|
||||
v.normal = v.normal;
|
||||
v.tangent.xyz = v.tangent.xyz;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
|
||||
|
||||
o.texCoord0 = v.uv0;
|
||||
o.color = v.color;
|
||||
o.positionCS = vertexInput.positionCS;
|
||||
o.positionWS = vertexInput.positionWS;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag( VertexOutput IN ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
float3 positionWS = IN.positionWS.xyz;
|
||||
|
||||
sampler2D tex59 = _MainTex;
|
||||
float2 texCoord51 = IN.texCoord0.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float2 uv52 = texCoord51;
|
||||
float2 uv59 = uv52;
|
||||
float2 appendResult56 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 uv_delat58 = ( appendResult56 * _BlurRadius );
|
||||
float2 uv_delta59 = uv_delat58;
|
||||
float4 localGaussianBlur_3x359 = GaussianBlur_3x3( tex59 , uv59 , uv_delta59 );
|
||||
sampler2D tex48 = _MainTex;
|
||||
float2 uv48 = uv52;
|
||||
float2 uv_delta48 = uv_delat58;
|
||||
float4 localGaussianBlur_5x548 = GaussianBlur_5x5( tex48 , uv48 , uv_delta48 );
|
||||
#if defined(_BLURCOUNT__3X3)
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#elif defined(_BLURCOUNT__5X5)
|
||||
float4 staticSwitch73 = localGaussianBlur_5x548;
|
||||
#else
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#endif
|
||||
|
||||
float4 Color = staticSwitch73;
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "SceneSelectionPass"
|
||||
Tags { "LightMode"="SceneSelectionPass" }
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "../GaussianBlur.hlsl"
|
||||
#pragma shader_feature_local _BLURCOUNT__3X3 _BLURCOUNT__5X5
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainTex_TexelSize;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
|
||||
int _ObjectId;
|
||||
int _PassValue;
|
||||
|
||||
|
||||
VertexOutput vert(VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
|
||||
o.ase_texcoord.xy = v.ase_texcoord.xy;
|
||||
|
||||
//setting value to unused interpolator channels and avoid initialization warnings
|
||||
o.ase_texcoord.zw = 0;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#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 ) : SV_TARGET
|
||||
{
|
||||
sampler2D tex59 = _MainTex;
|
||||
float2 texCoord51 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float2 uv52 = texCoord51;
|
||||
float2 uv59 = uv52;
|
||||
float2 appendResult56 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 uv_delat58 = ( appendResult56 * _BlurRadius );
|
||||
float2 uv_delta59 = uv_delat58;
|
||||
float4 localGaussianBlur_3x359 = GaussianBlur_3x3( tex59 , uv59 , uv_delta59 );
|
||||
sampler2D tex48 = _MainTex;
|
||||
float2 uv48 = uv52;
|
||||
float2 uv_delta48 = uv_delat58;
|
||||
float4 localGaussianBlur_5x548 = GaussianBlur_5x5( tex48 , uv48 , uv_delta48 );
|
||||
#if defined(_BLURCOUNT__3X3)
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#elif defined(_BLURCOUNT__5X5)
|
||||
float4 staticSwitch73 = localGaussianBlur_5x548;
|
||||
#else
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#endif
|
||||
|
||||
float4 Color = staticSwitch73;
|
||||
|
||||
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "ScenePickingPass"
|
||||
Tags { "LightMode"="Picking" }
|
||||
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define ASE_SRP_VERSION 140011
|
||||
|
||||
|
||||
#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.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
|
||||
#include "../GaussianBlur.hlsl"
|
||||
#pragma shader_feature_local _BLURCOUNT__3X3 _BLURCOUNT__5X5
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
CBUFFER_START( UnityPerMaterial )
|
||||
float4 _MainTex_TexelSize;
|
||||
float _BlurRadius;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
float4 _SelectionID;
|
||||
|
||||
|
||||
VertexOutput vert(VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||||
|
||||
o.ase_texcoord.xy = v.ase_texcoord.xy;
|
||||
|
||||
//setting value to unused interpolator channels and avoid initialization warnings
|
||||
o.ase_texcoord.zw = 0;
|
||||
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||||
float3 defaultVertexValue = v.positionOS.xyz;
|
||||
#else
|
||||
float3 defaultVertexValue = float3(0, 0, 0);
|
||||
#endif
|
||||
float3 vertexValue = defaultVertexValue;
|
||||
#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 ) : SV_TARGET
|
||||
{
|
||||
sampler2D tex59 = _MainTex;
|
||||
float2 texCoord51 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float2 uv52 = texCoord51;
|
||||
float2 uv59 = uv52;
|
||||
float2 appendResult56 = (float2(_MainTex_TexelSize.x , _MainTex_TexelSize.y));
|
||||
float2 uv_delat58 = ( appendResult56 * _BlurRadius );
|
||||
float2 uv_delta59 = uv_delat58;
|
||||
float4 localGaussianBlur_3x359 = GaussianBlur_3x3( tex59 , uv59 , uv_delta59 );
|
||||
sampler2D tex48 = _MainTex;
|
||||
float2 uv48 = uv52;
|
||||
float2 uv_delta48 = uv_delat58;
|
||||
float4 localGaussianBlur_5x548 = GaussianBlur_5x5( tex48 , uv48 , uv_delta48 );
|
||||
#if defined(_BLURCOUNT__3X3)
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#elif defined(_BLURCOUNT__5X5)
|
||||
float4 staticSwitch73 = localGaussianBlur_5x548;
|
||||
#else
|
||||
float4 staticSwitch73 = localGaussianBlur_3x359;
|
||||
#endif
|
||||
|
||||
float4 Color = staticSwitch73;
|
||||
half4 outColor = _SelectionID;
|
||||
return outColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
}
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
Fallback "Hidden/InternalErrorShader"
|
||||
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19202
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;34;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Normal;0;1;Sprite Normal;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=NormalsRendering;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;35;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Forward;0;2;Sprite Forward;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;36;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;SceneSelectionPass;0;3;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;37;819,-71;Float;False;False;-1;2;ASEMaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;ScenePickingPass;0;4;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||||
Node;AmplifyShaderEditor.TexturePropertyNode;49;-1024,-896;Inherit;True;Property;_MainTex;主帖图;0;0;Create;False;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;50;-768,-896;Inherit;False;tex;-1;True;1;0;SAMPLER2D;;False;1;SAMPLER2D;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;52;-768,-672;Inherit;False;uv;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode;51;-1024,-672;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;53;-1472,-512;Inherit;False;50;tex;1;0;OBJECT;;False;1;SAMPLER2D;0
|
||||
Node;AmplifyShaderEditor.TexelSizeNode;54;-1280,-512;Inherit;False;-1;1;0;SAMPLER2D;;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode;56;-1088,-512;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode;55;-1344,-336;Inherit;False;Property;_BlurRadius;模糊半径;1;0;Create;False;0;0;0;False;0;False;0;0;0;10;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;57;-928,-512;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;58;-768,-512;Inherit;False;uv_delat;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;61;-384,-896;Inherit;False;50;tex;1;0;OBJECT;;False;1;SAMPLER2D;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;63;-384,-800;Inherit;False;52;uv;1;0;OBJECT;;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;64;-384,-704;Inherit;False;58;uv_delat;1;0;OBJECT;;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.CustomExpressionNode;48;-192,-576;Inherit;False; ;4;File;3;True;tex;SAMPLER2D;;In;;Inherit;False;True;uv;FLOAT2;0,0;In;;Inherit;False;True;uv_delta;FLOAT2;0,0;In;;Inherit;False;GaussianBlur_5x5;False;False;0;33397e96d5047fc43a9fbba09f992c70;False;3;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT4;0
|
||||
Node;AmplifyShaderEditor.CustomExpressionNode;59;-192,-896;Inherit;False; ;4;File;3;True;tex;SAMPLER2D;;In;;Inherit;False;True;uv;FLOAT2;0,0;In;;Inherit;False;True;uv_delta;FLOAT2;0,0;In;;Inherit;False;GaussianBlur_3x3;False;False;0;33397e96d5047fc43a9fbba09f992c70;False;3;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT4;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;65;-384,-576;Inherit;False;50;tex;1;0;OBJECT;;False;1;SAMPLER2D;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;66;-384,-480;Inherit;False;52;uv;1;0;OBJECT;;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;67;-384,-384;Inherit;False;58;uv_delat;1;0;OBJECT;;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;33;512,-896;Float;False;True;-1;2;ASEMaterialInspector;0;16;BaseASE/Sprite/Lit/GaussianBlur;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Lit;0;0;Sprite Lit;6;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;3;Vertex Position;1;0;Debug Display;0;0;External Alpha;0;0;0;5;True;True;True;True;True;False;;False;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch;73;192,-896;Inherit;False;Property;_BlurCount;模糊次数;2;0;Create;False;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;_3x3;_5x5;Create;True;True;All;9;1;FLOAT4;0,0,0,0;False;0;FLOAT4;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;4;FLOAT4;0,0,0,0;False;5;FLOAT4;0,0,0,0;False;6;FLOAT4;0,0,0,0;False;7;FLOAT4;0,0,0,0;False;8;FLOAT4;0,0,0,0;False;1;FLOAT4;0
|
||||
WireConnection;50;0;49;0
|
||||
WireConnection;52;0;51;0
|
||||
WireConnection;54;0;53;0
|
||||
WireConnection;56;0;54;1
|
||||
WireConnection;56;1;54;2
|
||||
WireConnection;57;0;56;0
|
||||
WireConnection;57;1;55;0
|
||||
WireConnection;58;0;57;0
|
||||
WireConnection;48;0;65;0
|
||||
WireConnection;48;1;66;0
|
||||
WireConnection;48;2;67;0
|
||||
WireConnection;59;0;61;0
|
||||
WireConnection;59;1;63;0
|
||||
WireConnection;59;2;64;0
|
||||
WireConnection;33;1;73;0
|
||||
WireConnection;73;1;59;0
|
||||
WireConnection;73;0;48;0
|
||||
ASEEND*/
|
||||
//CHKSM=70745C5715F07EEA24371977B7265E6B17286A64
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bae84a31ad580224eaf2d0b1e545e8e3
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1620
Assets/_Game/Shaders/BaseASE/Environment/Sprite_Unlit.shader
Normal file
1620
Assets/_Game/Shaders/BaseASE/Environment/Sprite_Unlit.shader
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b49544d9e2605a4c9e8352f77ef8ebe
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1743
Assets/_Game/Shaders/BaseASE/Environment/URP_Particle_Blur.shader
Normal file
1743
Assets/_Game/Shaders/BaseASE/Environment/URP_Particle_Blur.shader
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1469c818aa6564a4fbc960a386b4cfb3
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2844
Assets/_Game/Shaders/BaseASE/Environment/URP_Particle_Current.shader
Normal file
2844
Assets/_Game/Shaders/BaseASE/Environment/URP_Particle_Current.shader
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be9204b2fe6880e49851f88f9f24778d
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- SimpleNoise1: {fileID: 2800000, guid: 72c91df59ee8e464baef98c294cc648c, type: 3}
|
||||
- _RimTex: {fileID: 2800000, guid: 72c91df59ee8e464baef98c294cc648c, type: 3}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1710
Assets/_Game/Shaders/BaseASE/Environment/URP_Particle_Distort.shader
Normal file
1710
Assets/_Game/Shaders/BaseASE/Environment/URP_Particle_Distort.shader
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b0d9994ae660c3408bca4e1d8de9e2f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 161a95ff982864a4c9118127877dbf67
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user