I have been using the mix shader to get different types of metals by mixing diffuse and glossy, I always get good results. However there is a thing I have not understand yet: why the material changes when I exchange the two mix shader inputs (diffuse and glossy). Any explanation out there? Thanks.
The fresnel node will produce a mask like this:
when you use it as a factor you are just saying that the first input will replace the black and the 2nd will replace the white,
when you switch the inputs,you are just saying that the black should be the 2nd input and the white should be he first.
By switching :
Yes, has explained above in Omar Ahmad answer the question it's not so much "How does the mix shader work" it's more "How does the Fresnel node work".
They reason your are getting different results when switching positions between those shaders is because of the Fresnel node, not the mix shader itself.
If you were to remove the Fresnell from your material the results would indeed be the same given the Mix node was at 0.5 .