diff options
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c b/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c index 13d7e239ca2..471d8db2c03 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c @@ -26,7 +26,13 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c + * \ingroup texnodes + */ + + #include "../TEX_util.h" +#include "TEX_node.h" static bNodeSocketType inputs[]= { @@ -49,11 +55,11 @@ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float hue, float sat 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; - if(hsv[1]>1.0) hsv[1]= 1.0; else if(hsv[1]<0.0) hsv[1]= 0.0; + if(hsv[1]>1.0f) hsv[1]= 1.0f; else if(hsv[1]<0.0f) hsv[1]= 0.0f; hsv[2]*= val; - if(hsv[2]>1.0) hsv[2]= 1.0; else if(hsv[2]<0.0) hsv[2]= 0.0; + if(hsv[2]>1.0f) hsv[2]= 1.0f; else if(hsv[2]<0.0f) hsv[2]= 0.0f; hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); out[0]= mfac*in[0] + fac*col[0]; |