diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-02 21:03:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-02 21:03:46 +0400 |
commit | d64661b5078cd4781bd58fce6fadedac511c4132 (patch) | |
tree | 08abb98017e41cd6f7bfbd1f2ca87a2166f91eea /source | |
parent | 89f554fd24abb6c3986090933f771da267345b96 (diff) |
Cycles: add Ray Length output to Light Path node. This gives the distance travelled
by the last light ray. One use case for this might be to do absorption.
Patch #31232 by Agustin benavidez, see this blog post for details:
http://agus3d.blogspot.com.ar/2012/05/blender-cycles-ray-length-node-output.html
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_light_path.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_light_path.c b/source/blender/nodes/shader/nodes/node_shader_light_path.c index 5d7a3014682..5ebbd63a5a1 100644 --- a/source/blender/nodes/shader/nodes/node_shader_light_path.c +++ b/source/blender/nodes/shader/nodes/node_shader_light_path.c @@ -37,6 +37,7 @@ static bNodeSocketTemplate sh_node_light_path_out[]= { { SOCK_FLOAT, 0, "Is Singular Ray", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 0, "Is Reflection Ray", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 0, "Is Transmission Ray", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "Ray Length", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, { -1, 0, "" } }; |