Subtract
The Subtract Texture node subtracts the value of one texture from another, similar to the Subtract layer mode in Photoshop.
How to Use
Subtract One Texture from Another
Open the Node Editor and prepare the setup as you see in the image below. Here, texture 1 is subtracted from texture 2, according to the color values feeding from the gradient nodes. Any image or procedural texture can be used.
Subtract One Texture from Luminance Values
Open the Node Editor and prepare the setup as you see in the image below. Here, texture 1 is subtracted from texture 2 using the luminance color values (grayscale) The white color is fully transparent for appearance the cat picture. Black is not transparent, and gray is semi-transparent. This is similar to masking/alpha tracking function in Photoshop or After Effects.