Brightness/Contrast Node for Cycles

Contrast helps to adjust IBL (HDR images used for background lighting).
Note: In the UI we are caling it Bright instead of Brightness. This copy what Blender composite is doing.
Note2: the algorithm we are using produces pure black when contrast is 100. I'm not a fan of that, but it's a division by zero. I would like to look at other algorithms (what gimp does for example). But that would be only after 2.62.
This commit is contained in:
Dalai Felinto
2012-01-24 16:32:31 +00:00
parent 1f9e25ac1a
commit 335ffb0ff3
17 changed files with 224 additions and 6 deletions

View File

@@ -131,6 +131,7 @@ CCL_NAMESPACE_END
#include "svm_hsv.h"
#include "svm_image.h"
#include "svm_gamma.h"
#include "svm_brightness.h"
#include "svm_invert.h"
#include "svm_light_path.h"
#include "svm_magic.h"
@@ -270,6 +271,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
case NODE_GAMMA:
svm_node_gamma(sd, stack, node.y, node.z, node.w);
break;
case NODE_BRIGHTCONTRAST:
svm_node_brightness(sd, stack, node.y, node.z, node.w);
break;
case NODE_MIX:
svm_node_mix(kg, sd, stack, node.y, node.z, node.w, &offset);
break;