Jump to content

Image edge transparency causes gray border


alexzchen
 Share

Recommended Posts

Hi, I asked a question in an old post yestorday, no one replied, so I recreated a post, the old one is 

https://www.html5gamedevs.com/topic/44883-using-mask-with-blendmodel-will-result-in-black/?tab=comments#comment-249483

 

Thanks for your solution again, but I hava another problem, when the lower sprite and mask use the same picture, it will cause a gray border, I'm trying to zoom in the mask picture, and it's going to be obvious, I guess it's because the edge of picture are not clear enough, is there anyway to solve it?

here is my code: https://www.pixiplayground.com/#/edit/DPZGFIoYSgTtkkXSAmPTm

tks

11.png

22.png

Edited by alexzchen
Link to comment
Share on other sites

I think I already know some reasons, the edge of the picture has some transparency, but the mask does not, so when the picture cut by mask multiply with the lower sprite, the edge will turn black, how to solve this problem?

In addition, why is the transparent part black , rather than transparent or white when calculating multiply, can I change it?

33.png

Edited by alexzchen
Link to comment
Share on other sites

Oh wait, its the same as in other thread.. OK, basically, you need to extrude your white color on transparent part. I have you an article about colors. Well, have another: http://www.adriancourreges.com/blog/2017/05/09/beware-of-transparent-pixels/

 

Edited by ivan.popelyshev
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...