Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-02 21:03:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-02 21:03:46 +0400
commitd64661b5078cd4781bd58fce6fadedac511c4132 (patch)
tree08abb98017e41cd6f7bfbd1f2ca87a2166f91eea /intern/cycles/kernel/kernel_types.h
parent89f554fd24abb6c3986090933f771da267345b96 (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.h3
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