Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-03-25 03:10:41 +0300
committerMatt Ebb <matt@mke3.net>2010-03-25 03:10:41 +0300
commit78e282fdf1330ebe1f980725d3e3154fa1abd5c5 (patch)
treebb1f033cdaaee23f83f78549a0d2f7dabaf7750c /source/blender/nodes
parentf1cfb5f13c76e28a5f56fe9dd03001be0c25c530 (diff)
Patch from Francois Tarlier: extend colour balance node 'lift' value to 0.0-2.0 range
(default 1.0), like the other controls. Thanks!
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
index 7ec28e6461d..b40b27e06ee 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
@@ -56,7 +56,7 @@ DO_INLINE float colorbalance_cdl(float in, float offset, float power, float slop
DO_INLINE float colorbalance_lgg(float in, float lift, float gamma, float gain)
{
- float x = gain*(in+lift*(1-in));
+ float x = gain*(in+(lift-1)*(1-in));
/* prevent NaN */
if (x < 0.f) x = 0.f;
@@ -150,7 +150,7 @@ static void node_composit_init_colorbalance(bNode *node)
{
NodeColorBalance *n= node->storage= MEM_callocN(sizeof(NodeColorBalance), "node colorbalance");
- n->lift[0] = n->lift[1] = n->lift[2] = 0.0f;
+ n->lift[0] = n->lift[1] = n->lift[2] = 1.0f;
n->gamma[0] = n->gamma[1] = n->gamma[2] = 1.0f;
n->gain[0] = n->gain[1] = n->gain[2] = 1.0f;
}