2 * Copyright 2011-2013 Blender Foundation
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
19 shader node_light_path(
20 output float IsCameraRay = 0.0,
21 output float IsShadowRay = 0.0,
22 output float IsDiffuseRay = 0.0,
23 output float IsGlossyRay = 0.0,
24 output float IsSingularRay = 0.0,
25 output float IsReflectionRay = 0.0,
26 output float IsTransmissionRay = 0.0,
27 output float IsVolumeScatterRay = 0.0,
28 output float RayLength = 0.0,
29 output float RayDepth = 0.0)
31 IsCameraRay = raytype("camera");
32 IsShadowRay = raytype("shadow");
33 IsDiffuseRay = raytype("diffuse");
34 IsGlossyRay = raytype("glossy");
35 IsSingularRay = raytype("singular");
36 IsReflectionRay = raytype("reflection");
37 IsTransmissionRay = raytype("refraction");
38 IsVolumeScatterRay = raytype("volume_scatter");
40 getattribute("path:ray_length", RayLength);
43 getattribute("path:ray_depth", ray_depth);
44 RayDepth = (float)ray_depth;