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/shader/node_shader_util.c')
-rw-r--r--source/blender/nodes/shader/node_shader_util.c53
1 files changed, 2 insertions, 51 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index b25a6c2bba0..a4b2c155675 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -91,53 +91,6 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
}
-/* go over all used Geometry and Texture nodes, and return a texco flag */
-/* no group inside needed, this function is called for groups too */
-void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mode)
-{
- bNode *node;
- bNodeSocket *sock;
- int a;
-
- for (node = ntree->nodes.first; node; node = node->next) {
- if (node->type == SH_NODE_TEXTURE) {
- if ((r_mode & R_OSA) && node->id) {
- Tex *tex = (Tex *)node->id;
- if (ELEM(tex->type, TEX_IMAGE, TEX_ENVMAP)) {
- *texco |= TEXCO_OSA | NEED_UV;
- }
- }
- /* usability exception... without input we still give the node orcos */
- sock = node->inputs.first;
- if (sock == NULL || sock->link == NULL)
- *texco |= TEXCO_ORCO | NEED_UV;
- }
- else if (node->type == SH_NODE_GEOMETRY) {
- /* note; sockets always exist for the given type! */
- for (a = 0, sock = node->outputs.first; sock; sock = sock->next, a++) {
- if (sock->flag & SOCK_IN_USE) {
- switch (a) {
- case GEOM_OUT_GLOB:
- *texco |= TEXCO_GLOB | NEED_UV; break;
- case GEOM_OUT_VIEW:
- *texco |= TEXCO_VIEW | NEED_UV; break;
- case GEOM_OUT_ORCO:
- *texco |= TEXCO_ORCO | NEED_UV; break;
- case GEOM_OUT_UV:
- *texco |= TEXCO_UV | NEED_UV; break;
- case GEOM_OUT_NORMAL:
- *texco |= TEXCO_NORM | NEED_UV; break;
- case GEOM_OUT_VCOL:
- *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break;
- case GEOM_OUT_VCOL_ALPHA:
- *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break;
- }
- }
- }
- }
- }
-}
-
void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
{
memset(gs, 0, sizeof(*gs));
@@ -147,7 +100,6 @@ void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
zero_v4(gs->vec);
gs->link = NULL;
gs->type = GPU_NONE;
- gs->name = "";
gs->hasinput = false;
gs->hasoutput = false;
gs->sockettype = type;
@@ -163,11 +115,10 @@ void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
else if (type == SOCK_RGBA)
gs->type = GPU_VEC4;
else if (type == SOCK_SHADER)
- gs->type = GPU_VEC4;
+ gs->type = GPU_CLOSURE;
else
gs->type = GPU_NONE;
- gs->name = "";
gs->hasinput = ns->hasinput && ns->data;
/* XXX Commented out the ns->data check here, as it seems it's not always set,
* even though there *is* a valid connection/output... But that might need
@@ -193,7 +144,7 @@ static void gpu_stack_from_data_list(GPUNodeStack *gs, ListBase *sockets, bNodeS
for (sock = sockets->first, i = 0; sock; sock = sock->next, i++)
node_gpu_stack_from_data(&gs[i], sock->type, ns[i]);
- gs[i].type = GPU_NONE;
+ gs[i].end = true;
}
static void data_from_gpu_stack_list(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs)