blender/intern/cycles/kernel/osl
Brecht Van Lommel 3e9f2938f0 Cycles OSL: support for the trace(point pos, vector dir, ...) function, to trace
rays from the OSL shader. The "shade" parameter is not supported currently, but
attributes can be retrieved from the object that was hit using the
getmessage("trace", ..) function.

As mentioned in the OSL specification, this function can't be used instead of
lighting, the main purpose is to allow shaders to "probe" nearby geometry, for
example to apply a projected texture that can be blocked by geometry, apply
more “wear” to exposed geometry, or make other ambient occlusion-like effects.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL#Trace

Example .blend and render:
http://www.pasteall.org/blend/17347
http://www.pasteall.org/pic/show.php?id=40066
2012-11-06 19:59:10 +00:00
..
background.cpp Cycles: 4 new nodes. 2012-11-06 19:59:02 +00:00
bsdf_phong_ramp.cpp Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like 2012-11-06 19:59:07 +00:00
CMakeLists.txt Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like 2012-11-06 19:59:07 +00:00
emissive.cpp Cycles OSL: most closure code is now shared between OSL and SVM. Also fix 2012-10-20 12:18:00 +00:00
osl_closures.cpp Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like 2012-11-06 19:59:07 +00:00
osl_closures.h Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like 2012-11-06 19:59:07 +00:00
osl_globals.h Cycles OSL: support for the trace(point pos, vector dir, ...) function, to trace 2012-11-06 19:59:10 +00:00
osl_services.cpp Cycles OSL: support for the trace(point pos, vector dir, ...) function, to trace 2012-11-06 19:59:10 +00:00
osl_services.h Cycles OSL: support for the trace(point pos, vector dir, ...) function, to trace 2012-11-06 19:59:10 +00:00
osl_shader.cpp Cycles OSL: support for the trace(point pos, vector dir, ...) function, to trace 2012-11-06 19:59:10 +00:00
osl_shader.h Cycles OSL: most closure code is now shared between OSL and SVM. Also fix 2012-10-20 12:18:00 +00:00