Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_valToRgb.c
| Context not available. | |||||
| #include "node_shader_util.h" | #include "node_shader_util.h" | ||||
| #include "IMB_colormanagement.h" | |||||
| /* **************** VALTORGB ******************** */ | /* **************** VALTORGB ******************** */ | ||||
| static bNodeSocketTemplate sh_node_valtorgb_in[] = { | static bNodeSocketTemplate sh_node_valtorgb_in[] = { | ||||
| Context not available. | |||||
| float col[3]; | float col[3]; | ||||
| nodestack_get_vec(col, SOCK_VECTOR, in[0]); | 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) | static int gpu_shader_rgbtobw(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| Context not available. | |||||