Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/nodes/node_texture_valToRgb.c
| Context not available. | |||||
| #include "node_texture_util.h" | #include "node_texture_util.h" | ||||
| #include "NOD_texture.h" | #include "NOD_texture.h" | ||||
| #include "IMB_colormanagement.h" | |||||
| /* **************** VALTORGB ******************** */ | /* **************** VALTORGB ******************** */ | ||||
| static bNodeSocketTemplate valtorgb_in[] = { | static bNodeSocketTemplate valtorgb_in[] = { | ||||
| Context not available. | |||||
| { | { | ||||
| float cin[4]; | float cin[4]; | ||||
| tex_input_rgba(cin, in[0], p, thread); | 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) | static void rgbtobw_exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out) | ||||
| Context not available. | |||||