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:
authorMai Lavelle <mai.lavelle@gmail.com>2016-08-13 19:27:17 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2016-09-02 05:45:29 +0300
commit62aecbdac19aca49270a11cd0d835f22d31cad72 (patch)
treeb69a4eb1f3f7677ff03d441f24912a303dc2daca /intern/cycles/render/shader.cpp
parent9f1c42392e4ae8dfaa91ef8cc32119199ca7d723 (diff)
Cycles: Store undisplaced coordinates for meshes when needed
Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
Diffstat (limited to 'intern/cycles/render/shader.cpp')
-rw-r--r--intern/cycles/render/shader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index 4a3233ac764..1876791c6e8 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -240,6 +240,10 @@ void Shader::tag_update(Scene *scene)
attributes.clear();
foreach(ShaderNode *node, graph->nodes)
node->attributes(this, &attributes);
+
+ if(has_displacement && displacement_method == DISPLACE_BOTH) {
+ attributes.add(ATTR_STD_POSITION_UNDISPLACED);
+ }
/* compare if the attributes changed, mesh manager will check
* need_update_attributes, update the relevant meshes and clear it. */