diff options
Diffstat (limited to 'intern/cycles/render/graph.cpp')
-rw-r--r-- | intern/cycles/render/graph.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index c284c64b5bf..e5fd39f08b7 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -721,6 +721,13 @@ void ShaderGraph::compute_displacement_hash() int link_id = (input->link) ? input->link->parent->id : 0; md5.append((uint8_t *)&link_id, sizeof(link_id)); } + + if (node->special_type == SHADER_SPECIAL_TYPE_OSL) { + /* Hash takes into account socket values, to detect changes + * in the code of the node we need an exception. */ + OSLNode *oslnode = static_cast<OSLNode *>(node); + md5.append(oslnode->bytecode_hash); + } } displacement_hash = md5.get_hex(); |