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 <brechtvanlommel@gmail.com>2019-06-07 18:49:58 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-07 21:51:40 +0300
commitfb03f50e069d66c99391e4796e1b9eaa2b4cc133 (patch)
tree10c761cf548c6d4aa9160eed7c2798a96b798ccb /source/blender/imbuf/IMB_colormanagement.h
parentd05f27c7b95371db9e7e4e34a919a3623682a114 (diff)
Fix T64625: Eevee image textures with alpha have dark edges
Now texture storage of images is defined by the alpha mode of the image. The downside of this is that there can be artifacts near alpha edges where pixels with zero alpha bleed in. It also adds more code complexity since image textures are no longer all stored the same way. This changes allows us to keep using sRGB texture formats, which have edge darkening when stored with premultiplied alpha. Game engines seems to generally do the same thing, and we want to be compatible with them.
Diffstat (limited to 'source/blender/imbuf/IMB_colormanagement.h')
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index a27945cc369..b12339aef6d 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -129,13 +129,21 @@ void IMB_colormanagement_colorspace_to_scene_linear(float *buffer,
struct ColorSpace *colorspace,
bool predivide);
-void IMB_colormanagement_imbuf_to_srgb_texture(unsigned char *rect,
+void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer,
const int x,
const int y,
const int width,
const int height,
const struct ImBuf *ibuf,
- const bool compress_as_srgb);
+ const bool compress_as_srgb,
+ const bool store_premultiplied);
+void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer,
+ const int offset_x,
+ const int offset_y,
+ const int width,
+ const int height,
+ const struct ImBuf *ibuf,
+ const bool store_premultiplied);
void IMB_colormanagement_scene_linear_to_color_picking_v3(float pixel[3]);
void IMB_colormanagement_color_picking_to_scene_linear_v3(float pixel[3]);