Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-08-12 19:40:52 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-08-14 14:36:56 +0300
commit67c10dbf1322bd09945c82354d5d3a9004e06bcd (patch)
tree1024f0d4b1d7012f4ba1ff028ae5887f79b4c5cd /source/blender/nodes
parent13d469e6f0c554399629febeb1fd8d680b873a90 (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.c10
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);
}