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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-22 21:34:06 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-22 21:34:06 +0400
commit3285d47842657161b2206ccb2b29f34ef51eab99 (patch)
treed57a4d3f4b24e875afacd8d82d6ff8ccf2d2f6cc /source/blender/render
parent6e62491c5a101ee36ec48db97e4a4f4945f5eada (diff)
Fix #32930: texture colors in material nodes (blender internal) are brighter than normal
There was a missing byte buffer linearization for shader nodes. Also fixed incorrect image input color space refresh when image is packed.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/render_texture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index dc99ee02a19..9cdf7da5a44 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1262,6 +1262,14 @@ int multitex_nodes(Tex *tex, float texvec[3], float dxt[3], float dyt[3], int os
do_2d_mapping(&localmtex, texvec_l, NULL, NULL, dxt_l, dyt_l);
rgbnor= multitex(tex, texvec_l, dxt_l, dyt_l, osatex, texres, thread, which_output);
+
+ {
+ ImBuf *ibuf = BKE_image_get_ibuf(tex->ima, &tex->iuser);
+
+ /* don't linearize float buffers, assumed to be linear */
+ if (ibuf && !(ibuf->rect_float) && R.scene_color_manage)
+ IMB_colormanagement_colorspace_to_scene_linear_v3(&texres->tr, ibuf->rect_colorspace);
+ }
}
return rgbnor;