Fix Cycles GLSL image texture node not respecting color space property.
This commit is contained in:
parent
2b3657a838
commit
c2cdc67375
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue