Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2016-04-28 18:33:19 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-04-28 18:33:19 +0300
commit1f723603c882e6d79ab69bea6e5c034ae21a6ce7 (patch)
tree098b0133beea06c460c3e9e92010bc669d151e5d /source/blender/nodes/shader/nodes/node_shader_tex_image.c
parent3632c4997f5019d2a519996d9e216d474aa05d3b (diff)
parenta48d7407986d04492107a2ef16d0ff6f0d012c45 (diff)
Merge branch 'master' into temp_remove_particlestemp_remove_particles
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_tex_image.c')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.c20
1 files changed, 9 insertions, 11 deletions
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 f87e792399b..f0a8cda045e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -60,7 +60,6 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode *node, bNodeExecDat
ImageUser *iuser = NULL;
NodeTexImage *tex = node->storage;
int isdata = tex->color_space == SHD_COLORSPACE_NONE;
- int ret;
if (!ima)
return GPU_stack_link(mat, "node_tex_image_empty", in, out);
@@ -70,19 +69,18 @@ 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));
+ 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 &&
- GPU_material_do_color_management(mat))
- {
- GPU_link(mat, "srgb_to_linearrgb", out[0].link, &out[0].link);
- }
- BKE_image_release_ibuf(ima, ibuf, NULL);
+ ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
+ if ((tex->color_space == SHD_COLORSPACE_COLOR) &&
+ ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
+ GPU_material_do_color_management(mat))
+ {
+ GPU_link(mat, "srgb_to_linearrgb", out[0].link, &out[0].link);
}
+ BKE_image_release_ibuf(ima, ibuf, NULL);
- return ret;
+ return true;
}
/* node type definition */