ray_switch

Class

Shader

Output

RGBA

Synopsis
This shader makes it possible to evaluate different shader trees per ray. This decreases the shading complexity of a scene and thus the render times, and increases artistic control. It can be used to remove unnecessary secondary rays (glossy/sss), make speculars even more glossy in glossy rays, control the color of opacity in shadow rays to fake light scattering through a tissue, increase the backlighting on leaves in diffuse rays or add a second specular lobe in camera rays only.

 

 


 

camera

Plug the output of the shader you wish to use when calculating camera rays here. 

Red Standard shader connected to 'Camera' attribute of Ray Switch shader

shadow

Plug the output of the shader you wish to use when calculating shadow rays here. The shader evaluation that happens for transparent shadows on objects. A use for this parameter could be to connect a Ray Switch shader to the Opacity parameter of a Standard Surface shader. That way you can get a shadow that's different from the actual transparency of the object. For example, to reduce the amount of shadow cast by the object, or to use a different cutout opacity pattern.

Make sure that the transparency is set to 1 and that either the Refraction color or Transmittance color is set to the desired shadow color. The Opaque attribute must also be disabled for the mesh.

Body object's Standard shader has red Refraction Color and Opaque is disabled

Remember that the Opaque attribute must also be disabled for the mesh when using Opacity or Transparency.

reflection

Plug the output of the shader you wish to use when calculating reflection rays here.

Red Standard shader connected to 'Reflection' attribute of Ray Switch

refraction

Plug the output of the shader you wish to use when calculating refraction rays here. 

Red Standard shader assigned to 'Refraction' attribute of Ray Switch shader

diffuse

Plug the output of the shader you wish to use when calculating diffuse rays here. 

Color ramp connected to 'Diffuse' attribute of Ray Switch shader

glossy

Plug the output of the shader you wish to use when calculating glossy rays here. 

Red Standard shader connected to Ray Switch 'Glossy' attribute

 

volume

Plug the output of the shader you wish to use when calculating volume rays here. 
  • No labels