summaryrefslogtreecommitdiff
path: root/Assets/Bundle/Shaders/Common/Image
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-10 14:07:40 +0800
committerchai <chaifix@163.com>2022-03-10 14:07:40 +0800
commit22891bf59032ba88262824255a706d652031384b (patch)
tree7595439ba9966c9402d37e37cee5e8cf098757d5 /Assets/Bundle/Shaders/Common/Image
parent8b04ea73e540067f83870b61d89db4868fea5e8a (diff)
* move folder
Diffstat (limited to 'Assets/Bundle/Shaders/Common/Image')
-rw-r--r--Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc45
-rw-r--r--Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc.meta9
-rw-r--r--Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc18
-rw-r--r--Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc.meta9
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_blur.shader70
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_blur.shader.meta9
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader65
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader.meta9
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader65
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader.meta9
10 files changed, 0 insertions, 308 deletions
diff --git a/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc b/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc
deleted file mode 100644
index ede53e55..00000000
--- a/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc
+++ /dev/null
@@ -1,45 +0,0 @@
-// UnitLensEffect效果相关
-
-sampler2D _MainTex;
-float4 _MainTex_ST;
-
-sampler2D _CameraDepthTexture;
-float4 _CameraDepthTexture_ST;
-
-sampler2D _UnitDepthTexture; // 配合_CameraDepthTexture定位角色
-float4 _UnitDepthTexture_ST;
-
-sampler2D _UnitWorldNormalTexture;
-float4 _UnitWorldNormalTexture_ST;
-
-sampler2D _UnitMotionVectorTexture;
-float4 _UnitMotionVectorTexture_ST;
-
-float4 _UnitTileOffset;
-
-// 只对一小部分进行后处理
-float4 CalculateUnitTillOfssetVertex(float4 vert)
-{
- float4 v = float4(vert.xy * _UnitTileOffset.xy + _UnitTileOffset.zw, 0, 1);
- v.xy = v.xy * 2 - float2(1,1);
- return v;
-}
-
-fixed2 CalculateUnitTillOfssetUV(fixed2 uv0)
-{
- return uv0 * _UnitTileOffset.xy + _UnitTileOffset.zw;
-}
-
-struct image_v2f
-{
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
-};
-
-image_v2f image_vert(appdata_img v)
-{
- image_v2f o;
- o.vertex = CalculateUnitTillOfssetVertex(v.vertex);
- o.uv = CalculateUnitTillOfssetUV(TRANSFORM_TEX(v.texcoord, _MainTex));
- return o;
-}
diff --git a/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc.meta b/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc.meta
deleted file mode 100644
index 8a4c56b7..00000000
--- a/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 7d761d98009111740b1e65e517a71aa5
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc b/Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc
deleted file mode 100644
index ffe5bc11..00000000
--- a/Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc
+++ /dev/null
@@ -1,18 +0,0 @@
-
-// 迭代一次
-fixed4 blur(sampler2D tex, float2 texSize, fixed2 uv, float spread = 1)
-{
- fixed2 step = 1 / texSize;
- const fixed weight = 0.1111111;
- fixed4 color = fixed4(0, 0, 0, 0);
- color += tex2D(tex, uv + spread * fixed2(-step.x, step.y)) * weight;
- color += tex2D(tex, uv + spread * fixed2(0, step.y)) * weight;
- color += tex2D(tex, uv + spread * fixed2(step.x, step.y)) * weight;
- color += tex2D(tex, uv + spread * fixed2(-step.x, 0)) * weight;
- color += tex2D(tex, uv) * weight;
- color += tex2D(tex, uv + spread * fixed2(step.x, 0)) * weight;
- color += tex2D(tex, uv + spread * fixed2(-step.x, -step.y)) * weight;
- color += tex2D(tex, uv + spread * fixed2(0, -step.y)) * weight;
- color += tex2D(tex, uv + spread * fixed2(step.x, -step.y)) * weight;
- return color;
-}
diff --git a/Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc.meta b/Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc.meta
deleted file mode 100644
index d5b4db71..00000000
--- a/Assets/Bundle/Shaders/Common/Image/ImageHelper.cginc.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 6186a4071ad9eeb488a67f940291bb9d
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_blur.shader b/Assets/Bundle/Shaders/Common/Image/common_img_blur.shader
deleted file mode 100644
index 89102da7..00000000
--- a/Assets/Bundle/Shaders/Common/Image/common_img_blur.shader
+++ /dev/null
@@ -1,70 +0,0 @@
-锘// 楂樻柉妯$硦
-
-Shader "Erika/Common/Image/Blur"
-{
- Properties
- {
- _MainTex("Texture", 2D) = "white" {}
- _Angle("Angle", float) = 0
- _Distance("Distance", float) = 0
- _UnitTileOffset("TileOffset", Vector) = (1,1,0,0)
- _Iterate("Iterate Count", float) = 1
- }
-
- SubShader
- {
- Tags { "RenderType" = "Opaque" "Queue" = "Transparent-1"}
- LOD 100
-
- ZWrite Off
- ZTest LEqual
-
- Blend SrcAlpha OneMinusSrcAlpha
-
- Pass
- {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
-
- #include "UnityCG.cginc"
-
- #include "./ImageEffect.cginc"
- #include "./ImageHelper.cginc"
-
- struct v2f
- {
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
- };
-
- float _Angle;
-
- fixed _Distance;
-
- float _Iterate;
-
- v2f vert(appdata_img v)
- {
- v2f o;
- o.vertex = UnityObjectToClipPos(v.vertex);
- o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
- return o;
- }
-
- fixed4 frag(v2f i) : SV_Target
- {
- _Angle = 0;
- _Distance = 0;
-
- fixed2 uv = i.uv;
-
- fixed4 color = blur(_MainTex, _ScreenParams.xy, uv);
-
- return color;
- }
- ENDCG
- }
- }
-
-} // shader
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_blur.shader.meta b/Assets/Bundle/Shaders/Common/Image/common_img_blur.shader.meta
deleted file mode 100644
index 8053135d..00000000
--- a/Assets/Bundle/Shaders/Common/Image/common_img_blur.shader.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 582d2065809e3814c98b6f0806996415
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader b/Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader
deleted file mode 100644
index 929a57b7..00000000
--- a/Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader
+++ /dev/null
@@ -1,65 +0,0 @@
-锘// 铚傞福
-
-Shader "Erika/Common/Image/Buzz"
-{
- Properties
- {
- _MainTex("Texture", 2D) = "white" {}
- _UnitTileOffset("TileOffset", Vector) = (1,1,0,0)
- }
-
- SubShader
- {
- Tags { "RenderType" = "Opaque" "Queue" = "Transparent-1"}
- LOD 100
-
- ZWrite Off
- ZTest LEqual
-
- Blend One Zero
-
- Pass
- {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
-
- #include "UnityCG.cginc"
-
- #include "./ImageEffect.cginc"
- #include "./ImageHelper.cginc"
-
- struct v2f
- {
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
- };
-
- v2f vert(appdata_img v)
- {
- v2f o;
- o.vertex = UnityObjectToClipPos(v.vertex);
- o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
- return o;
- }
-
- fixed4 frag(v2f i) : SV_Target
- {
- fixed2 uv = i.uv;
- float depth0 = tex2D(_CameraDepthTexture, uv).r;
- float depth1 = tex2D(_UnitDepthTexture, uv).r;
-
- fixed4 color = tex2D(_MainTex, uv);
-
- if (abs(depth0 - depth1) < 0.001f && depth1 != 1)
- {
- color.r = 1;
- }
-
- return color;
- }
- ENDCG
- }
- }
-
-} // shader
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader.meta b/Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader.meta
deleted file mode 100644
index 310221ef..00000000
--- a/Assets/Bundle/Shaders/Common/Image/common_img_buzz.shader.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 506516fea7a699443b904c0221d860f7
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader b/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
deleted file mode 100644
index d3a67ca9..00000000
--- a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
+++ /dev/null
@@ -1,65 +0,0 @@
-锘// 鍔ㄦ佹ā绯
-
-Shader "Erika/Common/Image/MotionBlur"
-{
- Properties
- {
- _MainTex("Texture", 2D) = "white" {}
- _Angle("Angle", float) = 0
- _Distance("Distance", float) = 0
- _UnitTileOffset("TileOffset", Vector) = (1,1,0,0)
- _Iterate("Iterate Count", float) = 1
- }
-
- SubShader
- {
- Tags { "RenderType" = "Opaque" "Queue" = "Transparent-1"}
- LOD 100
-
- ZWrite Off
- ZTest LEqual
-
- Blend SrcAlpha OneMinusSrcAlpha
-
- Pass
- {
- CGPROGRAM
- #pragma vertex image_vert
- #pragma fragment frag
-
- #include "UnityCG.cginc"
- #include "./ImageEffect.cginc"
-
- float _Angle;
- fixed _Distance;
- float _Iterate; // 杩唬娆℃暟
- float _AlphaMultiplier; //
-
- fixed4 frag(image_v2f i) : SV_Target
- {
- _Distance = 0.1;
-
- fixed2 uv0 = i.uv;
-
- fixed4 color = fixed4(0,0,0,0);
- const float count = 20;
- float step = _Distance / count;
- float amount = 0.2f;
- for(int i = 0; i < count; ++i)
- {
- fixed2 uv = uv0 + step * i * fixed2(cos(radians(_Angle)), sin(radians(_Angle)));
- if(uv.x > 1) continue;
- if(uv.x < 0) continue;
- float weight = amount - amount * ((float)i / (float)count);
- color += tex2D(_MainTex, uv) * weight;
- }
-
- color.a *= _AlphaMultiplier;
-
- return color;
- }
- ENDCG
- }
- }
-
-} // shader
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader.meta b/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader.meta
deleted file mode 100644
index cc5320fa..00000000
--- a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: d68c264cf01a43b4c8503bd7bbe2fbda
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant: