diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-08-12 19:40:52 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-08-14 14:36:56 +0300 |
commit | 67c10dbf1322bd09945c82354d5d3a9004e06bcd (patch) | |
tree | 1024f0d4b1d7012f4ba1ff028ae5887f79b4c5cd /source/blender/nodes | |
parent | 13d469e6f0c554399629febeb1fd8d680b873a90 (diff) |
Eevee: Add support for the holdout node
Support should be full when using Alpha Blend mode and partial if using
any other blend mode (opaque / alpha clip / alpha hashed).
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_holdout.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_holdout.c b/source/blender/nodes/shader/nodes/node_shader_holdout.c index a4d1e77c736..2762e5ec1f5 100644 --- a/source/blender/nodes/shader/nodes/node_shader_holdout.c +++ b/source/blender/nodes/shader/nodes/node_shader_holdout.c @@ -30,6 +30,15 @@ static bNodeSocketTemplate sh_node_holdout_out[] = { {-1, 0, ""}, }; +static int gpu_shader_rgb(GPUMaterial *mat, + bNode *node, + bNodeExecData *UNUSED(execdata), + GPUNodeStack *in, + GPUNodeStack *out) +{ + return GPU_stack_link(mat, node, "node_holdout", in, out); +} + /* node type definition */ void register_node_type_sh_holdout(void) { @@ -39,6 +48,7 @@ void register_node_type_sh_holdout(void) node_type_socket_templates(&ntype, sh_node_holdout_in, sh_node_holdout_out); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); + node_type_gpu(&ntype, gpu_shader_rgb); nodeRegisterType(&ntype); } |