Page 1 of 1

Need help with odd Alpha issue

PostPosted: Mon Mar 11, 2019 9:26 pm
by Jasysin
OK, I'm new to Amplify, but have built node based shaders in the past and I'm having an issue I'm hoping someone can help with. I'm sure it's user error :-)

My shaders purpose is to take a mostly greyscale png (with alpha) of a character and then using another png (no alpha) whose channels contain different masks combine them with user selected colors to create a system to tint the flesh, hair, and eye colors of their avatar.

Most of this is working as expected except for the final result seems to mask out the colored areas (hair, skin, eyes) as well as the original avatar png transparency.

Since the "board attachment quota has been reached" I'll have to include my screen grabs via dropbox :-(

I'm including 2 screen grabs, The first is just taking the greyscale texture with png transparency and passing it straight to the output to show the alpha working properly on the right. The 2nd screen grab shows my nodes all setup along with the sub shader blend mode and tag info. The incorrect result I'm getting is on the right.
First = https://db.tt/u82zwytCDJ
Second = https://db.tt/qAWVzTObmw

Thank you very much in advance for any help.
Jason

Re: Need help with odd Alpha issue

PostPosted: Wed Mar 13, 2019 10:52 am
by Amplify_Borba
Hello and thank you for getting in touch!

The issue here is that multiplication between multi-channel data types is being done per-channel, so the Alpha channel is also part of that calculation. You likely need to use an Append node as in our SpriteMask or SimpleSprite samples in order to ensure that you pass the correct Alpha values.

Re: Need help with odd Alpha issue

PostPosted: Wed Mar 13, 2019 11:42 pm
by Jasysin
That did the trick, thanks for the help and the great tool.

Re: Need help with odd Alpha issue

PostPosted: Fri Mar 15, 2019 11:37 am
by Amplify_Borba
No problem, thank you for the kind words!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, every bit helps and your feedback is extremely valuable to us.

Please let us know if you have further issues or questions!