Blender Git Loki

Git Commits -> Revision 023a7fa

September 12, 2019, 01:13 (GMT)
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

Commit Details:

Full Hash: 023a7fada8b1c675d02a50bcc665c5e5b9d71b28
Parent Commit: 13194fc
Committed By: YimingWu
Lines Changed: +159, -90

17 Modified Paths:

/source/blender/gpu/shaders/material/gpu_shader_material_bump.glsl (+21, -4) (Diff)
/source/blender/makesdna/DNA_node_types.h (+2, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bump.c (+10, -25) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_brick.c (+3, -7) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_checker.c (+1, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_coord.c (+13, -11) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_environment.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c (+1, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_image.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_magic.c (+1, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c (+1, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_noise.c (+1, -4) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c (+1, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_wave.c (+1, -5) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+71, -8) (Diff)
/source/blender/nodes/shader/node_shader_util.c (+24, -0) (Diff)
/source/blender/nodes/shader/node_shader_util.h (+6, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021