Hello,
I'm new to Amplify and still wrapping my head around how transparency is handled. I'm currently looking at making a shader with multiple PNG sprites with transparency layered on top on each other. I've experimented with add & multiply, as well as different blend types & modes and have yet to find success.
What I would like to achieve as a result is simply for one texture to sit on top of another, without blending in any way, as seen below:
I want to avoid masking or blending, like this example:
Any idea how to accomplish this? I feel like it should be possible, but I can only seem to find nodes & settings that will blend, instead of layering on top of, like I am trying to.
Layered Sprites With Transparency
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Layered Sprites With Transparency
Hello, one possible way to accomplish this is through setting up a mask as the interpolator for a Lerp node, please refer to the example below:

I'm using the relay node to show a preview of the mask being used, which has a value of 0 or black where the A input's texture is present, and 1 or white for the B input's texture.
You can also check out our SingleChannelMasking sample for a more complex case in which several masks are used, as well as the SpriteMask or MaskedUI samples for examples using each of those specific templates.
Please let me know if this helps!

I'm using the relay node to show a preview of the mask being used, which has a value of 0 or black where the A input's texture is present, and 1 or white for the B input's texture.
You can also check out our SingleChannelMasking sample for a more complex case in which several masks are used, as well as the SpriteMask or MaskedUI samples for examples using each of those specific templates.
Please let me know if this helps!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
JosephHorsmann
- Posts: 10
- Joined: Mon Oct 08, 2018 2:32 pm
Re: Layered Sprites With Transparency
Thanks for the reply Amplify_Borba,
Your example does help. I didn't realize that the alpha input of the lerp node worked that way. The lerp node will allow me to do what I need to do.
Your example does help. I didn't realize that the alpha input of the lerp node worked that way. The lerp node will allow me to do what I need to do.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Layered Sprites With Transparency
Glad I could help!
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, your feedback is extremely valuable to us.
Please feel free to get back in touch if you have any further issues or questions.
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, your feedback is extremely valuable to us.
Please feel free to get back in touch if you have any further issues or questions.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!