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:
authorAntony Riakiotakis <kalast@gmail.com>2015-03-17 17:20:33 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-03-17 17:20:33 +0300
commitdd38dce7f0ae604396d1e96bc49500369fdedf29 (patch)
tree2b32e776f0bb972705d2c884cb6d5ec77deaf714 /source/blender/nodes
parent42aac45d7f0e0f43725093e97ebb8175a95aa247 (diff)
Part 2 of D1082 by Troy Sobotka, remove our functions that do luma
calculations and use the OCIO one instead.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.c3
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToRgb.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
index fa5d9b43ee7..72942cce9c5 100644
--- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
@@ -31,6 +31,7 @@
#include "node_shader_util.h"
+#include "IMB_colormanagement.h"
/* **************** VALTORGB ******************** */
static bNodeSocketTemplate sh_node_valtorgb_in[] = {
@@ -106,7 +107,7 @@ static void node_shader_exec_rgbtobw(void *UNUSED(data), int UNUSED(thread), bNo
float col[3];
nodestack_get_vec(col, SOCK_VECTOR, in[0]);
- out[0]->vec[0] = rgb_to_bw(col);
+ out[0]->vec[0] = IMB_colormanagement_get_luminance(col);
}
static int gpu_shader_rgbtobw(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
index 7f8adab2da5..a49d82d27a9 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
@@ -32,6 +32,7 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
+#include "IMB_colormanagement.h"
/* **************** VALTORGB ******************** */
static bNodeSocketTemplate valtorgb_in[] = {
@@ -91,7 +92,7 @@ static void rgbtobw_valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNode
{
float cin[4];
tex_input_rgba(cin, in[0], p, thread);
- *out = rgb_to_bw(cin);
+ *out = IMB_colormanagement_get_luminance(cin);
}
static void rgbtobw_exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)