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/TEX_nodes/TEX_texture.c')
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_texture.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
index d4d77b5fd5a..c58595866af 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
@@ -49,18 +49,18 @@ static bNodeSocketType outputs[]= {
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
{
+ Tex *nodetex = (Tex *)node->id;
static float red[] = {1,0,0,1};
static float white[] = {1,1,1,1};
- float *co = p->co;
-
- Tex *nodetex = (Tex *)node->id;
+ float co[3], dxt[3], dyt[3];
+
+ copy_v3_v3(co, p->co);
+ copy_v3_v3(dxt, p->dxt);
+ copy_v3_v3(dyt, p->dyt);
if(node->custom2 || node->need_exec==0) {
/* this node refers to its own texture tree! */
- QUATCOPY(
- out,
- (fabs(co[0] - co[1]) < .01) ? white : red
- );
+ QUATCOPY(out, (fabs(co[0] - co[1]) < .01) ? white : red );
}
else if(nodetex) {
TexResult texres;
@@ -70,9 +70,9 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
tex_input_rgba(col1, in[0], p, thread);
tex_input_rgba(col2, in[1], p, thread);
-
+
texres.nor = nor;
- textype = multitex_nodes(nodetex, co, p->dxt, p->dyt, p->osatex,
+ textype = multitex_nodes(nodetex, co, dxt, dyt, p->osatex,
&texres, thread, 0, p->shi, p->mtex);
if(textype & TEX_RGB) {