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 RayLength = 0.0,
28 output float RayDepth = 0.0)
30 IsCameraRay = raytype("camera");
31 IsShadowRay = raytype("shadow");
32 IsDiffuseRay = raytype("diffuse");
33 IsGlossyRay = raytype("glossy");
34 IsSingularRay = raytype("singular");
35 IsReflectionRay = raytype("reflection");
36 IsTransmissionRay = raytype("refraction");
38 getattribute("path:ray_length", RayLength);
41 getattribute("path:ray_depth", ray_depth);
42 RayDepth = (float)ray_depth;