Transparent image like a decal on mesh with principled BSDF shader I have done this before, but that was before the principled BSDF shader existed. Now I'm trying to do a similar node setup with the principled BSDF shader instead of the diffuse BSDF shader, but the result is not 100% perfect! The background of the mesh with the transparent decal image, differ slightly compared to the surrounding mesh. I want the background around the decal to be fully transparent and look just like the nearby meshes.

The principled BSDF shader to the left in the image below has the green color for that background and that is the green color I also use on the rest of the object with the same settings.

Is there a better way to achieve this with a better node setup or just adjust my node setup in some way? I have tried to adjust the value of the mix shader, but without any improvement.
I find this questions easier to understand if you don't think in terms of transparency and think in terms of Masks to control how elements mix.

Using the Alpha channel in a mix node will make White areas use one element, and Black areas use the other. Any shade of gray will be a partial mix according to its brightness.



What that means is that the alpha channel of a given image can be used as a Mask to control the mix of color or the mix of shaders. 

When you use one or the other is something you have to decide.


If you want to use the color information of the image over the color of a given shader, in a way that all other properties of the shader are homogeneous, then use a color mix node and have the mask be the factor for the color of the shader.




(click on the image to enlarge)


Or you can use the mask to control the mix between two different shaders. Note that doing this will make the masked areas have different characteristics.




(click on the image to enlarge)


Lastly if what you really want is the mask to control the transparency of the object, then use the alpha information as the factor that controls the mix of a transparent and other kind of shader.




(click on the image to enlarge)