diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-05-02 20:56:44 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-05-03 13:08:56 +0300 |
commit | e0fded5d3a57b3a3f2cb6b71be7290370099bfb9 (patch) | |
tree | 9df06178974deb0117ff22f12596f84ded372990 /source/blender/nodes | |
parent | 5570ba9c4f2cee25a1d366c754682996040d58a9 (diff) |
GPUMaterial: Force old outputs to fail with EEVEE.
Workaround waiting for compatibility bit / or PyNodes.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_output.c | 6 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_output_material.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c index 789df09d898..ad6b4acdd48 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output.c +++ b/source/blender/nodes/shader/nodes/node_shader_output.c @@ -32,6 +32,8 @@ #include "node_shader_util.h" +#include "BKE_scene.h" + /* **************** OUTPUT ******************** */ static bNodeSocketTemplate sh_node_output_in[] = { { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, @@ -74,6 +76,10 @@ static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecDat GPU_material_enable_alpha(mat); #endif + if (BKE_scene_uses_blender_eevee(GPU_material_scene(mat))) { + return false; + } + GPU_stack_link(mat, "output_node", in, out, &outlink); GPU_material_output_link(mat, outlink); 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 336536b21ee..bbb72651ee5 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output_material.c +++ b/source/blender/nodes/shader/nodes/node_shader_output_material.c @@ -27,6 +27,8 @@ #include "../node_shader_util.h" +#include "BKE_scene.h" + /* **************** OUTPUT ******************** */ static bNodeSocketTemplate sh_node_output_material_in[] = { @@ -40,6 +42,10 @@ static int node_shader_gpu_output_material(GPUMaterial *mat, bNode *UNUSED(node) { GPUNodeLink *outlink; + if (BKE_scene_uses_blender_eevee(GPU_material_scene(mat))) { + return false; + } + GPU_stack_link(mat, "node_output_material", in, out, &outlink); GPU_material_output_link(mat, outlink); |