- Home /
Transparency Overlapping
Let's say I have two transparent images that overlap each other.
Is it possible to make the overlapping part have the same color as the not overlapping ones?
It should be possible with a shader. I'd be surprised if there wasn't an existing one that does what you need.
Answer by IgorAherne · Oct 04, 2017 at 12:43 PM
yes, write a shader that appropriately responds to what's already in the color buffer (on the screen for simplicity of understanding). There are several methods to overlayed the color produced by your shader could onto of what's already in the buffer. This is essentially what transparency does. One of these blending-modes will help you (look at the table specifically):
http://www.informit.com/articles/article.aspx?p=1616796&seqNum=5
thanks, combining SrcColor with Zero in the Blend function works.
Your answer
Follow this Question
Related Questions
On Pointer Enter for semi-transparent UI? 2 Answers
Checking if object intersects? 1 Answer
Clickable button area is offset 0 Answers
Canvas with mask and transparent image 1 Answer
How to Change transparency of button image in Unity 5.0? 3 Answers