mob-sakai / UIEffect

UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!
https://github.com/mob-sakai/UIEffect
MIT License
5.62k stars 773 forks source link

Blur outline #213

Open mantonijoan opened 4 years ago

mantonijoan commented 4 years ago

Describe the bug When applying a blur to an image, a visible and blurred border is created.

To Reproduce I am rendering a full screen render texture

Expected behavior No border created.

Screenshots Cropped images showing the borders in the top and left margins: Screenshot 2020-05-11 at 13 56 57

Expected result: Screenshot 2020-05-11 at 13 58 12

Environment (please complete the following information):

Additional context A solution to this problem may be that inside the loop of the Tex2DBlurring method, check if the uv coordinates are between 0 and 1.

Moreover, I found confusing the parameter Blur Factor. When a blur factor of 1 is applied, the blur kernel operation skips one texel, leading to strange artifacts in the resulting image. I am currently using blur of 0.5 to achieve the maximum blurring.