[Bf-blender-cvs] [0de3ca6] cycles-ptex-24: WIP tex image node

Nicholas Bishop noreply at git.blender.org
Fri Jan 30 18:00:27 CET 2015


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

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..121bf42 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_regions) {
+			ret = GPU_stack_link(mat, "node_tex_image", in, out,
+								 GPU_image(ima, iuser, isdata),
+								 GPU_texture(-ibuf2->num_ptex_regions,
+											 (float*)ibuf2->ptex_regions));
+		} 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