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@gmail.com>2018-01-24 22:19:48 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-29 19:07:08 +0300
commit1eeb846e781dac3f55d6c108d0fc4c3cfe88f4cc (patch)
treec80b01eb79df21ad995cb22831ac6012dc0fd1c1 /intern/cycles/graph/node.h
parentfb941679bb6e537a8fb1e1de69b5a446490e761b (diff)
Fix Cycles viewport render not updating when tweaking displacement shader.
This was disabled to avoid updating the geometry every time when the material includes displacement, because there was no way to distinguish between surface shader and displacement updates. As a solution, we now compute an MD5 hash of the nodes linked to the displacement socket, and only update the mesh if that changes. Differential Revision: https://developer.blender.org/D3018
Diffstat (limited to 'intern/cycles/graph/node.h')
-rw-r--r--intern/cycles/graph/node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/graph/node.h b/intern/cycles/graph/node.h
index 53425f5faf1..d198c38be32 100644
--- a/intern/cycles/graph/node.h
+++ b/intern/cycles/graph/node.h
@@ -24,6 +24,7 @@
CCL_NAMESPACE_BEGIN
+class MD5Hash;
struct Node;
struct NodeType;
struct Transform;
@@ -88,6 +89,9 @@ struct Node
/* equals */
bool equals(const Node& other) const;
+ /* compute hash of node and its socket values */
+ void hash(MD5Hash& md5);
+
ustring name;
const NodeType *type;
};