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-10-20 19:09:36 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-20 19:09:36 +0400
commit73b79a6763f762ff2999622edd7c70aee69c18e9 (patch)
treec5dfc838e0f61db9c22bddb5e6c3f171953d2453 /intern/cycles/render/osl.cpp
parente287c97fea74debb88b73de695b155fb172fa7c6 (diff)
Cycles OSL: light path, texture coordinate, bump and blended box mapping now up
to date and working.
Diffstat (limited to 'intern/cycles/render/osl.cpp')
-rw-r--r--intern/cycles/render/osl.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index 21e6c7749b8..638bfa8634e 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -59,6 +59,22 @@ OSLShaderManager::OSLShaderManager()
//ss->attribute("statistics:level", 1);
ss->attribute("searchpath:shader", path_get("shader").c_str());
+ /* our own ray types */
+ static const char *raytypes[] = {
+ "camera", /* PATH_RAY_CAMERA */
+ "reflection", /* PATH_RAY_REFLECT */
+ "refraction", /* PATH_RAY_TRANSMIT */
+ "diffuse", /* PATH_RAY_DIFFUSE */
+ "glossy", /* PATH_RAY_GLOSSY */
+ "singular", /* PATH_RAY_SINGULAR */
+ "transparent", /* PATH_RAY_TRANSPARENT */
+ "shadow", /* PATH_RAY_SHADOW_OPAQUE */
+ "shadow", /* PATH_RAY_SHADOW_TRANSPARENT */
+ };
+
+ const int nraytypes = sizeof(raytypes)/sizeof(raytypes[0]);
+ ss->attribute("raytypes", TypeDesc(TypeDesc::STRING, nraytypes), raytypes);
+
OSLShader::register_closures(ss);
}
@@ -209,6 +225,10 @@ bool OSLCompiler::node_skip_input(ShaderNode *node, ShaderInput *input)
if(strcmp(input->name, "Normal") == 0)
return true;
}
+ else if(node->name == ustring("bump")) {
+ if(strcmp(input->name, "Height") == 0)
+ return true;
+ }
else if(current_type == SHADER_TYPE_DISPLACEMENT && input->link && input->link->parent->name == ustring("bump"))
return true;