diff options
Diffstat (limited to 'Assets/Bundle')
-rw-r--r-- | Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader b/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader index 702bbd4b..6219bdac 100644 --- a/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader +++ b/Assets/Bundle/Shaders/Common/Image/common_img_motionblur.shader @@ -48,6 +48,8 @@ Shader "Erika/Common/Image/MotionBlur" float _Iterate; // 迭代次数 + float _AlphaMultiplier; // + v2f vert(appdata_img v) { v2f o; @@ -71,9 +73,12 @@ Shader "Erika/Common/Image/MotionBlur" fixed2 uv = uv0 + step * i * fixed2(cos(radians(_Angle)), sin(radians(_Angle))); if(uv.x > 1) continue; if(uv.x < 0) continue; - color += tex2D(_MainTex, uv) * 1 / count; + float weight = 0.15 - 0.15 * ((float)i / (float)count); + color += tex2D(_MainTex, uv) * weight; } + color.a *= _AlphaMultiplier; + return color; } ENDCG |