ball 项目提交
This commit is contained in:
@@ -0,0 +1,179 @@
|
||||
Shader "Custom/Blur"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,0.2)
|
||||
_BlurSize ("Blur Size", Float) = 5
|
||||
_BlurQuality ("Blur Quality", Float ) = 5
|
||||
_BlurStrength ("Blur Strength", Float) = 1.2
|
||||
|
||||
// 新增:FairyGUI的Stencil属性(模板测试用)
|
||||
_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
|
||||
|
||||
// 新增:FairyGUI的颜色遮罩和混合模式属性
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
_BlendSrcFactor ("Blend SrcFactor", Float) = 5
|
||||
_BlendDstFactor ("Blend DstFactor", Float) = 10
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags {
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
// 新增:Stencil模板测试(关键,实现列表边框遮罩)
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
// 统一FairyGUI的渲染状态
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Fog { Mode Off }
|
||||
Blend [_BlendSrcFactor] [_BlendDstFactor], One One // 替换原有Blend
|
||||
ColorMask [_ColorMask] // 新增颜色遮罩
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma multi_compile NOT_CLIPPED CLIPPED SOFT_CLIPPED ALPHA_MASK // 新增:FairyGUI裁剪宏
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
fixed4 _Color;
|
||||
float _BlurSize;
|
||||
int _BlurQuality;
|
||||
float _BlurStrength;
|
||||
|
||||
// 新增:FairyGUI裁剪参数(和Image shader一致)
|
||||
#ifdef CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0); // 裁剪区域
|
||||
#endif
|
||||
#ifdef SOFT_CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0); // 软裁剪区域
|
||||
float4 _ClipSoftness = float4(0, 0, 0, 0); // 软裁剪过渡
|
||||
#endif
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
|
||||
// 新增:裁剪坐标(用于FairyGUI裁剪计算)
|
||||
#ifdef CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
// 新增:颜色空间转换(和FairyGUI保持一致)
|
||||
#if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550)
|
||||
OUT.color.rgb = GammaToLinearSpace(IN.color.rgb) * _Color.rgb;
|
||||
OUT.color.a = IN.color.a * _Color.a;
|
||||
#else
|
||||
OUT.color = IN.color * _Color;
|
||||
#endif
|
||||
|
||||
// 新增:计算裁剪坐标(FairyGUI裁剪逻辑)
|
||||
#ifdef CLIPPED
|
||||
OUT.clipPos = mul(unity_ObjectToWorld, IN.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
#ifdef SOFT_CLIPPED
|
||||
OUT.clipPos = mul(unity_ObjectToWorld, IN.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
|
||||
// 高斯模糊权重计算(保留原有功能)
|
||||
float GaussianWeight(int x, int y, float sigma)
|
||||
{
|
||||
return exp(-(x*x + y*y) / (2.0 * sigma * sigma)) / (2.0 * 3.14159 * sigma * sigma);
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
float2 uv = IN.texcoord;
|
||||
fixed4 col = fixed4(0,0,0,0);
|
||||
|
||||
|
||||
// 高斯模糊计算(保留)
|
||||
float totalWeight = 0.0;
|
||||
float sigma = _BlurQuality * _BlurStrength;
|
||||
int range = _BlurQuality * 2;
|
||||
|
||||
for (int x = -range; x <= range; x++)
|
||||
{
|
||||
for (int y = -range; y <= range; y++)
|
||||
{
|
||||
float weight = GaussianWeight(x, y, sigma);
|
||||
totalWeight += weight;
|
||||
float2 offset = float2(x, y) * _BlurSize * _MainTex_TexelSize.xy;
|
||||
col += tex2D(_MainTex, uv + offset) * weight;
|
||||
}
|
||||
}
|
||||
col /= totalWeight;
|
||||
|
||||
// 新增:FairyGUI裁剪逻辑(关键,适配列表边框裁剪)
|
||||
#ifdef CLIPPED
|
||||
float2 factor = abs(IN.clipPos);
|
||||
if (max(factor.x, factor.y) > 1) col.a = 0; // 硬裁剪
|
||||
#endif
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 factor = float2(0,0);
|
||||
if (IN.clipPos.x < 0) factor.x = (1.0 - abs(IN.clipPos.x)) * _ClipSoftness.x;
|
||||
else factor.x = (1.0 - IN.clipPos.x) * _ClipSoftness.z;
|
||||
if (IN.clipPos.y < 0) factor.y = (1.0 - abs(IN.clipPos.y)) * _ClipSoftness.w;
|
||||
else factor.y = (1.0 - IN.clipPos.y) * _ClipSoftness.y;
|
||||
col.a *= clamp(min(factor.x, factor.y), 0.0, 1.0); // 软裁剪
|
||||
#endif
|
||||
#ifdef ALPHA_MASK
|
||||
clip(col.a - 0.001); // 透明通道裁剪
|
||||
#endif
|
||||
|
||||
// 应用颜色 tint(和FairyGUI颜色处理保持一致)
|
||||
col.rgb *= IN.color.rgb;
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e83f364b956f4127a4fff5375b1b5fb
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb7fd3964fc2b4f47b9ca80168080557
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,90 @@
|
||||
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
|
||||
|
||||
// FC ¾«Áé´¿É«Shader
|
||||
Shader "[FC_Shader]/Sprites/FC_PureColor"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1, 1, 1, 1)
|
||||
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent-1"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Fog { Mode Off }
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
CGPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile DUMMY PIXELSNAP_ON
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
half2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
sampler2D _MainTex;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_INITIALIZE_OUTPUT(v2f, OUT);
|
||||
|
||||
//OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
|
||||
OUT.vertex = mul(unity_ObjectToWorld, IN.vertex);
|
||||
OUT.vertex.z = 0;
|
||||
OUT.vertex = mul(UNITY_MATRIX_VP, OUT.vertex);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
//OUT.color = IN.color * _Color;
|
||||
#ifdef PIXELSNAP_ON
|
||||
OUT.vertex = UnityPixelSnap(OUT.vertex);
|
||||
#endif
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
//fixed4 c = tex2D(_MainTex, IN.texcoord) * IN.color;
|
||||
//c.rgb *= c.a;
|
||||
|
||||
fixed4 c = tex2D(_MainTex, IN.texcoord);
|
||||
c.rgba = _Color * c.a;
|
||||
c.rgba *= _Color.a;
|
||||
return c;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac23333d64cce4f71a340804d9468d26
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.fc.assetbundle
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,136 @@
|
||||
Shader "[FC_Shader]/FGUI/FC_Spine-Skeleton-FGUIMask" {
|
||||
Properties {
|
||||
_Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
[NoScaleOffset] _MainTex ("Main Texture", 2D) = "black" {}
|
||||
// [ÐÞ¸Ä]
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 1
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
|
||||
// [Du ÐÞ¸Ä]FGUI Mask: wrapper.supportStencil = true;
|
||||
_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
|
||||
}
|
||||
|
||||
SubShader {
|
||||
// [Du ÐÞ¸Ä]FGUI Mask: wrapper.supportStencil = true;
|
||||
Stencil
|
||||
{
|
||||
Ref[_Stencil]
|
||||
Comp[_StencilComp]
|
||||
Pass[_StencilOp]
|
||||
ReadMask[_StencilReadMask]
|
||||
WriteMask[_StencilWriteMask]
|
||||
}
|
||||
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
|
||||
|
||||
Fog { Mode Off }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
Lighting Off
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Normal"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct VertexInput {
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertexColor : COLOR;
|
||||
};
|
||||
|
||||
struct VertexOutput {
|
||||
float4 pos : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertexColor : COLOR;
|
||||
};
|
||||
|
||||
VertexOutput vert (VertexInput v) {
|
||||
VertexOutput o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.uv;
|
||||
o.vertexColor = v.vertexColor;
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag (VertexOutput i) : SV_Target {
|
||||
float4 texColor = tex2D(_MainTex, i.uv);
|
||||
|
||||
#if defined(_STRAIGHT_ALPHA_INPUT)
|
||||
texColor.rgb *= texColor.a;
|
||||
#endif
|
||||
|
||||
return (texColor * i.vertexColor);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Caster"
|
||||
Tags { "LightMode"="ShadowCaster" }
|
||||
Offset 1, 1
|
||||
ZWrite On
|
||||
ZTest LEqual
|
||||
|
||||
Fog { Mode Off }
|
||||
Cull Off
|
||||
Lighting Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
sampler2D _MainTex;
|
||||
fixed _Cutoff;
|
||||
|
||||
struct VertexOutput {
|
||||
V2F_SHADOW_CASTER;
|
||||
float4 uvAndAlpha : TEXCOORD1;
|
||||
};
|
||||
|
||||
VertexOutput vert (appdata_base v, float4 vertexColor : COLOR) {
|
||||
VertexOutput o;
|
||||
o.uvAndAlpha = v.texcoord;
|
||||
o.uvAndAlpha.a = vertexColor.a;
|
||||
TRANSFER_SHADOW_CASTER(o)
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag (VertexOutput i) : SV_Target {
|
||||
fixed4 texcol = tex2D(_MainTex, i.uvAndAlpha.xy);
|
||||
clip(texcol.a * i.uvAndAlpha.a - _Cutoff);
|
||||
SHADOW_CASTER_FRAGMENT(i)
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: deae41791f6e3b749a01cb42165e3b65
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.fc.assetbundle
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e84944a9944f2546ba8242019c0070f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,154 @@
|
||||
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "FairyGUI/BMFont"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Base (RGB), Alpha (A)", 2D) = "black" {}
|
||||
|
||||
_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) = 255
|
||||
|
||||
_BlendSrcFactor ("Blend SrcFactor", Float) = 5
|
||||
_BlendDstFactor ("Blend DstFactor", Float) = 10
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 100
|
||||
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Fog { Mode Off }
|
||||
Blend [_BlendSrcFactor] [_BlendDstFactor]
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma multi_compile NOT_GRAYED GRAYED
|
||||
#pragma multi_compile NOT_CLIPPED CLIPPED SOFT_CLIPPED
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma exclude_renderers d3d9 opengl flash
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
|
||||
#ifdef CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
#ifdef CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0);
|
||||
float4 _ClipSoftness = float4(0, 0, 0, 0);
|
||||
#endif
|
||||
CBUFFER_END
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = v.texcoord;
|
||||
#if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550)
|
||||
o.color.rgb = GammaToLinearSpace(v.color.rgb);
|
||||
o.color.a = v.color.a;
|
||||
#else
|
||||
o.color = v.color;
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 col = i.color;
|
||||
fixed4 tcol = tex2D(_MainTex, i.texcoord);
|
||||
col.a *= tcol[i.texcoord.z];//z stores channel
|
||||
|
||||
#ifdef GRAYED
|
||||
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
|
||||
col.rgb = fixed3(grey, grey, grey);
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 factor = float2(0,0);
|
||||
if(i.clipPos.x<0)
|
||||
factor.x = (1.0-abs(i.clipPos.x)) * _ClipSoftness.x;
|
||||
else
|
||||
factor.x = (1.0-i.clipPos.x) * _ClipSoftness.z;
|
||||
if(i.clipPos.y<0)
|
||||
factor.y = (1.0-abs(i.clipPos.y)) * _ClipSoftness.w;
|
||||
else
|
||||
factor.y = (1.0-i.clipPos.y) * _ClipSoftness.y;
|
||||
col.a *= clamp(min(factor.x, factor.y), 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
float2 factor = abs(i.clipPos);
|
||||
col.a *= step(max(factor.x, factor.y), 1);
|
||||
#endif
|
||||
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "FairyGUI/Text"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd79153f88fa7334ea6c5564c053bdca
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.fairygui.assetbundle
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "FairyGUI/BlurFilter" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Pass {
|
||||
ZTest Always
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : SV_POSITION;
|
||||
half2 texcoord : TEXCOORD0;
|
||||
half2 taps[4] : TEXCOORD1;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
half4 _MainTex_TexelSize;
|
||||
half4 _BlurOffsets;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = v.texcoord - _BlurOffsets.xy * _MainTex_TexelSize.xy;
|
||||
o.taps[0] = o.texcoord + _MainTex_TexelSize * _BlurOffsets.xy;
|
||||
o.taps[1] = o.texcoord - _MainTex_TexelSize * _BlurOffsets.xy;
|
||||
o.taps[2] = o.texcoord + _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1);
|
||||
o.taps[3] = o.texcoord - _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
half4 color = tex2D(_MainTex, i.taps[0]);
|
||||
color += tex2D(_MainTex, i.taps[1]);
|
||||
color += tex2D(_MainTex, i.taps[2]);
|
||||
color += tex2D(_MainTex, i.taps[3]);
|
||||
return color * 0.25;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
Fallback off
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f83d3bb1d90aaf54d8aed0783317662f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.fairygui.assetbundle
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,180 @@
|
||||
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "FairyGUI/Image"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Base (RGB), Alpha (A)", 2D) = "black" {}
|
||||
|
||||
_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
|
||||
|
||||
_BlendSrcFactor ("Blend SrcFactor", Float) = 5
|
||||
_BlendDstFactor ("Blend DstFactor", Float) = 10
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 100
|
||||
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Fog { Mode Off }
|
||||
Blend [_BlendSrcFactor] [_BlendDstFactor], One One
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma multi_compile NOT_COMBINED COMBINED
|
||||
#pragma multi_compile NOT_GRAYED GRAYED COLOR_FILTER
|
||||
#pragma multi_compile NOT_CLIPPED CLIPPED SOFT_CLIPPED ALPHA_MASK
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
|
||||
#ifdef CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
#ifdef COMBINED
|
||||
sampler2D _AlphaTex;
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0);
|
||||
float4 _ClipSoftness = float4(0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef COLOR_FILTER
|
||||
float4x4 _ColorMatrix;
|
||||
float4 _ColorOffset;
|
||||
float _ColorOption = 0;
|
||||
#endif
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = v.texcoord;
|
||||
#if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550)
|
||||
o.color.rgb = GammaToLinearSpace(v.color.rgb);
|
||||
o.color.a = v.color.a;
|
||||
#else
|
||||
o.color = v.color;
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 col = tex2D(_MainTex, i.texcoord.xy / i.texcoord.w) * i.color;
|
||||
|
||||
#ifdef COMBINED
|
||||
col.a *= tex2D(_AlphaTex, i.texcoord.xy / i.texcoord.w).g;
|
||||
#endif
|
||||
|
||||
#ifdef GRAYED
|
||||
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
|
||||
col.rgb = fixed3(grey, grey, grey);
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 factor = float2(0,0);
|
||||
if(i.clipPos.x<0)
|
||||
factor.x = (1.0-abs(i.clipPos.x)) * _ClipSoftness.x;
|
||||
else
|
||||
factor.x = (1.0-i.clipPos.x) * _ClipSoftness.z;
|
||||
if(i.clipPos.y<0)
|
||||
factor.y = (1.0-abs(i.clipPos.y)) * _ClipSoftness.w;
|
||||
else
|
||||
factor.y = (1.0-i.clipPos.y) * _ClipSoftness.y;
|
||||
col.a *= clamp(min(factor.x, factor.y), 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
float2 factor = abs(i.clipPos);
|
||||
if(max(factor.x, factor.y)>1) col.a = 0;
|
||||
#endif
|
||||
|
||||
#ifdef COLOR_FILTER
|
||||
if (_ColorOption == 0)
|
||||
{
|
||||
fixed4 col2 = col;
|
||||
col2.r = dot(col, _ColorMatrix[0]) + _ColorOffset.x;
|
||||
col2.g = dot(col, _ColorMatrix[1]) + _ColorOffset.y;
|
||||
col2.b = dot(col, _ColorMatrix[2]) + _ColorOffset.z;
|
||||
col2.a = dot(col, _ColorMatrix[3]) + _ColorOffset.w;
|
||||
col = col2;
|
||||
}
|
||||
else //premultiply alpha
|
||||
col.rgb *= col.a;
|
||||
#endif
|
||||
|
||||
#ifdef ALPHA_MASK
|
||||
clip(col.a - 0.001);
|
||||
#endif
|
||||
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 263c97191482b3649ac7bf0810cc4f77
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.fairygui.assetbundle
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,179 @@
|
||||
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "FairyGUI/Text"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Alpha (A)", 2D) = "white" {}
|
||||
|
||||
_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
|
||||
|
||||
_BlendSrcFactor ("Blend SrcFactor", Float) = 5
|
||||
_BlendDstFactor ("Blend DstFactor", Float) = 10
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 100
|
||||
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Fog { Mode Off }
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Blend[_BlendSrcFactor][_BlendDstFactor]
|
||||
ColorMask[_ColorMask]
|
||||
CGPROGRAM
|
||||
#pragma multi_compile NOT_GRAYED GRAYED
|
||||
#pragma multi_compile NOT_CLIPPED CLIPPED SOFT_CLIPPED
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
|
||||
#ifdef CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 clipPos : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
#ifdef CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float4 _ClipBox = float4(-2, -2, 0, 0);
|
||||
float4 _ClipSoftness = float4(0, 0, 0, 0);
|
||||
#endif
|
||||
CBUFFER_END
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = v.texcoord;
|
||||
#if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550)
|
||||
o.color.rgb = GammaToLinearSpace(v.color.rgb);
|
||||
o.color.a = v.color.a;
|
||||
#else
|
||||
o.color = v.color;
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 col = i.color;
|
||||
col.a *= tex2D(_MainTex, i.texcoord).a;
|
||||
|
||||
#ifdef GRAYED
|
||||
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
|
||||
col.rgb = fixed3(grey, grey, grey);
|
||||
#endif
|
||||
|
||||
#ifdef SOFT_CLIPPED
|
||||
float2 factor = float2(0,0);
|
||||
if(i.clipPos.x<0)
|
||||
factor.x = (1.0-abs(i.clipPos.x)) * _ClipSoftness.x;
|
||||
else
|
||||
factor.x = (1.0-i.clipPos.x) * _ClipSoftness.z;
|
||||
if(i.clipPos.y<0)
|
||||
factor.y = (1.0-abs(i.clipPos.y)) * _ClipSoftness.w;
|
||||
else
|
||||
factor.y = (1.0-i.clipPos.y) * _ClipSoftness.y;
|
||||
col.a *= clamp(min(factor.x, factor.y), 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPED
|
||||
float2 factor = abs(i.clipPos);
|
||||
col.a *= step(max(factor.x, factor.y), 1);
|
||||
#endif
|
||||
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass{
|
||||
ZTest Always Cull Off ZWrite Off
|
||||
COLORMASK A
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct v2f {
|
||||
float4 pos : SV_POSITION;
|
||||
};
|
||||
|
||||
v2f vert(appdata_img v) {
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f i) : SV_Target {
|
||||
fixed4 col = float4(0, 0, 0, 0);
|
||||
col.a = 1;
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8526777372c6fef4f8162b3a7901dcb0
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.fairygui.assetbundle
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,57 @@
|
||||
Shader "Custom/MosaicTransparent"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
_BlockSize ("Block Size", Float) = 30
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "Queue" = "Transparent" "RenderType" = "Transparent" }
|
||||
LOD 100
|
||||
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
float _BlockSize;
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
float2 uv = floor(i.uv * _BlockSize) / _BlockSize + 0.5 / _BlockSize;
|
||||
fixed4 col = tex2D(_MainTex, uv);
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a297746d842d499597aabc2a0ca53c8
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
// Made with Amplify Shader Editor
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "ASE/ZooMatch"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MAinTex("MAinTex", 2D) = "white" {}
|
||||
[HDR]_Main_C("Main_C", Color) = (1,1,1,1)
|
||||
_Mask("Mask", 2D) = "white" {}
|
||||
_MainFlow("MainFlow", Vector) = (0,0,0,0)
|
||||
[HideInInspector] _texcoord( "", 2D ) = "white" {}
|
||||
[HideInInspector] __dirty( "", Int ) = 1
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IsEmissive" = "true" }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend SrcAlpha One
|
||||
|
||||
CGPROGRAM
|
||||
#include "UnityShaderVariables.cginc"
|
||||
#pragma target 4.6
|
||||
#pragma surface surf Unlit keepalpha noshadow
|
||||
struct Input
|
||||
{
|
||||
float2 uv_texcoord;
|
||||
float4 vertexColor : COLOR;
|
||||
};
|
||||
|
||||
uniform sampler2D _MAinTex;
|
||||
uniform half2 _MainFlow;
|
||||
uniform float4 _MAinTex_ST;
|
||||
uniform half4 _Main_C;
|
||||
uniform sampler2D _Mask;
|
||||
uniform half4 _Mask_ST;
|
||||
|
||||
inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
|
||||
{
|
||||
return half4 ( 0, 0, 0, s.Alpha );
|
||||
}
|
||||
|
||||
void surf( Input i , inout SurfaceOutput o )
|
||||
{
|
||||
float2 uv_MAinTex = i.uv_texcoord * _MAinTex_ST.xy + _MAinTex_ST.zw;
|
||||
half2 panner9 = ( 1.0 * _Time.y * _MainFlow + uv_MAinTex);
|
||||
half4 tex2DNode1 = tex2D( _MAinTex, panner9 );
|
||||
o.Emission = ( tex2DNode1 * _Main_C * i.vertexColor ).rgb;
|
||||
float2 uv_Mask = i.uv_texcoord * _Mask_ST.xy + _Mask_ST.zw;
|
||||
o.Alpha = ( tex2DNode1.b * tex2D( _Mask, uv_Mask ).r * i.vertexColor.a );
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=18707
|
||||
47;175;1207;844;1019.811;660.9065;1.662226;True;True
|
||||
Node;AmplifyShaderEditor.Vector2Node;11;-395.4762,181.6483;Inherit;False;Property;_MainFlow;MainFlow;4;0;Create;True;0;0;False;0;False;0,0;0,-0.8;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode;10;-534.9034,57.47778;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.PannerNode;9;-154.3344,58.9921;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.ColorNode;3;160.5288,214.8553;Inherit;False;Property;_Main_C;Main_C;2;1;[HDR];Create;True;0;0;False;0;False;1,1,1,1;0.3160377,1,0.7541794,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.SamplerNode;1;69.08453,29.78693;Inherit;True;Property;_MAinTex;MAinTex;1;0;Create;True;0;0;False;0;False;-1;None;a4c5ecde8ab107742bb63120e16c7ad3;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.SamplerNode;6;76.19043,381.2281;Inherit;True;Property;_Mask;Mask;3;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.VertexColorNode;8;-27.57687,219.4534;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;2;477.5288,110.8553;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;7;519.3937,414.1211;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;784.0682,5.391076;Half;False;True;-1;6;ASEMaterialInspector;0;0;Unlit;ASE/ZooMatch;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Off;2;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;True;Transparent;;Transparent;All;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;8;5;False;-1;1;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;False;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
|
||||
WireConnection;9;0;10;0
|
||||
WireConnection;9;2;11;0
|
||||
WireConnection;1;1;9;0
|
||||
WireConnection;2;0;1;0
|
||||
WireConnection;2;1;3;0
|
||||
WireConnection;2;2;8;0
|
||||
WireConnection;7;0;1;3
|
||||
WireConnection;7;1;6;1
|
||||
WireConnection;7;2;8;4
|
||||
WireConnection;0;2;2;0
|
||||
WireConnection;0;9;7;0
|
||||
ASEEND*/
|
||||
//CHKSM=ECBC1423F0188BF4B5159351CD934475BE2AA47D
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: faed8258c5327f84cb8d1cfb9d24a3cc
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName: shader.assetbundle
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user