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 /intern/cycles/kernel/kernel_types.h | |
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 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index bf48ec8c000..85ee16fc5c6 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -401,6 +401,9 @@ typedef struct ShaderData { /* motion blur sample time */ float time; + + /* length of the ray being shaded */ + float ray_length; #ifdef __MOTION__ /* object <-> world space transformations, cached to avoid |