GarretLR
GarretLR

Reputation: 55

Unity shader that make overlapped regions transparent?

enter image description here

Say i have two planes, i wanna know how to write shader that make overlapped region transparent. Thank you in advance.

Upvotes: 0

Views: 1258

Answers (1)

Harry
Harry

Reputation: 5707

Stencil shader does exactly what you want in opposite way. Perhaps you could adapt it to your problem.

Here it is: https://youtu.be/xkcCWqifT9M?t=218
And documentation: https://docs.unity3d.com/Manual/SL-Stencil.html
This one is exciting as well: https://youtu.be/l7LQmJuoiBY?t=940

Upvotes: 2

Related Questions