[Bf-blender-cvs] [201badf] cycles-ptex-08: WIP tex image node
Nicholas Bishop
noreply at git.blender.org
Tue Jan 20 13:57:15 CET 2015
Commit: 201badf2e823411324e467179b1e81461daed38a
Author: Nicholas Bishop
Date: Tue Jan 20 12:55:15 2015 +0100
Branches: cycles-ptex-08
https://developer.blender.org/rB201badf2e823411324e467179b1e81461daed38a
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 &&
More information about the Bf-blender-cvs
mailing list