diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2016-09-02 07:41:04 +0300 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2016-09-11 18:20:21 +0300 |
commit | 92a2c49aab55a2c459a8f6d50e730bdcda966eb5 (patch) | |
tree | 8524d21897c5c2b4da74f08ef7b27046c8682eed /intern/cycles/render/svm.cpp | |
parent | ac2fe8312bd2a609eb884ad95dd27bcbbf7f1b0e (diff) |
Cycles: Fix bump mapping to use object space when used with true displacement
Bump mapping was happening in world space while displacement happens in object
space, causing shading errors when displacement type was used with bump mapping.
To fix this the proper transforms are added to bump nodes. This is only done
for automatic bump mapping however, to avoid visual changes from other uses of
bump mapping. It would be nice to do this for all bump mapping to be consistent
but that will have to wait till we can break compatibility.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2191
Diffstat (limited to 'intern/cycles/render/svm.cpp')
-rw-r--r-- | intern/cycles/render/svm.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp index e51758035dc..8b3affb011e 100644 --- a/intern/cycles/render/svm.cpp +++ b/intern/cycles/render/svm.cpp @@ -767,7 +767,8 @@ void SVMCompiler::compile(Scene *scene, shader->graph_bump->finalize(scene, true, false, - shader->has_integrator_dependency); + shader->has_integrator_dependency, + shader->displacement_method == DISPLACE_BOTH); } current_shader = shader; |