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:
authorBrecht Van Lommel <brecht@blender.org>2022-07-18 18:31:19 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-18 18:40:48 +0300
commit8358cc79639c9ee797c5de9f5496032016e945d2 (patch)
tree64abe08c968b2e803e57e0684718e5ddd373403e /source/blender/imbuf/intern/colormanagement.c
parentcd21022b78fe48c16ab11d04682bb92271873a9c (diff)
Fix wrong alpha for scene linear byte images during texture painting
Make the update logic consistent with the case where the initial texture is created. Also fixes a wrong assert. Thanks Clément for spotting this.
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r--source/blender/imbuf/intern/colormanagement.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index b95ec1cd92b..b62bdd5521d 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -2213,10 +2213,11 @@ void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer,
const struct ImBuf *ibuf,
const bool store_premultiplied)
{
- /* Byte buffer storage, only for sRGB and data texture since other
+ /* Byte buffer storage, only for sRGB, scene linear and data texture since other
* color space conversions can't be done on the GPU. */
BLI_assert(ibuf->rect && ibuf->rect_float == NULL);
BLI_assert(IMB_colormanagement_space_is_srgb(ibuf->rect_colorspace) ||
+ IMB_colormanagement_space_is_scene_linear(ibuf->rect_colorspace) ||
IMB_colormanagement_space_is_data(ibuf->rect_colorspace));
const unsigned char *in_buffer = (unsigned char *)ibuf->rect;