alexzchen Posted March 20, 2020 Share Posted March 20, 2020 (edited) 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 Edited March 20, 2020 by alexzchen Quote Link to comment Share on other sites More sharing options...
alexzchen Posted March 20, 2020 Author Share Posted March 20, 2020 (edited) 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? Edited March 20, 2020 by alexzchen Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 20, 2020 Share Posted March 20, 2020 (edited) 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 March 20, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.