diff options
Diffstat (limited to 'Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader')
-rw-r--r-- | Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader | 6 |
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; } |