1
$\begingroup$

I am watching this tutorial on Light Path Nodes and in the image below the Light Path node is connected to a Mix Shader.

enter image description here

When connecting the "Camera Ray" socket to the Mix Shader the lower Shader is selected as being the Camera Ray. Why is this ? Why is not the other Shader selected ?

$\endgroup$

1 Answer 1

9
$\begingroup$

The factor of the Mix Shader node is the fraction of the second shader that contributes to the output shader. If the factor is 0.8 then the output shader will be 80% the second input and 20% the first input.

The Is Camera Ray output (along with most of the other Light Path outputs) is a boolean (true = 1, false = 0). So if the ray is a camera ray (true), the value going to the mix factor will be 1 and the output will be 100% the second shader input.

$\endgroup$
2
  • 2
    $\begingroup$ I think you are a Teacher !! $\endgroup$
    – user13877
    Commented Mar 20, 2017 at 16:49
  • $\begingroup$ I like this explanation, however it may help to look at the mix node without the fac input to visualize this answer. When the manual mix is 0.000 (All the way to the left), the top-most shader is 100% and the bottom-most 0%. And the opposite is true; When the manual mix is 1.000 (All the way to the right), the top-most shader is 0% and the bottom-most 100%. I just believe that it is important to understand the basics of the Mix Shader, so that you understand the expected choice (top or bottom), based on the factor's value. $\endgroup$
    – Rick Riggs
    Commented Mar 20, 2017 at 19:00

You must log in to answer this question.