diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-18 13:51:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-18 13:54:59 +0300 |
commit | 95a42ccf1c0fb7dff618bf99a1a6389f597479a5 (patch) | |
tree | 6a2ba16f941ef895d2dbc1bc2be04b681d5478d4 /source/blender/nodes | |
parent | 8a5effe967052038a0ca0a0eac5cf6d9d056aede (diff) |
Fix T64762: incorrect textures for non-color images with an alpha channel
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/node_shader_util.h | 3 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_image.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index 165ada05a56..a3c553b983b 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -60,8 +60,7 @@ #include "BLT_translation.h" -#include "IMB_imbuf_types.h" -#include "IMB_imbuf.h" +#include "IMB_colormanagement.h" #include "RE_pipeline.h" #include "RE_shader_ext.h" 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 924714e561a..a9183cd10ef 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c @@ -180,7 +180,8 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, } if (out[0].hasoutput) { - if (out[1].hasoutput) { + if (out[1].hasoutput && + !IMB_colormanagement_space_name_is_data(ima->colorspace_settings.name)) { GPU_link(mat, "tex_color_alpha_unpremultiply", out[0].link, &out[0].link); } else { |