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-09-02 07:41:04 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2016-09-11 18:20:21 +0300
commit92a2c49aab55a2c459a8f6d50e730bdcda966eb5 (patch)
tree8524d21897c5c2b4da74f08ef7b27046c8682eed /intern/cycles/render/graph.h
parentac2fe8312bd2a609eb884ad95dd27bcbbf7f1b0e (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/graph.h')
-rw-r--r--intern/cycles/render/graph.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index b35be48d8ca..780fdf49ca4 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -258,7 +258,8 @@ public:
void finalize(Scene *scene,
bool do_bump = false,
bool do_osl = false,
- bool do_simplify = false);
+ bool do_simplify = false,
+ bool bump_in_object_space = false);
int get_num_closures();
@@ -272,7 +273,7 @@ protected:
void copy_nodes(ShaderNodeSet& nodes, ShaderNodeMap& nnodemap);
void break_cycles(ShaderNode *node, vector<bool>& visited, vector<bool>& on_stack);
- void bump_from_displacement();
+ void bump_from_displacement(bool use_object_space);
void refine_bump_nodes();
void default_inputs(bool do_osl);
void transform_multi_closure(ShaderNode *node, ShaderOutput *weight_out, bool volume);