~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/nodes/shader/nodes/node_shader_brightness.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
/* **************** Brigh and contrsast  ******************** */
33
33
 
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},
38
 
        {       -1, 0, ""       }
39
 
};
40
 
 
41
 
static bNodeSocketTemplate sh_node_brightcontrast_out[]= {
42
 
        {       SOCK_RGBA, 0, "Color"},
43
 
        {       -1, 0, ""       }
44
 
};
 
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},
 
38
        {       -1, 0, ""       }
 
39
};
 
40
 
 
41
static bNodeSocketTemplate sh_node_brightcontrast_out[] = {
 
42
        {       SOCK_RGBA, 0, N_("Color")},
 
43
        {       -1, 0, ""       }
 
44
};
 
45
 
 
46
static int gpu_shader_brightcontrast(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
 
47
{
 
48
        return GPU_stack_link(mat, "brightness_contrast", in, out);
 
49
}
45
50
 
46
51
void register_node_type_sh_brightcontrast(bNodeTreeType *ttype)
47
52
{
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);
58
63
        
59
64
        nodeRegisterType(ttype, &ntype);
60
65
}