From c42c12939342bdccb98000c195503a78423ddc2c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 1 Aug 2017 18:03:16 +0200 Subject: 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. --- source/blender/nodes/shader/node_shader_tree.c | 3 +++ source/blender/nodes/shader/nodes/node_shader_output_material.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'source') 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); -- cgit v1.2.3