diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-28 21:08:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-28 21:08:33 +0400 |
commit | 9b9c4184c88c49ff96f3f23cbfbd00f6811d7301 (patch) | |
tree | 4c5aaf763f28710d07b3ec364088a98de8ae9794 /source/blender/nodes/intern/SHD_nodes | |
parent | faf07c3e2b6cb180d1580b4160ff6534b4754b76 (diff) |
misc nodes & editors: floats were being implicitly promoted to doubles, adjust to use floats.
+ minor update to demo_mode
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c | 4 | ||||
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_invert.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c b/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c index dd09b4e1b70..91fd995dbbe 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c @@ -52,12 +52,12 @@ static bNodeSocketType sh_node_hue_sat_out[]= { /* note: it would be possible to use CMP version for both nodes */ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float *hue, float *sat, float *val, float *in, float *fac) { - if(*fac!=0.0f && (*hue!=0.5f || *sat!=1.0 || *val!=1.0)) { + if(*fac!=0.0f && (*hue!=0.5f || *sat!=1.0f || *val!=1.0f)) { float col[3], hsv[3], mfac= 1.0f - *fac; rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); hsv[0]+= (*hue - 0.5f); - if(hsv[0]>1.0) hsv[0]-=1.0; else if(hsv[0]<0.0) hsv[0]+= 1.0; + if(hsv[0]>1.0f) hsv[0]-=1.0f; else if(hsv[0]<0.0f) hsv[0]+= 1.0f; hsv[1]*= *sat; hsv[2]*= *val; hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c b/source/blender/nodes/intern/SHD_nodes/SHD_invert.c index 888d1514146..f8d6e54859e 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_invert.c @@ -59,7 +59,7 @@ bNodeStack **out) /* if fac, blend result against original input */ if (in[0]->vec[0] < 1.0f) { - facm = 1.0 - in[0]->vec[0]; + facm = 1.0f - in[0]->vec[0]; col[0] = in[0]->vec[0]*col[0] + (facm*in[1]->vec[0]); col[1] = in[0]->vec[0]*col[1] + (facm*in[1]->vec[1]); |