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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-04-27 01:23:05 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-04-27 01:26:06 +0300
commitc2cdc673758039653db3d2035704858406e7b4ea (patch)
tree56e47f757c6627a12b34a1e0f37f0a312eba33a6
parent2b3657a838fed826d29900bbf8824f909b9173bc (diff)
Fix Cycles GLSL image texture node not respecting color space property.
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.c5
1 files changed, 3 insertions, 2 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 ac7a2073845..f0a8cda045e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -72,8 +72,9 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode *node, bNodeExecDat
GPU_stack_link(mat, "node_tex_image", in, out, GPU_image(ima, iuser, isdata));
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))
+ 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);
}