diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-22 21:34:06 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-22 21:34:06 +0400 |
commit | 3285d47842657161b2206ccb2b29f34ef51eab99 (patch) | |
tree | d57a4d3f4b24e875afacd8d82d6ff8ccf2d2f6cc /source/blender/imbuf | |
parent | 6e62491c5a101ee36ec48db97e4a4f4945f5eada (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/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_colormanagement.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h index 0653956e113..12f23e832c7 100644 --- a/source/blender/imbuf/IMB_colormanagement.h +++ b/source/blender/imbuf/IMB_colormanagement.h @@ -62,6 +62,8 @@ void IMB_colormanagement_check_is_data(struct ImBuf *ibuf, const char *name); void IMB_colormanagement_assign_float_colorspace(struct ImBuf *ibuf, const char *name); void IMB_colormanagement_assign_rect_colorspace(struct ImBuf *ibuf, const char *name); +int IMB_colormanagement_colorspace_is_data(const char *name); + /* ** Color space transformation functions ** */ void IMB_colormanagement_transform(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, int predivide); diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index ff474d85a8c..8cd2a707dd3 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1113,6 +1113,13 @@ void IMB_colormanagement_assign_rect_colorspace(ImBuf *ibuf, const char *name) ibuf->colormanage_flag &= ~IMB_COLORMANAGE_IS_DATA; } +int IMB_colormanagement_colorspace_is_data(const char *name) +{ + ColorSpace *colorspace = colormanage_colorspace_get_named(name); + + return colorspace->is_data; +} + /*********************** Threaded display buffer transform routines *************************/ typedef struct DisplayBufferThread { |