Commit: b8e6fd9577225c6bb1192f5f7f1f536a672c6a8b
Author: Nicholas Bishop
Date:   Tue Jan 20 12:55:15 2015 +0100
Branches: cycles-ptex-12
https://developer.blender.org/rBb8e6fd9577225c6bb1192f5f7f1f536a672c6a8b

WIP tex image node

===================================================================

M       source/blender/nodes/shader/nodes/node_shader_tex_image.c

===================================================================

diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c 
b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
index 62db5b7..e982c35 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -70,8 +70,20 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode 
*node, bNodeExecDat
 
        node_shader_gpu_tex_mapping(mat, node, in, out);
 
-       ret = GPU_stack_link(mat, "node_tex_image", in, out, GPU_image(ima, 
iuser, isdata));
+       {
+               // TODO
+               ImBuf *ibuf2 = BKE_image_acquire_ibuf(ima, iuser, NULL);
+               if (ibuf2->num_ptex_coords) {
+                       ret = GPU_stack_link(mat, "node_tex_image", in, out,
+                                                                GPU_image(ima, 
iuser, isdata),
+                                                                
GPU_texture(-ibuf2->num_ptex_coords,
+                                                                               
         (float*)ibuf2->ptex_coords));
+               } else {
+                       ret = GPU_stack_link(mat, "node_tex_image", in, out,
+                                                                GPU_image(ima, 
iuser, isdata));
+               }
 
+       }
        if (ret) {
                ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
                if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) 
== 0 &&

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to