diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-12-06 18:15:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-19 17:09:58 +0300 |
commit | d6cf28c5e15739f864fbf04614c2a50708b4b152 (patch) | |
tree | fd668693afef3f97f6249acd05237869321bd564 /intern/cycles/kernel/shaders | |
parent | afdd756e56e0cffb7ac5681749abdba6aa089309 (diff) |
Cycles: Expose diffuse and glossy depth to Light Path node
Was a bit confusing to have transparent and translucent depth
exposed but no diffuse or glossy.
Reviewers: brecht
Subscribers: eyecandy
Differential Revision: https://developer.blender.org/D2399
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r-- | intern/cycles/kernel/shaders/node_light_path.osl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/kernel/shaders/node_light_path.osl b/intern/cycles/kernel/shaders/node_light_path.osl index a021a40467d..64fe4c20132 100644 --- a/intern/cycles/kernel/shaders/node_light_path.osl +++ b/intern/cycles/kernel/shaders/node_light_path.osl @@ -27,6 +27,8 @@ shader node_light_path( output float IsVolumeScatterRay = 0.0, output float RayLength = 0.0, output float RayDepth = 0.0, + output float DiffuseDepth = 0.0, + output float GlossyDepth = 0.0, output float TransparentDepth = 0.0, output float TransmissionDepth = 0.0) { @@ -45,6 +47,14 @@ shader node_light_path( getattribute("path:ray_depth", ray_depth); RayDepth = (float)ray_depth; + int diffuse_depth; + getattribute("path:diffuse_depth", diffuse_depth); + DiffuseDepth = (float)diffuse_depth; + + int glossy_depth; + getattribute("path:glossy_depth", glossy_depth); + GlossyDepth = (float)glossy_depth; + int transparent_depth; getattribute("path:transparent_depth", transparent_depth); TransparentDepth = (float)transparent_depth; |