diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-18 21:52:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-19 15:36:42 +0300 |
commit | 7aaa7aa9dd79b8c6e37f351fd67a93ba07fbb883 (patch) | |
tree | 6d64084b9b104ad3d9f2bbff2b3d0404ec356862 /intern/cycles/render/image.h | |
parent | 3b23b5c638feae0ad6319440771b83a64a1f9ebe (diff) |
Images: change alpha settings to support channel packing
This also replaces the Use Alpha setting. We now have these alpha modes:
* Straight: store RGB and alpha channels separately with alpha acting as a
mask, also known as unassociated alpha.
* Premultiplied: transparent RGB pixels are multiplied by the alpha channel.
The natural format for renders.
* Channel Packed: different images are packed in the RGB and alpha channels,
and they should not influence each other. Channel packing is commonly used
by game engines to save memory.
* None: ignore alpha channel from the file and make image fully opaque.
Cycles OSL does not correctly support Channel Packed and None yet, we are
missing fine control over the OpenImageIO texture cache to do that.
Fixes T53672
Diffstat (limited to 'intern/cycles/render/image.h')
-rw-r--r-- | intern/cycles/render/image.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h index 70d7fd3632d..ed2780f8471 100644 --- a/intern/cycles/render/image.h +++ b/intern/cycles/render/image.h @@ -83,7 +83,7 @@ class ImageManager { float frame, InterpolationType interpolation, ExtensionType extension, - bool use_alpha, + ImageAlphaType alpha_type, ustring colorspace, ImageMetaData &metadata); void add_image_user(int flat_slot); @@ -92,13 +92,13 @@ class ImageManager { void *builtin_data, InterpolationType interpolation, ExtensionType extension, - bool use_alpha, + ImageAlphaType alpha_type, ustring colorspace); void tag_reload_image(const string &filename, void *builtin_data, InterpolationType interpolation, ExtensionType extension, - bool use_alpha, + ImageAlphaType alpha_type, ustring colorspace); bool get_image_metadata(const string &filename, void *builtin_data, @@ -147,7 +147,7 @@ class ImageManager { ImageMetaData metadata; ustring colorspace; - bool use_alpha; + ImageAlphaType alpha_type; bool need_load; bool animated; float frame; |