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:
authorRobin Allen <roblovski@gmail.com>2009-08-18 00:30:11 +0400
committerRobin Allen <roblovski@gmail.com>2009-08-18 00:30:11 +0400
commitf9ceeeede672a634913188c775e020c23170f4e1 (patch)
tree1f1068e7d4b118dd44795bc6412b46d36230fd28 /source/blender/nodes/intern/TEX_nodes/TEX_output.c
parent9f5d25748397aad6a4347f40c7ec6c025dc93129 (diff)
Slight refactor of texture nodes.
Delegates now receive a TexParams* instead of float *coords. This gives texture nodes access to dxt, dyt, cfra as well as coords. This fixes the time node and allows nice sampling to be implemented.
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_output.c')
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_output.c b/source/blender/nodes/intern/TEX_nodes/TEX_output.c
index d0538d11900..355de796c7e 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_output.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_output.c
@@ -21,7 +21,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Robin Allen
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -49,14 +49,17 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
if(!cdata->do_preview) {
if(cdata->which_output == node->custom1)
{
- tex_input_rgba(&target->tr, in[0], cdata->coord, cdata->thread);
+ TexParams params;
+ params_from_cdata(&params, cdata);
+
+ tex_input_rgba(&target->tr, in[0], &params, cdata->thread);
target->tin = (target->tr + target->tg + target->tb) / 3.0f;
target->talpha = 1.0f;
if(target->nor) {
if(in[1]->hasinput)
- tex_input_vec(target->nor, in[1], cdata->coord, cdata->thread);
+ tex_input_vec(target->nor, in[1], &params, cdata->thread);
else
target->nor = 0;
}