diff options
author | Matt Ebb <matt@mke3.net> | 2008-06-17 08:18:34 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2008-06-17 08:18:34 +0400 |
commit | 4c391a0c30018917f6173d1200efcb93c02211f5 (patch) | |
tree | 9435ae13a8353ad8ff3891639bbc983c612e536d /source/blender/nodes/intern/SHD_nodes | |
parent | 6be46f9ee3c29da2022e14bf812a5dac172453cb (diff) |
* Simple addition to math node (comp and shading): Greater Than and Less Than modes.
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_math.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_math.c b/source/blender/nodes/intern/SHD_nodes/SHD_math.c index 95162e508d5..2e156cf12bf 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_math.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_math.c @@ -174,7 +174,23 @@ bNodeStack **out) else out[0]->vec[0]= (int)(in[1]->vec[0] + 0.5f); } - break; + break; + case 15: /* Less Than */ + { + if( in[0]->vec[0] < in[1]->vec[0] ) + out[0]->vec[0]= 1.0f; + else + out[0]->vec[0]= 0.0f; + } + break; + case 16: /* Greater Than */ + { + if( in[0]->vec[0] > in[1]->vec[0] ) + out[0]->vec[0]= 1.0f; + else + out[0]->vec[0]= 0.0f; + } + break; } } |