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:
authorClément Foucault <foucault.clem@gmail.com>2019-08-19 21:33:17 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-09-06 17:59:15 +0300
commitffd5e1e6acd296a187e7af016f9d7f8a9f209f87 (patch)
treef6dfa5af198009a7119aa90c5fb78feb0be49b0b /source/blender/nodes/shader/node_shader_util.h
parent83a7d98a325232bef85bd7c66dccf911248abf05 (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/nodes/shader/node_shader_util.h')
-rw-r--r--source/blender/nodes/shader/node_shader_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h
index a3c553b983b..9719d0b36f5 100644
--- a/source/blender/nodes/shader/node_shader_util.h
+++ b/source/blender/nodes/shader/node_shader_util.h
@@ -84,6 +84,12 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns);
void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, struct bNodeStack *ns);
void node_data_from_gpu_stack(struct bNodeStack *ns, struct GPUNodeStack *gs);
+void node_shader_gpu_bump_tex_coord(struct GPUMaterial *mat,
+ struct bNode *node,
+ struct GPUNodeLink **link);
+void node_shader_gpu_default_tex_coord(struct GPUMaterial *mat,
+ struct bNode *node,
+ struct GPUNodeLink **link);
void node_shader_gpu_tex_mapping(struct GPUMaterial *mat,
struct bNode *node,
struct GPUNodeStack *in,