summaryrefslogtreecommitdiff
path: root/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-30 09:39:47 +0800
committerchai <chaifix@163.com>2021-09-30 09:39:47 +0800
commit76745de7a04e46d18319c734067fa49641370014 (patch)
treea4c3c36bc58a4b31c8dc3024c68818e9e0d7de94 /Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
parentb781f9ecf36bcc6c614538ac427fa2eb8f1e29d2 (diff)
*Unit Preprocessing
Diffstat (limited to 'Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader')
-rw-r--r--Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader6
1 files changed, 3 insertions, 3 deletions
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader b/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
index 6219bdac..418d7347 100644
--- a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
+++ b/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader
@@ -1,4 +1,4 @@
-// 高斯模糊
+// 动态模糊
Shader "Erika/Common/Image/MotionBlur"
{
@@ -64,16 +64,16 @@ Shader "Erika/Common/Image/MotionBlur"
fixed2 uv0 = i.uv;
- //fixed4 color = blur(_MainTex, _ScreenParams.xy, uv);
fixed4 color = fixed4(0,0,0,0);
const float count = 20;
float step = _Distance / count;
+ float amount = 0.15;
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 = 0.15 - 0.15 * ((float)i / (float)count);
+ float weight = amount - amount * ((float)i / (float)count);
color += tex2D(_MainTex, uv) * weight;
}