[Bf-blender-cvs] [c2cdc67] master: Fix Cycles GLSL image texture node not respecting color space property.

Brecht Van Lommel noreply at git.blender.org
Wed Apr 27 00:26:47 CEST 2016


Commit: c2cdc673758039653db3d2035704858406e7b4ea
Author: Brecht Van Lommel
Date:   Wed Apr 27 00:23:05 2016 +0200
Branches: master
https://developer.blender.org/rBc2cdc673758039653db3d2035704858406e7b4ea

Fix Cycles GLSL image texture node not respecting color space property.

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

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 ac7a207..f0a8cda 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);
 	}




More information about the Bf-blender-cvs mailing list