diff options
author | Ton Roosendaal <ton@blender.org> | 2008-11-12 22:03:50 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-11-12 22:03:50 +0300 |
commit | 8030cb03fd41673b7d687128782a0e21417baaea (patch) | |
tree | b2e25d9a91ecf3713c45a4263f88a934e973e593 /source/blender/nodes/intern/SHD_nodes | |
parent | 3fd3a13efc81ce3eafadd5ab31a154bbc25d6e58 (diff) |
Patch #7897 Texture Nodes!
Robin (Frrr) Allen did a decent job on this, so we can also welcome him
as a member in the svn committers team to maintain it!
I do the first commit with some minor fixes:
- get Makefiles work
- fix rounding issue with tiles on unit faces
- removed UI includes from tex node
A nice doc in wiki is here:
http://wiki.blender.org/index.php/User:Frr/TexnodeManual
On the todo for Robin is:
- When using one or more Texture-input nodes, you cannot edit them by activating
(as works now for Material nodes).
- The new "output node" option fails on the default case, when only one
output node is active. It then shows often a blank menu. Will get fixed asap.
- When using a NodeTree-Texture as input node, the menu for 'active output'
should not show. NodeTree should ignore other nodetrees to keep things sane
for now.
- On a future todo is proper usage of "Dxt" and "Dyt" texture vectors for
superior antialising of checkers/bricks.
General note; I know people are dying to get a full integrated shader system
with nodes. In theory we could merge this with Material Nodetrees... but I
rather wait for a solid and very well thought out design proposal for this,
also including design ideas for unifying with a shader language (GPU, CPU).
For the time being this is a nice extension of current textures. :)
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_texture.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c b/source/blender/nodes/intern/SHD_nodes/SHD_texture.c index 31dbde940fd..908cbf5abfd 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_texture.c @@ -50,6 +50,9 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b TexResult texres; float vec[3], nor[3]={0.0f, 0.0f, 0.0f}; int retval; + short which_output = node->custom1; + + short thread = shi->thread; /* out: value, color, normal */ @@ -61,7 +64,7 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b if(in[0]->datatype==NS_OSA_VECTORS) { float *fp= in[0]->data; - retval= multitex_ext((Tex *)node->id, vec, fp, fp+3, shi->osatex, &texres); + retval= multitex_thread((Tex *)node->id, vec, fp, fp+3, shi->osatex, &texres, thread, which_output); } else if(in[0]->datatype==NS_OSA_VALUES) { float *fp= in[0]->data; @@ -69,14 +72,14 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b dxt[0]= fp[0]; dxt[1]= dxt[2]= 0.0f; dyt[0]= fp[1]; dyt[1]= dyt[2]= 0.0f; - retval= multitex_ext((Tex *)node->id, vec, dxt, dyt, shi->osatex, &texres); + retval= multitex_thread((Tex *)node->id, vec, dxt, dyt, shi->osatex, &texres, thread, which_output); } else - retval= multitex_ext((Tex *)node->id, vec, NULL, NULL, 0, &texres); + retval= multitex_thread((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output); } - else { /* only for previewrender, so we see stuff */ + else { VECCOPY(vec, shi->lo); - retval= multitex_ext((Tex *)node->id, vec, NULL, NULL, 0, &texres); + retval= multitex_thread((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output); } /* stupid exception */ |