diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-08-19 21:33:17 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-09-06 17:59:15 +0300 |
commit | ffd5e1e6acd296a187e7af016f9d7f8a9f209f87 (patch) | |
tree | f6dfa5af198009a7119aa90c5fb78feb0be49b0b /source/blender/makesdna/DNA_node_types.h | |
parent | 83a7d98a325232bef85bd7c66dccf911248abf05 (diff) |
Eevee: Use manual derivatives for better quality bump.
We basically duplicate the height map branch plugged into the bump node,
and tag each node in each branch as dx/dy/ref using `branch_tag`.
Then we add a one pixel offset on the texture coordinates if the node is
tagged as dx or dy.
The dx/dy branches are plugged into (new) hidden sockets on the bump node.
This match cycles bump better but have a performance impact. Also, complex
nodetrees can now become instruction limited and not compile anymore.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5531
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index ee5e9a13f66..6d2b278472f 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -276,7 +276,8 @@ typedef struct bNode { short preview_xsize, preview_ysize; /** Used at runtime when going through the tree. Initialize before use. */ short tmp_flag; - char _pad2[2]; + /** Used at runtime to tag derivatives branches. EEVEE only. */ + short branch_tag; /** Runtime during drawing. */ struct uiBlock *block; |