From 76745de7a04e46d18319c734067fa49641370014 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 30 Sep 2021 09:39:47 +0800 Subject: *Unit Preprocessing --- Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader') 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; } -- cgit v1.1-26-g67d0