diff options
author | Thomas Dinges <blender@dingto.org> | 2014-03-07 00:02:41 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-03-07 00:03:22 +0400 |
commit | 8a38d840e99be38a4827fefb3834c9704050e4a8 (patch) | |
tree | 058f01ad0378f520909d932522bfce04deb02eac /intern/cycles | |
parent | 1d016758330b7e328758b3df28ea93a19d47fcdc (diff) |
Cycles: Use Displacement type in OSL ShadingSystem.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D386
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/osl.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index aeb7aeefd0a..d4ca014a907 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -513,16 +513,14 @@ void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath) } } - /* create shader of the appropriate type. we pass "surface" to all shaders, - * because "volume" and "displacement" don't work yet in OSL. the shaders - * work fine, but presumably these values would be used for more strict - * checking, so when that is fixed, we should update the code here too. */ + /* create shader of the appropriate type. OSL only distinguishes between "surface" + * and "displacement" atm */ if(current_type == SHADER_TYPE_SURFACE) ss->Shader("surface", name, id(node).c_str()); else if(current_type == SHADER_TYPE_VOLUME) ss->Shader("surface", name, id(node).c_str()); else if(current_type == SHADER_TYPE_DISPLACEMENT) - ss->Shader("surface", name, id(node).c_str()); + ss->Shader("displacement", name, id(node).c_str()); else assert(0); |