diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-08-19 21:33:17 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2019-09-12 04:13:02 +0300 |
commit | 023a7fada8b1c675d02a50bcc665c5e5b9d71b28 (patch) | |
tree | ce28cfa6a354e14c741e6a2875f5a981cf39034f /source/blender/makesdna | |
parent | 13194fc36a8335d848e8f1c91cc366c5bb994aa1 (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')
-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; |