32
32
/* **************** Brigh and contrsast ******************** */
34
static bNodeSocketTemplate sh_node_brightcontrast_in[]= {
35
{ SOCK_RGBA, 1, "Color", 1.0f, 1.0f, 1.0f, 1.0f},
36
{ SOCK_FLOAT, 1, "Bright", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
37
{ SOCK_FLOAT, 1, "Contrast", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
41
static bNodeSocketTemplate sh_node_brightcontrast_out[]= {
42
{ SOCK_RGBA, 0, "Color"},
34
static bNodeSocketTemplate sh_node_brightcontrast_in[] = {
35
{ SOCK_RGBA, 1, N_("Color"), 1.0f, 1.0f, 1.0f, 1.0f},
36
{ SOCK_FLOAT, 1, N_("Bright"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
37
{ SOCK_FLOAT, 1, N_("Contrast"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
41
static bNodeSocketTemplate sh_node_brightcontrast_out[] = {
42
{ SOCK_RGBA, 0, N_("Color")},
46
static int gpu_shader_brightcontrast(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
48
return GPU_stack_link(mat, "brightness_contrast", in, out);
46
51
void register_node_type_sh_brightcontrast(bNodeTreeType *ttype)
54
59
node_type_init(&ntype, NULL);
55
60
node_type_storage(&ntype, "", NULL, NULL);
56
61
node_type_exec(&ntype, NULL);
57
node_type_gpu(&ntype, NULL);
62
node_type_gpu(&ntype, gpu_shader_brightcontrast);
59
64
nodeRegisterType(ttype, &ntype);