Cycles: working towards texture workflow design
[blender.git] / source / blender / nodes / intern / SHD_nodes / SHD_tex_image.c
index 3d74054e5d361b8faa392aa88c16ade3b227bf3c..0a8fb0db109bce9c47974020cc7d33a2499fc119 100644 (file)
@@ -83,8 +83,14 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode *node, GPUNodeStack
        Image *ima= (Image*)node->id;
        ImageUser *iuser= NULL;
 
-       if(!ima)
-               return 0;
+       if(!ima) {
+               float black[4] = {0.0f, 0.0f, 0.0f, 1.0f};
+               GPUNodeLink *vec = GPU_uniform(black);
+               return GPU_stack_link(mat, "set_rgba", out, out, vec);
+       }
+       
+       if(!in[0].link)
+               in[0].link = GPU_attribute(CD_MTFACE, "");
 
        return GPU_stack_link(mat, "node_tex_image", in, out, GPU_image(ima, iuser));
 }