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

« back to all changes in this revision

Viewing changes to source/blender/nodes/shader/nodes/node_shader_bsdf_glass.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:
29
29
 
30
30
/* **************** OUTPUT ******************** */
31
31
 
32
 
static bNodeSocketTemplate sh_node_bsdf_glass_in[]= {
33
 
        {       SOCK_RGBA, 1, "Color",          0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
34
 
        {       SOCK_FLOAT, 1, "Roughness",     0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
35
 
        {       SOCK_FLOAT, 1, "IOR",           1.45f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
 
32
static bNodeSocketTemplate sh_node_bsdf_glass_in[] = {
 
33
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
 
34
        {       SOCK_FLOAT, 1, N_("Roughness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
 
35
        {       SOCK_FLOAT, 1, N_("IOR"),               1.45f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
 
36
        {       SOCK_VECTOR, 1, N_("Normal"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
36
37
        {       -1, 0, ""       }
37
38
};
38
39
 
39
 
static bNodeSocketTemplate sh_node_bsdf_glass_out[]= {
40
 
        {       SOCK_SHADER, 0, "BSDF"},
 
40
static bNodeSocketTemplate sh_node_bsdf_glass_out[] = {
 
41
        {       SOCK_SHADER, 0, N_("BSDF")},
41
42
        {       -1, 0, ""       }
42
43
};
43
44
 
44
45
static int node_shader_gpu_bsdf_glass(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
45
46
{
46
 
        return GPU_stack_link(mat, "node_bsdf_glass", in, out, GPU_builtin(GPU_VIEW_NORMAL), GPU_builtin(GPU_VIEW_POSITION));
 
47
        if (!in[3].link)
 
48
                in[3].link = GPU_builtin(GPU_VIEW_NORMAL);
 
49
 
 
50
        return GPU_stack_link(mat, "node_bsdf_glass", in, out);
47
51
}
48
52
 
49
53
/* node type definition */