summaryrefslogtreecommitdiff
path: root/Assets/Bundle/Shaders/Common
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
parent8b04ea73e540067f83870b61d89db4868fea5e8a (diff)
* move folder
Diffstat (limited to 'Assets/Bundle/Shaders/Common')
-rw-r--r--Assets/Bundle/Shaders/Common/Image.meta8
-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
-rw-r--r--Assets/Bundle/Shaders/Common/common_gbuffer.shader113
-rw-r--r--Assets/Bundle/Shaders/Common/common_gbuffer.shader.meta9
-rw-r--r--Assets/Bundle/Shaders/Common/common_solid_color.shader82
-rw-r--r--Assets/Bundle/Shaders/Common/common_solid_color.shader.meta9
15 files changed, 0 insertions, 529 deletions
diff --git a/Assets/Bundle/Shaders/Common/Image.meta b/Assets/Bundle/Shaders/Common/Image.meta
deleted file mode 100644
index abeda856..00000000
--- a/Assets/Bundle/Shaders/Common/Image.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: c4f83cfe782b4d6408644387c887b5f9
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
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:
diff --git a/Assets/Bundle/Shaders/Common/common_gbuffer.shader b/Assets/Bundle/Shaders/Common/common_gbuffer.shader
deleted file mode 100644
index c682d8fa..00000000
--- a/Assets/Bundle/Shaders/Common/common_gbuffer.shader
+++ /dev/null
@@ -1,113 +0,0 @@
-锘縎hader "Erika/Common/GBuffer"
-{
- //unity鍙傛暟鍏ュ彛
- Properties
- {
- _MainTex("璐村浘",2D) = "white"{}
- _Diffuse("婕弽灏",Color) = (1,1,1,1)
- _Specular("楂樺厜鑹",Color) = (1,1,1,1)
- _Gloss("骞虫粦搴",Range(1,100)) = 50
- }
-
- SubShader
- {
- //闈為忔槑闃熷垪
- Tags { "RenderType" = "Opaque" }
- LOD 100
- //寤惰繜娓叉煋
- Pass
- {
- //璁剧疆 鍏夌収妯″紡涓哄欢杩熸覆鏌
- Tags{"LightMode" = "Deferred"}
- CGPROGRAM
- // 澹版槑椤剁偣鐫鑹插櫒銆佺墖鍏冪潃鑹插櫒鍜岃緭鍑虹洰鏍
- #pragma target 3.0
- #pragma vertex vert
- #pragma fragment frag
- //鎺掗櫎涓嶆敮鎸丮RT鐨勭‖浠
- //#pragma exclude_renderers norm
- // unity 鍑芥暟搴
- #include"UnityCG.cginc"
- //瀹氫箟UNITY_HDR_ON鍏抽敭瀛
- //鍦╟# 涓 Shader.EnableKeyword("UNITY_HDR_ON"); Shader.DisableKeyword("UNITY_HDR_ON");
- // 璁惧畾hdr鏄惁寮鍚
- #pragma multi_compile __ UNITY_HDR_ON
- // 璐村浘
- sampler2D _MainTex;
- // 棰樺浘uv澶勭悊
- float4 _MainTex_ST;
- // 婕弽灏勫厜
- float4 _Diffuse;
- // 楂樺厜
- float4 _Specular;
- // 骞虫粦搴
- float _Gloss;
- // 椤剁偣娓叉煋鍣ㄦ墍浼犲叆鐨勫弬鏁扮粨鏋勶紝鍒嗗埆鏄《鐐逛綅缃佹硶绾夸俊鎭乽v鍧愭爣
- struct a2v
- {
- float4 pos:POSITION;
- float3 normal:NORMAL;
- float2 uv:TEXCOORD0;
- };
- // 鐗囧厓娓叉煋鍣ㄦ墍闇鐨勪紶鍏ュ弬鏁扮粨鏋勶紝鍒嗗埆鏄儚绱犱綅缃乽v鍧愭爣銆佸儚绱犱笘鐣屼綅缃佸儚绱犱笘鐣屾硶绾
- struct v2f
- {
- float4 pos:SV_POSITION;
- float2 uv : TEXCOORD0;
- float3 worldPos:TEXCOORD1;
- float3 worldNormal:TEXCOORD2;
- };
- // 寤惰繜娓叉煋鎵闇鐨勮緭鍑虹粨鏋勩傛鍚戞覆鏌撳彧闇瑕佽緭鍑1涓猅arget锛岃屽欢杩熸覆鏌撶殑鐗囧厓闇瑕佽緭鍑4涓猅arget
- struct DeferredOutput
- {
- //// RGB瀛樺偍婕弽灏勯鑹诧紝A閫氶亾瀛樺偍閬僵
- //float4 gBuffer0:SV_TARGET0;
- //// RGB瀛樺偍楂樺厜锛堥暅闈級鍙嶅皠棰滆壊锛孉閫氶亾瀛樺偍楂樺厜鍙嶅皠鐨勬寚鏁伴儴鍒嗭紝涔熷氨鏄钩婊戝害
- //float4 gBuffer1:SV_TARGET1;
- //// RGB閫氶亾瀛樺偍涓栫晫绌洪棿娉曠嚎锛孉閫氶亾娌$敤
- //float4 gBuffer2:SV_TARGET2;
- //// Emission + lighting + lightmaps + reflection probes (楂樺姩鎬佸厜鐓ф覆鏌/浣庡姩鎬佸厜鐓ф覆鏌)鐢ㄤ簬瀛樺偍鑷彂鍏+lightmap+鍙嶅皠鎺㈤拡娣卞害缂撳啿鍜屾ā鏉跨紦鍐
- //float4 gBuffer3:SV_TARGET3;
- float4 normal : SV_TARGET0;
- float4 position : SV_TARGET1;
- };
- // 椤剁偣娓叉煋鍣
- v2f vert(a2v v)
- {
- v2f o;
- // 鑾峰彇瑁佸壀绌洪棿涓嬬殑椤剁偣鍧愭爣
- o.pos = UnityObjectToClipPos(v.pos);
- // 搴旂敤uv璁剧疆锛岃幏鍙栨纭殑uv
- o.uv = TRANSFORM_TEX(v.uv, _MainTex);
- // 鑾峰彇椤剁偣鐨勪笘鐣屽潗鏍
- o.worldPos = mul(unity_ObjectToWorld, v.pos).xyz;
- // 鑾峰彇涓栫晫鍧愭爣涓嬬殑娉曠嚎
- o.worldNormal = UnityObjectToWorldNormal(v.normal);
- return o;
- }
- // 鐗囧厓鐫鑹插櫒
- DeferredOutput frag(v2f i)
- {
- DeferredOutput o;
- //// 鍍忕礌棰滆壊 = 璐村浘棰滆壊 * 婕弽灏勯鑹
- //fixed3 color = tex2D(_MainTex, i.uv).rgb * _Diffuse.rgb;
- //// 榛樿浣跨敤楂樺厜鍙嶅皠杈撳嚭锛侊紒
- //o.gBuffer0.rgb = color; // RGB瀛樺偍婕弽灏勯鑹诧紝A閫氶亾瀛樺偍閬僵
- //o.gBuffer0.a = 1; // 婕弽灏勭殑閫忔槑搴
- //o.gBuffer1.rgb = _Specular.rgb; // RGB瀛樺偍楂樺厜锛堥暅闈級鍙嶅皠棰滆壊锛
- //o.gBuffer1.a = _Gloss / 100; // 楂樺厜锛堥暅闈級鍙嶅皠棰滆壊 鐨
- //o.gBuffer2 = float4(i.worldNormal * 0.5 + 0.5, 1); // RGB閫氶亾瀛樺偍涓栫晫绌洪棿娉曠嚎锛孉閫氶亾娌$敤
- //// 濡傛灉娌″紑鍚疕DR锛岃缁欓鑹茬紪鐮佽浆鎹竴涓嬫暟鎹甧xp2锛屽悗闈㈠湪lightpass2閲屽垯鏄繘琛岃В鐮乴og2
- //#if !defined(UNITY_HDR_ON)
- // color.rgb = exp2(-color.rgb);
- //#endif
- //// Emission + lighting + lightmaps + reflection probes (楂樺姩鎬佸厜鐓ф覆鏌/浣庡姩鎬佸厜鐓ф覆鏌)鐢ㄤ簬瀛樺偍鑷彂鍏+lightmap+鍙嶅皠鎺㈤拡娣卞害缂撳啿鍜屾ā鏉跨紦鍐
- //o.gBuffer3 = fixed4(color, 1);
- o.normal = float4(i.worldNormal * 0.5 + 0.5, 1);
- o.position = float4(i.worldPos, 1);
- return o;
- }
- ENDCG
- }
- }
-}
diff --git a/Assets/Bundle/Shaders/Common/common_gbuffer.shader.meta b/Assets/Bundle/Shaders/Common/common_gbuffer.shader.meta
deleted file mode 100644
index b40b2f5a..00000000
--- a/Assets/Bundle/Shaders/Common/common_gbuffer.shader.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 1bb32fe6a2152fc45b9badd5cf9ed7ed
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Bundle/Shaders/Common/common_solid_color.shader b/Assets/Bundle/Shaders/Common/common_solid_color.shader
deleted file mode 100644
index 69b25500..00000000
--- a/Assets/Bundle/Shaders/Common/common_solid_color.shader
+++ /dev/null
@@ -1,82 +0,0 @@
-锘縎hader "Erika/Common/SolidColor"
-{
- Properties
- {
- _MainTex("Texture", 2D) = "white" {}
- _Color("Color", Color) = (1,1,1,1)
- }
- SubShader
- {
- Tags { "RenderType"="Opaque" }
- LOD 100
-
- ZTest LEqual
- ZWrite On
-
- Pass
- {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
-
- #include "UnityCG.cginc"
-
- struct appdata
- {
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- };
-
- struct v2f
- {
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
- float4 screenPos : TEXCOORD2;
- };
-
- fixed4 _Color;
-
- sampler2D_float _CameraDepthTexture;
-
- float4x4 _ObjectToWorld;
-
- sampler2D _MainTex;
- float4 _MainTex_ST;
-
- v2f vert (appdata v)
- {
- v2f o;
- o.vertex = UnityWorldToClipPos(mul(_ObjectToWorld, v.vertex));
- //o.vertex = UnityWorldToClipPos(mul(unity_ObjectToWorld, v.vertex));
- o.screenPos = ComputeScreenPos(o.vertex);
- o.uv = TRANSFORM_TEX(v.uv, _MainTex);
- return o;
- }
-
- fixed4 frag (v2f i) : SV_Target
- {
- float4 c = float4(0, 0, 0, 0);
-
- float2 uv = i.screenPos.xy / i.screenPos.w; // normalized screen-space pos
- float camDepth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv);
- camDepth = Linear01Depth(camDepth); // converts z buffer value to depth value from 0..1
-
- float depth = i.screenPos.z / i.screenPos.w;
-#if !UNITY_UV_STARTS_AT_TOP//OpenGL骞冲彴闇瑕佹墜鍔ㄥ皢[-1,1]鏄犲皠鍒癧0,1]妯℃嫙glDepthRange(0,1)
- depth = (depth + 1) / 2;
-#endif
- depth = Linear01Depth(depth);
-
- float diff = saturate(depth - camDepth);
- if (diff < 0.0001)
- {
- c = _Color;
- c = tex2D(_MainTex, i.uv);
- }
-
- return c;
- }
- ENDCG
- }
- }
-}
diff --git a/Assets/Bundle/Shaders/Common/common_solid_color.shader.meta b/Assets/Bundle/Shaders/Common/common_solid_color.shader.meta
deleted file mode 100644
index c0777cb0..00000000
--- a/Assets/Bundle/Shaders/Common/common_solid_color.shader.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: e7ee93f26e570c24cbdef0b6ad1f461d
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant: