diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-01 19:03:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-01 20:13:41 +0300 |
commit | c42c12939342bdccb98000c195503a78423ddc2c (patch) | |
tree | a60e272cbe1f4805e34e39f8f5118ec0fb743c77 /source | |
parent | 110d6832a88a3ebca0b0d4c3d996e545c2f5e1f1 (diff) |
Render: make Cycles and Evee support each other's output material nodes.
This changes the Cycles exporting and Cycles/Eevee UI code to support both
output material nodes, giving priority to the renderer native one. Still
missing is Eevee code to prefer the Eevee output node.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/shader/node_shader_tree.c | 3 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_output_material.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index 52e9ed35a2e..ec35959f31a 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -214,6 +214,9 @@ static void ntree_shader_link_builtin_normal(bNodeTree *ntree, * render engines works but it's how the GPU shader compilation works. This we * can change in the future and make it a generic function, but for now it stays * private here. + * + * It also does not yet take into account render engine specific output nodes, + * it should give priority to e.g. the Eevee material output node for Eevee. */ static bNode *ntree_shader_output_node(bNodeTree *ntree) { diff --git a/source/blender/nodes/shader/nodes/node_shader_output_material.c b/source/blender/nodes/shader/nodes/node_shader_output_material.c index 953999a0d48..0418b039337 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output_material.c +++ b/source/blender/nodes/shader/nodes/node_shader_output_material.c @@ -42,10 +42,6 @@ static int node_shader_gpu_output_material(GPUMaterial *mat, bNode *node, bNodeE { GPUNodeLink *outlink; - if (BKE_scene_uses_blender_eevee(GPU_material_scene(mat))) { - return false; - } - GPU_stack_link(mat, node, "node_output_material", in, out, &outlink); GPU_material_output_link(mat, outlink); |