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:
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_add_shader.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c)26
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_background.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_blend_weight.c68
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c6
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c5
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c5
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_emission.c6
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_fresnel.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_holdout.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_mix_shader.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_mix_closure.c)26
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_output_lamp.c2
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_output_material.c4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_output_world.c4
17 files changed, 123 insertions, 57 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c b/source/blender/nodes/intern/SHD_nodes/SHD_add_shader.c
index 8c4a7d83915..60fe04a8b34 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_add_shader.c
@@ -31,38 +31,38 @@
/* **************** OUTPUT ******************** */
-static bNodeSocketType sh_node_add_closure_in[]= {
- { SOCK_CLOSURE, 1, "Closure1", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_CLOSURE, 1, "Closure2", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketType sh_node_add_shader_in[]= {
+ { SOCK_SHADER, 1, "Shader1", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Shader2", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_add_closure_out[]= {
- { SOCK_CLOSURE, 0, "Closure", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketType sh_node_add_shader_out[]= {
+ { SOCK_SHADER, 0, "Shader", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static void node_shader_exec_add_closure(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
+static void node_shader_exec_add_shader(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
{
}
-static int node_shader_gpu_add_closure(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
+static int node_shader_gpu_add_shader(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
{
- return GPU_stack_link(mat, "node_add_closure", in, out);
+ return GPU_stack_link(mat, "node_add_shader", in, out);
}
/* node type definition */
-void register_node_type_sh_add_closure(ListBase *lb)
+void register_node_type_sh_add_shader(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_ADD_CLOSURE, "Add Closure", NODE_CLASS_CLOSURE, 0,
- sh_node_add_closure_in, sh_node_add_closure_out);
+ node_type_base(&ntype, SH_NODE_ADD_SHADER, "Add Shader", NODE_CLASS_SHADER, 0,
+ sh_node_add_shader_in, sh_node_add_shader_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
node_type_storage(&ntype, "", NULL, NULL);
- node_type_exec(&ntype, node_shader_exec_add_closure);
- node_type_gpu(&ntype, node_shader_gpu_add_closure);
+ node_type_exec(&ntype, node_shader_exec_add_shader);
+ node_type_gpu(&ntype, node_shader_gpu_add_shader);
nodeRegisterType(lb, &ntype);
};
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_background.c b/source/blender/nodes/intern/SHD_nodes/SHD_background.c
index 195f804416f..e5603b2d167 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_background.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_background.c
@@ -38,7 +38,7 @@ static bNodeSocketType sh_node_background_in[]= {
};
static bNodeSocketType sh_node_background_out[]= {
- { SOCK_CLOSURE, 0, "Background", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "Background", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -52,7 +52,7 @@ void register_node_type_sh_background(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BACKGROUND, "Background", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BACKGROUND, "Background", NODE_CLASS_SHADER, 0,
sh_node_background_in, sh_node_background_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_blend_weight.c b/source/blender/nodes/intern/SHD_nodes/SHD_blend_weight.c
new file mode 100644
index 00000000000..f68348a8aa5
--- /dev/null
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_blend_weight.c
@@ -0,0 +1,68 @@
+/**
+ * $Id: SHD_blend_weight.c 32517 2010-10-16 14:32:17Z campbellbarton $
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "../SHD_util.h"
+
+/* **************** BlendWeight ******************** */
+static bNodeSocketType sh_node_blend_weight_in[]= {
+ { SOCK_VALUE, 1, "Blend", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
+};
+
+static bNodeSocketType sh_node_blend_weight_out[]= {
+ { SOCK_VALUE, 0, "Fresnel", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VALUE, 0, "Facing", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
+};
+
+static void node_shader_exec_blend_weight(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
+{
+}
+
+static int node_shader_gpu_blend_weight(GPUMaterial *UNUSED(mat), bNode *UNUSED(node), GPUNodeStack *UNUSED(in), GPUNodeStack *UNUSED(out))
+{
+ return 0;
+}
+
+/* node type definition */
+void register_node_type_sh_blend_weight(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, SH_NODE_BLEND_WEIGHT, "Blend Weight", NODE_CLASS_INPUT, 0,
+ sh_node_blend_weight_in, sh_node_blend_weight_out);
+ node_type_size(&ntype, 150, 60, 200);
+ node_type_init(&ntype, NULL);
+ node_type_storage(&ntype, "", NULL, NULL);
+ node_type_exec(&ntype, node_shader_exec_blend_weight);
+ node_type_gpu(&ntype, node_shader_gpu_blend_weight);
+
+ nodeRegisterType(lb, &ntype);
+};
+
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
index 508bf827440..15db7ebb53c 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
@@ -39,7 +39,7 @@ static bNodeSocketType sh_node_bsdf_anisotropic_in[]= {
};
static bNodeSocketType sh_node_bsdf_anisotropic_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -57,7 +57,7 @@ void register_node_type_sh_bsdf_anisotropic(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_ANISOTROPIC, "Glossy Anisotropic BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_ANISOTROPIC, "Glossy Anisotropic BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_anisotropic_in, sh_node_bsdf_anisotropic_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c
index 2525174606a..bd2781d4052 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c
@@ -37,7 +37,7 @@ static bNodeSocketType sh_node_bsdf_diffuse_in[]= {
};
static bNodeSocketType sh_node_bsdf_diffuse_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -55,7 +55,7 @@ void register_node_type_sh_bsdf_diffuse(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_DIFFUSE, "Diffuse BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_DIFFUSE, "Diffuse BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_diffuse_in, sh_node_bsdf_diffuse_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c
index 7f42c70b338..2d2b31573f2 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c
@@ -34,12 +34,12 @@
static bNodeSocketType sh_node_bsdf_glass_in[]= {
{ SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Roughness", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Fresnel", 0.3f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VALUE, 1, "IOR", 1.45f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
{ -1, 0, "" }
};
static bNodeSocketType sh_node_bsdf_glass_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -57,7 +57,7 @@ void register_node_type_sh_bsdf_glass(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_GLASS, "Glass BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_GLASS, "Glass BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_glass_in, sh_node_bsdf_glass_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c
index 16dea77d492..033aea1509f 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c
@@ -34,12 +34,11 @@
static bNodeSocketType sh_node_bsdf_glossy_in[]= {
{ SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Roughness", 0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Fresnel", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
static bNodeSocketType sh_node_bsdf_glossy_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -58,7 +57,7 @@ void register_node_type_sh_bsdf_glossy(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_glossy_in, sh_node_bsdf_glossy_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c
index ceec2891aaf..7a9ff48f5c9 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c
@@ -37,7 +37,7 @@ static bNodeSocketType sh_node_bsdf_translucent_in[]= {
};
static bNodeSocketType sh_node_bsdf_translucent_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -55,7 +55,7 @@ void register_node_type_sh_bsdf_translucent(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_TRANSLUCENT, "Translucent BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_TRANSLUCENT, "Translucent BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_translucent_in, sh_node_bsdf_translucent_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c
index 4f4537b339d..b3932162d73 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c
@@ -37,7 +37,7 @@ static bNodeSocketType sh_node_bsdf_transparent_in[]= {
};
static bNodeSocketType sh_node_bsdf_transparent_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -55,7 +55,7 @@ void register_node_type_sh_bsdf_transparent(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_TRANSPARENT, "Transparent BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_TRANSPARENT, "Transparent BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_transparent_in, sh_node_bsdf_transparent_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c
index 5b700eb1e4e..dfdcf2a4f7f 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c
@@ -34,12 +34,11 @@
static bNodeSocketType sh_node_bsdf_velvet_in[]= {
{ SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Sigma", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Fresnel", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
static bNodeSocketType sh_node_bsdf_velvet_out[]= {
- { SOCK_CLOSURE, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "BSDF", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -57,7 +56,7 @@ void register_node_type_sh_bsdf_velvet(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_VELVET, "Velvet BSDF", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_BSDF_VELVET, "Velvet BSDF", NODE_CLASS_SHADER, 0,
sh_node_bsdf_velvet_in, sh_node_bsdf_velvet_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_emission.c b/source/blender/nodes/intern/SHD_nodes/SHD_emission.c
index 7a88db3380d..e8b1d58a85a 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_emission.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_emission.c
@@ -33,12 +33,12 @@
static bNodeSocketType sh_node_emission_in[]= {
{ SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Strength", 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f},
+ { SOCK_VALUE, 1, "Strength", 30.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f},
{ -1, 0, "" }
};
static bNodeSocketType sh_node_emission_out[]= {
- { SOCK_CLOSURE, 0, "Emission", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "Emission", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -56,7 +56,7 @@ void register_node_type_sh_emission(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_EMISSION, "Emission", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_EMISSION, "Emission", NODE_CLASS_SHADER, 0,
sh_node_emission_in, sh_node_emission_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_fresnel.c b/source/blender/nodes/intern/SHD_nodes/SHD_fresnel.c
index 8e6d2545bb1..ac17faaaaa4 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_fresnel.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_fresnel.c
@@ -31,12 +31,12 @@
/* **************** Fresnel ******************** */
static bNodeSocketType sh_node_fresnel_in[]= {
- { SOCK_VALUE, 1, "Fresnel", 0.3f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VALUE, 1, "IOR", 1.45f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
{ -1, 0, "" }
};
static bNodeSocketType sh_node_fresnel_out[]= {
- { SOCK_VALUE, 0, "Fac", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VALUE, 0, "Fac", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_holdout.c b/source/blender/nodes/intern/SHD_nodes/SHD_holdout.c
index a96b621456a..f874eda786a 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_holdout.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_holdout.c
@@ -36,7 +36,7 @@ static bNodeSocketType sh_node_holdout_in[]= {
};
static bNodeSocketType sh_node_holdout_out[]= {
- { SOCK_CLOSURE, 0, "Holdout", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 0, "Holdout", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -50,7 +50,7 @@ void register_node_type_sh_holdout(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_CLOSURE, 0,
+ node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER, 0,
sh_node_holdout_in, sh_node_holdout_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mix_closure.c b/source/blender/nodes/intern/SHD_nodes/SHD_mix_shader.c
index 55838365756..3f486c4b469 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_mix_closure.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_mix_shader.c
@@ -31,39 +31,39 @@
/* **************** OUTPUT ******************** */
-static bNodeSocketType sh_node_mix_closure_in[]= {
+static bNodeSocketType sh_node_mix_shader_in[]= {
{ SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_CLOSURE, 1, "Closure1", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_CLOSURE, 1, "Closure2", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Shader1", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Shader2", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_mix_closure_out[]= {
- { SOCK_CLOSURE, 0, "Closure", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketType sh_node_mix_shader_out[]= {
+ { SOCK_SHADER, 0, "Shader", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static void node_shader_exec_mix_closure(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
+static void node_shader_exec_mix_shader(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
{
}
-static int node_shader_gpu_mix_closure(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
+static int node_shader_gpu_mix_shader(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
{
- return GPU_stack_link(mat, "node_mix_closure", in, out);
+ return GPU_stack_link(mat, "node_mix_shader", in, out);
}
/* node type definition */
-void register_node_type_sh_mix_closure(ListBase *lb)
+void register_node_type_sh_mix_shader(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MIX_CLOSURE, "Mix Closure", NODE_CLASS_CLOSURE, 0,
- sh_node_mix_closure_in, sh_node_mix_closure_out);
+ node_type_base(&ntype, SH_NODE_MIX_SHADER, "Mix Shader", NODE_CLASS_SHADER, 0,
+ sh_node_mix_shader_in, sh_node_mix_shader_out);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, NULL);
node_type_storage(&ntype, "", NULL, NULL);
- node_type_exec(&ntype, node_shader_exec_mix_closure);
- node_type_gpu(&ntype, node_shader_gpu_mix_closure);
+ node_type_exec(&ntype, node_shader_exec_mix_shader);
+ node_type_gpu(&ntype, node_shader_gpu_mix_shader);
nodeRegisterType(lb, &ntype);
};
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_output_lamp.c b/source/blender/nodes/intern/SHD_nodes/SHD_output_lamp.c
index 6665c727f48..5be9a1f6948 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_output_lamp.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_output_lamp.c
@@ -32,7 +32,7 @@
/* **************** OUTPUT ******************** */
static bNodeSocketType sh_node_output_lamp_in[]= {
- { SOCK_CLOSURE, 1, "Surface", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Surface", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_output_material.c b/source/blender/nodes/intern/SHD_nodes/SHD_output_material.c
index 06ab6b67dac..c0cdde3fb8b 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_output_material.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_output_material.c
@@ -32,8 +32,8 @@
/* **************** OUTPUT ******************** */
static bNodeSocketType sh_node_output_material_in[]= {
- { SOCK_CLOSURE, 1, "Surface", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_CLOSURE, 1, "Volume", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Surface", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Volume", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Displacement", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, SOCK_NO_VALUE},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_output_world.c b/source/blender/nodes/intern/SHD_nodes/SHD_output_world.c
index d140fb2408c..410ddd25bff 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_output_world.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_output_world.c
@@ -32,8 +32,8 @@
/* **************** OUTPUT ******************** */
static bNodeSocketType sh_node_output_world_in[]= {
- { SOCK_CLOSURE, 1, "Surface", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_CLOSURE, 1, "Volume", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Surface", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_SHADER, 1, "Volume", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};